CN104077193A - Control method and electronic device - Google Patents

Control method and electronic device Download PDF

Info

Publication number
CN104077193A
CN104077193A CN201310097734.1A CN201310097734A CN104077193A CN 104077193 A CN104077193 A CN 104077193A CN 201310097734 A CN201310097734 A CN 201310097734A CN 104077193 A CN104077193 A CN 104077193A
Authority
CN
China
Prior art keywords
memory device
unit
interface
distance
force value
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.)
Granted
Application number
CN201310097734.1A
Other languages
Chinese (zh)
Other versions
CN104077193B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201310097734.1A priority Critical patent/CN104077193B/en
Publication of CN104077193A publication Critical patent/CN104077193A/en
Application granted granted Critical
Publication of CN104077193B publication Critical patent/CN104077193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Facsimiles In General (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a control method and an electronic device. The method is applied to the electronic device which is provided with a first interface and a first detection device connected with the first interface. The method comprises the following steps: detecting whether a first operation aiming at a first storage device exists by the first detection device; when the first operation exists, judging whether the first operation meets a preset condition or not; when the first operation meets the preset condition, generating a first control command corresponding to the first operation; and executing the first control command and executing a first control operation corresponding to the first control command to the first storage device.

Description

A kind of control method and a kind of electronic equipment
Technical field
The present invention relates to electronic technology field, relate in particular to a kind of control method and a kind of electronic equipment.
Background technology
Along with scientific and technical development, electronic equipment has also obtained development at full speed, and the kind of electronic product is also more and more, and people have also enjoyed the various facilities that scientific development brings, people can pass through various types of electronic equipments now, enjoy the comfortable life bringing along with development in science and technology.Such as, existing memory device is all supported hot plug, that is to say, user is when using external memory device, do not need to repeat shutdown, the interface of external equipment is connected on to such repetitive operation of starting shooting again on electronic equipment and realizes external equipment is connected with described electronic equipment, and can be directly at electronic equipment in open state, just the interface of external equipment can be connected on this electronic equipment and use.After completing the read-write operation of external equipment, can read writing task by confirming that this external equipment has completed, detect while having the information that can extract safely, just this external storage equipment can be extracted from this electronic equipment safely.
But in the process of inventor's invention technical scheme in realizing the embodiment of the present invention, find that above-mentioned technology at least exists following technical matters:
1, owing to needing in prior art to wait for that the read-write task of the file of external storage equipment completes, could disconnect and being connected of external storage equipment from electronic equipment, if and when external storage equipment is not when completing the read-write operation of file, just by user, directly external storage equipment and electronic equipment are disconnected, easily cause the technical matters to the damage of this external world's memory device.
2, owing to existing when extraneous memory device is not when completing the read-write operation of file, when just directly external storage equipment and electronic equipment are disconnected by user, can to external storage equipment, cause the technical matters of damage, make to be kept at the technical matters that the file data on this external world's memory device is lost.
3, due to need to be when external storage equipment and electronic equipment be disconnected in prior art, need to confirm the operation that can eject, owing to often occurring that system mistake causes ejecting unsuccessfully, so, the technical matters that the operation that exists confirmation to eject cannot be carried out.
Summary of the invention
The embodiment of the present application is by providing a kind of control method and a kind of electronic equipment, solved in prior art when external storage equipment does not complete the read-write operation of file, just directly external storage equipment and electronic equipment are disconnected, easily cause the technical matters to the damage of this external world's memory device.
On the one hand, the embodiment of the present application provides a kind of control method, whether, in the electronic equipment of the first pick-up unit that is applied to have first interface and is connected with described first interface, described method comprises: by described the first pick-up unit, detected and for first of described the first memory device, operated; There iing described first when operation, judging whether described the first operation meets one pre-conditioned; When described the first operation meets describedly when pre-conditioned, generate one and operate the first corresponding steering order with described first; Carry out described the first steering order, so that described the first memory device is carried out to first control operation corresponding with described the first steering order.
Further, describedly by described the first pick-up unit, whether detect for the first operation of described the first memory device, be specially: by described the first pick-up unit detect whether have described the first memory device is extracted from described first interface first extract operation; Or detect whether there is the first update that described the first memory device is inserted to described first interface by described the first pick-up unit.
Further, described by described the first pick-up unit detect whether have described the first memory device is extracted from described first interface first extract operation, be specially: in first moment, by described the first pick-up unit, detecting described the first memory device is primary importance in the current location of described first interface; In second moment after described first moment, by described the first pick-up unit, detecting described current location is the second place; Judge the position relationship between described primary importance and the described second place, the first judged result of acquisition; Based on described the first judged result, detect whether have described the first memory device is extracted from described first interface first extract operation.
Further, described when having described the first operation, judge that whether described the first operation meets one pre-conditioned, specifically comprise: obtain the second distance of the outer end of the described first interface of described second place distance, and the first distance of the described outer end of described primary importance distance; Described second distance be less than described first apart from time, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, it is described that to judge that whether described the first operation meets one pre-conditioned, be specially: judge whether described second distance is greater than the first predetermined threshold value, wherein, described the first predetermined threshold value is specially for characterizing described the first memory device whether had the possible distance value being electrically connected to described electronic equipment disconnection.
Further, describedly meet described when pre-conditioned when described the first operation, generate first steering order corresponding with described the first operation, be specially: described, show to have described first to extract operation, and when described second distance is less than described the first predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
Further, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, be specially: described in execution, stop data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
Further, whether described have by described the first pick-up unit detection the first update that described the first memory device is inserted to described first interface, be specially: in first moment, by described the first pick-up unit, detecting the current location of described the first memory device in described first interface is the 3rd position; In second moment after described first moment, by described the first pick-up unit, detecting described current location is the 4th position; Judge the position relationship between described the 3rd position and described the 4th position, obtain the second judged result; Based on described the second judged result, detect and whether have the first update that described the first memory device is inserted to described first interface.
Further, described when having described the first operation, judge that whether described the first operation meets one pre-conditioned, specifically comprise: obtain the 4th distance of the outer end of first interface described in described the 4th positional distance, and the 3rd distance of outer end described in described the 3rd positional distance; Described the 4th distance be greater than the described the 3rd apart from time, show to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, it is described that to judge that whether described the first operation meets one pre-conditioned, be specially: judge whether described the 4th distance is less than the second predetermined threshold value, wherein, whether described the second predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the potential range but not powering on.
Further, described the first operation of described judgement meets described when pre-conditioned, generate first steering order corresponding with described the first operation, be specially: described, show to have described the first update, and when described second distance is greater than described the second predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
Further, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, be specially: carry out described prompting instruction, to remind described in described electronic equipment the first memory device insertion not in place.
Further, when described the first memory device is USB interface memory device, describedly by described the first pick-up unit, whether detect for the first operation of described the first memory device, be specially: by be arranged on pressure transducer in the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation; Or detect the first update in two holes that whether have two shell fragments to insert described USB interface memory device by the pressure transducer being arranged in the USB interface corresponding with described USB interface memory device.
Further, described by be arranged on pressure transducer in the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation, be specially: in first moment, by described pressure transducer, detect the first force value on described two shell fragments; In second moment after described first moment, by described pressure transducer, detect the second force value on described two shell fragments; Judge the magnitude relationship of described the first force value and described the second force value, obtain the 3rd judged result; Based on described the 3rd judged result, detect whether have that described shell fragment extracts from described two holes first extract operation.
Further, described having described first when operation, judges whether described the first operation meets one pre-conditioned, specifically comprises: when described the second force value is greater than described the first force value, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, it is described that to judge that whether described the first operation meets one pre-conditioned, be specially: judge whether described the second force value is greater than the 3rd predetermined threshold value, whether wherein, described the 3rd predetermined threshold value is specifically used for characterizing described the first memory device the possible pressure value being connected with described electronic equipment power-off.
Further, describedly meet described when pre-conditioned when described the first operation, generate first steering order corresponding with described the first operation, be specially: described, show that described first extracts when operation, and when described the second force value is greater than described the 3rd predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
Further, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, be specially: described in execution, stop data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
Further, describedly by being arranged on pressure transducer in the USB interface corresponding with described USB interface memory device, detect the first update in two holes that whether have two shell fragments to insert described USB interface memory device, be specially: in first moment, by described pressure transducer, detect the 3rd force value on two shell fragments in described USB interface; Second moment after described first moment, then detect the 4th force value on two shell fragments in described USB interface by described pressure transducer; Judge the magnitude relationship of described the 3rd force value and described the 4th force value, obtain the 3rd judged result; Based on described the 4th judged result, detect whether to have described shell fragment is inserted to the operation of first in described two holes.
Further, described having described first when operation, judges whether described the first operation meets one pre-conditioned, specifically comprises: when described the 4th force value is less than described the 3rd force value, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, it is described that to judge that whether described the first operation meets one pre-conditioned, be specially: judge whether described the 4th force value is less than the 4th predetermined threshold value, wherein, whether described the 4th predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the possible pressure value but not powering on.
Further, described the first operation of described judgement meets described when pre-conditioned, generate first steering order corresponding with described the first operation, be specially: described, show to have described the first update, and when described the 4th force value is less than described the 4th predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
Further, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, be specially: carry out described prompting instruction, to remind described in described electronic equipment the first memory device insertion not in place.
On the other hand, the embodiment of the present application, by a kind of electronic equipment is provided, comprising: first interface; The first pick-up unit, is connected with described first interface; Wherein, by described the first pick-up unit, detect whether for the first operation that is connected to described the first memory device on described first interface; There iing described first when operation, judging whether described the first operation meets one pre-conditioned; When described the first operation meets describedly when pre-conditioned, generate one and operate the first corresponding steering order with described first; Carry out described the first steering order, so that described the first memory device is carried out to first control operation corresponding with described the first steering order.
Further, described the first pick-up unit specifically comprises: the first detection sub-unit, for detection of whether have described memory device is extracted from described first interface first extract operation; The second detection sub-unit, for detection of whether there being the first update that described memory device is inserted to described first interface.
Further, described the first detection sub-unit specifically comprises: primary importance detecting unit, and for first constantly, by described the first detection sub-unit, detecting described memory device is primary importance in the current location of described first interface; Second place detecting unit, for second moment after described first moment, by described the first detection sub-unit, detecting described current location is the second place; The first judging unit, for judging the position relationship between described primary importance and the described second place, the first judged result of acquisition; First extracts detecting unit, for based on described the first judged result, detect whether have described memory device is extracted from described first interface first extract operation.
Further, described first extracts detecting unit specifically comprises: the first acquiring unit, and for obtaining the second distance of the outer end of the described first interface of described second place distance, and the first distance of the described outer end of described primary importance distance; The first judgment sub-unit, at described second distance, be less than described first apart from time, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, described the first judgment sub-unit is specifically for judging whether described second distance is greater than the first predetermined threshold value, wherein, described the first predetermined threshold value is specially for characterizing described the first memory device whether had the possible distance value being electrically connected to described electronic equipment disconnection.
Further, described the first judgment sub-unit specifically comprises: the first generation unit, described in being used for, show to have described first to extract operation, and when described second distance is greater than described the first predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
Further, described the first judgment sub-unit specifically also comprises: the first performance element stops data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device described in carrying out; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
Further, described the second detection sub-unit specifically comprises: the 3rd position detection unit, and for first constantly, by described the first pick-up unit, detecting the current location of described the first memory device in described first interface is the 3rd position; The 4th position detection unit, for second moment after described first moment, by described the first pick-up unit, detecting described current location is the 4th position; The second judging unit, for judging the position relationship between described the 3rd position and described the 4th position, obtains the second judged result; First inserts detecting unit, for based on described the second judged result, detects and whether has the first update that described the first memory device is inserted to described first interface.
Further, described first inserts detecting unit specifically comprises: second acquisition unit, and for obtaining the 4th distance of the outer end of first interface described in described the 4th positional distance, and the 3rd distance of outer end described in described the 3rd positional distance; The second judgment sub-unit, in described the 4th distance, be greater than the described the 3rd apart from time, show to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, described the second judgment sub-unit is specifically for judging whether described the 4th distance is less than the second predetermined threshold value, whether wherein, described the second predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the potential range but not powering on.
Further, described the second judgment sub-unit specifically comprises: the second generation unit, for showing to have described the first update described, and when described second distance is less than described the second predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
Further, described the second judgment sub-unit specifically also comprises: the second performance element, and for carrying out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
Further, when described memory device is specially USB interface memory device, and when described first interface is USB interface, described the first pick-up unit specifically comprises: the 3rd detection sub-unit, for by be arranged on the pressure transducer of the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation; The 4th detection sub-unit, for detecting the first update in two holes that whether have two shell fragments to insert described USB interface memory device by being arranged on the pressure transducer of the USB interface corresponding with described USB interface memory device.
Further, described the 3rd detection sub-unit specifically comprises: the first pressure sensing cell, in first moment, detects the first force value on described two shell fragments by described pressure transducer; The second pressure sensing cell, for second moment after described first moment, detects the second force value on described two shell fragments by described pressure transducer; The 3rd judging unit, for judging the magnitude relationship of described the first force value and described the second force value, obtains the 3rd judged result; Second extracts detecting unit, for based on described the 3rd judged result, detect whether have that described shell fragment extracts from described two holes first extract operation.
Further, described second extracts detecting unit specifically comprises: the 3rd judgment sub-unit, and for when described the second force value is greater than described the first force value, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, described the 3rd judgment sub-unit is specifically for judging whether described the second force value is greater than the 3rd predetermined threshold value, whether wherein, described the 3rd predetermined threshold value is specifically used for characterizing described the first memory device the possible pressure value being connected with described electronic equipment power-off.
Further, described the 3rd judgment sub-unit specifically comprises: the 3rd generation unit, for showing that described described first extracts when operation, and when described the second force value is less than described the 3rd predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
Further, described the 3rd judgment sub-unit also comprises: the 3rd performance element stops data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device described in carrying out; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
Further, described the 4th detection sub-unit specifically comprises: the 3rd pressure sensing cell, in first moment, detects the 3rd force value on two shell fragments in described USB interface by described pressure transducer; The 4th pressure sensing cell, for second moment after described first moment, then detects the 4th force value on two shell fragments in described USB interface by described pressure transducer; The 4th judging unit, for judging the magnitude relationship of described the 3rd force value and described the 4th force value, obtains the 4th judged result; Whether second inserts detecting unit, for based on described the 4th judged result, detect and have described sheet insertion to enter the first update in described two holes.
Further, described second inserts detecting unit specifically comprises: the 4th judgment sub-unit, for when described the 4th force value is less than described the 3rd force value, show to have described the first update, and it is one pre-conditioned to judge whether described the first operation meets.
Further, described the 4th judgment sub-unit is specifically for judging whether described the 4th force value is less than the 4th predetermined threshold value, whether wherein, described the 4th predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the possible pressure value but not powering on.
Further, described the 4th judgment sub-unit specifically comprises: the 4th generation unit, for showing to have described the first update described, and when described the 4th force value is greater than described the 4th predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
Further, described the 4th judgment sub-unit specifically also comprises: the 4th performance element, and for carrying out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
The one or more technical schemes that provide in the embodiment of the present application, at least have following technique effect or advantage:
1, owing to having adopted, the first pick-up unit is set on first interface, by the first pick-up unit, detect whether the first operation of the first memory device is met to a predetermined condition, then according to satisfied predetermined condition, generate corresponding steering order, by carrying out this steering order, can carry out the control operation corresponding with this steering order to the first memory device, when the read-write task that has solved the file that needs to wait for external storage equipment in prior art completes, could disconnect and being connected of external storage equipment from electronic equipment, if and when external storage equipment is not when completing the read-write operation of file, just by user, unintentionally external storage equipment and electronic equipment are disconnected, will cause the technical matters to the damage of this external world's memory device, and then realized can be to the first memory device executivecontrol function, make this first memory device avoid the technique effect suffering damage.
2, owing to adopting, the first operation of the first memory device is met to one when pre-conditioned detecting by the first pick-up unit, stop the technical scheme of fileinfo that the task of the transmission of data or quick storage being are are being read and write, solved in prior art owing to existing when extraneous memory device is not when completing the read-write operation of file, when just unintentionally external storage equipment and electronic equipment are disconnected by user, can cause to external storage equipment the technical matters of damage, make to be kept at the technical matters that the file data on this external world's memory device is lost, and then realized can be before the first memory device and electronic equipment disconnect, preservation does not in time complete the file of read-write operation, avoided the loss of file data.
3, owing to adopting the first pick-up unit to detect the first operation to the first memory device, having solved in prior art need to be when disconnecting external storage equipment and electronic equipment, need to confirm the operation that can eject, owing to often occurring that system mistake causes ejecting unsuccessfully, so, the technical matters that the operation of exist to confirm ejecting cannot be carried out, and then realized the operation of ejecting without being confirmed whether, the technique effect that just external storage equipment and electronic equipment directly can be disconnected.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of a kind of control method in the embodiment of the present application;
Fig. 2 is the schematic diagram of extracting from the interface of electronic equipment at detection external storage equipment in the embodiment of the present application;
Fig. 3 detects external storage equipment whether to form with the interface of electronic equipment the critical condition schematic diagram being electrically connected in the embodiment of the present application;
Fig. 4 is the schematic diagram detecting in the embodiment of the present application in the interface that external storage equipment inserts electronic equipment;
Fig. 5 is the module map of a kind of electronic equipment in the embodiment of the present application.
Embodiment
The embodiment of the present application is by providing a kind of control method and a kind of electronic equipment, solved in prior art at external storage equipment at the read-write operation that does not complete file, when just this external storage equipment and electronic equipment are disconnected, easily cause the technical matters to the damage of this external storage equipment.
Technical scheme in the embodiment of the present application is for solving the above-mentioned technical matters easily causing the damage of this external storage equipment, and general thought is as follows:
The memory device of USB interface of take is example, when being positioned at electronic equipment, for example that a pick-up unit in the USB interface of notebook computer detects when inserting or extracting the operation of the memory device that is circumscribed with USB interface, can judge such update or extract operation and whether meet certain pre-conditioned, for example, whether the interface inserting puts in place, or whether the interface of extracting has met certain distance value etc., meet these pre-conditioned after, can trigger and pre-conditioned corresponding steering order, by carrying out steering order, can control the memory device of USB interface.
In order better to understand technique scheme, below in conjunction with Figure of description and concrete embodiment, technique scheme is described in detail.
The application provides a kind of control method, be applied to there is first interface and the electronic equipment of the first pick-up unit of being connected with described first interface in, as shown in Figure 1, described method comprises:
Whether S10, detected and for first of described the first memory device, operated by described the first pick-up unit;
S20, is having described first when operation, judges whether described the first operation meets one pre-conditioned;
S30, when described the first operation meets describedly when pre-conditioned, generates one and operates the first corresponding steering order with described first;
S40, carries out described the first steering order, so that described the first memory device is carried out to first control operation corresponding with described the first steering order.
Wherein, in S10, by described the first pick-up unit, whether detect for the first operation of described the first memory device, be specially: by described the first pick-up unit detect whether have described the first memory device is extracted from described first interface first extract operation; Or detect whether there is the first update that described the first memory device is inserted to described first interface by described the first pick-up unit.
In concrete embodiment, this first pick-up unit is specifically arranged on the interface of electronic equipment, this interface can be parallel port (EPP), USB interface also has IEEE1394 interface, being arranged on pick-up unit on these interfaces can detect the external storage equipment being connected with this interface and have the operation of extracting of outwards extracting, or the update that the oriented interface slot of the external storage equipment being connected with this interface inserts can be detected, above-mentioned extracting operation or have update specifically how to be detected, have more specific description below.
First, the detection method that introduction can be applicable to most of generic interface.
The first, detect and whether have the operation of extracting of extracting from described first interface.
In first moment, by described the first pick-up unit, detecting described the first memory device is primary importance in the current location of described first interface; In second moment after described first moment, by described the first pick-up unit, detecting described current location is the second place; Judge the position relationship between described primary importance and the described second place, the first judged result of acquisition; Based on described the first judged result, detect whether have described the first memory device is extracted from described first interface first extract operation.
In concrete embodiment, this pick-up unit can detect certain point on the interface connecting at this external storage equipment constantly with respect to the positional information of the interface of electronic equipment, for example, as described in Figure 2, when first moment, the interface connecting when this external storage equipment is positioned at the position of P1 with respect to the primary importance of the interface of electronic equipment; Through second after 0.3s constantly, the interface that this external equipment detected is positioned at the position of P2 with respect to the second place of the interface of electronic equipment, the position that the position of then ordering according to P1 and P2 are ordered judges whether this external storage equipment is extracted from the interface of electronic equipment.Macroscopic view understanding based on artificial, the position of ordering with respect to P1 when P2 point position is while more approaching outside the interface of electronic equipment, just illustrate this operation be one external storage equipment is outwards extracted extract operation, but for electronic equipment, just can the detection based on distance judge the operation to this external storage equipment.
Therefore, in S20, there iing described first when operation, judge whether described the first operation meets one pre-conditioned, specifically comprise: obtain the second distance of the outer end of the described first interface of described second place distance, and the first distance of the described outer end of described primary importance distance; Described second distance be less than described first apart from time, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
In concrete embodiment, outer peripheral first distance value of interface of the positional distance electronic equipment of P1 just can be detected, and the outer peripheral second distance value of the interface of the positional distance electronic equipment of P2, if when second distance value is less than the first distance value, illustrate that this external storage equipment outwards extracts, certainly, this second distance value also needs to meet certain pre-conditioned, just can be so that the interface of this external storage equipment disconnects with the realization that is connected of the interface of electronic equipment, so, introduce below and being connected of the interface of external storage equipment and the interface of electronic equipment how to meet the condition disconnecting.
Therefore, just can judge whether described second distance is greater than the first predetermined threshold value, wherein, described the first predetermined threshold value is specially for characterizing described the first memory device whether had the possible distance value being electrically connected to described electronic equipment disconnection.
In concrete embodiment, this first predetermined threshold value can be set like this, as shown in Figure 3, the position of P0 is a critical point, P0 is X apart from the outer peripheral distance of interface of electronic equipment, this X is a default threshold value, when the outer peripheral distance of interface of the positional distance electronic equipment of this P2 is less than X, just illustrate that this external storage equipment has disconnected and being connected with the interface of this electronic equipment, when if the outer peripheral distance of interface of the positional distance electronic equipment of P2 is greater than X, the interface that this external storage equipment and this electronic equipment are just described will disconnect, but also do not disconnect.
After obtaining above-mentioned judged result, then carry out S30, when having met this and extracted pre-conditioned that operation meets, generate first steering order corresponding with described the first operation, be specially: described, show to have described first to extract operation, and when described second distance is greater than described the first predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
After executing S30, then carry out S40, carry out described the first steering order, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, this step is specially: described in execution, stop data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
In concrete embodiment, the interface of wanting when this external storage equipment and electronic equipment will disconnect, but while also not disconnecting, will generate the command for stopping that a task termination that this external storage equipment is being carried out carries out, that is to say, if this external storage equipment is carrying out data transfer task or data store tasks, just stop immediately the task of data transmission, the data that needs are preserved are preserved fast, and stop immediately remaining the preservation of content.The loss of the data that so just can effectively avoid transmitting the loss of data or preserve, also can avoid this external storage equipment to be damaged.
For example, when electronic equipment is carrying out the operation of partition table to external storage equipment, the interface of this external storage equipment and this electronic equipment is disconnected, for fear of the consequence that need to format external storage equipment that directly operation brings like this, can be before the operation that this external world's memory device is extracted from the interface of described electronic equipment being detected, the content of rapidly needs being preserved is preserved, make when the interface of this external storage equipment and this electronic equipment disconnects, the task of preservation completes.
The second, detect the update that whether has the interface of external storage equipment to insert the interface of electronic equipment.
First, in first moment, by described the first pick-up unit, detecting the current location of described the first memory device in described first interface is the 3rd position; Then, in second moment after described first moment, by described the first pick-up unit, detecting described current location is the 4th position; Then, judge the position relationship between described the 3rd position and described the 4th position, obtain the second judged result; Finally, based on described the second judged result, detect and whether have the first update that described the first memory device is inserted to described first interface.
In concrete embodiment, or according to above-mentioned example, as shown in Figure 4, first constantly, when the interface of extraneous memory device is positioned at the position of P3 with respect to the 3rd position of the interface of electronic equipment; Through second after 0.3s constantly, the interface that this external storage equipment detected is positioned at the position of P4 with respect to the 4th position of the interface of electronic equipment, the position that the position of then ordering according to P3 and P4 are ordered judges whether this external storage equipment inserts in the interface of electronic equipment.Judging that whether this operating process is that the operation of an insertion is specific as follows:
Obtain the 4th distance of the outer end of first interface described in described the 4th positional distance, and the 3rd distance of outer end described in described the 3rd positional distance; Described the 4th distance be greater than the described the 3rd apart from time, show to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
In concrete embodiment, outer peripheral the 3rd distance of interface of the positional distance electronic equipment of P3 can be detected, and outer peripheral the 4th distance value of the interface of the positional distance electronic equipment of P4, if when the 4th distance value is greater than the 3rd distance value, that is to say, the position of P4 is compared to the outward flange of the more close interface in position of P3, and this operation has just met default condition, can think the operation of an insertion.After judging the operation that this operation is an insertion, need to judge that whether this operation meets a default condition, introduces this update below and how can meet a default condition.
Therefore, just can judge that whether described the 4th distance is less than the second predetermined threshold value, wherein, whether described the second predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the potential range but not powering on.
In concrete embodiment, this second predetermined threshold value can be set like this, the position of P0 is a critical point, P0 is X apart from the outer peripheral distance of interface of electronic equipment, this X is a predetermined threshold value, when the outer peripheral distance of interface of the positional distance electronic equipment of this P4 is less than X, just illustrates that the interface of this external storage equipment and this electronic equipment is not linked to be path, namely, the interface that this external storage equipment inserts this electronic equipment does not insert and puts in place; When if the outer peripheral distance of interface of the positional distance electronic equipment of P4 is greater than X, just illustrate that the interface of this external storage equipment and this electronic equipment has formed path, namely, the interface insertion that this external storage equipment inserts this electronic equipment has put in place.
After obtaining above-mentioned judged result, namely when having met pre-conditioned that this update met, generate first steering order corresponding with described the first operation, be specially: described, show to have described the first update, and when described second distance is less than described the second predetermined threshold value, generate the prompting corresponding with described the first update and insert prompting instruction not in place, carry out described prompting instruction, to remind this first memory device of this electronic equipment to insert not in place.
In concrete embodiment, when the interface of extraneous memory device and electronic equipment will be linked to be path, but be not also linked to be path, namely external storage equipment inserts situation not in place when inserting the interface of electronic equipment, will generate an external storage equipment of reminding this electronic equipment to be attached thereto does not have the prompting instruction of successful connection, carry out this and remind instruction, remind the external storage equipment that this electronic equipment is attached thereto to insert not in place, like this, user is seeing while having such prompting message, can check whether external storage equipment has insertion well on the interface of electronic equipment, after adjusting through user, this prompting message can disappear automatically.
By above-mentioned detection external storage equipment in the operation of extracting or inserting from the interface of electronic equipment, send in time the instruction that stops preservation or rapid saving, by read-write operation Quick stop, or remind to insert the measures such as not in place, make the external storage equipment being connected with this electronic equipment can be not damaged in the process of plug and pull.
Nowadays the interface being connected with external storage equipment is commonly USB interface, and the USB interface of take is below described in detail as example.
Therefore,, when first interface is USB interface, by described the first pick-up unit, detects the first operation whether having for the first memory device and be specially:
By be arranged on pressure transducer in the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation; Or
By the pressure transducer being arranged in the USB interface corresponding with described USB interface memory device, detect the first update in two holes that whether have two shell fragments to insert described USB interface memory device.
In concrete embodiment, detect in this USB interface, whether there is the operation of extracting or inserting, specifically by detecting, the deformation size of shell fragment detects.
Lower mask body, characterizes and from USB interface, extracts or insert in not deformation in the same time with regard to shell fragment.
One, the concrete detecting step of extracting operation of extracting detected from USB interface.
In first moment, by described pressure transducer, detect the first force value on described two shell fragments; In second moment after described first moment, by described pressure transducer, detect the second force value on described two shell fragments; Judge the magnitude relationship of described the first force value and described the second force value, obtain the 3rd judged result; Based on described the 3rd judged result, detect whether have that described shell fragment extracts from described two holes first extract operation.
In concrete embodiment, in USB interface inside, be provided with two parallel shell fragments, on these two shell fragments, be respectively arranged with pressure transducer, namely first pick-up unit here.First, when first moment, detect the force value on shell fragment, for example, in the first force value constantly detecting, be 1N, then, in second moment after first moment, the force value detecting on shell fragment is 6N, then, just can be relatively in the first force value constantly obtaining and second size of the force value of acquisition constantly, thereby obtain the result of a comparison, finally just can determine whether according to such comparative result it is an operation of extracting.
According to above-mentioned comparative result how to confirm, be that the operation of extracting is specific as follows:
When described the second force value is greater than described the first force value, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
In concrete embodiment, the above-mentioned force value not obtaining is in the same time compared, the first the first force value 4N constantly obtaining is less than the second the second force value 6N constantly obtaining, like this, just determine that such operation is one and extracts operation, determine be extract operation after, can not determine whether it is the operation of extracting that has met certain condition, below just the satisfied condition of needs is described.
Needing satisfied condition is a threshold condition, therefore, judge whether described the second force value is greater than the 3rd predetermined threshold value, wherein, whether described the 3rd predetermined threshold value is specifically used for characterizing described the first memory device the possible pressure value being connected with described electronic equipment power-off.
In concrete embodiment, need judgement in the second the second force value 6N constantly obtaining and the relation of the 3rd predetermined threshold value, the 3rd predetermined threshold value is the critical condition whether a detection disconnects electrical connection, that is to say the threshold condition whether external storage equipment of this USB interface really disconnects with electronic equipment interfaces.For example, when critical threshold conditions is 7N, just can find out, the external storage equipment of this USB interface is just extracted from the interface of electronic equipment, but does not also disconnect between them.When if critical threshold conditions is 5N, just can find out, the external storage equipment of this USB interface is ready to be extracted, and disconnected connection between them from the interface of electronic equipment.
When the force value obtaining in second moment in above-mentioned is less than threshold limit value, just met default condition, after having met such condition, just can generate an instruction, this instruction be one and first extract operational correspondence stop data transfer instruction and/or instruction data storage.
Then, stop data transfer instruction described in execution, to stop the data transmission between described electronic equipment and described the first memory device; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
In concrete embodiment, when the external storage equipment detecting in USB interface is the operation of extracting, simultaneously, the condition that has met predetermined threshold value in the force value in second moment detected, just generated an instruction, the task of data transmission is carried out in this instruction for stopping this external storage equipment and electronic equipment, if when the external storage equipment of this USB interface is just in the operation of execute file partition table, so, the instruction generating is the instruction of rapid saving this document partition table, then, just can carry out the task of rapid saving, while having avoided the external storage equipment of this USB interface also not complete read-write task, while just disconnecting, can not make loss of data, or the task that need to format external storage equipment.
Two, the concrete detecting step of the update inserting detected from USB interface:
In first moment, by described pressure transducer, detect the 3rd force value on described two shell fragments; Second moment after described first moment, then detect the 4th force value on described two shell fragments by described pressure transducer; Judge the magnitude relationship of described the 3rd force value and described the 4th force value, obtain the 4th judged result; Based on described the 4th judged result, detect and whether have described sheet insertion to enter the first update in described two holes.
In concrete embodiment, first first constantly, the force value detecting on shell fragment is 7N, then, in second moment after first moment, the force value detecting on shell fragment is 4N, then, just can compare the size of the first force value constantly obtaining and the second force value constantly obtaining, thereby obtain the result of a comparison, finally just can determine whether this operation is the operation of an insertion according to such comparative result.
According to above-mentioned comparative result how to confirm, be that the operation of inserting is specific as follows:
When described the 4th force value is less than the 3rd force value, show to have such a update, and it is one pre-conditioned to judge that whether this first operation meets.
In concrete embodiment, the above-mentioned force value not obtaining is in the same time compared, first obtains the 3rd force value 7N is constantly greater than the 4th the 4th force value 4N constantly obtaining, like this, just determine that such operation is a update, after determining and being update, can not determine whether it is the update that has met certain condition, below just the satisfied condition of needs is described.
Here needing satisfied condition is a threshold condition, therefore, judge whether described the 4th force value is less than the 4th predetermined threshold value, wherein, whether described the 4th predetermined threshold value is specifically used for characterizing described the first memory device and is connected with electronic equipment, the possible pressure value but not powering on.
In concrete embodiment, need judgement in the second the 4th force value 4N constantly obtaining and the relation of the 4th predetermined threshold value, the 4th predetermined threshold value is whether a detection connects the critical condition powering on, that is to say, whether the external storage equipment of this USB interface is really connected with electronic equipment interfaces the threshold condition powering on, for example, when this critical threshold conditions is 3N, just can find out, the external storage equipment of this USB interface inserts in the interface of electronic equipment, but on not connecting between them, when if critical threshold conditions is 5N, just can find out, in the interface of the external storage equipment forward electronic equipment of this USB interface, insert, and between them, formed the relation powering on that connects.
In above-mentioned, when the second force value constantly obtaining is greater than critical value, just met default condition, namely, detecting is the operation of an insertion, but does not form the relation powering on that connects.With regard to generating a prompting corresponding with the first update, insert prompting instruction not in place like this.
Then, carry out described prompting instruction, to remind electronic equipment the first memory device to insert not in place.
In concrete embodiment, the operation that has external storage equipment to insert in USB interface being detected, simultaneously, the condition that has met predetermined threshold value in the 4th force value detected, just generate an instruction, this instruction, for reminding this external storage equipment of this electronic equipment not have to insert the prompting message putting in place, is inserted external equipment with reminding user, namely inserts and puts in place.Make like this user experience well.
The embodiment of the present application also provides a kind of electronic equipment, and as shown in Figure 5, this electronic equipment comprises:
First interface 10;
The first pick-up unit 20, is connected with described first interface 10;
Wherein, by described the first pick-up unit 20, detect whether for the first operation that is connected to described the first memory device on described first interface 10; There iing described first when operation, judging whether described the first operation meets one pre-conditioned; When described the first operation meets describedly when pre-conditioned, generate one and operate the first corresponding steering order with described first; Carry out described the first steering order, so that described the first memory device is carried out to first control operation corresponding with described the first steering order.
Further, described the first pick-up unit 20 specifically comprises: the first detection sub-unit, for detection of whether have described memory device is extracted from described first interface 10 first extract operation; The second detection sub-unit, for detection of whether there being the first update that described memory device is inserted to described first interface 10.
Further, described the first detection sub-unit specifically comprises: primary importance detecting unit, and for first constantly, by described the first detection sub-unit, detecting described memory device is primary importance in the current location of described first interface 10; Second place detecting unit, for second moment after described first moment, by described the first detection sub-unit, detecting described current location is the second place; The first judging unit, for judging the position relationship between described primary importance and the described second place, the first judged result of acquisition; First extracts detecting unit, for based on described the first judged result, detect whether have described memory device is extracted from described first interface first extract operation.
Further, described first extracts detecting unit specifically comprises: the first acquiring unit, and for obtaining the second distance of the outer end of the described first interface of described second place distance, and the first distance of the described outer end of described primary importance distance; The first judgment sub-unit, at described second distance, be less than described first apart from time, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, described the first judgment sub-unit is specifically for judging whether described second distance is greater than the first predetermined threshold value, wherein, described the first predetermined threshold value is specially for characterizing described the first memory device whether had the possible distance value being electrically connected to described electronic equipment disconnection.
Further, described the first judgment sub-unit specifically comprises: the first generation unit, described in being used for, show to have described first to extract operation, and when described second distance is greater than described the first predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
Further, described the first judgment sub-unit specifically also comprises: the first performance element stops data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device described in carrying out; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
Further, described the second detection sub-unit specifically comprises: the 3rd position detection unit, and for first constantly, by described the first pick-up unit, detecting the current location of described the first memory device in described first interface is the 3rd position; The 4th position detection unit, for second moment after described first moment, by described the first pick-up unit, detecting described current location is the 4th position; The second judging unit, for judging the position relationship between described the 3rd position and described the 4th position, obtains the second judged result; First inserts detecting unit, for based on described the second judged result, detects and whether has the first update that described the first memory device is inserted to described first interface 10.
Further, described first inserts detecting unit specifically comprises: second acquisition unit, and for obtaining the 4th distance of the outer end of first interface 10 described in described the 4th positional distance, and the 3rd distance of outer end described in described the 3rd positional distance; The second judgment sub-unit, in described the 4th distance, be greater than the described the 3rd apart from time, show to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, described the second judgment sub-unit is specifically for judging whether described the 4th distance is less than the second predetermined threshold value, whether wherein, described the second predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the potential range but not powering on.
Further, described the second judgment sub-unit specifically comprises: the second generation unit, for showing to have described the first update described, and when described second distance is less than described the second predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
Further, described the second judgment sub-unit specifically also comprises: the second performance element, and for carrying out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
Further, when described memory device is specially USB interface memory device, and when described first interface 10 is USB interface, described the first pick-up unit specifically comprises: the 3rd detection sub-unit, for by be arranged on the pressure transducer of the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation; The 4th detection sub-unit, for detecting the first update in two holes that whether have two shell fragments to insert described USB interface memory device by being arranged on the pressure transducer of the USB interface corresponding with described USB interface memory device.
Further, described the 3rd detection sub-unit specifically comprises: the first pressure sensing cell, in first moment, detects the first force value on described two shell fragments by described pressure transducer; The second pressure sensing cell, for second moment after described first moment, detects the second force value on described two shell fragments by described pressure transducer; The 3rd judging unit, for judging the magnitude relationship of described the first force value and described the second force value, obtains the 3rd judged result; Second extracts detecting unit, for based on described the 3rd judged result, detect whether have that described shell fragment extracts from described two holes first extract operation.
Further, described second extracts detecting unit specifically comprises: the 3rd judgment sub-unit, and for when described the second force value is greater than described the first force value, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
Further, described the 3rd judgment sub-unit is specifically for judging whether described the second force value is greater than the 3rd predetermined threshold value, whether wherein, described the 3rd predetermined threshold value is specifically used for characterizing described the first memory device the possible pressure value being connected with described electronic equipment power-off.
Further, described the 3rd judgment sub-unit specifically comprises: the 3rd generation unit, for showing that described described first extracts when operation, and when described the second force value is less than described the 3rd predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
Further, described the 3rd judgment sub-unit also comprises: the 3rd performance element stops data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device described in carrying out; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
Further, described the 4th detection sub-unit specifically comprises: the 3rd pressure sensing cell, in first moment, detects the 3rd force value on two shell fragments in described USB interface by described pressure transducer; The 4th pressure sensing cell, for second moment after described first moment, then detects the 4th force value on two shell fragments in described USB interface by described pressure transducer; The 4th judging unit, for judging the magnitude relationship of described the 3rd force value and described the 4th force value, obtains the 4th judged result; Whether second inserts detecting unit, for based on described the 4th judged result, detect and have described sheet insertion to enter the first update in described two holes.
Further, described second inserts detecting unit specifically comprises: the 4th judgment sub-unit, for when described the 4th force value is less than described the 3rd force value, show to have described the first update, and it is one pre-conditioned to judge whether described the first operation meets.
Further, described the 4th judgment sub-unit is specifically for judging whether described the 4th force value is less than the 4th predetermined threshold value, whether wherein, described the 4th predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the possible pressure value but not powering on.
Further, described the 4th judgment sub-unit specifically comprises: the 4th generation unit, for showing to have described the first update described, and when described the 4th force value is greater than described the 4th predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
Further, described the 4th judgment sub-unit specifically also comprises: the 4th performance element, and for carrying out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
The one or more technical schemes that provide in the embodiment of the present application, at least have following technique effect or advantage:
1, owing to having adopted, the first pick-up unit is set on first interface, by the first pick-up unit, detect whether the first operation of the first memory device is met to a predetermined condition, then according to satisfied predetermined condition, generate corresponding steering order, by carrying out this steering order, can carry out the control operation corresponding with this steering order to the first memory device, when the read-write task that has solved the file that needs to wait for external storage equipment in prior art completes, could disconnect and being connected of external storage equipment from electronic equipment, if and when external storage equipment is not when completing the read-write operation of file, just by user, unintentionally external storage equipment and electronic equipment are disconnected, will cause the technical matters to the damage of this external world's memory device, and then realized can be to the first memory device executivecontrol function, make this first memory device avoid the technique effect suffering damage.
2, owing to adopting, the first operation of the first memory device is met to one when pre-conditioned detecting by the first pick-up unit, stop the technical scheme of fileinfo that the task of the transmission of data or quick storage being are are being read and write, solved in prior art owing to existing when extraneous memory device is not when completing the read-write operation of file, when just unintentionally external storage equipment and electronic equipment are disconnected by user, can cause to external storage equipment the technical matters of damage, make to be kept at the technical matters that the file data on this external world's memory device is lost, and then realized can be before the first memory device and electronic equipment disconnect, preservation does not in time complete the file of read-write operation, avoided the loss of file data.
3, owing to adopting the first pick-up unit to detect the first operation to the first memory device, having solved in prior art need to be when disconnecting external storage equipment and electronic equipment, need to confirm the operation that can eject, owing to often occurring that system mistake causes ejecting unsuccessfully, so, the technical matters that the operation of exist to confirm ejecting cannot be carried out, and then realized the operation of ejecting without being confirmed whether, the technique effect that just external storage equipment and electronic equipment directly can be disconnected.
Although described the preferred embodiments of the present invention, once those skilled in the art obtain the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.

Claims (46)

1. a control method, be applied to there is first interface and the electronic equipment of the first pick-up unit of being connected with described first interface in, it is characterized in that, described method comprises:
By described the first pick-up unit, detect and whether for first of described the first memory device, operate;
There iing described first when operation, judging whether described the first operation meets one pre-conditioned;
When described the first operation meets describedly when pre-conditioned, generate one and operate the first corresponding steering order with described first;
Carry out described the first steering order, so that described the first memory device is carried out to first control operation corresponding with described the first steering order.
2. whether the method for claim 1, is characterized in that, describedly by described the first pick-up unit, detect for the first operation of described the first memory device, is specially:
By described the first pick-up unit detect whether have described the first memory device is extracted from described first interface first extract operation; Or
By described the first pick-up unit, detect whether there is the first update that described the first memory device is inserted to described first interface.
3. method as claimed in claim 2, is characterized in that, described by described the first pick-up unit detect whether have described the first memory device is extracted from described first interface first extract operation, be specially:
In first moment, by described the first pick-up unit, detecting described the first memory device is primary importance in the current location of described first interface;
In second moment after described first moment, by described the first pick-up unit, detecting described current location is the second place;
Judge the position relationship between described primary importance and the described second place, the first judged result of acquisition;
Based on described the first judged result, detect whether have described the first memory device is extracted from described first interface first extract operation.
4. method as claimed in claim 3, is characterized in that, described having described first when operation, judges whether described the first operation meets one pre-conditioned, specifically comprises:
Obtain the second distance of the outer end of the described first interface of described second place distance, and the first distance of the described outer end of described primary importance distance;
Described second distance be less than described first apart from time, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
5. method as claimed in claim 4, is characterized in that, described to judge that whether described the first operation meets one pre-conditioned, is specially:
Judge whether described second distance is greater than the first predetermined threshold value, wherein, described the first predetermined threshold value is specially for characterizing described the first memory device whether had the possible distance value being electrically connected to described electronic equipment disconnection.
6. method as claimed in claim 5, is characterized in that, describedly meets describedly when pre-conditioned when described the first operation, generates one and operates the first corresponding steering order with described first, is specially:
Described, show to have described first to extract operation, and when described second distance is greater than described the first predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
7. method as claimed in claim 6, is characterized in that, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, is specially:
Described in execution, stop data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device; And/or
Carry out described instruction data storage, to preserve the data in described the first memory device.
8. method as claimed in claim 2, is characterized in that, whether described have by described the first pick-up unit detection the first update that described the first memory device is inserted to described first interface, is specially:
In first moment, by described the first pick-up unit, detecting the current location of described the first memory device in described first interface is the 3rd position;
In second moment after described first moment, by described the first pick-up unit, detecting described current location is the 4th position;
Judge the position relationship between described the 3rd position and described the 4th position, obtain the second judged result;
Based on described the second judged result, detect and whether have the first update that described the first memory device is inserted to described first interface.
9. method as claimed in claim 8, is characterized in that, described having described first when operation, judges whether described the first operation meets one pre-conditioned, specifically comprises:
Obtain the 4th distance of the outer end of first interface described in described the 4th positional distance, and the 3rd distance of outer end described in described the 3rd positional distance;
Described the 4th distance be greater than the described the 3rd apart from time, show to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
10. method as claimed in claim 9, is characterized in that, described to judge that whether described the first operation meets one pre-conditioned, is specially:
Judge that whether described the 4th distance is less than the second predetermined threshold value, wherein, whether described the second predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the potential range but not powering on.
11. methods as claimed in claim 10, is characterized in that, described the first operation of described judgement meets described when pre-conditioned, generate one and operate the first corresponding steering order with described first, are specially:
Described, show to have described the first update, and when described second distance is less than described the second predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
12. methods as claimed in claim 11, is characterized in that, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, is specially:
Carry out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
Whether 13. the method for claim 1, is characterized in that, when described the first memory device is USB interface memory device, describedly by described the first pick-up unit, detect for the first operation of described the first memory device, are specially:
By be arranged on pressure transducer in the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation; Or
By the pressure transducer being arranged in the USB interface corresponding with described USB interface memory device, detect the first update in two holes that whether have two shell fragments to insert described USB interface memory device.
14. methods as claimed in claim 13, it is characterized in that, by be arranged on pressure transducer in the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation, be specially:
In first moment, by described pressure transducer, detect the first force value on described two shell fragments;
In second moment after described first moment, by described pressure transducer, detect the second force value on described two shell fragments;
Judge the magnitude relationship of described the first force value and described the second force value, obtain the 3rd judged result;
Based on described the 3rd judged result, detect whether have that described shell fragment extracts from described two holes first extract operation.
15. methods as claimed in claim 14, is characterized in that, described having described first when operation, judge whether described the first operation meets one pre-conditioned, specifically comprise:
When described the second force value is greater than described the first force value, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
16. methods as claimed in claim 15, is characterized in that, described to judge that whether described the first operation meets one pre-conditioned, is specially:
Judge whether described the second force value is greater than the 3rd predetermined threshold value, wherein, whether described the 3rd predetermined threshold value is specifically used for characterizing described the first memory device the possible pressure value being connected with described electronic equipment power-off.
17. methods as claimed in claim 16, is characterized in that, describedly meet describedly when pre-conditioned when described the first operation, generate one and operate the first corresponding steering order with described first, are specially:
Described, show that described first extracts when operation, and when described the second force value is less than described the 3rd predetermined threshold value, generate and described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
18. methods as claimed in claim 17, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, is specially:
Described in execution, stop data transfer instruction, to stop the data transmission between described electronic equipment and described the first memory device; And/or
Carry out described instruction data storage, to preserve the data in described the first memory device.
19. methods as claimed in claim 13, it is characterized in that, describedly by being arranged on pressure transducer in the USB interface corresponding with described USB interface memory device, detect the first update in two holes that whether have two shell fragments to insert described USB interface memory device, be specially:
In first moment, by described pressure transducer, detect the 3rd force value on described two shell fragments;
Second moment after described first moment, then detect the 4th force value on described two shell fragments by described pressure transducer;
Judge the magnitude relationship of described the 3rd force value and described the 4th force value, obtain the 4th judged result;
Based on described the 4th judged result, detect and whether have described sheet insertion to enter the first update in described two holes.
20. methods as claimed in claim 19, is characterized in that, described having described first when operation, judge whether described the first operation meets one pre-conditioned, specifically comprise:
When described the 4th force value is less than described the 3rd force value, show to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
21. methods as claimed in claim 20, is characterized in that, described to judge that whether described the first operation meets one pre-conditioned, is specially:
Judge whether described the 4th force value is less than the 4th predetermined threshold value, wherein, whether described the 4th predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the possible pressure value but not powering on.
22. methods as claimed in claim 21, is characterized in that, described the first operation of described judgement meets described when pre-conditioned, generate one and operate the first corresponding steering order with described first, are specially:
Described, show to have described the first update, and when described the 4th force value is greater than described the 4th predetermined threshold value, generates the prompting corresponding with described the first update and insert prompting instruction not in place.
23. methods as claimed in claim 22, is characterized in that, described the first steering order of described execution, so that described the first memory device is carried out to first control operation corresponding with described the first steering order, is specially:
Carry out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
24. 1 kinds of electronic equipments, is characterized in that, comprising:
First interface;
The first pick-up unit, is connected with described first interface;
Wherein, by described the first pick-up unit, detect whether for the first operation that is connected to described the first memory device on described first interface; There iing described first when operation, judging whether described the first operation meets one pre-conditioned; When described the first operation meets describedly when pre-conditioned, generate one and operate the first corresponding steering order with described first; Carry out described the first steering order, so that described the first memory device is carried out to first control operation corresponding with described the first steering order.
25. electronic equipments as claimed in claim 24, is characterized in that, described the first pick-up unit specifically comprises:
The first detection sub-unit, for detection of whether have described memory device is extracted from described first interface first extract operation;
The second detection sub-unit, for detection of whether there being the first update that described memory device is inserted to described first interface.
26. electronic equipments as claimed in claim 25, is characterized in that, described the first detection sub-unit specifically comprises:
Primary importance detecting unit, for first constantly, by described the first detection sub-unit, detecting described memory device is primary importance in the current location of described first interface;
Second place detecting unit, for second moment after described first moment, by described the first detection sub-unit, detecting described current location is the second place;
The first judging unit, for judging the position relationship between described primary importance and the described second place, the first judged result of acquisition;
First extracts detecting unit, for based on described the first judged result, detect whether have described memory device is extracted from described first interface first extract operation.
27. electronic equipments as claimed in claim 26, is characterized in that, described first extracts detecting unit specifically comprises:
The first acquiring unit, for obtaining the second distance of the outer end of the described first interface of described second place distance, and the first distance of the described outer end of described primary importance distance;
The first judgment sub-unit, at described second distance, be less than described first apart from time, show to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
28. electronic equipments as claimed in claim 27, it is characterized in that, described the first judgment sub-unit is specifically for judging whether described second distance is greater than the first predetermined threshold value, wherein, described the first predetermined threshold value is specially for characterizing described the first memory device whether had the possible distance value being electrically connected to described electronic equipment disconnection.
29. electronic equipments as claimed in claim 28, is characterized in that, described the first judgment sub-unit specifically comprises:
The first generation unit, shows to have described first to extract operation for described, and when described second distance is greater than described the first predetermined threshold value, generate with described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
30. electronic equipments as claimed in claim 28, is characterized in that, described the first judgment sub-unit specifically also comprises:
The first performance element stops data transfer instruction described in carrying out, to stop the data transmission between described electronic equipment and described the first memory device; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
31. electronic equipments as claimed in claim 25, is characterized in that, described the second detection sub-unit specifically comprises:
The 3rd position detection unit, for first constantly, by described the first pick-up unit, detecting the current location of described the first memory device in described first interface is the 3rd position;
The 4th position detection unit, for second moment after described first moment, by described the first pick-up unit, detecting described current location is the 4th position;
The second judging unit, for judging the position relationship between described the 3rd position and described the 4th position, obtains the second judged result;
First inserts detecting unit, for based on described the second judged result, detects and whether has the first update that described the first memory device is inserted to described first interface.
32. electronic equipments as claimed in claim 31, is characterized in that, described first inserts detecting unit specifically comprises:
Second acquisition unit, for obtaining the 4th distance of the outer end of first interface described in described the 4th positional distance, and the 3rd distance of outer end described in described the 3rd positional distance;
The second judgment sub-unit, in described the 4th distance, be greater than the described the 3rd apart from time, show to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
33. electronic equipments as claimed in claim 32, it is characterized in that, described the second judgment sub-unit is specifically for judging whether described the 4th distance is less than the second predetermined threshold value, wherein, whether described the second predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the potential range but not powering on.
34. electronic equipments as claimed in claim 33, is characterized in that, described the second judgment sub-unit specifically comprises:
The second generation unit, for showing to have described the first update described, and when described second distance is less than described the second predetermined threshold value, generates the prompting corresponding with described the first update and inserts prompting instruction not in place.
35. electronic equipments as claimed in claim 33, is characterized in that, described the second judgment sub-unit specifically also comprises:
The second performance element, for carrying out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
36. electronic equipments as claimed in claim 24, when described memory device is specially USB interface memory device, and described first interface is while being USB interface, described the first pick-up unit specifically comprises:
The 3rd detection sub-unit, for by be arranged on the pressure transducer of the USB interface corresponding with described USB interface memory device detect whether have that two shell fragments extract from two holes of described USB interface memory device first extract operation;
The 4th detection sub-unit, for detecting the first update in two holes that whether have two shell fragments to insert described USB interface memory device by being arranged on the pressure transducer of the USB interface corresponding with described USB interface memory device.
37. electronic equipments as claimed in claim 36, is characterized in that, described the 3rd detection sub-unit specifically comprises:
The first pressure sensing cell, in first moment, detects the first force value on described two shell fragments by described pressure transducer;
The second pressure sensing cell, for second moment after described first moment, detects the second force value on described two shell fragments by described pressure transducer;
The 3rd judging unit, for judging the magnitude relationship of described the first force value and described the second force value, obtains the 3rd judged result;
Second extracts detecting unit, for based on described the 3rd judged result, detect whether have that described shell fragment extracts from described two holes first extract operation.
38. electronic equipments as claimed in claim 37, is characterized in that, described second extracts detecting unit specifically comprises:
The 3rd judgment sub-unit, for when described the second force value is greater than described the first force value, shows to have described first to extract operation, and it is one pre-conditioned to judge that whether described the first operation meets.
39. electronic equipments as claimed in claim 37, it is characterized in that, described the 3rd judgment sub-unit is specifically for judging whether described the second force value is greater than the 3rd predetermined threshold value, whether wherein, described the 3rd predetermined threshold value is specifically used for characterizing described the first memory device the possible pressure value being connected with described electronic equipment power-off.
40. electronic equipments as claimed in claim 39, is characterized in that, described the 3rd judgment sub-unit specifically comprises:
The 3rd generation unit, for showing that described described first extracts when operation, and when described the second force value is less than described the 3rd predetermined threshold value, generate and described first extract operational correspondence stop data transfer instruction and/or instruction data storage.
41. electronic equipments as claimed in claim 39, is characterized in that, described the 3rd judgment sub-unit also comprises:
The 3rd performance element stops data transfer instruction described in carrying out, to stop the data transmission between described electronic equipment and described the first memory device; And/or carry out described instruction data storage, to preserve the data in described the first memory device.
42. electronic equipments as claimed in claim 36, is characterized in that, described the 4th detection sub-unit specifically comprises:
The 3rd pressure sensing cell, in first moment, detects the 3rd force value on two shell fragments in described USB interface by described pressure transducer;
The 4th pressure sensing cell, for second moment after described first moment, then detects the 4th force value on two shell fragments in described USB interface by described pressure transducer;
The 4th judging unit, for judging the magnitude relationship of described the 3rd force value and described the 4th force value, obtains the 4th judged result;
Whether second inserts detecting unit, for based on described the 4th judged result, detect and have described sheet insertion to enter the first update in described two holes.
43. electronic equipments as claimed in claim 42, is characterized in that, described second inserts detecting unit specifically comprises:
The 4th judgment sub-unit, for when described the 4th force value is less than described the 3rd force value, shows to have described the first update, and it is one pre-conditioned to judge that whether described the first operation meets.
44. electronic equipments as claimed in claim 43, it is characterized in that, described the 4th judgment sub-unit is specifically for judging whether described the 4th force value is less than the 4th predetermined threshold value, wherein, whether described the 4th predetermined threshold value is specially for characterizing described the first memory device has had with described electronic equipment and has been connected, the possible pressure value but not powering on.
45. electronic equipments as claimed in claim 44, is characterized in that, described the 4th judgment sub-unit specifically comprises:
The 4th generation unit, for showing to have described the first update described, and when described the 4th force value is greater than described the 4th predetermined threshold value, generates the prompting corresponding with described the first update and inserts prompting instruction not in place.
46. electronic equipments as claimed in claim 44, is characterized in that, described the 4th judgment sub-unit specifically also comprises:
The 4th performance element, for carrying out described prompting instruction, to remind the first memory device described in described electronic equipment to insert not in place.
CN201310097734.1A 2013-03-25 2013-03-25 A kind of control method and a kind of electronic equipment Active CN104077193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310097734.1A CN104077193B (en) 2013-03-25 2013-03-25 A kind of control method and a kind of electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310097734.1A CN104077193B (en) 2013-03-25 2013-03-25 A kind of control method and a kind of electronic equipment

Publications (2)

Publication Number Publication Date
CN104077193A true CN104077193A (en) 2014-10-01
CN104077193B CN104077193B (en) 2018-08-31

Family

ID=51598462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310097734.1A Active CN104077193B (en) 2013-03-25 2013-03-25 A kind of control method and a kind of electronic equipment

Country Status (1)

Country Link
CN (1) CN104077193B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072268A (en) * 2015-07-31 2015-11-18 努比亚技术有限公司 Mobile terminal and method for stopping application thereof
CN105824736A (en) * 2016-03-29 2016-08-03 乐视控股(北京)有限公司 Method and device for detecting disconnection risk of external equipment
CN106886695A (en) * 2017-03-13 2017-06-23 联想(北京)有限公司 Electronic equipment and its method for unlocking
CN107861839A (en) * 2017-10-18 2018-03-30 深圳市汉普电子技术开发有限公司 USB hot plug data anti-loss method, equipment and storage medium
CN111338526A (en) * 2020-02-25 2020-06-26 维沃移动通信有限公司 Screenshot method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW444165B (en) * 1998-05-12 2001-07-01 Primax Electronics Ltd Hot plug and play universal serial bus switch device and control method
CN101383627B (en) * 2007-09-04 2012-12-26 联芯科技有限公司 Device and method for terminal charger charging, USB charging and data communication
US7635280B1 (en) * 2008-07-30 2009-12-22 Apple Inc. Type A USB receptacle with plug detection
CN102053941B (en) * 2009-11-06 2012-07-04 创见资讯股份有限公司 Portable device with reciprocating type detection terminal and detection and control method thereof
CN202275990U (en) * 2011-10-17 2012-06-13 山东科技大学 Protector of universal serial bus (USB) plug

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072268A (en) * 2015-07-31 2015-11-18 努比亚技术有限公司 Mobile terminal and method for stopping application thereof
CN105072268B (en) * 2015-07-31 2018-08-14 努比亚技术有限公司 Mobile terminal and its method for stopping application
CN105824736A (en) * 2016-03-29 2016-08-03 乐视控股(北京)有限公司 Method and device for detecting disconnection risk of external equipment
CN106886695A (en) * 2017-03-13 2017-06-23 联想(北京)有限公司 Electronic equipment and its method for unlocking
CN107861839A (en) * 2017-10-18 2018-03-30 深圳市汉普电子技术开发有限公司 USB hot plug data anti-loss method, equipment and storage medium
CN111338526A (en) * 2020-02-25 2020-06-26 维沃移动通信有限公司 Screenshot method and device

Also Published As

Publication number Publication date
CN104077193B (en) 2018-08-31

Similar Documents

Publication Publication Date Title
CN104077193A (en) Control method and electronic device
EP2879014B1 (en) Tablet interface extension method and device
US20140300321A1 (en) Method for controlling charging of electronic device, and electronic device and charging device supporting the same
US20100174835A1 (en) Signal Converter for an All-In-One USB Connector
US7996579B2 (en) Apparatus, methods, and computer-code for handling an impending decoupling between a peripheral device and a host device
CN108920397B (en) Device identification method and device, storage medium and electronic device
CN102890662B (en) By USB HID device is carried out the method that secondary enumerates to identify host operating system
CN204028812U (en) Electronic equipment
CN104777891A (en) OTG (on-the-go) connecting control method applied to intelligent terminal and connecting control device
CN102073602A (en) Computer system, connection control device as well as connecting and disconnecting method
CN103096167B (en) A kind of starting method and system of smart television
CN106293845A (en) A kind of terminal enters control method and the device of brush machine pattern
CN102236591A (en) System and method for customizing a SCSI error response received from a SCSI target in a storage network environment
EP2270758A3 (en) Portable electronic apparatus, processing apparatus for portable electronic apparatus, and data processing method in portable electronic apparatus
EP3264226B1 (en) Pin control method and device
TW201331757A (en) Detecting method and apparatus for hot swapped SD card
CN104463034B (en) A kind of method and device of safe and convenient unloading external connection storage device
EP4350934A1 (en) Connector and power supply control method applied to connector
CN115528768A (en) Charging control method and device
US11334506B2 (en) Interface connection device, system and method thereof
CN104423570A (en) Misrecognition reducing motion recognition apparatus and method
CN101923878A (en) Data storage control system and method
CN113220091A (en) Supercomputing device, online detection method of force calculating plate and storage medium
CN106128491A (en) Visual hard disk
CN104731681A (en) Diagnostic device and information processing method

Legal Events

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