CN108959153B - All-in-one machine, data continuous transmission method, device, equipment and storage medium - Google Patents

All-in-one machine, data continuous transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN108959153B
CN108959153B CN201810863839.6A CN201810863839A CN108959153B CN 108959153 B CN108959153 B CN 108959153B CN 201810863839 A CN201810863839 A CN 201810863839A CN 108959153 B CN108959153 B CN 108959153B
Authority
CN
China
Prior art keywords
host unit
target data
data
host
storage device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810863839.6A
Other languages
Chinese (zh)
Other versions
CN108959153A (en
Inventor
路堃熙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810863839.6A priority Critical patent/CN108959153B/en
Publication of CN108959153A publication Critical patent/CN108959153A/en
Application granted granted Critical
Publication of CN108959153B publication Critical patent/CN108959153B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1443Transmit or communication errors

Abstract

The invention discloses an all-in-one machine, a data continuous transmission method, a device, equipment and a storage medium, and relates to the technical field of data transmission, wherein the data continuous transmission method comprises the following steps: acquiring storage information of target data currently transmitted between the mobile storage equipment and the first host unit; when the mobile storage equipment is switched to be connected with a second host unit, establishing data connection between the first host unit and the second host unit; continuing, by the second host unit, the transfer of the target data between the mobile storage device and the first host unit based on the storage information. The embodiment solves the problem that the original target data transmission is interrupted and cannot be recovered due to the switching of the data connection channel, and realizes the data continuous transmission of the target data between the original storage paths on the premise of not increasing the system cost.

Description

All-in-one machine, data continuous transmission method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data transmission, in particular to an all-in-one machine, a data continuous transmission method, a data continuous transmission device, data continuous transmission equipment and a storage medium.
Background
The existing dual-system tablet computer is connected to the corresponding host unit through the switching channel, so that data can be transmitted to the android host unit and data can also be transmitted to the computer host unit. However, in the practical process, the inventor finds that, if the user switches the channel when the mobile storage device transmits data to the host computer unit, the user connects the mobile storage device to the android host unit, and at this time, the data transmission process to the host computer unit is interrupted due to the switching of the channel, so that the data transmission to the host computer unit is interrupted, and the data transmission cannot be automatically recovered.
Disclosure of Invention
The invention provides an all-in-one machine, a data continuous transmission method, a data continuous transmission device, data continuous transmission equipment and a storage medium, which are used for realizing the data continuous transmission of target data among original storage paths on the premise of not increasing the system cost.
In a first aspect, an embodiment of the present invention provides an all-in-one machine, including: the device comprises a main chip, two host units, a USB selector switch and a USB interface;
the Host unit is respectively provided with a USB interface with Host function and is connected to the main chip through a USB;
the static end of the USB selector switch is connected with the USB interface;
the main chip is provided with an I/O port, is connected to the USB selector switch through the I/O port and is used for controlling the movable end of the USB selector switch to be connected with one of the two host units;
and the main chip is also used for establishing a new data connection through the switched connection relation to recover the transmission of the target data when the host unit and the USB interface are subjected to moving end switching in the process of transmitting the target data.
Further, at least one of the host units is an android host unit;
the android host unit is connected with the main chip through an SPI passage.
Further, the establishing of the new data connection through the switched connection relationship to recover the transmission of the target data includes:
and reestablishing new data connection according to the storage address and the data name of the target data.
In a second aspect, an embodiment of the present invention provides a method for data continuous transmission, where the method includes:
acquiring storage information of target data currently transmitted between the mobile storage equipment and the first host unit;
when the mobile storage equipment is switched to be connected with a second host unit, establishing data connection between the first host unit and the second host unit;
continuing, by the second host unit, the transfer of the target data between the mobile storage device and the first host unit based on the storage information.
In a third aspect, an embodiment of the present invention further provides a device for data continuous transmission, where the device includes:
the storage information acquisition module is used for acquiring the storage information of the target data currently transmitted between the mobile storage equipment and the first host unit;
the data connection establishing module is used for establishing data connection between the first host unit and a second host unit when the mobile storage device is switched to be connected with the second host unit;
and the target data continuous transmission module is used for continuously transmitting the target data between the mobile storage device and the first host unit through the second host unit based on the storage information.
In a fourth aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the data resuming method when executing the program.
In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for resuming data is implemented.
The method comprises the steps of acquiring storage information of target data currently transmitted between the mobile storage device and a first host unit; when the mobile storage equipment is switched to be connected with the second host unit, establishing data connection between the first host unit and the second host unit; the target data is continuously transmitted between the mobile storage device and the first host unit through the second host unit based on the storage information, the problem that the original target data cannot be recovered due to transmission interruption of the original target data caused by switching of data connection channels is solved, and data continuous transmission of the target data between the original storage paths is realized on the premise of not increasing the system cost.
Drawings
Fig. 1 is a schematic structural diagram of an all-in-one machine provided in an embodiment of the present invention;
fig. 2 is a flowchart of a data retransmission method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an all-in-one machine of an application data retransmission method according to a second embodiment of the present invention;
fig. 4 is a flowchart of a data resuming method according to a third embodiment of the present invention;
fig. 5 is a flowchart of a data resuming method according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data retransmission apparatus according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer device according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic structural diagram of an all-in-one machine provided in an embodiment of the present invention. As shown in fig. 1, the all-in-one machine includes: a main chip 10, two host units 20, a USB switch 30, and a USB interface 40.
The Host unit 20 is provided with a USB interface for Host function, and is connected to the main chip 10 through USB; the static end of the USB selector switch 30 is connected with the USB interface 40; the main chip 10 is provided with an I/O port, connected to the USB switch 30 through the I/O port, and configured to control the movable end of the USB switch 30 to be connected to one of the two host units 20; the main chip 10 is further configured to establish a new data connection through the switched connection relationship to resume transmission of the target data when the host unit 20 and the USB interface 40 perform end-to-end switching during transmission of the target data.
Specifically, the main chip 10 is an MCU (micro controller Unit, abbreviated as MCU in english), and a descriptor of a USB interface of the MCU, which serves as a Device function, is a standard touch protocol descriptor, so that a serial port transmission protocol does not need to be developed during transmission of touch data, and the touch data is not limited by a transmission bandwidth of a serial port, and has high stability and high transmission rate of the USB data.
Further, since the two Host units 20 in the all-in-one machine in this embodiment are both hardware Host systems, the USB attribute of each Host unit is Host, and the two devices with the attribute of Host cannot directly communicate with each other, if data is transmitted to the other Host unit 20 through one of the Host units 20, the Device requiring the main chip 10 as a Device function transfers data between the two Host units 20 to establish a communication connection between the two Host units, thereby completing data transmission.
The USB switch 30 has a static end and a dynamic end, the static end is connected to the USB interface 40, and the USB interface 40 is used for connecting an external mobile storage device. The main chip 10 is connected to the USB switch 30 through the I/O port, and controls the USB switch 30 to operate so that the USB switch 30 is connected to one of the two host units 20. For ease of explanation, the two host units 20 are a first host unit and a second host unit, respectively. The main chip 10 controls the USB switch 30 to connect with the first host unit, the mobile storage device transmits target data to the first host unit through the USB interface 40, and during the transmission of the target data, the main chip controls the USB switch to disconnect the data connection with the first host unit and establish the data connection with the second host unit, and at this time, the main chip 10 establishes a new data connection between the second host unit, the main chip and the first host unit according to the connection relationship between the switched second host unit and the USB interface 40 to recover the transmission of the target data.
It should be noted that, during the process of transmitting the target data through the newly established data connection between the second host unit, the host chip and the first host unit, if the host chip 10 controls the USB switch 30 to disconnect the data connection with the second host unit and resume the data connection with the first host unit, the target data in the mobile storage device is directly transmitted to the first host unit again to resume the transmission of the target data.
The all-in-one machine provided by the embodiment comprises a main chip, two main machine units, a USB (universal serial bus) selector switch and a USB interface; the Host unit is respectively provided with a USB interface with Host function and is connected to the main chip through a USB; the static end of the USB selector switch is connected with the USB interface; the main chip is provided with an I/O port, is connected to the USB selector switch through the I/O port and is used for controlling the movable end of the USB selector switch to be connected with one of the two host units; and the main chip is also used for establishing a new data connection through the switched connection relation to recover the transmission of the target data when the host unit and the USB interface are subjected to moving end switching in the process of transmitting the target data.
On the basis of the above embodiment, at least one of the first host unit and the second host unit is an android host unit; the android host unit is connected with the main chip through an SPI passage.
Because the USB communication transmission rate between the android host unit and the main chip is slow, preferably, an SPI passage can be added between the android host unit and the main chip to assist transmission. The abbreviation of SPI, Serial Peripheral Interface, is a Serial Peripheral Interface, which is a high-speed full-duplex synchronous communication bus. Specifically, the SPI communication link is used to transmit the storage information and the transmission status of the target data.
On the basis of the above embodiment, the establishing of a new data connection through the switched connection relationship to recover transmission of the target data includes: and reestablishing new data connection according to the storage address and the data name of the target data.
The storage address and the data name of the target data are contained in the storage path of the target data. The storage address of the target data comprises both the storage address in the removable storage medium and the storage address in the first host unit. Specifically, in the process of transmitting the target data stored in the mobile storage device to the first host unit through the USB switch, when the USB switch is switched from the currently connected first host unit to the second host unit, the host chip reestablishes a new data connection through the data name of the target data, the storage address in the mobile storage device, and the storage address on the first host unit, where the new data connection is: the mobile storage device-the USB switcher-the second host unit-the main chip-the first host unit to resume the transmission of the target data.
The all-in-one machine can further comprise: the android mainboard is connected with the touch frame through a USB and used for driving the touch frame to perform touch action detection and screen display.
The all-in-one machine can also comprise a key module, an infrared remote control module, a channel switching module and a power control module, wherein one end of the main chip is connected with an android main board through a USB, and the other end of the main chip is connected with the key module, the infrared remote control module, the channel switching module and the power control module through a GPIO. The all-in-one machine integrates the display functions of a plurality of display channels, and can realize the setting and control of various functions among the plurality of display channels through the key module, the infrared remote control module, the channel switching module and the power control module.
Example two
Fig. 2 is a flowchart of a data resuming method according to a second embodiment of the present invention, where the data resuming method is executed by a data resuming device, and the data resuming device may be formed by two or more physical entities. The data continuous transmission device may be an all-in-one machine in the above embodiment, and specifically, may be an intelligent interactive tablet. The present embodiment is applicable to a data resume situation after a mobile storage device transmits data to a host unit in the device after a data interruption, and the method may be executed by a device configured to implement data resume by hardware and/or software, and specifically includes the following steps:
s110, acquiring storage information of target data currently transmitted between the mobile storage device and the first host unit.
The first host unit comprises a computer host unit or an android host unit; the mobile storage device comprises a U disk, a mobile hard disk and the like. The mobile storage device is connected to the first host unit through the USB interface and the USB switch, and transmits target data between the first host units. In the process of the target data transmission, the storage information of the target data currently transmitted between the mobile storage device and the first host unit is obtained. The storage information may include a storage path of the target data in the mobile storage device or the first host unit, and specifically, the storage path includes a data name corresponding to the target data.
The transmission of the target data between the mobile storage device and the first host unit can be divided into two cases, the first case is that the target data is stored in the mobile storage device in advance, the target data is transmitted to the first host unit, at this time, a storage path of the target data in the mobile storage device and a transmission path for transmitting the target data to the first host unit are obtained, a data name corresponding to the target data can be known according to the storage path of the target data in the mobile storage device, and the storage path of the target data in the first host unit can be inquired according to the transmission path; the second case is that the target data is pre-stored in the first host unit, the target data is transmitted to the mobile storage device, at this time, a storage path of the target data in the first host unit and a transmission path for transmitting the target data to the mobile storage device are obtained, a data name corresponding to the target data can be known according to the storage path of the target data in the first host unit, and the storage path of the target data in the mobile storage device can be inquired according to the transmission path.
S120, when the mobile storage device is switched to be connected with a second host unit, establishing data connection between the first host unit and the second host unit.
Wherein, the second host computer unit includes computer host unit or tall and erect host computer unit of ann, and first host computer unit and second host computer unit all set up in the inside of same equipment, and this equipment can be the panel computer. In the process of transmitting target data between the mobile storage device and the first host unit, the USB transfer switch switches the data channel to enable the mobile storage device to be connected with the second host unit, and when the connection between the mobile storage device and the first host unit is interrupted, if the target data transmission between the mobile storage device and the first host unit is not completed, the data connection between the first host unit and the second host unit is established after the data connection between the mobile storage device and the second host unit is established. The target data transmission between the mobile storage device and the first host unit may be the target data transmission stored in the mobile device to the first host unit, or the target data transmission stored in the first host unit to the mobile storage device. The first host unit and the second host unit may be the same host unit or different host units. The first host unit and the second host unit may establish a data connection directly or indirectly.
S130, the target data is continuously transmitted between the mobile storage device and the first host unit through the second host unit based on the storage information.
After the first host unit and the second host unit establish data connection, the first host unit sends storage information of target data which is not transmitted to the second host unit, and the second host unit sends a command for data transmission to the mobile storage device directly connected with the second host unit according to the received storage information, and continues to transmit the data of the target data between the mobile storage device and the first host unit. Further, the continuing of the transmission of the target data between the mobile storage device and the first host unit by the second host unit may be resuming the transmission of the target data, that is, resuming the transmission of the data regardless of the amount of the target data transmitted before the interruption, or continuing the transmission based on the target data transmission before the interruption. In the present embodiment, the former is explained as an example.
The working principle of the data continuous transmission method is as follows: a dual-host system is arranged in the tablet personal computer and respectively comprises a first host unit and a second host unit. The first host unit and the second host unit switch data channels with an external storage device through a USB (universal serial bus) selector switch, and the external storage device can be a mobile storage device. When the mobile storage device switches a data channel through the USB switch, the mobile storage device is connected to the first host unit, and performs target data transmission between the mobile storage device and the first host unit, to obtain storage information of target data of current data transmission between the mobile storage device and the first host unit, where the storage information may be a storage path of the target data in the mobile storage device. When the target data is transmitted from the mobile storage device to the first host unit, inquiring the name of the target data, the storage address of the target data stored in the mobile storage device and the storage address of the target data to be stored in the first host unit according to the storage information; when the target data is transmitted from the first host unit to the mobile storage device, the name of the target data, the storage address of the target data stored in the first host unit and the storage address of the target data to be stored in the mobile storage device are inquired according to the storage information.
When the mobile storage device and the first host unit switch the data channel to be connected with the second host unit due to the USB transfer switch in the process of transmitting the target data, the data connection between the mobile storage device and the first host unit is cut off, and the data transmission is interrupted. When the transmission of the target data between the first host unit and the mobile storage device needs to be continued, after the mobile storage device establishes a data connection with the second host unit, the first host unit actively establishes a data connection to the second host unit, and sends storage information to the second host unit to request to continue the data transmission of the target data between the mobile storage device and the first host unit through the second host unit, where the data transmission may be the transmission of data from the mobile storage device to the first host unit through the second host unit, or the transmission of data from the first host unit to the mobile storage device through the second host unit. The data connection between the first host unit and the second host unit may be directly established between the first host unit and the second host unit, or indirectly established through a third unit.
It should be noted that, directly establishing data connection between the first host unit and the second host unit requires higher configuration requirements of the first host unit and the second host unit to ensure the data continuous transmission speed of the first host unit and the second host unit, so that the cost is increased due to the higher assembly configuration of the first host unit and the second host unit; if the first host unit and the second host unit are adopted to indirectly establish data connection through the original third unit in the device, the data transmission speed is ensured, and meanwhile, the cost of the system is not increased.
According to the technical scheme of the embodiment, the storage information of the target data currently transmitted between the mobile storage device and the first host unit is acquired; when the mobile storage equipment is switched to be connected with the second host unit, establishing data connection between the first host unit and the second host unit; the target data is continuously transmitted between the mobile storage device and the first host unit through the second host unit based on the storage information, the problem that the original target data cannot be recovered due to transmission interruption of the original target data caused by switching of data connection channels is solved, and data transmission of the target data between original storage paths is continued on the premise of not increasing system cost.
On the basis of the foregoing embodiment, when the mobile storage device is switched to connect with a second host unit, the establishing of the data connection between the first host unit and the second host unit specifically includes: when the mobile storage device is switched to be connected with a second host unit, a first data connection between the first host unit and a main chip and a second data connection between the second host unit and the main chip are established, and the data connection between the first host unit and the second host unit is established through the first data connection and the second data connection.
The first host unit, the second host unit and the main chip are all units integrated in the same device, and the main chip is preferably a chip unit originally existing in the device and can also be a newly added chip unit. When a direct data channel between the mobile storage device and the first host unit is cut off, the mobile storage device is switched to be connected with the second host unit, if target data transmission between the mobile storage device and the first host unit is not finished, a first data connection is established between the first host unit and the main chip, a second data connection is established between the second host unit and the main chip, the main chip serves as an intermediate medium between the first host chip and the second host chip to indirectly establish the data connection, and a data transmission channel is established between the mobile storage device and the first host unit through 'first data connection-main chip-second data connection'. The first data connection and the second data connection can establish data connection in a wired mode such as a USB line and the like, and can also establish data connection in a wireless mode.
On the basis of the foregoing embodiment, the first host unit is a computer host unit, the second host unit is an android host unit, and when the mobile storage device is switched to the second host unit for connection, the data connection between the first host unit and the second host unit is established, which specifically further includes: and establishing SPI communication connection between the second host unit and the main chip, wherein the SPI communication connection is used for transmitting the storage information and the transmission state of the target data.
When the second host is the android host unit, the transmission rate of the USB data path between the second host unit and the main chip is slower, so that besides the USB data path, SPI communication connection is added between the second host unit and the main chip to assist transmission. SPI is a synchronous serial data bus with a simple protocol, and has a low transmission rate compared to the USB data path, which is only a few megabbps. The SPI is used to transmit information with a small data amount and low requirement, such as storage information and transmission state of target data. The storage information of the target data comprises the name of the target data and the storage path of the target data in the mobile storage device and the first host unit.
The following describes an exemplary embodiment of the present invention:
fig. 3 is a schematic structural diagram of an all-in-one machine of the application data retransmission method according to the second embodiment of the present invention. As shown in fig. 3, the mobile storage device is connected to the all-in-one machine through the USB interface 40, and selectively connected to the computer host unit 201 or the android host unit 202 through the USB switch 30. In this example, the mobile storage device initially establishes a data connection with the computer main unit 201 through the USB switch 30, and data copying is performed on the mobile storage device through a computer path between the USB switch 30 and the computer main unit 201. In the data copying process, the computer host unit 201 captures the target data in the removable storage device in real time, and knows the storage path of the target data in the removable storage device, the transmission path between the removable storage device and the computer host unit 201, and the transmission state on the computer channel. The storage path comprises a storage address and a data name of the target data in the mobile storage device, the transmission path comprises a storage address of the target data in the host computer unit, and the transmission state in the computer channel refers to whether the host computer unit copies the target data.
The computer host unit 201 transmits the acquired transmission state to the main chip 10 through the USB data path, and the main chip 10 can know whether the computer host unit 201 copies the target data of the mobile storage device in real time. If the data transmission channel is switched during the process of copying the target data, the USB switch 30 interrupts the data connection with the computer host unit 201, and establishes the data connection with the android host unit 202. At this time, the main chip 10 determines whether the computer host unit 201 is copying the mobile storage device, and if so, a series of actions of data continuous transmission are started, that is, a first data connection between the main chip 10 and the computer host unit 201, a second data connection between the main chip 10 and the android host unit 202 are established, and data transmission is performed again on the target data through the first data connection and the second data connection.
The main chip 10 acquires, from the computer host unit 201 via USB, storage information of target data currently transferred between the mobile storage device and the computer host unit 201, the storage information including a storage path of the target data in the mobile storage device and a storage path copied to the computer host unit 201, the storage path including a data name of the target data and a storage address in the mobile storage device, and the transfer path including a storage path of the target data copied to the computer host unit 201. The data connection between the main chip 10 and the android host unit 202 includes a USB data path and an SPI path, the USB data path is used for transmitting target data, and the SPI path is used for transmitting storage information and a transmission state of the target data.
The main chip 10 informs the android host unit 202 of the need to start the data continuous transmission function and the storage information of the target data to be transmitted through the SPI channel, and the data name of the target data, the storage path of the target data in the mobile storage device and the storage path of the target data in the host computer module can be known according to the storage information. The android host unit 202 reads target data of the mobile storage device connected with the android host unit 202 according to the information transmitted by the main chip 10, and transmits the target data to the main chip 10 through the USB data path, and the main chip 10 acquires the target data transmitted from the android host unit 202 and transmits the target data to the computer host unit 201 through the USB data path.
EXAMPLE III
Fig. 4 is a flowchart of a data resuming method according to a third embodiment of the present invention, which is embodied on the basis of the second embodiment. The method is suitable for a case where target data is stored in the mobile storage device and the target data is transmitted from the mobile storage device to the first host unit, where the storage information is a storage path of the target data in the mobile storage device and the first host unit, and as shown in fig. 4, the method specifically includes:
step S310, obtaining the storage information of the target data currently transmitted between the mobile storage device and the first host unit.
The mobile storage device is connected to the first host unit through the USB transfer switch switching data channel and transmits target data to the first host unit. In the process of the target data transmission, the storage information of the target data currently transmitted between the mobile storage device and the first host unit is obtained. The storage information may be a storage path of the target data in the mobile storage device, and a data name corresponding to the target data, a storage address where the target data is stored in the mobile storage device, and a storage address where the target data is to be sent to the first host unit are queried according to the storage information.
Step S320, when the mobile storage device is switched to connect with a second host unit, establishing a first data connection between the first host unit and a host chip and a second data connection between the second host unit and the host chip, and establishing a data connection between the first host unit and the second host unit through the first data connection and the second data connection.
When the transmission of the target data to the first host unit is not completed, the USB transfer switch switches the data channel so that the mobile storage device is connected with the second host unit, and the transmission process of the target data between the mobile storage device and the first host unit is interrupted. At this time, if it is necessary to continue transmitting the target data to the first host unit, a first data connection is established between the first host unit and the main chip, a second data connection is established between the second host unit and the main chip, the main chip serves as an "intermediate medium" to indirectly establish a data connection between the first host chip and the second host chip, and the target data continues to be transmitted between the mobile storage device and the first host unit through a data path of "the first host unit, the main chip, and the second host unit".
Step S330, sending the storage information to the second host unit, so that the second host unit reads the target data from the mobile storage device according to the storage information, and transmits the target data to the first host unit.
And inquiring the name of the target data which is not transmitted, the address of the target data stored in the mobile storage device and the storage address of the target data to be stored in the first host unit according to the storage information. The second host unit receives the storage information, reads the target data stored in the mobile storage device according to the storage information and sends the target data to the main chip; the main chip receives the target data and forwards the target data to the first host unit, and the first host unit receives the target data and stores the target data in an original storage path of the target data. The data continuous transmission can be all retransmission, and covers the previous target data; or the transmission may continue at the interrupted target data location. In addition, in the data transmission process, the current data transmission state is correspondingly displayed on the screen. For example, the progress of transmission completion is displayed, and if the data transmission is retransmitted, the progress bar of the data transmission is redisplayed from the beginning; if the transmission is continued at the target data location of the interruption, the data transmission may be prompted to be interrupted and resumed.
According to the technical scheme of the embodiment, the storage information of the target data currently transmitted between the mobile storage device and the first host unit is acquired; when the mobile storage equipment is switched to be connected with the second host unit, establishing data connection between the first host unit and the second host unit; and sending the storage information to the second host unit so that the second host unit reads the target data from the mobile storage device according to the storage information and transmits the target data to the first host unit, thereby solving the problem that the original target data transmission is interrupted and cannot be recovered due to switching of a data connection channel in the process of transmitting the target data to the first host unit when the target data is stored in the mobile storage device, and realizing the data continuous transmission of the target data between original storage paths on the premise of not increasing the system cost.
Example four
Fig. 5 is a flowchart of a data resuming method according to a fourth embodiment of the present invention, where the method is applied to a case where target data is stored in a first host unit and the target data is transmitted from the first host unit to a mobile storage unit, and as shown in fig. 5, the method specifically includes:
s410, acquiring storage information of target data currently transmitted between the mobile storage device and the first host unit.
The mobile storage device is connected to the first host unit through the USB switch, and the first host unit transmits target data to the mobile storage device through the data channel. In the process of the target data transmission, the storage information of the target data currently transmitted between the mobile storage device and the first host unit is obtained. The storage information may be a storage path of the target data in the mobile storage device, and a data name corresponding to the target data, a storage address where the target data is stored in the first host unit, and a storage address where the target data is to be sent to the mobile storage device are queried according to the storage information.
S420, when the mobile storage device is switched to be connected with a second host unit, establishing a first data connection between the first host unit and a main chip and a second data connection between the second host unit and the main chip, and establishing a data connection between the first host unit and the second host unit through the first data connection and the second data connection.
When the target data transmission from the first host unit to the mobile storage device is not completed, the USB transfer switch switches the data channel to connect the mobile storage device with the second host unit, and the target data transmission process between the mobile storage device and the first host unit is interrupted. At this time, if it is necessary to continue to transmit target data to the mobile storage device, a first data connection is established between the first host unit and the host chip, a second data connection is established between the second host unit and the host chip, the host chip serves as an "intermediate medium" to indirectly establish a data connection between the first host chip and the second host chip, and the target data is continuously transmitted between the mobile storage device and the first host unit through a data path of "the first host unit, the host chip, and the second host unit".
S430, sending the storage information to the second host unit, so that the second host unit reads the target data from the mobile storage device according to the storage information, and transmits the target data to the first host unit.
And at the moment, the first host unit sends storage information to the second host unit, wherein the storage information comprises the name of the target data which is not transmitted completely, the storage address of the target data stored in the first host unit and the storage address of the target data to be stored in the mobile storage device. The first host unit sends target data to the main chip, and the main chip receives the target data and forwards the target data to the second host unit; the second host unit transmits the received target data to the original storage path of the target data in the mobile storage device according to the storage information. The data continuous transmission can be all retransmission, and covers the previous target data; or the transmission may continue at the interrupted target data location. In addition, in the data transmission process, the current data transmission state is correspondingly displayed on the screen. For example, the progress of transmission completion is displayed, and if the data transmission is retransmitted, the progress bar of the data transmission is redisplayed from the beginning; if the transmission is continued at the target data location of the interruption, the data transmission may be prompted to be interrupted and resumed.
According to the technical scheme of the embodiment, the storage information of the target data currently transmitted between the mobile storage device and the first host unit is acquired; when the mobile storage equipment is switched to be connected with the second host unit, establishing data connection between the first host unit and the second host unit; and sending the storage information and the target data stored by the first host unit to the second host unit so that the second host unit transmits the target data to a storage path corresponding to the storage information, thereby solving the problem that the original target data cannot be recovered due to interruption of transmission of the original target data caused by switching of data connection channels in the process of transmitting the target data to the mobile storage device when the target data is stored in the first host unit, and realizing continuous data transmission of the target data between the original storage paths without increasing the system cost.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a data retransmission apparatus according to a fifth embodiment of the present invention, and as shown in fig. 4, the apparatus specifically includes: a storage information acquisition module 510, a data connection establishment module 520, and a target data retransmission module 530.
The storage information obtaining module 510 is configured to obtain storage information of target data currently transmitted between the mobile storage device and the first host unit;
a data connection establishing module 520, configured to establish a data connection between the first host unit and a second host unit when the mobile storage device is switched to connect with the second host unit;
a target data resuming module 530, configured to resume, by the second host unit, transmission of the target data between the mobile storage device and the first host unit based on the storage information.
In the technical solution of this embodiment, the storage information of the target data currently transmitted between the mobile storage device and the first host unit is acquired by the storage information acquisition module 510, and the data connection between the first host unit and the second host unit is established by the data connection establishment module 520 when the mobile storage device is switched to be connected to the second host unit, and the target data continuous transmission module 530 continues to transmit the target data between the mobile storage device and the first host unit through the second host unit based on the storage information, so as to solve the problem that the original target data transmission is interrupted and cannot be recovered due to the switching of the data connection channel, thereby implementing the data continuous transmission of the target data between the original storage paths without increasing the system cost.
Further, the data connection establishing module 520 is specifically configured to: when the mobile storage device is switched to be connected with a second host unit, a first data connection between the first host unit and a main chip and a second data connection between the second host unit and the main chip are established, and the data connection between the first host unit and the second host unit is established through the first data connection and the second data connection.
Further, if the target data is stored in the mobile storage device, and the storage information is a storage path of the target data in the mobile storage device, at this time, the target data resuming module 530 is specifically configured to: and sending the storage information to the second host unit so that the second host unit reads the target data from the mobile storage device according to the storage information and transmits the target data to the first host unit.
Further, if the target data is stored in the first host unit, and the storage information is a storage path of the target data in the mobile storage device, at this time, the target data resuming module 530 specifically includes: and sending the storage information and the target data stored by the first host unit to the second host unit so as to enable the second host unit to transmit the target data to a storage path corresponding to the storage information.
The data continuous transmission device can execute the data continuous transmission method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 7 is a schematic structural diagram of a computer device according to a sixth embodiment of the present invention. Fig. 7 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 7 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 7, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, and commonly referred to as a "hard drive"). Although not shown in FIG. 7, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the device 12 via the bus 18. It should be appreciated that although not shown in FIG. 7, other hardware and/or software modules may be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a data resuming method provided by the embodiment of the present invention:
that is, the processing unit implements, when executing the program: acquiring storage information of target data currently transmitted between the mobile storage equipment and the first host unit; when the mobile storage equipment is switched to be connected with a second host unit, establishing data connection between the first host unit and the second host unit; continuing, by the second host unit, the transfer of the target data between the mobile storage device and the first host unit based on the storage information.
EXAMPLE six
A sixth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for resuming data, as provided in all inventive embodiments of the present application:
that is, the program when executed by the processor implements: acquiring storage information of target data currently transmitted between the mobile storage equipment and the first host unit; when the mobile storage equipment is switched to be connected with a second host unit, establishing data connection between the first host unit and the second host unit; continuing, by the second host unit, the transfer of the target data between the mobile storage device and the first host unit based on the storage information.
An embodiment of the present invention provides a computer-readable storage medium that can adopt any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (14)

