TECHNICAL FIELD
[0001] The present invention relates to the field of electronic design, and in particular,
to a connection/disconnection method and apparatus.
BACKGROUND
[0002] With rapid development of technologies, requirements of a user for various products
are no longer reflected only in functionality. Requirements for product operation
experience, artistry, and security in using a product are becoming higher.
[0003] In the prior art, a card installed in a slot of an electronic device can be used
normally in the electronic device no matter whether the card is authorized. In addition,
a connection/disconnection structure between an existing electronic device and an
electronic component interface is mostly mechanical, namely, the electronic device
uses a mechanical lever to control connection/disconnection between the electronic
device and the electronic component interface, so that a user can implement connection/disconnection
between the electronic device and the electronic component interface by triggering
the mechanical lever and further change a card installed in the slot of the electronic
device. For example, the electronic device is connected to a subscriber identity module
(SIM, Subscriber Identity Module) slot or a secure digital memory card (SD, Secure
Digital Memory Card) slot by using a mechanical lever. By triggering the mechanical
lever, the user may directly change a card installed in the slot of the electronic
device. Examples of prior art can be found in
US 2002/120857 or
GB2398706.
[0004] However, with the mechanical connection/disconnection structure, the user can change
the card installed in the slot of the electronic device by only triggering the mechanical
lever. Therefore, an unauthorized card can also be installed in the electronic device
and used normally, which may lead to leakage of information in the electronic device
and also low security of the electronic device.
SUMMARY
[0005] Embodiments of the present invention provide a connection/disconnection method and
apparatus, so as to resolve a problem of low security of an electronic device in a
current mechanical connection/disconnection technology and improve the security of
the electronic device.
[0006] To achieve the foregoing objective, the following technical solutions are used in
the embodiments of the present invention as defined by the appended claims:
According to a first aspect, an embodiment of the present invention provides an electronic
device, including a magnetic medium, a coil that encircles a side of the magnetic
medium, and a processor connected to both ends of the coil, where
the magnetic medium is configured to: when the electronic device detects connection
of an electronic component, be magnetized by a first magnetic field generated by the
electronic component, and be connected to the electronic component under an effect
of a magnetic force of the first magnetic field, where the electronic component accommodates
or is connected to a target connection component;
the coil is configured to: under an effect of the first magnetic field, generate a
first electric signal according to a change of a magnetic flux in the coil, where
the first electric signal is used to drive the processor to determine whether identification
information of the target connection component accommodated in or connected to the
electronic component is the same as a preset identifier; and
the processor is configured to detect the change of the magnetic flux; is configured
to: if a change of the first electric signal meets a first preset model, determine
whether the identification information of the target connection component is the same
as the preset identifier; and is further configured to: if the identification information
of the target connection component is different from the preset identifier, drive
the electronic component to be disconnected from the electronic device.
[0007] In a first possible implementation manner of the first aspect, the processor is further
configured to: if the identification information is the same as the preset identifier,
generate a first control signal; and
the coil is specifically configured to generate a second electric signal according
to the first control signal, and generate a second magnetic field by using the second
electric signal, where a magnetic force of the second magnetic field is used to drive
the electronic component to be fixedly connected to the electronic device.
[0008] With reference to the first possible implementation manner of the first aspect, in
a second possible implementation manner of the first aspect, the processor is further
configured to obtain instruction information, where the instruction information is
used to drive the electronic component to be disconnected from the electronic device;
and
the processor is further configured to: after obtaining the instruction information,
drive the electronic component to be disconnected from the electronic device.
[0009] With reference to the second possible implementation manner of the first aspect,
in a third possible implementation manner of the first aspect, the processor is further
configured to: after obtaining the instruction information, determine whether the
instruction information is the same as instruction verification information; and
that the processor is further configured to: after obtaining the instruction information,
drive the electronic component to be disconnected from the electronic device includes:
the processor is further configured to: if the instruction information is the same
as the instruction verification information, drive the electronic component to be
disconnected from the electronic device.
[0010] With reference to the first aspect or any possible implementation manner of the first
possible implementation manner to the third possible implementation manner of the
first aspect, in a fourth possible implementation manner of the first aspect, the
processor is specifically configured to: if the identification information is different
from the preset identifier, generate a second control signal; and
the coil is specifically configured to generate a third electric signal according
to the second control signal, and generate the second magnetic field by using the
third electric signal, where the magnetic force of the second magnetic field is used
to drive the electronic component to be disconnected from the electronic device.
[0011] With reference to the fourth possible implementation manner of the first aspect,
in a fifth possible implementation manner of the first aspect, the processor is further
configured to detect whether a change of the third electric signal meets a second
preset model, and if the change of the third electric signal meets the second preset
model, drive the coil to stop generating the third electric signal.
[0012] With reference to the first aspect or any possible implementation manner of the first
to fifth possible implementation manners of the first aspect, in a sixth possible
implementation manner of the first aspect, the target connection component is a data
card or a memory card, and the identification information of the target connection
component is a serial number or an identity ID of the target connection component.
[0013] According to a second aspect, an embodiment of the present invention provides an
electronic component, including a permanent magnet apparatus that includes an electronic
interface, where
the permanent magnet apparatus is configured to generate a first magnetic field, where
a magnetic force of the first magnetic field is used to: when the electronic component
is being connected to an electronic device, drive the electronic component to be connected
to the electronic device; and
the electronic interface is configured to accommodate or be connected to a target
connection component, where the target connection component is used by the electronic
device to perform communication or used to perform data transmission with the electronic
device.
[0014] In a first possible implementation manner of the second aspect, the electronic interface
is a slot, and the slot is rigidly connected to the permanent magnet apparatus.
[0015] With reference to the second aspect or the first possible implementation manner of
the second aspect, in a second possible implementation manner of the second aspect,
the target connection component is a data card or a memory card.
[0016] According to a third aspect, an embodiment of the present invention provides user
equipment, including at least an electronic device with any characteristic described
in the first aspect and an electronic component with any characteristic described
in the second aspect.
[0017] According to a fourth aspect, an embodiment of the present invention provides a connection/disconnection
method, including:
detecting, by an electronic device, a change of a magnetic flux of a first magnetic
field in the electronic device, and generating a first electric signal according to
the change of the magnetic flux, where the first magnetic field is generated by an
electronic component, a magnetic force of the first magnetic field is used to drive
the electronic component to be connected to the electronic device, and the electronic
component accommodates or is connected to a target connection component;
if a change of the first electric signal meets a first preset model, determining,
by the electronic device, whether identification information of the target connection
component is the same as a preset identifier; and
if the identification information of the target connection component is different
from the preset identifier, driving, by the electronic device, the electronic component
to be disconnected from the electronic device.
[0018] In a first possible implementation manner of the fourth aspect, the method further
includes:
generating, by the electronic device, a second electric signal if the identification
information is the same as the preset identifier, so that the electronic device generates
a second magnetic field by using the second electric signal, where a magnetic force
of the second magnetic field is used to drive the electronic component to be fixedly
connected to the electronic device.
[0019] With reference to the first possible implementation manner of the fourth aspect,
in a second possible implementation manner of the fourth aspect, the method further
includes:
obtaining instruction information, where the instruction information is used to drive
the electronic component to be disconnected from the electronic device; and
driving, according to the instruction information, the electronic component to be
disconnected from the electronic device.
[0020] With reference to the second possible implementation manner of the fourth aspect,
in a third possible implementation manner of the fourth aspect, the method further
includes:
determining whether the instruction information is the same as instruction verification
information; and
the driving, according to the instruction information, the electronic component to
be disconnected from the electronic device includes:
if the instruction information is the same as the instruction verification information,
driving the electronic component to be disconnected from the electronic device.
[0021] With reference to the fourth aspect or any possible implementation manner of the
first possible implementation manner to the third possible implementation manner of
the fourth aspect, in a fourth possible implementation manner of the fourth aspect,
the target connection component is a data card or a memory card, and the identification
information of the target connection component is a serial number or an identity ID
of the target connection component.
[0022] According to a fifth aspect, an embodiment of the present invention provides an electronic
device, including:
a detection unit, configured to detect a change of a magnetic flux of a first magnetic
field in the electronic device, where the first magnetic field is generated by an
electronic component, a magnetic force of the first magnetic field is used to drive
the electronic component to be connected to the electronic device, and the electronic
component accommodates or is connected to a target connection component;
a generation unit, configured to generate a first electric signal according to the
change of the magnetic flux detected by the detection unit;
a determining unit, configured to: if a change of the first electric signal generated
by the generation unit meets a first preset model, determine whether identification
information of the target connection component is the same as a preset identifier;
and
a driving unit, configured to: if the determining unit determines that the identification
information of the target connection component is different from the preset identifier,
drive the electronic component to be disconnected from the electronic device.
[0023] In a first possible implementation manner of the fifth aspect, the generation unit
is further configured to generate a second electric signal if the determining unit
determines that the identification information is the same as the preset identifier,
so that the electronic device generates a second magnetic field by using the second
electric signal, where a magnetic force of the second magnetic field is used to drive
the electronic component to be fixedly connected to the electronic device.
[0024] With reference to the first possible implementation manner of the fifth aspect, in
a second possible implementation manner of the fifth aspect, the electronic device
further includes an obtaining unit;
the obtaining unit is configured to obtain instruction information, where the instruction
information is used to drive the electronic component to be disconnected from the
electronic device; and
the driving unit is further configured to: drive, according to the instruction information
obtained by the obtaining unit, the electronic component to be disconnected from the
electronic device.
[0025] With reference to the second possible implementation manner of the fifth aspect,
in a third possible implementation manner of the fifth aspect, the determining unit
is further configured to determine whether the instruction information obtained by
the obtaining unit is the same as instruction verification information; and
the driving unit is specifically configured to: if the determining unit determines
that the instruction information is the same as the instruction verification information,
drive the electronic component to be disconnected from the electronic device.
[0026] With reference to the fifth aspect or any possible implementation manner of the first
possible implementation manner to the third possible implementation manner of the
fifth aspect, in a fourth possible implementation manner of the fifth aspect, the
target connection component is a data card or a memory card, and the identification
information of the target connection component is a serial number or an identity ID
of the target connection component.
[0027] According to a sixth aspect, an embodiment of the present invention provides an electronic
component, including:
a permanent magnet unit, configured to generate a first magnetic field, where a magnetic
force of the first magnetic field is used to: when the electronic component is being
connected to an electronic device, drive the electronic component to be connected
to the electronic device; and
an input/output unit, configured to be connected to a target connection component,
where the target connection component is used by the electronic device to perform
communication or used to perform data transmission with the electronic device.
[0028] In a first possible implementation manner of the sixth aspect, the target connection
component is a data card or a memory card.
[0029] The embodiments of the present invention provide a connection/disconnection method
and apparatus. An electronic device detects a change of a magnetic flux of a first
magnetic field in the electronic device, and generates a first electric signal according
to the change of the magnetic flux, where the first magnetic field is generated by
an electronic component, a magnetic force of the first magnetic field is used to drive
the electronic component to be connected to the electronic device, and the electronic
component accommodates or is connected to a target connection component. From electromagnetic
induction principles, it can be learned that the change of the magnetic flux of the
first magnetic field in the electronic device may cause the electronic device to generate
a first electric signal, where the first magnetic field is generated by the electronic
component, and the change of the magnetic flux may cause a change of the first electric
signal. If the change of the first electric signal meets a first preset model, the
electronic device determines whether identification information of the target connection
component is the same as a preset identifier, and if the identification information
of the target connection component is different from the preset identifier, the electronic
device drives the electronic component to be disconnected from the electronic device.
[0030] By using this solution, the electronic device completes, by means of program logic
control, determining whether the target connection component accommodated in or connected
to the electronic component has been authorized, namely, determining whether the identification
information of the target connection component is the same as the preset identifier;
if determining that the target connection component is not authorized, the electronic
device drives the electronic component to be disconnected from the electronic device.
In this way, it is ensured that an unauthorized target connection component cannot
be normally used after the target connection component is connected to the electronic
device, thereby improving security of the electronic device.
BRIEF DESCRIPTION OF DRAWINGS
[0031] To describe the technical solutions in the embodiments of the present invention or
in the prior art more clearly, the following briefly introduces the accompanying drawings
required for describing the embodiments or the prior art. Apparently, the accompanying
drawings in the following description show merely some embodiments of the present
invention, and a person of ordinary skill in the art may still derive other drawings
from these accompanying drawings without creative efforts.
FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment
of the present invention;
FIG. 2 is a schematic structural diagram of an electronic component according to an
embodiment of the present invention;
FIG. 3 is a schematic structural diagram of user equipment according to an embodiment
of the present invention;
FIG. 4 is a schematic flowchart of a connection/disconnection method according to
an embodiment of the present invention;
FIG. 5 is a schematic diagram of magnetizing a magnetic medium of an electronic device
according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of generating a first electric signal by an electronic
device according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of generating a second magnetic field by an electronic
device according to an embodiment of the present invention;
FIG. 8 is a schematic flowchart of a connection/disconnection method according to
an embodiment of the present invention;
FIG. 9 is a schematic flowchart of a connection/disconnection method according to
an embodiment of the present invention;
FIG. 10 is a schematic flowchart of a connection/disconnection method according to
an embodiment of the present invention;
FIG. 11 is a schematic structural diagram of an electronic device according to an
embodiment of the present invention;
FIG. 12 is a schematic structural diagram of an electronic device according to an
embodiment of the present invention; and
FIG. 13 is a schematic structural diagram of an electronic component according to
an embodiment of the present invention.
DESCRIPTION OF EMBODIMENTS
[0032] The following clearly and completely describes the technical solutions in the embodiments
of the present invention with reference to the accompanying drawings in the embodiments
of the present invention. Apparently, the described embodiments are merely some but
not all of the embodiments of the present invention. All other embodiments obtained
by a person of ordinary skill in the art based on the embodiments of the present invention
without creative efforts shall fall within the protection scope of the present invention.
Embodiment 1
[0033] This embodiment of the present invention provides an electronic device. As shown
in FIG. 1, the electronic device may include a magnetic medium 10, a coil 11, a processor
12, an electronic component interface 13, a memory 14, and a system bus 15, where
the coil 11 encircles a side of the magnetic medium 10, the processor 12 is connected
to both ends of the coil 11, and connection and communication are implemented between
the processor 12, the memory 14, and the electronic component interface 13 by using
the system bus 15.
[0034] The memory 14 may be a high-speed RAM (Random Access Memory, random access memory)
memory, or may be a non-volatile memory (non-volatile memory) such as at least one
disk memory. The memory 14 is configured to store a first electric signal generated
by the electronic device, a first preset model, a second preset model, and the like.
[0035] The electronic component interface 13 may be configured to be connected to an external
electronic component, and enable the electronic device to perform communication or
data transmission over the electronic component interface 13 by using a target connection
component in the external electronic component. For example, by using the electronic
component interface, the electronic device may read data on a memory card accommodated
in a slot.
[0036] It should be noted that the electronic device in the embodiment of the present invention
may be any apparatus that includes a user interface, which is not limited by the embodiment
of the present invention. For example, the electronic device may be a mobile phone
on which no SIM card slot is installed, may be a mobile phone to which no headset
is connected, or may be an electronic device without an anti-theft lock on an electronic
exhibition booth.
[0037] The electronic device may be a mobile phone (or referred to as a "cellular" phone),
or may be a computer with a mobile terminal, such as a portable, pocket-sized, handheld,
computer built-in, or in-vehicle mobile apparatus.
[0038] Specifically, the magnetic medium 10 is configured to: when the electronic device
detects connection of an electronic component, be magnetized by a first magnetic field
generated by the electronic component, and be connected to the electronic component
under an effect of a magnetic force of the first magnetic field, where the electronic
component accommodates or is connected to a target connection component.
[0039] The magnetic medium refers to a material in which a magnetization state changes under
an effect of a magnetic field. Preferably, the magnetic medium 10 in the embodiment
of the present invention may be an iron core. The iron core may be made of a soft
iron or silicon steel material, which is not limited by the embodiment of the present
invention. In addition, a shape characteristic of the magnetic medium 10 may be a
cuboid, or may be a cylinder. The shape characteristic of the magnetic medium is not
limited by the embodiment of the present invention.
[0040] In addition, the electronic component in the embodiment of the present invention
may be a permanent magnet apparatus, or may be another apparatus with a permanent
magnet characteristic. The electronic component includes an electronic interface.
The electronic interface is connected to or accommodates a target connection component,
and the electronic component can generate a first magnetic field.
[0041] Specifically, when the electronic component is being connected to the body of the
electronic device, a distance between the electronic component and the magnetic medium
is becoming shorter, and the magnetic medium 10 is magnetized by the first magnetic
field. A change of an internal state of the magnetic medium under an effect of the
magnetic field is referred to as magnetization. That is, the internal state of the
magnetic medium 10 changes under the effect of the first magnetic field. In addition,
under the effect of the magnetic force of the first magnetic field, the magnetic medium
10 mutually attracts and is connected to the electronic component.
[0042] For example, the magnetic medium in the electronic device is an iron core. The electronic
component is a permanent magnet that includes an electronic interface, and therefore,
when the permanent magnet is connected to the body of the electronic device, the iron
core is magnetized by a magnetic field generated by the permanent magnet, and is connected
to the permanent magnet.
[0043] Specifically, the coil 11 is configured to: under the effect of the first magnetic
field, generate a first electric signal according to a change of a magnetic flux in
the coil, where the first electric signal is used to drive the processor 12 to determine
whether identification information of the target connection component accommodated
in or connected to the electronic component is the same as a preset identifier.
[0044] The magnetic flux is a measure of magnitude of a magnetic field that passes through
a given curved surface. Magnitude of a magnetic flux that passes through a plane may
be figuratively depicted by a quantity of magnetic induction lines in the plane. In
a same magnetic field, magnetic induction lines are denser in a place with a higher
magnetic induction intensity.
[0045] Understandably, that the coil 11 encircles the side of the magnetic medium includes
a case in which the coil 11 encircles all sides of the magnetic medium 10. For example,
if a shape of the magnetic medium 10 is a cylinder that includes two bases and a curved
surface, the coil 11 may encircle the curved surface (side) of the cylinder, or may
encircle the bases of the cylinder, or may encircle the curved surface and the bases
of the cylinder. A manner of encircling the magnetic medium by the coil should meet
an encircling manner of the coil in practical application, and is not limited by the
embodiment of the present invention.
[0046] When the electronic component is being connected to the electronic device, the electronic
component is becoming closer to the magnetic medium 10 under the effect of the magnetic
force of the first magnetic field, and the magnetic flux of the first magnetic field
in the coil 11 changes, where the first magnetic field is generated by the electronic
component. From electromagnetic induction principles, it can be learned that a conductor
in a changing magnetic flux may generate an electromotive force. That is, as the magnetic
flux of the first magnetic field in the coil 11 changes, the coil 11 generates a first
electric signal, and the first electric signal also changes with the magnetic flux.
[0047] It should be noted that the first electric signal in the embodiment of the present
invention may be a current or a voltage, which is not limited by the embodiment of
the present invention.
[0048] Specifically, the processor 12 is configured to detect the change of the magnetic
flux, and is configured to: if a change of the first electric signal meets a first
preset model, determine whether the identification information of the target connection
component is the same as the preset identifier.
[0049] The processor 12 is further configured to: if the identification information of the
target connection component is different from the preset identifier, drive the electronic
component to be disconnected from the electronic device.
[0050] The target connection component in the embodiment of the present invention may be
a data card, may be a memory card, or may be a chip in another intelligent electronic
component, which is not limited by the embodiment of the present invention. The target
connection component is a component used by the electronic device for communication
or data transmission.
[0051] For example, the target connection component is an SD card, a SIM card, a multimedia
card (MMC, Multimedia Card), a mini SD card, a memory stick, a smart card, a micro
SD card, or the like in the electronic device. The identification information of the
target connection component may be a serial number of the target connection component,
or may be an ID of the target connection component, which is not limited by the embodiment
of the present invention.
[0052] In addition, the electronic component in the embodiment of the present invention
accommodates or is connected to the target connection component by using an electronic
interface. There is at least one target connection component, such as two or more
than two, which is not specifically limited by the embodiment of the present invention.
[0053] Preferably, the electronic interface of the electronic component is a slot. In this
case, the target connection component is a data card (or a memory card), and therefore,
the data card (or the memory card) may be disposed at a groove of the slot, and a
size of the groove may fit a size of the data card (memory card).
[0054] Specifically, no matter how many target connection components are included in the
electronic component, processing that may be performed by the processor 12 on the
target connection components are the same processing; and the processor 12 determines
whether identification information of a target connection component is the same as
a preset identifier, where the preset identifier is an identifier corresponding to
the target connection component. So long as determining that the identifier of the
target connection component is different from the preset identifier, the processor
12 drives the electronic component to be disconnected from the electronic device.
[0055] For example, if the electronic device is a mobile phone on which no SIM card is installed
and the electronic component is a slot with a permanent magnet characteristic, the
slot can accommodate a SIM card. Identification information of the SIM card is an
international mobile subscriber identity (IMSI, International Mobile Subscriber Identification
Number).
[0056] Optionally, in an application scenario in which the mobile phone has only one slot
port and the slot with a permanent magnet characteristic can accommodate only one
SIM card, the processor in the mobile phone determines whether an international mobile
subscriber identity (IMSI, International Mobile Subscriber Identification Number)
of the SIM card accommodated in the slot is the same as a preset identifier. If the
IMSI of the SIM card is different from the preset identifier, the processor drives
the slot to be disconnected from the mobile phone, namely, the SIM accommodated in
the slot cannot be used normally.
[0057] Optionally, in an application scenario in which the mobile phone includes two slot
ports, the slot with a permanent magnet characteristic can accommodate only one SIM
card, and the mobile phone has two slots for accommodating a SIM card A and a SIM
card B respectively, the processor in the mobile phone processes the two slots in
the same way as the foregoing application scenario. When the processor in the mobile
phone determines that an IMSI of the SIM card A is the same as a preset identifier
thereof, the SIM card A can be used normally in the mobile phone. When the processor
in the mobile phone determines that an IMSI of the SIM card B is different from a
preset identifier thereof, the processor drives the slot, which accommodates the SIM
card B, to be disconnected from the mobile phone, namely, the SIM card B cannot be
used normally in the mobile phone.
[0058] Optionally, in an application scenario in which the mobile phone includes one slot
port and the slot with a permanent magnet characteristic can accommodate at least
one SIM card, for example, the slot accommodates two SIM cards, the processor in the
mobile phone separately determines whether IMSIs of the two SIM cards are the same
as preset identifiers of the SIM cards. In a first possible implementation manner,
if the IMSIs of both the SIM cards are the same as the preset identifiers, both the
SIMs can be used normally in the mobile phone. In a second possible implementation
manner, if the IMSI of one of the SIM cards is different from a preset identifier
thereof, the processor in the mobile phone drives this slot to be disconnected from
the mobile phone, so that neither of the SIM cards accommodated in the slot can be
used normally. In a third possible implementation manner, if the IMSI of one of the
SIM cards is different from a preset identifier thereof, the mobile phone may keep
a state of connection between this slot and the mobile phone, and disables the SIM
card whose IMSI is different from the preset identifier. That is, one of the SIM cards
can be used normally, and the other SIM card cannot be used normally.
[0059] Further, the processor 12 is further configured to: if the identification information
is the same as the preset identifier, generate a first control signal.
[0060] Further, the coil 11 is specifically configured to generate a second electric signal
according to the first control signal, and generate a second magnetic field by using
the second electric signal, where a magnetic force of the second magnetic field is
used to drive the electronic component to be fixedly connected to the electronic device.
[0061] Specifically, if the processor 12 determines that the identification information
of the target connection component is the same as the preset identifier, it indicates
that the target connection component can be used normally in the electronic device.
Correspondingly, the processor generates a first control signal, which is used to
drive the coil 11 to generate a second electric signal. Correspondingly, a second
magnetic field may be generated by using the second electric signal generated by the
coil 11. A magnetic force of the second magnetic field is used to drive the electronic
component to be fixedly connected to the electronic device, namely, drive the electronic
component to be more closely connected to the electronic device, which is equivalent
to a lock-in state between the electronic component and the electronic device, thereby
preventing a communications fault problem caused by a loose connection between the
electronic component and the electronic device, and further improving usage security
of the electronic device.
[0062] It should be noted that the second electric signal in the embodiment of the present
invention may be a current or a voltage, which is not limited by the embodiment of
the present invention.
[0063] The magnetic force of the second magnetic field generated by using the second electric
signal is used to drive the electronic component to be fixedly connected to the electronic
device, the first electric signal is generated according to the change of the magnetic
flux of the first magnetic field, and the magnetic force of the first magnetic field
is also used to drive the electronic component to be connected to the electronic device.
From the Lenz's law, it can be learned that the first electric signal and the second
electric signal have a same direction.
[0064] Further, the processor 12 is further configured to obtain instruction information,
where the instruction information is used to drive the electronic component to be
disconnected from the electronic device.
[0065] Preferably, the instruction information is information entered by a user by using
an application on the electronic device, and the instruction information is used to
drive the electronic component to be disconnected from the electronic device, and
may be a secure digital password, or may be other related information such as a graphical
password.
[0066] The application refers to a computer program that is developed to complete one or
more specific tasks and runs on an operating system. The application in the embodiment
of the present invention is an application compatible with a system running on the
electronic device.
[0067] It should be noted that the system running on the electronic device may be an Android
operating system, or may be another system such as an IOS, which is not limited by
the embodiment of the present invention. Because the system running on the electronic
device may be an Android operating system, or may be another system, a format of the
application also changes with the system.
[0068] For example, if the system running on the electronic device is an Android operating
system, the application is an APK (Application Package File, application package file).
[0069] The APK is an application installation file format on an Android operating system.
Before being run on an Android device, code of an Android application needs to be
compiled first, and then packed into a file identifiable by the Android operating
system. This file format that can be identified and run by the Android operating system
is APK. An APK file includes a compiled code file (.dex file), file resources (resources),
file access (assets), certificates (certificates), and a manifest file (manifest file).
[0070] For example, if the electronic device is a smartphone on which a SIM card is installed,
an application A is installed on the smartphone, and secure digital password input
is set in the application A, when a user uses the application A to enter a digital
password that drives ejection of the SIM card slot of the mobile phone, the processor
in the mobile phone obtains the digital password entered by the user.
[0071] Further, the processor 12 is further configured to: after obtaining the instruction
information, drive the electronic component to be disconnected from the electronic
device.
[0072] Further, the processor 12 is further configured to: after obtaining the instruction
information, determine whether the instruction information is the same as instruction
verification information.
[0073] Further, the processor 12 is further configured to: if the instruction information
is the same as the instruction verification information, drive the electronic component
to be disconnected from the electronic device.
[0074] Specifically, after obtaining the instruction information, the processor 12 performs
determining on the instruction information, and determines whether the instruction
information is the same as preset instruction verification information, and if the
instruction information is the same as the preset instruction verification information,
drives the electronic component to be disconnected from the electronic device.
[0075] For example, if the electronic device is a smartphone on which a SIM card is installed,
an application A is installed on the smartphone, and secure digital password input
is set in the application A, when a user uses the application A to enter a digital
password that drives ejection of the SIM card slot of the mobile phone, the processor
in the mobile phone obtains the digital password entered by the user. When determining
that the digital password entered by the user is the same as a preset digital password,
the processor drives the slot to be disconnected from the smartphone, namely, drives
ejection of the slot out of the smartphone.
[0076] Further, the processor 12 is specifically configured to: if the identification information
is different from the preset identifier, generate a second control signal.
[0077] Specifically, if the identification information is different from the preset identifier
or if the instruction information is the same as the instruction verification information,
the processor 12 generates a second control signal, and the electronic component is
disconnected from the electronic device under an effect of the second control signal.
[0078] In this application scenario, compared with a disadvantage in the prior art that
leakage of information in an electronic device may be caused by a fact that a user
can change a card in the electronic device by only triggering a mechanical lever,
the electronic device in the embodiment of the present invention can complete disconnection
only after receiving the instruction information that is entered by the user and used
to drive the electronic device to be disconnected from the electronic component and
after identifying the instruction information successfully, so that the user can change
the target connection component accommodated in or connected to the electronic component,
thereby better protecting security of the information in the electronic device.
[0079] Further, the coil 11 is specifically configured to generate a third electric signal
according to the second control signal, and generate the second magnetic field by
using the third electric signal, where the magnetic force of the second magnetic field
is used to drive the electronic component to be disconnected from the electronic device.
[0080] Further, the processor 12 is further configured to detect whether a change of the
third electric signal meets a second preset model, and if the change of the third
electric signal meets the second preset model, drive the coil 11 to stop generating
the third electric signal.
[0081] Specifically, in order to verify whether the electronic component is already disconnected
from the electronic device or detect whether a distance between the electronic component
and the electronic device already meets requirements, the processor 12 in the electronic
device needs to detect whether the change of the third electric signal meets the second
preset model, and if the change of the third electric signal meets the second preset
model, drives the coil 11 to stop generating the third electric signal, thereby avoiding
a problem of large power consumption of the electronic device.
[0082] It should be noted that the second preset model in the embodiment of the present
invention may be a coordinates diagram of the change of the third electric signal,
or may be a line graph of a change rate of the third electric signal, which is not
limited by the embodiment of the present invention.
[0083] Further, the target connection component is a data card or a memory card, and the
identification information of the target connection component is a serial number or
an identity ID of the target connection component.
[0084] This embodiment of the present invention provides an electronic device. The electronic
device detects a change of a magnetic flux of a first magnetic field in the electronic
device, and generates a first electric signal according to the change of the magnetic
flux, where the first magnetic field is generated by an electronic component, a magnetic
force of the first magnetic field is used to drive the electronic component to be
connected to the electronic device, and the electronic component accommodates or is
connected to a target connection component. From electromagnetic induction principles,
it can be learned that the change of the magnetic flux of the first magnetic field
in the electronic device may cause the electronic device to generate a first electric
signal, where the first magnetic field is generated by the electronic component, and
the change of the magnetic flux may cause a change of the first electric signal. If
the change of the first electric signal meets a first preset model, the electronic
device determines whether identification information of the target connection component
is the same as a preset identifier, and if the identification information of the target
connection component is different from the preset identifier, the electronic device
drives the electronic component to be disconnected from the electronic device.
[0085] By using this solution, the electronic device completes, by means of program logic
control, determining whether the target connection component accommodated in or connected
to the electronic component has been authorized, namely, determining whether the identification
information of the target connection component is the same as the preset identifier;
if determining that the target connection component is not authorized, the electronic
device drives the electronic component to be disconnected from the electronic device.
In this way, it is ensured that an unauthorized target connection component cannot
be normally used after the target connection component is connected to the electronic
device, thereby improving security of the electronic device.
Embodiment 2
[0086] As shown in FIG. 2, this embodiment of the present invention provides an electronic
component, which may include a permanent magnet apparatus 21 that includes an electronic
interface 20, where the electronic interface 20 is physically connected to the permanent
magnet apparatus 21.
[0087] Specifically, the permanent magnet apparatus 21 is configured to generate a first
magnetic field, where a magnetic force of the first magnetic field is used to: when
the electronic component is being connected to an electronic device, drive the electronic
component to be connected to the electronic device.
[0088] The permanent magnet apparatus 21 in the embodiment of the present invention may
be a permanent magnet, or may be another apparatus with a permanent magnet characteristic,
which is not limited by the embodiment of the present invention.
[0089] The permanent magnet apparatus 21 in the embodiment of the present invention uses
a material that can keep constant magnetism once magnetized, and that may be an alloy
permanent magnet material, or may be a ferrite permanent magnet material, which is
not limited by the embodiment of the present invention. In addition, a shape characteristic
of the permanent magnet apparatus 21 is not limited by the embodiment of the present
invention, and the shape may be a cylinder, or may be a cuboid.
[0090] Because the permanent magnet apparatus 21 in the embodiment of the present invention
has performance of a permanent magnet, an electron layout in the permanent magnet
apparatus 21 takes on a specific direction, and is reflected by regular molecular
currents to the outside, so that a first magnetic field is generated.
[0091] Further, the electronic interface 20 is configured to accommodate or be connected
to a target connection component, where the target connection component is used by
the electronic device to perform communication or used to perform data transmission
with the electronic device.
[0092] The target connection component in the embodiment of the present invention may be
a data card, may be a memory card, or may be a chip in another intelligent electronic
component, which is not limited by the embodiment of the present invention. The target
connection component is a component used by the electronic device for communication
or data transmission.
[0093] For example, the target connection component is an SD card, a SIM card, a multimedia
card (MMC, Multimedia Card), a mini SD card, a memory stick, a smart card, a micro
SD card, or the like in the electronic device.
[0094] It should be noted that the electronic interface 20 in the embodiment of the present
invention may accommodate or be connected to at least one target connection component.
[0095] Preferably, the electronic interface 20 is a slot, and the slot is rigidly connected
to the permanent magnet apparatus 21.
[0096] The rigid connection means that between two connected components, when one component
generates a shift or is under a force, the other component connected to it does not
generate any shift or does not deform relatively as against this component. For example,
the two connected components are connected into a whole by means of mechanical connection
such as welding and bolt connection.
[0097] For example, if the electronic interface is a slot and the target connection component
is a SIM card, the slot may accommodate one or more SIM cards.
[0098] The embodiment of the present invention provides an electronic component, and the
electronic component includes a permanent magnet apparatus that includes an electronic
interface, and the permanent magnet apparatus is configured to generate a first magnetic
field, where a magnetic force of the first magnetic field is used to: when the electronic
component is being connected to an electronic device, drive the electronic component
to be connected to the electronic device. According to this solution, the electronic
component includes the permanent magnet apparatus, and the permanent magnet apparatus
can implement connection/disconnection between the electronic component and the electronic
device by means of a magnetic force.
Embodiment 3
[0099] As shown in FIG. 3, this embodiment of the present invention provides user equipment,
which includes at least an electronic device 1 and an electronic component 1. When
the electronic component 1 is connected to the electronic device 1, electromagnetic
induction (represented by dashed lines in FIG. 3) exists between the electronic device
1 and the electronic component.
[0100] The electronic device 1 includes an electronic device with any characteristic described
in Embodiment 1, and the electronic component 1 includes an electronic component with
any characteristic described in Embodiment 2.
[0101] The embodiment of the present invention provides user equipment, and the user equipment
includes at least an electronic device and an electronic component. Specifically,
the electronic device detects a change of a magnetic flux of a first magnetic field
in the electronic device, where the first magnetic field is generated by the electronic
component, and generates a first electric signal according to the change of the magnetic
flux, where a magnetic force of the first magnetic field is used to drive the electronic
component to be connected to the electronic device, and the electronic component accommodates
or is connected to a target connection component. From electromagnetic induction principles,
it can be learned that the change of the magnetic flux of the first magnetic field
in the electronic device may cause the electronic device to generate a first electric
signal, where the first magnetic field is generated by the electronic component, and
the change of the magnetic flux may cause a change of the first electric signal. If
the change of the first electric signal meets a first preset model, the electronic
device determines whether identification information of the target connection component
is the same as a preset identifier, and if the identification information of the target
connection component is different from the preset identifier, the electronic device
drives the electronic component to be disconnected from the electronic device.
[0102] By using this solution, the electronic device completes, by means of program logic
control, determining whether the target connection component accommodated in or connected
to the electronic component has been authorized, namely, determining whether the identification
information of the target connection component is the same as the preset identifier;
if determining that the target connection component is not authorized, the electronic
device drives the electronic component to be disconnected from the electronic device.
In this way, it is ensured that an unauthorized target connection component cannot
be normally used after the target connection component is connected to the electronic
device, thereby improving security of the electronic device.
Embodiment 4
[0103] This embodiment of the present invention provides a connection/disconnection method.
As shown in FIG. 4, the disconnection method includes:
S101. An electronic device detects a change of a magnetic flux of a first magnetic
field in the electronic device, and generates a first electric signal according to
the change of the magnetic flux, where the first magnetic field is generated by an
electronic component.
[0104] A magnetic force of the first magnetic field is used to drive the electronic component
to be connected to the electronic device, and the electronic component accommodates
or is connected to a target connection component.
[0105] The electronic device in the embodiment of the present invention may be any apparatus
that includes a user interface, which is not limited by the embodiment of the present
invention. For example, the electronic device may be a mobile phone on which no SIM
card slot is installed, may be a mobile phone to which no headset is connected, or
may be an electronic device without an anti-theft lock on an electronic exhibition
booth.
[0106] The electronic device may be a mobile phone (or referred to as a "cellular" phone),
or may be a computer with a mobile terminal, such as a portable, pocket-sized, handheld,
computer built-in, or in-vehicle mobile apparatus.
[0107] The electronic component in the embodiment of the present invention may be a permanent
magnet apparatus, or may be another apparatus with a permanent magnet characteristic.
The electronic component includes an electronic interface. The electronic interface
is connected to or accommodates a target connection component, and the electronic
component can generate a first magnetic field. When the electronic component is being
connected to the electronic device, a magnetic force of the first magnetic field is
used to drive the electronic component to be connected to the electronic device.
[0108] Specifically, because an electron layout inside the permanent magnet apparatus in
the embodiment of the present invention takes on a specific direction, and is reflected
by regular molecular currents to the outside, so that a first magnetic field is generated.
The permanent magnet apparatus has performance of a permanent magnet, and uses a material
that can keep constant magnetism once magnetized, and that may be an alloy permanent
magnet material, or may be a ferrite permanent magnet material, which is not limited
by the embodiment of the present invention. In addition, a shape characteristic of
the permanent magnet apparatus is not limited by the embodiment of the present invention,
and the shape may be a cylinder, or may be a cuboid.
[0109] It should be noted that distribution locations of poles of the first magnetic field
generated by the electronic component in the embodiment of the present invention are
not limited by the embodiment of the present invention. Optionally, one end that is
of the electronic component and disposed opposite the electronic device is a north
(N) pole, and the other end is a south (S) pole; or, one end disposed opposite the
electronic device is a south (S) pole, and the other end is a north (N) pole.
[0110] Specifically, when the electronic component is being connected to the electronic
device, the electronic device can detect the change of the magnetic flux of the first
magnetic field in the electronic device, and generates a first electric signal according
to the change of the magnetic flux.
[0111] The magnetic flux is a measure of magnitude of a magnetic field that passes through
a given curved surface. Magnitude of a magnetic flux that passes through a plane may
be figuratively depicted by a quantity of magnetic induction lines in the plane. In
a same magnetic field, magnetic induction lines are denser in a place with a higher
magnetic induction intensity. When the electronic component is being connected to
the electronic device, the electronic component is becoming closer to the electronic
device under an effect of the magnetic force of the first magnetic field, and the
magnetic flux of the first magnetic field in the electronic device changes, where
the first magnetic field is generated by the electronic component. From electromagnetic
induction principles, it can be learned that a conductor in a changing magnetic flux
may generate an electromotive force. That is, as the magnetic flux of the first magnetic
field in the electronic device changes, the electronic device generates a first electric
signal, and the first electric signal also changes with the magnetic flux.
[0112] Further, the electronic device in the embodiment of the present invention includes
a magnetic medium, a coil that encircles a side of the magnetic medium, and a processor.
[0113] The magnetic medium refers to a material in which a magnetization state changes under
an effect of a magnetic field. The magnetic medium in the embodiment of the present
invention may be an iron core. The iron core may use a soft iron or silicon steel
material, which is not limited by the embodiment of the present invention.
[0114] Specifically, when the electronic component is being connected to the electronic
device, the magnetic medium is magnetized by the first magnetic field under the effect
of the first magnetic field, and is connected to the electronic component under the
effect of the magnetic force of the first magnetic field.
[0115] For example, as shown in FIG. 5, a permanent magnet apparatus in an electronic component
is of a cuboid shape, the left end of the permanent magnet apparatus is a north pole
(N pole), and the right end is a south pole (S) pole. In FIG. 5, E represents the
permanent magnet apparatus. Distribution of a first magnetic field generated by the
permanent magnet apparatus is represented by arrowed solid lines in FIG. 5, A represents
an electronic device, c represents a magnetic medium, and a represents a coil. When
the permanent magnet apparatus approaches the electronic device, the magnetic medium
c is magnetized by the first magnetic field generated by the permanent magnet apparatus
E. In this case, the pole (namely, the right end of the magnetic medium) disposed
opposite the permanent magnet module in the magnetic medium c is the S pole. Under
an effect of a magnetic force of the first magnetic field, the magnetic medium is
connected to the permanent magnet apparatus.
[0116] Further, as a distance between the magnetic medium and the permanent magnet apparatus
changes, the magnetic flux of the first magnetic field in the coil also changes accordingly.
From electromagnetic induction principles, it can be learned that a conductor in a
changing magnetic flux may generate an electromotive force. That is, as the magnetic
flux in the coil changes, the coil generates a first electric signal.
[0117] The first electric signal may be a current or a voltage, which is not limited by
the embodiment of the present invention. Specifically, a direction of the current
or a positive or negative pole of the voltage may be determined according to the Lenz's
law.
[0118] For example, as shown in FIG. 6, the left end of a permanent magnet apparatus E is
an N pole, and the right end is an S pole. Distribution of a first magnetic field
generated by the permanent magnet apparatus is represented by arrowed solid lines
in FIG. 6, A represents an electronic device, c represents a magnetic medium, and
a represents a coil. When the permanent magnet apparatus E approaches the electronic
device A, the magnetic medium c is magnetized, and the right end of the magnetic medium
is the S pole. As a distance between the permanent magnet apparatus E and the electronic
device A changes, a magnetic flux of the first magnetic field in the coil a changes.
The changed magnetic flux triggers the coil a to generate a first electric signal.
In FIG. 6, arrowed dashed lines represent the first magnetic field in the coil, and
a current represents the first electric signal. From the Lenz's law, it can be learned
that a direction of the current is the direction indicated on the coil in FIG. 6.
[0119] S102. If a change of the first electric signal meets a first preset model, the electronic
device determines whether identification information of a target connection component
is the same as a preset identifier.
[0120] The first electric signal generated by the electronic device changes with the magnetic
flux. When the change of the first electric signal meets the first preset model, the
electronic device determines whether the identification information of the target
connection component is the same as the preset identifier.
[0121] The target connection component in the embodiment of the present invention may be
a data card, may be a memory card, or may be a chip in another intelligent electronic
component, which is not limited by the embodiment of the present invention. The target
connection component is a component used by the electronic device for communication
or data transmission.
[0122] For example, the target connection component is an SD card, a SIM card, a multimedia
card (MMC, Multimedia Card), a mini SD card, a memory stick, a smart card, a micro
SD card, or the like in the electronic device. The identification information of the
target connection component may be a serial number of the target connection component,
or may be an ID of the target connection component, which is not limited by the embodiment
of the present invention.
[0123] In addition, the electronic component in the embodiment of the present invention
accommodates or is connected to the target connection component by using an electronic
interface. There is at least one target connection component, such as two or more
than two, which is not specifically limited by the embodiment of the present invention.
[0124] Preferably, the electronic interface of the electronic component is a slot. In this
case, the target connection component is a data card (or a memory card), and therefore,
the data card (or the memory card) may be disposed at a groove of the slot, and a
size of the groove may fit a size of the data card (memory card).
[0125] Specifically, no matter how many target connection components are included in the
electronic component, processing that may be performed by the electronic device on
the target connection components are the same processing; and the electronic device
determines whether identification information of a target connection component is
the same as a preset identifier, where the preset identifier is an identifier corresponding
to the target connection component.
[0126] It may be understood that when the distance between the electronic device and the
electronic component is becoming shorter, the change of the magnetic flux of the first
magnetic field in the electronic device may increase from zero to a maximum value,
and then decrease from the maximum value to zero. As the magnetic flux changes, the
change of the first electric signal may also take on a specific change trend. When
the change trend of the first electric signal meets the first preset model, it indicates
that the electronic component is fully connected to the electronic device.
[0127] It should be noted that the first preset model in the embodiment of the present invention
may be a coordinates diagram of the change of the first electric signal, or may be
a line graph of a change rate of the first electric signal, which is not limited by
the embodiment of the present invention.
[0128] Specifically, if the change of the first electric signal meets the first preset model,
the electronic device reads the identification information of the target connection
component, and then compares the read identification information with a pre-stored
preset identifier. If the read identification information is the same as the preset
identifier, it indicates that the target connection component is an authorized target
connection component; conversely, it indicates that the target connection component
is not authorized.
[0129] For example, if the electronic device is a mobile phone on which no SIM card is installed,
the electronic component is a slot with a permanent magnet characteristic, and the
slot can accommodate a SIM card, the mobile phone may read and detect an IMSI in the
SIM card. If a pre-stored first preset IMSI is 460030912121001 and the IMSI of the
SIM card accommodated in the slot that is connected to the mobile phone is 460030912121012,
the mobile phone compares the read IMSI with the pre-stored first preset IMSI after
reading the IMSI 460030912121012 of the SIM card. 460030912121012 is different from
460030912121001, and therefore, the SIM cannot be normally used by the connected mobile
phone, namely, is an unauthorized card.
[0130] If the identification information of the target connection component is the same
as the preset identifier, the electronic device keeps connected to the electronic
component; and if the identification information of the target connection component
is different from the preset identifier, the electronic device performs S103.
[0131] S103. If the identification information of the target connection component is different
from the preset identifier, the electronic device drives the electronic component
to be disconnected from the electronic device.
[0132] Specifically, if the electronic device determines that the identification information
of the target connection component is different from the preset identifier, it indicates
that the target connection component is an unauthorized or invalid target connection
component, and therefore, the processor in the electronic device generates a second
control signal. Under an effect of the second control signal, the electronic device
is disconnected from the electronic component, thereby avoiding that an unauthorized
target connection component is connected to the electronic device and is used normally,
and ensuring security of the electronic device.
[0133] Further, the coil generates a third electric signal according to the second control
signal, and generates a second magnetic field by using the third electric signal,
where a magnetic force of the second magnetic field is used to drive the electronic
component to be disconnected from the electronic device.
[0134] The third electric signal may be a current or a voltage, which is not limited by
the embodiment of the present invention. Specifically, a direction of the current
or a positive or negative pole of the voltage may be determined according to the Lenz's
law.
[0135] It may be understood that because the magnetic force of the second magnetic field
is used to drive the electronic component to be disconnected from the electronic device,
according to same-pole repelling in a magnetic field, it can be learned that pole
distribution of the second magnetic field is as follows: Poles that are of the electronic
component and disposed opposite the electronic device have same magnetism.
[0136] For example, as shown in FIG. 7, pole distribution of a permanent magnet apparatus
is that the left end is an N pole, and the right end is an S pole. In FIG. 7, E represents
the permanent magnet apparatus. Distribution of a first magnetic field is represented
by arrowed solid lines, A represents an electronic device, c represents a magnetic
medium, and a represents a coil. After generating a second control signal, a processor
drives the coil to generate a third electric signal. In FIG. 7, a current is used
to represent the third electric signal, and a direction of the current is the direction
indicated on the coil in FIG. 7. From a phenomenon that a current generates a magnetic
field, it can be learned that after the coil generates the third electric signal,
a second magnetic field may be generated around the coil. According to the Lenz's
law, it can be determined that poles of the second magnetic field are as follows:
The right end is an N pole, and the left end is an S pole. Distribution of the second
magnetic field is represented by arrowed dashed lines in FIG. 7. Because the right
end of the second magnetic field is the N pole and the left end of the first magnetic
field is the N pole, the electronic component is disconnected from the electronic
device under an effect of a magnetic force.
[0137] Further, in order to determine whether the electronic component is fully disconnected
from the electronic device, the electronic device further needs to detect whether
a change of the third electric signal in the coil meets a second preset model, and
if the change of the second electric signal meets the second preset model, the electronic
device drives the coil to stop generating the third electric signal.
[0138] The second preset model in the embodiment of the present invention may be a coordinates
diagram of the change of the third electric signal, or may be a line graph of a change
rate of the third electric signal, which is not limited by the embodiment of the present
invention.
[0139] This embodiment of the present invention provides a connection/disconnection method.
An electronic device detects a change of a magnetic flux of a first magnetic field
in the electronic device, and generates a first electric signal according to the change
of the magnetic flux, where the first magnetic field is generated by an electronic
component, a magnetic force of the first magnetic field is used to drive the electronic
component to be connected to the electronic device, and the electronic component accommodates
or is connected to a target connection component. From electromagnetic induction principles,
it can be learned that the change of the magnetic flux of the first magnetic field
in the electronic device may cause the electronic device to generate a first electric
signal, where the first magnetic field is generated by the electronic component, and
the change of the magnetic flux may cause a change of the first electric signal. If
the change of the first electric signal meets a first preset model, the electronic
device determines whether identification information of the target connection component
is the same as a preset identifier, and if the identification information of the target
connection component is different from the preset identifier, the electronic device
drives the electronic component to be disconnected from the electronic device.
[0140] By using this solution, the electronic device completes, by means of program logic
control, determining whether the target connection component accommodated in or connected
to the electronic component has been authorized, namely, determining whether the identification
information of the target connection component is the same as the preset identifier;
if determining that the target connection component is not authorized, the electronic
device drives the electronic component to be disconnected from the electronic device.
In this way, it is ensured that an unauthorized target connection component cannot
be normally used after the target connection component is connected to the electronic
device, thereby improving security of the electronic device.
Embodiment 5
[0141] This embodiment of the present invention provides a connection/disconnection method.
As shown in FIG. 8, the connection/disconnection method includes:
S201. An electronic device detects a change of a magnetic flux of a first magnetic
field in the electronic device, and generates a first electric signal according to
the change of the magnetic flux, where the first magnetic field is generated by an
electronic component.
[0142] A magnetic force of the first magnetic field is used to drive the electronic component
to be connected to the electronic device, and the electronic component accommodates
or is connected to a target connection component.
[0143] The electronic device in the embodiment of the present invention may be any apparatus
that includes a user interface, which is not limited by the embodiment of the present
invention. For example, the electronic device may be a mobile phone on which no SIM
card slot is installed, may be a mobile phone to which no headset is connected, or
may be an electronic device without an anti-theft lock on an electronic exhibition
booth.
[0144] The electronic device may be a mobile phone (or referred to as a "cellular" phone),
or may be a computer with a mobile terminal, such as a portable, pocket-sized, handheld,
computer built-in, or in-vehicle mobile apparatus.
[0145] The electronic component in the embodiment of the present invention may be a permanent
magnet apparatus, or may be another apparatus with a permanent magnet characteristic.
The electronic component includes an electronic interface. The electronic interface
is connected to or accommodates a target connection component, and the electronic
component can generate a first magnetic field. When the electronic component is being
connected to the electronic device, a magnetic force of the first magnetic field is
used to drive the electronic component to be connected to the electronic device.
[0146] Specifically, because an electron layout inside the permanent magnet apparatus in
the embodiment of the present invention takes on a specific direction, and is reflected
by regular molecular currents to the outside, so that a first magnetic field is generated.
The permanent magnet apparatus has performance of a permanent magnet, and uses a material
that can keep constant magnetism once magnetized, and that may be an alloy permanent
magnet material, or may be a ferrite permanent magnet material, which is not limited
by the embodiment of the present invention. In addition, a shape characteristic of
the permanent magnet apparatus is not limited by the embodiment of the present invention,
and the shape may be a cylinder, or may be a cuboid.
[0147] It should be noted that distribution locations of poles of the first magnetic field
generated by the electronic component in the embodiment of the present invention are
not limited by the embodiment of the present invention. Optionally, one end that is
of the electronic component and disposed opposite the electronic device is a north
(N) pole, and the other end is a south (S) pole; or, one end disposed opposite the
electronic device is a south (S) pole, and the other end is a north (N) pole.
[0148] Specifically, when the electronic component is being connected to the electronic
device, the electronic device can detect the change of the magnetic flux of the first
magnetic field in the electronic device, and generates a first electric signal according
to the change of the magnetic flux.
[0149] When the electronic component is being connected to the electronic device, the electronic
component is becoming closer to the electronic device under an effect of the magnetic
force of the first magnetic field, and the magnetic flux of the first magnetic field
in the electronic device changes, where the first magnetic field is generated by the
electronic component. From electromagnetic induction principles, it can be learned
that a conductor in a changing magnetic flux may generate an electromotive force.
That is, as the magnetic flux of the first magnetic field in the electronic device
changes, the electronic device generates a first electric signal, and the first electric
signal also changes with the magnetic flux.
[0150] Further, the electronic device in the embodiment of the present invention includes
a magnetic medium, a coil that encircles a side of the magnetic medium, and a processor.
[0151] The magnetic medium refers to a material in which a magnetization state changes under
an effect of a magnetic field. The magnetic medium in the embodiment of the present
invention may be an iron core. The iron core may use a soft iron or silicon steel
material, which is not limited by the embodiment of the present invention.
[0152] Specifically, when the electronic component is being connected to the electronic
device, the magnetic medium is magnetized by the first magnetic field under the effect
of the first magnetic field, and is physically connected to the electronic component
under the effect of the magnetic force of the first magnetic field.
[0153] Further, as a distance between the magnetic medium and the permanent magnet apparatus
changes, the magnetic flux of the first magnetic field in the coil also changes accordingly.
From electromagnetic induction principles, it can be learned that a conductor in a
changing magnetic flux may generate an electromotive force. That is, as the magnetic
flux in the coil changes, the coil generates a first electric signal.
[0154] The first electric signal may be a current or a voltage, which is not limited by
the embodiment of the present invention. Specifically, a direction of the current
or a positive or negative pole of the voltage may be determined according to the Lenz's
law.
[0155] For example, as shown in FIG. 6, the left end of a permanent magnet apparatus E is
an N pole, and the right end is an S pole. Distribution of a first magnetic field
generated by the permanent magnet apparatus is represented by arrowed solid lines
in FIG. 6, A represents an electronic device, c represents a magnetic medium, and
a represents a coil. When the permanent magnet apparatus E approaches the electronic
device A, the magnetic medium c is magnetized, and the right end of the magnetic medium
is the S pole. As a distance between the permanent magnet apparatus E and the electronic
device A changes, a magnetic flux of the first magnetic field in the coil a changes.
The changed magnetic flux triggers the coil a to generate a first electric signal.
In FIG. 6, arrowed dashed lines represent the first magnetic field in the coil, and
a current represents the first electric signal. From the Lenz's law, it can be learned
that a direction of the current is the direction indicated on the coil in FIG. 6.
[0156] S202. If a change of the first electric signal meets a first preset model, the electronic
device determines whether identification information of a target connection component
is the same as a preset identifier.
[0157] The first electric signal generated by the electronic device changes with the magnetic
flux. When the change of the first electric signal meets the first preset model, the
electronic device determines whether the identification information of the target
connection component is the same as the preset identifier.
[0158] The target connection component in the embodiment of the present invention may be
a data card, may be a memory card, or may be a chip in another intelligent electronic
component, which is not limited by the embodiment of the present invention. The target
connection component is a component used by the electronic device for communication
or data transmission.
[0159] For example, the target connection component is an SD card, a SIM card, a multimedia
card (MMC, Multimedia Card), a mini SD card, a memory stick, a smart card, a micro
SD card, or the like in the electronic device. The identification information of the
target connection component may be a serial number of the target connection component,
or may be an ID of the target connection component, which is not limited by the embodiment
of the present invention.
[0160] In addition, the electronic component in the embodiment of the present invention
accommodates or is connected to the target connection component by using an electronic
interface. There is at least one target connection component, such as two or more
than two, which is not specifically limited by the embodiment of the present invention.
[0161] Preferably, the electronic interface of the electronic component is a slot. In this
case, the target connection component is a data card (or a memory card), and therefore,
the data card (or the memory card) may be disposed at a groove of the slot, and a
size of the groove may fit a size of the data card (memory card).
[0162] Specifically, no matter how many target connection components are included in the
electronic component, processing that may be performed by the electronic device on
the target connection components are the same processing; and the electronic device
determines whether identification information of a target connection component is
the same as a preset identifier, where the preset identifier is an identifier corresponding
to the target connection component.
[0163] It may be understood that when the distance between the electronic device and the
electronic component is becoming shorter, the change of the magnetic flux of the first
magnetic field in the electronic device may increase from zero to a maximum value,
and then decrease from the maximum value to zero. As the magnetic flux changes, the
change of the first electric signal may also take on a specific change trend. When
the change trend of the first electric signal meets the first preset model, it indicates
that the electronic component is fully connected to the electronic device.
[0164] It should be noted that the first preset model in the embodiment of the present invention
may be a coordinates diagram of the change of the first electric signal, or may be
a line graph of a change rate of the first electric signal, which is not limited by
the embodiment of the present invention.
[0165] Specifically, if the change of the first electric signal meets the first preset model,
the electronic device reads the identification information of the target connection
component, and then compares the read identification information with a pre-stored
preset identifier. If the read identification information is the same as the preset
identifier, it indicates that the target connection component is an authorized target
connection component; conversely, it indicates that the target connection component
is not authorized.
[0166] S203. If the identification information of the target connection component is different
from the preset identifier, the electronic device drives the electronic component
to be disconnected from the electronic device.
[0167] Specifically, if the electronic device determines that the identification information
of the target connection component is different from the preset identifier, it indicates
that the target connection component is an unauthorized or invalid target connection
component, and therefore, the processor in the electronic device generates a second
control signal. Under an effect of the second control signal, the electronic device
is disconnected from the electronic component, thereby avoiding that an unauthorized
target connection component is connected to the electronic device and is used normally,
and ensuring security of the electronic device.
[0168] Further, the coil generates a third electric signal according to the second control
signal, and generates a second magnetic field by using the third electric signal,
where a magnetic force of the second magnetic field is used to drive the electronic
component to be disconnected from the electronic device.
[0169] The third electric signal may be a current or a voltage, which is not limited by
the embodiment of the present invention. Specifically, a direction of the current
or a positive or negative pole of the voltage may be determined according to the Lenz's
law.
[0170] It may be understood that because the magnetic force of the second magnetic field
is used to drive the electronic component to be disconnected from the electronic device,
according to same-pole repelling in a magnetic field, it can be learned that pole
distribution of the second magnetic field is as follows: Poles that are of the electronic
component and disposed opposite the electronic device have same magnetism.
[0171] For example, as shown in FIG. 7, pole distribution of a permanent magnet apparatus
is that the left end is an N pole, and the right end is an S pole. In FIG. 7, E represents
the permanent magnet apparatus. Distribution of a first magnetic field is represented
by arrowed solid lines, A represents an electronic device, c represents a magnetic
medium, and a represents a coil. After generating a second control signal, a processor
drives the coil to generate a third electric signal. In FIG. 7, a current is used
to represent the third electric signal, and a direction of the current is the direction
indicated on the coil in FIG. 7. From a phenomenon that a current generates a magnetic
field, it can be learned that after the coil generates the third electric signal,
a second magnetic field may be generated around the coil. According to the Lenz's
law, it can be determined that poles of the second magnetic field are that the right
end is the N pole, and the left end is the S pole. Distribution of the second magnetic
field is represented by arrowed dashed lines in FIG. 7. Because the right end of the
second magnetic field is the N pole and the left end of the first magnetic field is
the N pole, the electronic component is disconnected from the electronic device under
an effect of a magnetic force.
[0172] Further, in order to determine whether the electronic component is fully disconnected
from the electronic device, the electronic device further needs to detect whether
a change of the third electric signal in the coil meets a second preset model, and
if the change of the second electric signal meets the second preset model, the electronic
device drives the coil to stop generating the third electric signal.
[0173] The second preset model in the embodiment of the present invention may be a coordinates
diagram of the change of the third electric signal, or may be a line graph of a change
rate of the third electric signal, which is not limited by the embodiment of the present
invention.
[0174] Specifically, no matter how many target connection components are included in the
electronic component, processing that may be performed by the electronic device on
the target connection components are the same processing; and the electronic device
determines whether identification information of a target connection component is
the same as a preset identifier, where the preset identifier is an identifier corresponding
to the target connection component. So long as determining that the identifier of
the target connection component is different from the preset identifier, the electronic
device drives the electronic component to be disconnected from the electronic device.
[0175] For example, if the electronic device is a mobile phone on which no SIM card is installed
and the electronic component is a slot with a permanent magnet characteristic, the
slot can accommodate a SIM card. Identification information of the SIM card is an
international mobile subscriber identity (IMSI, International Mobile Subscriber Identification
Number).
[0176] Optionally, in an application scenario in which the mobile phone has only one slot
port and the slot with a permanent magnet characteristic can accommodate only one
SIM card, the processor in the mobile phone determines whether an international mobile
subscriber identity (IMSI, International Mobile Subscriber Identification Number)
of the SIM card accommodated in the slot is the same as a preset identifier. If the
IMSI of the SIM card is different from the preset identifier, the processor drives
the slot to be disconnected from the mobile phone, namely, the SIM accommodated in
the slot cannot be used normally.
[0177] Optionally, in an application scenario in which the mobile phone includes two slot
ports, the slot with a permanent magnet characteristic can accommodate only one SIM
card, and the mobile phone has two slots for accommodating a SIM card A and a SIM
card B respectively, the processor in the mobile phone processes the two slots in
the same way as the foregoing application scenario. When the processor in the mobile
phone determines that an IMSI of the SIM card A is the same as a preset identifier
thereof, the SIM card A can be used normally in the mobile phone. When the processor
in the mobile phone determines that an IMSI of the SIM card B is different from a
preset identifier thereof, the processor drives the slot, which accommodates the SIM
card B, to be disconnected from the mobile phone, namely, the SIM card B cannot be
used normally in the mobile phone.
[0178] Optionally, in an application scenario in which the mobile phone includes one slot
port and the slot with a permanent magnet characteristic can accommodate at least
one SIM card, for example, the slot accommodates two SIM cards, the processor in the
mobile phone separately determines whether IMSIs of the two SIM cards are the same
as preset identifiers of the SIM cards. In a first possible implementation manner,
if the IMSIs of both the SIM cards are the same as the preset identifiers, both the
SIMs can be used normally in the mobile phone. In a second possible implementation
manner, if the IMSI of one of the SIM cards is different from a preset identifier
thereof, the processor in the mobile phone drives this slot to be disconnected from
the mobile phone, so that neither of the SIM cards accommodated in the slot can be
used normally. In a third possible implementation manner, if the IMSI of one of the
SIM cards is different from a preset identifier thereof, the mobile phone may keep
a state of connection between this slot and the mobile phone, and disables the SIM
card whose IMSI is different from the preset identifier. That is, one of the SIM cards
can be used normally, and the other SIM card cannot be used normally.
[0179] S204. If the identification information of the target connection component is the
same as the preset identifier, the electronic device keeps a state of connection to
the electronic component.
[0180] Specifically, if the electronic device determines that the identification information
of the target connection component is the same as the preset identifier, it indicates
that the target connection component is an authorized or valid target connection component,
and therefore, the target connection component can be used normally after connecting
to the electronic device, so that the electronic device keeps a state of connection
to the electronic component.
[0181] Further, as shown in FIG. 9, after the electronic device determines that the identification
information of the target connection component is the same as the preset identifier,
namely, after the electronic device completes S204, the electronic device may further
complete S205. Specifically:
S205. The electronic device generates a second electric signal, so that the electronic
device generates a second magnetic field by using the second electric signal, where
a magnetic force of the second magnetic field is used to drive the electronic component
to be fixedly connected to the electronic device.
[0182] Specifically, in order to make closer connection between the electronic device and
the electronic component and prevent a communications fault problem caused by a loose
connection between the electronic component and the electronic device, after the electronic
device determines that the identification information of the target connection component
is the same as the preset identifier, the electronic device generates a second electric
signal that is used to make the electronic device be fixedly connected to the electronic
component. The coil in the electronic device generates the second electric signal,
and generates a second magnetic field by using the second electric signal. A magnetic
force of the second magnetic field is used to drive the electronic component to be
fixedly connected to the electronic device, namely, drive the electronic component
to be more closely connected to the electronic device, which is equivalent to a lock-in
state between the electronic component and the electronic device, thereby improving
usage security of the electronic device.
[0183] It should be noted that the second electric signal in the embodiment of the present
invention may be a current or a voltage, which is not limited by the embodiment of
the present invention.
[0184] The magnetic force of the second magnetic field generated by using the second electric
signal is used to drive the electronic component to be fixedly connected to the electronic
device, the first electric signal is generated according to the change of the magnetic
flux of the first magnetic field, and the magnetic force of the first magnetic field
is also used to drive the electronic component to be connected to the electronic device.
From the Lenz's law, it can be learned that the first electric signal and the second
electric signal have a same direction.
[0185] It should be noted that S205 is an optional step. After the electronic device determines
that the identification information of the target connection component is the same
as the preset identifier, the electronic device and the electronic component may be
further enabled to be fixedly connected to each other, or this step may not be performed,
which is not limited by the embodiment of the present invention.
[0186] Further, as shown in FIG. 10, after the electronic device determines that the identification
information of the target connection component is the same as the preset identifier,
namely, after the electronic device completes S204, the electronic device may further
complete S206 to S209. Specifically:
S206. The electronic device obtains instruction information, where the instruction
information is used to drive the electronic component to be disconnected from the
electronic device.
[0187] Specifically, in the embodiment of the present invention, when a state of connection
is kept between the electronic device and the electronic component, if a user proactively
wants to disconnect the electronic component from the electronic device, the user
uses the electronic device to enter instruction information that is used to drive
the electronic component to be disconnected from the electronic device. Correspondingly,
the electronic device obtains the instruction information.
[0188] The instruction information entered by the user is information entered by the user
by using an application on the electronic device, and the instruction information
is used to drive the electronic component to be disconnected from the electronic device,
and may be a secure digital password, or may be other related information such as
a graphical password.
[0189] The application refers to a computer program that is developed to complete one or
more specific tasks and runs on an operating system. The application in the embodiment
of the present invention is an application compatible with a system running on the
electronic device.
[0190] It should be noted that the system running on the electronic device may be an Android
operating system, or may be another system such as an IOS, which is not limited by
the embodiment of the present invention. Because the system running on the electronic
device may be an Android operating system, or may be another system, a format of the
application also changes with the system.
[0191] For example, if the system running on the electronic device is an Android operating
system, the application is an APK (Application Package File, application package file).
[0192] The APK is an application installation file format on an Android operating system.
Before being run on an Android device, code of an Android application needs to be
compiled first, and then packed into a file identifiable by the Android operating
system. This file format that can be identified and run by the Android operating system
is APK. An APK file includes a compiled code file (.dex file), file resources (resources),
file access (assets), certificates (certificates), and a manifest file (manifest file).
[0193] S207. The electronic device determines whether the instruction information is the
same as instruction verification information.
[0194] Specifically, if the electronic device determines that the identification information
of the target connection component is the same as the preset identifier, after the
electronic device obtains the instruction information of the user, the electronic
device reads and detects the instruction information, namely, the electronic device
determines whether the instruction information is the same as the instruction verification
information.
[0195] For example, if the electronic device is a smartphone on which a SIM card is installed,
an application A is installed on the smartphone, and secure digital password input
is set in the application A, when the user uses the application A to enter a digital
password that drives ejection of the SIM card slot of the mobile phone, the processor
in the mobile phone determines whether the digital password entered by the user is
the same as the instruction verification information.
[0196] Further, the electronic device compares the read instruction information with the
pre-stored instruction verification information. If the instruction information read
by the electronic device is the same as the instruction verification information,
the instruction information entered by the user is identified successfully, and the
electronic device performs S208; or, if the instruction information read by the electronic
device is different from the instruction verification information, the instruction
information entered by the user is identified unsuccessfully, and the electronic device
performs S209.
[0197] S208. If the instruction information is the same as the instruction verification
information, the electronic device drives the electronic component to be disconnected
from the electronic device.
[0198] If the electronic device successfully identifies the instruction information entered
by the user, it indicates that the electronic device is used by the user, and the
user proactively wants to eject the target connection component; therefore, the electronic
device drives the electronic component to be disconnected from the electronic device.
[0199] Specifically, after identifying the instruction information successfully, the electronic
device generates a third electric signal, and generates a second magnetic field by
using the third electric signal, where a magnetic force of the second magnetic field
is used to drive the electronic component to be disconnected from the electronic device,
thereby avoiding that an unauthorized target connection component is connected to
the electronic device and is used normally, and ensuring security of the electronic
device.
[0200] In the prior art, a user can implement connection/disconnection between an electronic
device and an electronic component by only triggering a mechanical lever, and further
implement changing a target connection component in the electronic device; in the
embodiment of the present invention, however, disconnection between an electronic
component and an electronic device can be implemented only after the electronic device
receives instruction information entered by a user and used to drive the electronic
component to be disconnected from the electronic device and only after the electronic
device identifies the instruction information. In this way, when the user does not
enter correct instruction information, the user is unable to change a target connection
component in the electronic device, thereby improving security of information in the
electronic device.
[0201] Further, in the prior art, if the target connection component is a data card or a
memory card, when needing to take out the card in the electronic device, the user
generally requires an additional tool (such as an ejector pin) to take out the card
in the electronic device. Such a tool is generally small-sized and is generally not
carried by the user along, which makes the user often feel much inconvenient when
the user wants to take out the card in the electronic device; in the embodiment of
the present invention, however, disconnection between the electronic device and the
electronic component is implemented by means of program logic control, and the user
no longer requires an additional tool for taking out the card in the electronic device,
which facilitates operation of the user.
[0202] S209. If the instruction information is different from the instruction verification
information, the electronic device keeps a state of connection to the electronic component.
[0203] If the electronic device does not successfully identify the instruction information
entered by the user, a state of connection is still kept between the electronic device
and the electronic component, so that the user is unable to change the target connection
component in the electronic device, and security of information in the electronic
device is improved.
[0204] For example, if instruction verification information of a mobile phone of a user
A is a secure verification code, in a scenario in which the mobile phone is stolen,
a thief can take out a SIM in the mobile phone of the user A only by entering the
secure verification code.
[0205] This embodiment of the present invention provides a connection/disconnection method.
An electronic device detects a change of a magnetic flux of a first magnetic field
in the electronic device, and generates a first electric signal according to the change
of the magnetic flux, where the first magnetic field is generated by an electronic
component, a magnetic force of the first magnetic field is used to drive the electronic
component to be connected to the electronic device, and the electronic component accommodates
or is connected to a target connection component. From electromagnetic induction principles,
it can be learned that the change of the magnetic flux of the first magnetic field
in the electronic device may cause the electronic device to generate a first electric
signal, where the first magnetic field is generated by the electronic component, and
the change of the magnetic flux may cause a change of the first electric signal. If
the change of the first electric signal meets a first preset model, the electronic
device determines whether identification information of the target connection component
is the same as a preset identifier, and if the identification information of the target
connection component is different from the preset identifier, the electronic device
drives the electronic component to be disconnected from the electronic device.
[0206] By using this solution, the electronic device completes, by means of program logic
control, determining whether the target connection component accommodated in or connected
to the electronic component has been authorized, namely, determining whether the identification
information of the target connection component is the same as the preset identifier;
if determining that the target connection component is not authorized, the electronic
device drives the electronic component to be disconnected from the electronic device.
In this way, it is ensured that an unauthorized target connection component cannot
be normally used after the target connection component is connected to the electronic
device, thereby improving security of the electronic device.
Embodiment 6
[0207] As shown in FIG. 11, this embodiment of the present invention provides an electronic
device 1, which includes:
a detection unit 10, configured to detect a change of a magnetic flux of a first magnetic
field in the electronic device, where the first magnetic field is generated by an
electronic component, a magnetic force of the first magnetic field is used to drive
the electronic component to be connected to the electronic device, and the electronic
component accommodates or is connected to a target connection component;
a generation unit 11, configured to generate a first electric signal according to
the change of the magnetic flux detected by the detection unit 10;
a determining unit 12, configured to: if a change of the first electric signal generated
by the generation unit 11 meets a first preset model, determine whether identification
information of the target connection component is the same as a preset identifier;
and
a driving unit 13, configured to: if the determining unit 12 determines that the identification
information of the target connection component is different from the preset identifier,
drive the electronic component to be disconnected from the electronic device.
[0208] Further, the generation unit 11 is further configured to generate a second electric
signal if the identification information is the same as the preset identifier, so
that the electronic device generates a second magnetic field by using the second electric
signal, where a magnetic force of the second magnetic field is used to drive the electronic
component to be fixedly connected to the electronic device.
[0209] Further, as shown in FIG. 12, the electronic device further includes an obtaining
unit 14.
[0210] The obtaining unit 14 is configured to obtain instruction information, where the
instruction information is used to drive the electronic component to be disconnected
from the electronic device.
[0211] Further, the driving unit 13 is further configured to: drive, according to the instruction
information obtained by the obtaining unit 14, the electronic component to be disconnected
from the electronic device.
[0212] Further, the determining unit 12 is further configured to determine whether the instruction
information obtained by the obtaining unit 14 is the same as instruction verification
information.
[0213] Further, the driving unit 13 is specifically configured to: if the determining unit
12 determines that the instruction information is the same as the instruction verification
information, drive the electronic component to be disconnected from the electronic
device.
[0214] Further, the target connection component is a data card or a memory card, and the
identification information of the target connection component is a serial number or
an identity ID of the target connection component.
[0215] The embodiment of the present invention provides an electronic device, which includes
a detection unit, a generation unit, a determining unit, and a driving unit. The electronic
device detects a change of a magnetic flux of a first magnetic field in the electronic
device, and generates a first electric signal according to the change of the magnetic
flux, where the first magnetic field is generated by an electronic component, a magnetic
force of the first magnetic field is used to drive the electronic component to be
connected to the electronic device, and the electronic component accommodates or is
connected to a target connection component. From electromagnetic induction principles,
it can be learned that the change of the magnetic flux of the first magnetic field
in the electronic device may cause the electronic device to generate a first electric
signal, where the first magnetic field is generated by the electronic component, and
the change of the magnetic flux may cause a change of the first electric signal. If
the change of the first electric signal meets a first preset model, the electronic
device determines whether identification information of the target connection component
is the same as a preset identifier, and if the identification information of the target
connection component is different from the preset identifier, the electronic device
drives the electronic component to be disconnected from the electronic device.
[0216] By using this solution, the electronic device completes, by means of program logic
control, determining whether the target connection component accommodated in or connected
to the electronic component has been authorized, namely, determining whether the identification
information of the target connection component is the same as the preset identifier;
if determining that the target connection component is not authorized, the electronic
device drives the electronic component to be disconnected from the electronic device.
In this way, it is ensured that an unauthorized target connection component cannot
be normally used after the target connection component is connected to the electronic
device, thereby improving security of the electronic device.
Embodiment 7
[0217] As shown in FIG. 13, this embodiment of the present invention provides an electronic
component 2, which includes:
a permanent magnet unit 20, configured to generate a first magnetic field, where a
magnetic force of the first magnetic field is used to: when the electronic component
is being connected to an electronic device, drive the electronic component to be connected
to the electronic device; and
an input/output unit 21, configured to be connected to a target connection component,
where the target connection component is used by the electronic device to perform
communication or used to perform data transmission with the electronic device.
[0218] Further, the target connection component is a data card or a memory card.
[0219] The embodiment of the present invention provides an electronic component, and the
electronic component includes a permanent magnet unit and an input/output unit. The
permanent magnet unit is configured to generate a first magnetic field, where a magnetic
force of the first magnetic field is used to: when the electronic component is being
connected to an electronic device, drive the electronic component to be connected
to the electronic device. According to this solution, the electronic component includes
the permanent magnet unit, and the permanent magnet apparatus can implement connection/disconnection
between the electronic component and the electronic device by means of a magnetic
force.
[0220] It may be clearly understood by a person skilled in the art that, for the purpose
of convenient and brief description, division of the foregoing functional modules
is taken as an example for illustration. In actual application, the foregoing functions
can be allocated to different functional modules and implemented according to a requirement,
that is, an inner structure of an apparatus is divided into different functional modules
to implement all or some of the functions described above. For a detailed working
process of the foregoing system, apparatus, and unit, reference may be made to a corresponding
process in the foregoing method embodiments, and details are not described herein
again.
[0221] In the several embodiments provided in the present application, it should be understood
that the disclosed system, apparatus, and method may be implemented in other manners.
For example, the described apparatus embodiment is merely exemplary. For example,
the module or unit division is merely logical function division and may be other division
in actual implementation. For example, a plurality of units or components may be combined
or integrated into another system, or some features may be ignored or not performed.
In addition, the displayed or discussed mutual couplings or direct couplings or communication
connections may be implemented by using some interfaces. The indirect couplings or
communication connections between the apparatuses or units may be implemented in electronic,
mechanical, or other forms.
[0222] The units described as separate parts may or may not be physically separate, and
parts displayed as units may or may not be physical units, may be located in one position,
or may be distributed on a plurality of network units. Some or all of the units may
be selected according to actual needs to achieve the objectives of the solutions of
the embodiments.
[0223] In addition, functional units in the embodiments of the present invention may be
integrated into one processing unit, or each of the units may exist alone physically,
or two or more units are integrated into one unit. The integrated unit may be implemented
in a form of hardware, or may be implemented in a form of a software functional unit.
[0224] When the integrated unit is implemented in the form of a software functional unit
and sold or used as an independent product, the integrated unit may be stored in a
computer-readable storage medium. Based on such an understanding, the technical solutions
of the present invention essentially, or the part contributing to the prior art, or
all or some of the technical solutions may be implemented in the form of a software
product. The computer software product is stored in a storage medium and includes
several instructions for instructing a computer device (which may be a personal computer,
a server, or a network device) or a processor (processor) to perform all or some of
the steps of the methods described in the embodiments of the present invention. The
foregoing storage medium includes: any medium that can store program code, such as
a USB flash drive, a removable hard disk, a read-only memory (ROM, Read-Only Memory),
a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical
disc.
[0225] The foregoing descriptions are merely specific implementation manners of the present
invention, but are not intended to limit the protection scope of the present invention.
Any variation or replacement readily figured out by a person skilled in the art within
the technical scope disclosed in the present invention shall fall within the protection
scope of the present invention. Therefore, the protection scope of the present invention
shall be subject to the protection scope of the appended claims.