Realize the method for safety unloading mobile electronic device
[affiliated technical field]
The present invention relates to a kind of method that realizes safety unloading mobile electronic device, particularly a kind of method that realizes safety unloading mobile electronic device by button.
[background technology]
Development along with technology, most mobile electronic device carries out communication (by computer Recognition is USB MASSSTORAGE DEVICE) with computing machine with USB MASS STORAGE agreement by USB interface and is connected, and mobile electronic device comprises electronic equipments such as portable hard drive, digital camera companion, audio/video player, USB flash disk.Mobile electronic device is with after USB interface of computer is connected, this moment system the display window in the screen lower right corner in the connection icon of a green arrow sign can appear.For safety unloading mobile electronic device, usually, the user uses mobile electronic device need disconnect with being connected of computing machine the time, at first, the connection icon in this screen lower right corner in the point, hit right mouse button or double-click, system can eject the affirmation frame of safety unloading automatically, deletes this mobile electronic device by the prompting step and can finish safe unloading.But, the safety unloading of carrying out set by step needs the user repeatedly to click the mouse or knocks keyboard, need the user to judge and select and finally to finish, wherein might be owing to the faulty operation that the user occurs, and the operation of artificial complicated safety unloading, also can increase the time of unloading simultaneously, so just can not satisfy the unloading demand that the user requires safe and convenient.
In addition, when the user uses mobile electronic device, show that demonstration finishes on the screen though sometimes can occurring reads and writes data, but reality is still being carried out read-write operation to mobile electronic device, at this moment, if the user does not click the connection icon in the screen lower right corner and unloads, and direct mobile electronic device under the hot plug from the computing machine.Like this, just cause losing of data easily, can occur the FAT table under the serious situation and damage, subregion can't be discerned, even damages mobile electronic device.
[summary of the invention]
Technical matters solved by the invention provides a kind of safety to realize the method for safety unloading mobile electronic device, be convenient to mobile electronic device when being connected with computing machine, can disconnect being connected of mobile electronic device and computing machine safely, safety unloading mobile electronic device is guaranteed safety of data transmission.
Technical scheme of the present invention is as follows:
A kind of method that realizes safety unloading mobile electronic device is characterized in that, may further comprise the steps:
1), computing machine receives the data message that mobile electronic device sends over;
2), computing machine judges whether the data message that receives includes safe unloading command, and when not having safe unloading command, mobile electronic device normally uses; When the safety unloading command, judged whether that further data are just carrying out data interaction between computing machine and mobile electronic device;
3), when data are carried out data interaction between computing machine and mobile electronic device, then central processing unit (CPU) generates the feedback command that cannot unload safely and sends, when not having data to carry out data interaction between computing machine and mobile electronic device, central processing unit (CPU) generates the feedback command that can unload safely and sends;
4), receive feedback command this feedback command fed back to the user, remind the user whether can unload mobile electronic device safely.
The present invention also further provides the described method that realizes safety unloading mobile electronic device, in described step 2) judged whether that further data are just carrying out data interaction between computing machine and mobile electronic device, this judgement is to monitor data interaction situation between computer interface unit and the controller in the mode of Fixed Time Interval poll, when having listened to data when between this interface unit and this controller, carrying out data interaction, just send the monitoring information that has data interaction carrying out to central processing unit, safe unloading command information in the data that the computing machine that the central processing unit basis receives sends over sends generation to feedback unit and shows the feedback command that can not unload safely.
The present invention also further provides the method that realizes safety unloading mobile electronic device, described step 2) judged whether that further data are just carrying out data interaction between computing machine and mobile electronic device, receive the monitoring information that data interaction is arranged of report when the central processing unit of computing machine, then central processing unit sends to described monitoring unit and monitors instruction, after monitoring unit receives and monitors instruction, data interaction situation between computer interface unit and the controller is monitored, when data are carried out data interaction between this interface unit and this controller, just send the monitoring information that has data interaction carrying out to central processing unit, central processing unit sends generation to feedback unit and shows the feedback command that can not unload safely according to the safe unloading command information that obtains in the data that the computer control that receives sends over.
The present invention also further provides the method that realizes safety unloading mobile electronic device, and described safe unloading command realizes sending to computing machine from mobile electronic device by the button that click is arranged on the mobile electronic device.
The present invention also further provides the method that realizes safety unloading mobile electronic device, and described mobile electronic device is flash memory device, audio/video player, personal digital assistant.
The present invention also further provides the method that realizes safety unloading mobile electronic device, also comprises the detecting operation, is used to detect described computer terminal controller sends state from data to central processing unit.
The present invention also further provides the method that realizes safety unloading mobile electronic device, describedly computer control is sent the data to central processing unit detects, and when detecting data when transmitting, sends the detecting information that has data to transmit to central processing unit.
The present invention also further provides the method that realizes safety unloading mobile electronic device, described central processing unit receives that computer control sends over the detecting information that data transmit is arranged after, the instruction that generation can not unload safely also sends.
From the above mentioned, the present invention is by increasing a button on mobile electronic device, when the user disconnects being connected between mobile electronic device and the computing machine if desired, need not to click the connection icon in the screen lower right corner, just push button and can Auto-Sensing whether to also have read-write mobile electronic device, operations such as addressing are not if just unload this equipment; If have, just on screen, provide prompting, remind the user to press again after a while, or close all with this device-dependent window, program after button again, safe unloading is finished in assurance.
In order further to understand feature of the present invention and technology contents, describe below in conjunction with specific embodiments of the invention and accompanying drawing.But the drawings and Examples of lifting not are to be used for the present invention is limited.
[description of drawings]
Fig. 1 is the logic diagram that the inventive method relates to first embodiment of system.
Fig. 2 is the logic diagram that the inventive method relates to second embodiment of system.
Fig. 3 is the FB(flow block) of the safe discharging method of realization of the inventive method.
[embodiment]
As shown in Figure 1, be the first embodiment of the present invention, electronic apparatus in the present embodiment is a portable hard drive.This portable hard drive is provided with a unloading button, and the user can carry out safe unloading to the portable hard drive that is connected to computing machine by clicking this unloading button.
This portable hard drive comprises:
Be used to produce the unloading button of safe unloader signal, this button connects the microprocessor (MPU) of portable hard drive, this microprocessor (MPU) generates safe unloading command with the unloader signal that receives and sends to the controller of portable hard drive, this controller to this safe unloading command encode the packing and send to USB interface, carry out data interaction by this USB interface and computing machine.
The computing machine that is connected with this portable hard drive comprises:
The USB interface that is connected with portable hard drive is used to receive the data message that portable hard drive sends over; The computer control that is connected with USB interface is used to receive the data message that sends over by USB interface, it is decoded, and the safe unloading command information that the back of will decoding obtains sends to central processing unit (CPU); Monitoring unit carries out poll to the data interaction situation between USB interface of computer and the controller at interval with regular time and monitors, when having listened to the data interaction transmission, then send the monitoring information that data interaction is arranged to CPU, CPU receives the monitoring information that safe unloading command sends over according to monitoring unit simultaneously and generates safe unloading command information, this safe unloading command represents that portable hard drive cannot unload safely at present, and should safe unloading command information send to feedback unit; Feedback unit is exported the information that call user's attention cannot unload portable hard drive this moment safely after receiving this safe unloading command information.
As shown in Figure 2, be the second embodiment of the present invention, portable electronic device in the present embodiment is a personal digital assistant (PDA).This PDA is provided with a unloading button, this PDA is connected with computing machine carry out data interaction after, then only need click to unload button when needing this PDA of unloading and check whether can carry out safe unloading.
This PDA comprises:
Be used to produce the unloading button of safe unloader signal, this button connects the microprocessor (MPU) of PDA, this microprocessor (MPU) generates safe unloading command information with the unloader signal that receives and sends to the controller of PDA, simultaneously, the storage unit that also has PDA that connects the PDA controller, storage data in this storage unit also send to this controller, this controller is to this safe unloading command information and the packing of encoding together of storage data, and the good packet of will packing sends to the USB interface of PDA, carries out data interaction by this USB interface and computing machine.
Computing machine comprises:
USB interface connects PDA and carries out data transmission; The line data decoding of going forward side by side of the computer control that connects this USB interface, the packet that receives of being used to unpack sends to storage unit with the associated storage data; Detecting unit is detected decoded data message, if therefrom obtain safe unloading command information, then should safe unloading command information send to CPU; After CPU received safe unloading command information, generation was monitored instruction and is sent to monitoring unit; Monitoring unit receives the monitoring instruction back of CPU transmission the data interaction situation between USB interface and the controller is monitored, when having listened to data interaction, then send the monitoring information that has data interaction carrying out to CPU, when not heard data interaction, then send the monitoring information that does not have data interaction carrying out to CPU; After CPU receives the monitoring information that data interaction is arranged that monitoring unit sends over, generate to remind the information that the user can not safe unloading equipment to send to feedback unit, after CPU receives the monitoring information that does not have data interaction that monitoring unit sends over, generate to remind the information of user security unloading equipment to send to feedback unit, feedback unit shows at display after receiving the corresponding information that CPU sends over.
As shown in Figure 3, in order to further specify the working condition of the system that the present invention relates to, install at first on computers and be used to monitor the driving of carrying out the data interaction situation between computing machine and the mobile electronic device, the installation of this driving can realize the function monitored.Below detailed explanation system of the present invention to finish the method for safe offloading functions as follows:
1), computing machine receives the data message that mobile electronic device sends over;
2), computing machine judges whether the data message that receives includes safe unloading command, and when not having safe unloading command, mobile electronic device normally uses; When the safety unloading command, judged whether that further data are just carrying out data interaction between computing machine and mobile electronic device;
3), when data are carried out data interaction between computing machine and mobile electronic device, then central processing unit (CPU) generates the feedback command that cannot unload safely and sends, when not having data to carry out data interaction between computing machine and mobile electronic device, central processing unit (CPU) generates the feedback command that can unload safely and sends;
4), receive feedback command this feedback command fed back to the user, remind the user whether can unload mobile electronic device safely.
And the operation in the step 3) of the above method further can be divided into following situation:
3.1), monitoring unit is with the data interaction situation between Fixed Time Interval poll USB interface and the computer control, when finding to have data transmitting to the central processing unit (CPU) feedback data just at the monitoring information of data interaction, send the monitoring information that has data interaction carrying out to central processing unit, central processing unit sends generation to feedback unit and shows the anti-storage instruction that can not unload safely according to the safe unloading command information that obtains in the data that the computer control that receives sends over.
3.2), monitoring unit receives the instruction that begins to monitor that central processing unit (CPU) sends, carry out the data interaction situation between computing machine and the mobile electronic device, when data are carried out data interaction between this interface unit and this controller, just send the monitoring information that has data interaction carrying out to central processing unit, central processing unit sends generation to feedback unit and shows the feedback command that can not unload safely according to the safe unloading command information that obtains in the data that the computer control that receives sends over.
Step 2 in the above method) computing machine judges that whether the data message receive includes safe unloading command is to be judged by central processing unit (CPU), or drives and form detecting unit and detect and judged whether safe unloading command by being installed to detecting in the computing machine.
Safe unloading command realizes sending to computing machine from mobile electronic device by the button that click is arranged on the mobile electronic device in the above method.
At the above method step 3) in can further include detecting operation, detecting sends to the data of central processing unit from computer control, is used to detect described computer terminal controller sends state from data to central processing unit.Describedly computer control is sent the data to central processing unit detect, when detecting data, send the detecting information that has data to transmit to central processing unit.After described central processing unit received and detects the detecting information that the data transmission is arranged that sends over, the instruction that generation can not unload safely also sent.
In sum; for the person of ordinary skill of the art; can make other various corresponding changes and distortion according to technical scheme of the present invention and technical conceive, and all these changes and distortion all should belong to the protection domain of claim of the present invention.