1. An all-in-one machine, comprising: the device comprises a main chip, two host units, a USB selector switch and a USB interface;
the Host unit is respectively provided with a USB interface with a Host function and is connected to the main chip through the USB interface with the Host function;
the static end of the USB selector switch is connected with the USB interface;
the main chip is provided with an I/O port, is connected to the USB selector switch through the I/O port and is used for controlling the movable end of the USB selector switch to be connected with one of the two host units;
and the main chip is also used for establishing a new data connection through the switched connection relation to recover the transmission of the target data when the host unit and the USB interface are subjected to moving end switching in the process of transmitting the target data.
2. The all-in-one machine of claim 1, wherein at least one of the host units is an android host unit;
the android host unit is connected with the main chip through an SPI passage.
3. The all-in-one machine of claim 1, wherein the establishing of the new data connection through the switched connection relationship to resume transmission of the target data comprises:
and reestablishing new data connection according to the storage address and the data name of the target data.
4. A method for data retransmission, comprising:
acquiring storage information of target data currently transmitted between the mobile storage equipment and the first host unit;
when the mobile storage equipment is switched to be connected with a second host unit, establishing data connection between the first host unit and the second host unit;
continuing, by the second host unit, the transfer of the target data between the mobile storage device and the first host unit based on the storage information.
5. The method of claim 4, wherein the target data is stored in the mobile storage device, and the storage information is a storage path of the target data in the mobile storage device and the first host unit;
the continuing of the transmission of the target data between the mobile storage device and the first host unit through the second host unit based on the storage information specifically includes:
and sending the storage information to the second host unit so that the second host unit reads the target data from the mobile storage device according to the storage information and transmits the target data to the first host unit.
6. The method of claim 4, wherein the target data is stored in the first host unit, and the storage information is a storage path of the target data in the mobile storage device and the first host unit;
the continuing of the transmission of the target data between the mobile storage device and the first host unit through the second host unit based on the storage information specifically includes:
and sending the storage information and the target data stored by the first host unit to the second host unit so as to enable the second host unit to transmit the target data to a storage path corresponding to the storage information.
7. The method according to claim 4, wherein when the mobile storage device is switched to connect with a second host unit, the establishing of the data connection between the first host unit and the second host unit is specifically:
when the mobile storage device is switched to be connected with a second host unit, a first data connection between the first host unit and a main chip and a second data connection between the second host unit and the main chip are established, and the data connection between the first host unit and the second host unit is established through the first data connection and the second data connection.
8. The method according to claim 4, wherein when the mobile storage device switches to connect with a second host unit, the establishing of the data connection between the first host unit and the second host unit is specifically:
and when the mobile storage equipment is switched to be connected with a second host unit, if the target data transmission is not finished, establishing data connection between the first host unit and the second host unit.
9. The method of claim 7, wherein the first host unit is a computer host unit and the second host unit is an android host unit;
when the mobile storage device is switched to be connected with a second host unit, establishing a data connection between the first host unit and the second host unit includes:
and establishing SPI communication connection between the second host unit and the main chip, wherein the SPI communication connection is used for transmitting the storage information and the transmission state of the target data.
10. An apparatus for data retransmission, comprising:
the storage information acquisition module is used for acquiring the storage information of the target data currently transmitted between the mobile storage equipment and the first host unit;
the data connection establishing module is used for establishing data connection between the first host unit and a second host unit when the mobile storage device is switched to be connected with the second host unit;
and the target data continuous transmission module is used for continuously transmitting the target data between the mobile storage device and the first host unit through the second host unit based on the storage information.
11. The apparatus of claim 10, wherein the target data is stored in the removable storage device, and the storage information is a storage path of the target data in the removable storage device and the first host unit;
the target data resuming module is specifically configured to send the storage information to the second host unit, so that the second host unit reads the target data from the mobile storage device according to the storage information, and transmits the target data to the first host unit.
12. The apparatus of claim 10, wherein the target data is stored in the first host unit, and the storage information is a storage path of the target data in the mobile storage device and the first host unit;
the target data continuous transmission module is specifically configured to send the storage information and the target data stored by the first host unit to the second host unit, so that the second host unit transmits the target data to a storage path corresponding to the storage information.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements a method of data retransmission as claimed in any one of claims 4-9.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of data retransmission according to any one of claims 4-9.
CN201810863839.6A 2018-08-01 2018-08-01 All-in-one machine, data continuous transmission method, device, equipment and storage medium Active CN108959153B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810863839.6A CN108959153B (en) 2018-08-01 2018-08-01 All-in-one machine, data continuous transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810863839.6A CN108959153B (en) 2018-08-01 2018-08-01 All-in-one machine, data continuous transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108959153A CN108959153A (en) 2018-12-07
CN108959153B true CN108959153B (en) 2021-04-06

Family

ID=64465319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810863839.6A Active CN108959153B (en) 2018-08-01 2018-08-01 All-in-one machine, data continuous transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108959153B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114201428A (en) * 2020-09-18 2022-03-18 高创(苏州)电子有限公司 Electronic device and USB interface switching method
CN112509608B (en) * 2020-11-25 2022-03-08 广州朗国电子科技股份有限公司 Method and device for recording sound along with channel of USB (Universal Serial bus) equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105122226A (en) * 2013-03-15 2015-12-02 美光科技公司 Systems and methods for memory system management based on thermal information of a memory system

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5925140A (en) * 1993-04-30 1999-07-20 Intel Corporation Apparatus and method for error free loading of a programmable non-volatile memory over a datalink
KR100644596B1 (en) * 2000-07-27 2006-11-10 삼성전자주식회사 Bus system and bus arbitration method thereof
CN1294504C (en) * 2004-03-18 2007-01-10 上海交通大学 Data separation switching transmitting method based on USB bus
KR100748554B1 (en) * 2005-07-26 2007-08-10 삼성전자주식회사 Universal serial bus host, universal serial bus system and method of driving the same
CN103390137B (en) * 2013-07-30 2016-09-21 东莞宇龙通信科技有限公司 A kind of terminal
CN103888336A (en) * 2014-02-28 2014-06-25 广州视睿电子科技有限公司 Networking method of multi-system all-in-one machine and multi-system all-in-one machine
KR101850175B1 (en) * 2014-05-13 2018-04-18 엘에스산전 주식회사 Expansion Module for Programmable Logic Controller using USB Communication
CN105224483B (en) * 2014-06-11 2019-11-12 西安中兴新软件有限责任公司 Data transmission method, electronic equipment and universal serial bus device
CN104834620B (en) * 2015-04-29 2018-07-31 北京小鸟看看科技有限公司 Serial peripheral equipment interface SPI bus circuit, implementation method and electronic equipment
CN106850161A (en) * 2016-12-20 2017-06-13 广州视源电子科技股份有限公司 A kind of dual system all-in-one and its communication means with touch screen functionality
CN107846309A (en) * 2017-10-20 2018-03-27 深圳益邦阳光有限公司 Suspension data forward method, electronic equipment and storage medium based on remote monitoring

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105122226A (en) * 2013-03-15 2015-12-02 美光科技公司 Systems and methods for memory system management based on thermal information of a memory system

Also Published As

Publication number Publication date
CN108959153A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN109819493B (en) Control method, screen projection method and device, storage medium and electronic equipment
CN100410869C (en) Computer switch and a computer switching method
KR101280695B1 (en) Message passing framework for audio/video streaming in a topology of devices
WO2020034893A1 (en) Intelligent interaction system, writing track display method and device, tablet and medium
KR101251250B1 (en) System for performing remote control using remote device driver and method for performing the same
CN104618793A (en) Information processing method and electronic equipment
JP2006072962A (en) Control system for controlling a plurality of target computers
CN108959153B (en) All-in-one machine, data continuous transmission method, device, equipment and storage medium
CN103995567A (en) Double-system intelligent interaction all-in-one machine and double-system switching method thereof
EP3026530A1 (en) Keyboard-video-mouse switch and operating method thereof
CN110784533A (en) Communication method, communication device, relay module, control terminal, and storage medium
US8407390B2 (en) Method and apparatus for data processing
US20150256446A1 (en) Method and apparatus for relaying commands
CN113253877B (en) Electronic whiteboard system and control method thereof
JP2012113565A (en) Network device, network system, and control method of network device
CN109413180B (en) Data acquisition method, system and equipment and storage medium
CN113660123B (en) Virtual switch upgrading method, device, electronic equipment and storage medium
CN113434089B (en) Data moving method and device and PCIE system
US10320663B2 (en) Communication device, communication system, and computer program product for performing interactive communication via relay servers
CN112769196B (en) Charging control method and device, electronic equipment and charger
CN112839194A (en) Method, device, all-in-one machine and storage medium for sharing camera under dual systems
WO2020220969A1 (en) Intelligent interactive device and control method therefor
WO2019015089A1 (en) Control method, device and apparatus for global menu, and storage medium
CN103353856A (en) Hard disk and method for forwarding and obtaining hard disk data
JPS62121562A (en) Data communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant