CN111343325B - Port detection method and device, mobile terminal and storage medium - Google Patents

Port detection method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN111343325B
CN111343325B CN202010186868.0A CN202010186868A CN111343325B CN 111343325 B CN111343325 B CN 111343325B CN 202010186868 A CN202010186868 A CN 202010186868A CN 111343325 B CN111343325 B CN 111343325B
Authority
CN
China
Prior art keywords
port
mobile terminal
risk
preventer
object preventer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010186868.0A
Other languages
Chinese (zh)
Other versions
CN111343325A (en
Inventor
俞斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Anhui Technology Co ltd
Original Assignee
TCL Mobile Communication Technology Ningbo Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Mobile Communication Technology Ningbo Ltd filed Critical TCL Mobile Communication Technology Ningbo Ltd
Priority to CN202010186868.0A priority Critical patent/CN111343325B/en
Publication of CN111343325A publication Critical patent/CN111343325A/en
Application granted granted Critical
Publication of CN111343325B publication Critical patent/CN111343325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing

Abstract

The application discloses a port detection method, a device, a mobile terminal and a storage medium, which are applied to the mobile terminal, wherein the port detection method comprises the following steps: when the preset time length is reached, whether the object preventer is installed on the port is detected, if yes, the current port is judged to have no risk of entering foreign matters, and if not, the current port is judged to have the risk of the foreign matters, so that the follow-up prompt operation of the mobile terminal is facilitated, the user attention is brought to, the abnormal connection condition caused by the fact that the port enters the foreign matters is reduced, and the user experience is improved.

Description

Port detection method and device, mobile terminal and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a port detection method and apparatus, a mobile terminal, and a storage medium.
Background
Because the lithium battery has the advantages of no memory effect, long service life and the like, the mobile terminal is generally powered by the lithium battery at present.
With the continuous development of mobile terminals, at present, mobile terminals have application functions of games, payment, video watching and the like in addition to basic functions of short messages and telephones, and therefore, the application function of one mobile terminal even exceeds that of one personal computer. Based on such many application functions, the time for the user to use the mobile terminal is greatly increased, so that the mobile terminal still needs to be charged at least once a day to maintain normal use under the condition that the power consumption control and the battery capacity of the mobile terminal are greatly superior to those of the traditional functional mobile phone. Mobile terminal charges through USB mouth that charges usually, can also carry out data communication when charging, nevertheless because USB charges mouthful contains the pin more, so the mouth that charges is great, need occupy 5mm 10 mm's area usually, when the user put into mobile terminal containers such as pocket, package, the mouth that charges gets into the foreign matter very easily, leads to the charging wire to connect unusually, unable normal charging, very big influence user experience.
Disclosure of Invention
The embodiment of the application provides a port detection method, a port detection device, a mobile terminal and a storage medium, and aims to solve the technical problem that an existing mobile terminal charging port cannot be normally charged due to foreign matters.
The technical scheme provided by the application is as follows:
the application provides a port detection method, which is applied to a mobile terminal, wherein the mobile terminal comprises at least one port, and the port detection method comprises the following steps:
when the preset time length is reached, detecting whether an object preventer is installed on the port or not;
if so, judging that the port does not have the risk of entering foreign matters currently;
if not, judging that the port has the risk of entering foreign matters currently.
The present application further provides a port detection device applied to a mobile terminal, the mobile terminal includes at least one port, the port detection device includes:
the detection module is used for detecting whether the object preventer is installed on the port or not when the preset time length is reached;
the first judgment module is used for judging that the port does not have the risk of entering foreign matters currently if the port does not have the risk of entering foreign matters;
and the second judgment module is used for judging that the port has the risk of entering foreign matters currently if the port is not in the normal state.
In the port detection device provided by the application, a storage unit is arranged on the object preventer, a preset value is stored in the storage unit, and the detection module is specifically used for:
judging whether the preset value is successfully acquired from the storage unit or not;
if yes, judging that the port is provided with an object preventer;
if not, judging that the port is not provided with the object preventer.
In the port detection device provided in the present application, the port detection device further includes a charging module, configured to:
after the first judging module judges that the port does not have the risk of entering foreign matters at present, acquiring the electric quantity value of the object preventer;
and if the current electric quantity value is smaller than a preset electric quantity value, controlling the mobile terminal to supply power to the object preventer so as to charge the object preventer.
In the port detection device provided by the present application, before controlling the mobile terminal to supply power to the object preventer, the charging module is further configured to:
acquiring the electric quantity condition of the mobile terminal;
if the electric quantity condition indicates that the mobile terminal is in a power saving mode, displaying a selection dialog box, wherein the selection dialog box comprises an event display area and a selection area, the event display area is used for prompting a user whether to supply power to the object preventer, and the selection area is provided with a selection key;
and according to the selection operation of the user on the selection key, executing the step of controlling the mobile terminal to supply power to the object preventer.
In the port detection apparatus provided by the present application, the port detection apparatus further includes a prompt module, configured to, after the second determination module determines that there is a risk of entering of a foreign object at the current port:
acquiring a current reminding mode of the mobile terminal;
determining a prompt strategy according to the prompt mode;
and prompting the user that the risk of foreign matter entering the port exists at present according to the prompting strategy.
In the port detection device provided in the present application, the prompt module is specifically configured to:
if the sound state of the mobile terminal is ringing, using voice prompt as a prompt strategy;
and if the sound state of the mobile terminal is not ringing, vibrating and displaying a prompt dialog box as a prompt strategy.
The present application further provides a computer-readable storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor to perform any of the above-described port detection methods.
The application also provides a mobile terminal, which comprises a processor and a memory, wherein the processor is electrically connected with the memory, the memory is used for storing instructions and data, and the processor is used for the steps in the port detection method.
The beneficial effect of this application does: the application discloses a port detection method, a device, a mobile terminal and a storage medium, which are applied to the mobile terminal, wherein when the preset time length is reached, whether an object preventer is installed on a port is detected, if so, the current port is judged to have no risk of foreign matter entering, and if not, the current port is judged to have the risk of foreign matter, so that the follow-up prompt operation of the mobile terminal is facilitated, the attention of a user is brought, the occurrence of abnormal connection caused by the fact that the port enters the foreign matter is favorably reduced, and the user experience is improved.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario of a port detection method according to an embodiment of the present application.
Fig. 2 is a schematic flowchart of a port detection method according to an embodiment of the present application.
Fig. 3 is another schematic flow chart of a port detection method according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a port detection apparatus according to an embodiment of the present application.
Fig. 5 is another schematic structural diagram of a port detection apparatus according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a port detection method, a port detection device, a mobile terminal and a storage medium.
Referring to fig. 1, fig. 1 provides an application scenario diagram of a port detection system, where the port detection system may include any one of the port detection devices provided in the embodiments of the present application, and the port detection device may be integrated in a mobile terminal, where the mobile terminal includes at least one port, and may include a device with a mobile communication function, such as a smart phone and a tablet computer.
When the preset time length is reached, whether an object preventer is installed on the port is detected, and if yes, the current port is judged to have no risk of entering foreign objects; if not, the risk of foreign matter entering the current port is judged.
For example, as shown in fig. 1, the mobile terminal starts a timer, and when the preset duration is reached, it is determined whether an object preventer (e.g., a black solid small rectangle on the right side of the mobile terminal) is installed on a port (e.g., a black hollow small rectangle on the right side of the mobile terminal), and if so, it is determined that there is no risk of entering a foreign object at the current port, e.g., a triangular icon in the figure indicates that there is a risk; if not, the risk of foreign matter entering the current port is judged.
Referring to fig. 2, fig. 2 is a schematic flowchart of a port detection method according to an embodiment of the present disclosure, and as shown in fig. 2, the port detection method is applied to a mobile terminal, where the mobile terminal includes at least one port, and the port can be any intelligent electronic device with a mobile communication function, such as a smart phone, a tablet computer, and a smart watch. The specific process of the port detection method provided by this embodiment may be as follows:
s101, when the preset time length is reached, whether an object preventer is installed on the port is detected, if yes, step S102 is executed, and if not, step S103 is executed.
Specifically, the port includes an earphone port, a charging port, and the like, and a timer is provided in the mobile terminal for timing.
In addition, the object preventer may include a chip, a circuit, etc., and is a small device that can communicate with a mobile terminal, and the mobile terminal can recognize the object when communicating with the object preventer, and the shape and the size of the object preventer are not limited to the specific case.
In some embodiments, the port is an earphone port, when the mobile terminal detects that the earphone is unplugged, timing is started, and when a preset duration is reached, whether an object preventer is installed at the earphone port is detected.
In some embodiments, the port is a charging port, when the mobile terminal detects that no charging is performed, timing is started, and when a preset time length is reached, whether an object preventer is installed on the charging port is detected.
In some embodiments, the object preventer is provided with a storage unit, the storage unit stores preset values, and the step S101 may include the following sub-steps:
1-1, judging whether the preset value is successfully acquired from the storage unit, if so, executing the step 1-2, and if not, executing the step 1-3.
Specifically, the preset value stored in the storage unit of the object preventer may be any value, and here, taking 0x12 as an example, when the object preventer is installed on the mobile terminal, the mobile terminal is connected to the mobile terminal, at this time, the mobile terminal may acquire 0x12, and if the preset value is not acquired, it indicates that the object preventer is not connected to the mobile terminal.
1-2, judging that the port is provided with an object preventer;
specifically, when 0x12 is obtained, it is indicated that the mobile terminal is connected with an object protector, and it can be determined that the object protector is installed on the port.
1-3, judging that the port is not provided with the object preventer.
Specifically, if 0x12 is not obtained, it indicates that the mobile terminal is not connected to the alarm, and it may be determined that the alarm is not installed on the port.
And S102, judging that the current port has no risk of foreign matter entering.
Specifically, when an object preventer is installed on a port of the mobile terminal, a foreign object cannot enter the port, and it can be determined that there is no risk of entering the foreign object in the current port.
In some embodiments, after step S102, the method may further include:
step A: and acquiring the electric quantity value of the object preventer.
Specifically, the object protector needs to be electrically connected with the mobile terminal, and the mobile terminal can acquire the preset value, so that the electric quantity of the object protector is ensured to be sufficient, and therefore, when the object protector is installed on the mobile terminal, the mobile terminal judges whether the object protector is charged in the subsequent steps or not by acquiring the electric quantity value of the object protector.
And B: and if the current electric quantity value is smaller than the preset electric quantity value, controlling the mobile terminal to supply power to the object preventer.
Specifically, if the preset electric quantity value can be 100mA, when the electric quantity value of the object preventer is smaller than 100mA, the power is supplied to the object preventer, so that the risk of entering foreign matters due to the fact that the preset value cannot be obtained because the object preventer is powered off and the object preventer is not installed on the current port is judged by mistake.
In some embodiments, before "controlling the mobile terminal to supply power to the object preventer" in the step B, the method may further include:
and C: and acquiring the electric quantity condition of the mobile terminal.
Specifically, before the power is supplied to the object protector, it should be determined that the power of the mobile terminal is sufficient, and therefore, the power condition of the mobile terminal is obtained first and is used for judging whether the power is supplied to the object protector in the subsequent steps.
Step D: and if the electric quantity condition indicates that the mobile terminal is in the power saving module, displaying a selection dialog box, wherein the selection dialog box comprises an event display area and a selection area, the event display area is used for prompting a user whether to supply power to the object preventer, and the selection area is provided with a selection key.
For example, when the power condition of the mobile terminal is less than twenty percent of the total power, the mobile phone enters the power saving mode, which proves that the power of the mobile terminal is insufficient, and at this time, the user should be asked whether to supply power to the object preventer.
Specifically, the event display area is used for prompting the user whether to supply power to the alarm, and may include statements like "the mobile terminal has insufficient power, asks whether to supply power to the alarm" or not; the selection area is provided with keys of 'yes' and 'no' for selection by a user.
Step E: and executing the step of controlling the mobile terminal to supply power to the object preventer according to the selection operation of the user on the selection key.
Specifically, if the user selects "yes", the step of controlling the mobile terminal to supply power to the object preventer is executed, and if the user selects "no", the step of controlling the mobile terminal to supply power to the object preventer is not executed.
S103, judging that the current port has the risk of foreign matter entering.
Specifically, when the port of the mobile terminal is not equipped with an object preventer, if a user puts the mobile terminal into a container such as a bag or a pocket, foreign objects or dust can easily enter the port, and therefore, it is determined that the current port is at risk of entering the foreign objects.
In some embodiments, after step S103, the following steps may be further included:
step I: and acquiring the current reminding mode of the mobile terminal.
Specifically, the alert mode of the mobile terminal may include: ringing, vibrating, muting, etc. The reminding mode is set manually by the user, so that the reminding mode obtained here can be used for subsequently determining the reminding strategy.
Step II: and determining a prompt strategy according to the prompt mode.
In some embodiments, step ii may specifically include the following sub-steps:
if the sound state of the mobile terminal is ringing, the voice prompt is used as a prompt strategy;
and if the sound state of the mobile terminal is not ringing, vibrating and displaying a prompt dialog box as a prompt strategy.
Specifically, when the reminding mode is vibration or mute, it can be understood that the user is in the non-disturbance state at this time, and does not want the mobile terminal to make a sound, then a strong reminding mode should be avoided, so that vibration and a prompt dialog box are displayed as a reminding strategy, when the reminding mode is ringing, it can be understood that the user is not in the non-disturbance state at this time, and even if the mobile terminal makes a sound, the user is not troubled, so that the voice prompt can be used as the reminding strategy.
Step III: and prompting the user that the risk of foreign matter entering the current port exists according to a prompting strategy.
Specifically, according to the prompt policy determined in the previous step, the user is prompted that the current port is at risk of entering foreign matters, and the user can perform corresponding operations when receiving the prompt, for example, installing an object preventer or setting no-more-prompt and the like.
As can be seen from the above, the port detection method provided in this embodiment is applied to a mobile terminal, and includes: when the preset time length is reached, whether the object preventer is installed on the port is detected, if yes, the current port is judged to have no risk of entering foreign matters, and if not, the current port is judged to have the risk of entering the foreign matters, so that the follow-up prompt operation of the mobile terminal is facilitated, the user can notice the current port, the abnormal connection condition caused by the fact that the port enters the foreign matters is avoided, and the user experience is improved.
Referring to fig. 3, fig. 3 is another schematic flow chart of a port detection method according to an embodiment of the present application, where the port detection method is applied to a mobile terminal, and the mobile terminal includes at least one port, and the port detection method can be any intelligent electronic device with a mobile communication function, such as a smart phone, a tablet computer, and a smart watch. The specific process of the port detection method provided by this embodiment may be as follows:
s201, when the preset duration is reached, judging whether the preset value is successfully acquired from the storage unit, if so, executing step S202, and if not, executing step S203.
Specifically, the port includes an earphone port, a charging port, and the like, and a timer is provided in the mobile terminal for timing. The port is often provided with a lot of leads, for example, the mouth that charges contains many pins, so the mouth that charges is great, often occupies 5mm 10mm area, gets into the foreign matter very easily when the user puts mobile terminal in the container such as pocket, package, leads to unusually. To prevent the port from entering foreign objects, an object preventer may be installed at the port. The object preventer may include a chip, a circuit, etc., and is a small device capable of communicating with the mobile terminal, and the mobile terminal can recognize the object when communicating with the object preventer, and the shape and the size of the object preventer are not limited, as the case may be.
In some embodiments, the object preventer is provided with a storage unit, the storage unit stores a preset value, and when the object preventer is installed on the port, the object preventer is connected with the port, so that whether the object preventer is installed on the port can be determined by determining whether the preset value is obtained.
Specifically, when the port is an earphone port, when the mobile terminal detects that the earphone is unplugged, timing is started, and when a preset duration is reached, whether the preset value is successfully acquired is detected, for example, the earphone port may be an earphone plug.
Specifically, when the port is a charging port, when the mobile terminal detects that no charging is performed, timing is started, and when a preset duration is reached, whether the preset value is obtained successfully is detected.
Specifically, the preset value stored in the storage unit of the object preventer may be any value, and here, taking 0x12 as an example, when the object preventer is installed on the mobile terminal, the mobile terminal is connected to the mobile terminal, at this time, the mobile terminal may acquire 0x12, and if the preset value is not acquired, it indicates that the object preventer is not connected to the mobile terminal.
S202, judging that the object preventer is installed on the port.
Specifically, when 0x12 is obtained, it is indicated that the mobile terminal is connected with an object protector, and it can be determined that the object protector is installed on the port.
S203, judging that the current port has no risk of foreign matter entering.
Specifically, when the port is provided with the object preventer, the port can be completely blocked by the object preventer, and no space for other foreign objects to enter is provided, so that the risk that the foreign objects enter the current port can be judged.
And S204, acquiring the electric quantity value of the object preventer.
Specifically, the object protector needs to be electrically connected with the mobile terminal, and the mobile terminal can acquire the preset value, so that the electric quantity of the object protector is ensured to be sufficient, and therefore, when the object protector is installed on the mobile terminal, the mobile terminal judges whether the object protector is charged in the subsequent steps or not by acquiring the electric quantity value of the object protector.
S205, if the current electric quantity value is smaller than the preset electric quantity value, the mobile terminal is controlled to supply power to the object preventer.
Specifically, if the preset electric quantity value can be 100mA, when the electric quantity value of the object preventer is smaller than 100mA, the power is supplied to the object preventer, so that the risk of entering foreign matters due to the fact that the preset value cannot be obtained because the object preventer is powered off and the object preventer is not installed on the current port is judged by mistake.
In some embodiments, before "controlling the mobile terminal to supply power to the object preventer" in step 205, the method may further include:
(1) and acquiring the electric quantity condition of the mobile terminal.
Specifically, before the power is supplied to the object protector, it should be determined that the power of the mobile terminal is sufficient, and therefore, the power condition of the mobile terminal is obtained first and is used for judging whether the power is supplied to the object protector in the subsequent steps.
(2) And if the electric quantity condition indicates that the mobile terminal is in a power saving mode, displaying a selection dialog box, wherein the selection dialog box comprises an event display area and a selection area, the event display area is used for prompting a user whether to supply power to the object preventer, and the selection area is provided with a selection key.
For example, when the power condition of the mobile terminal is less than twenty percent of the total power, the mobile phone enters the power saving mode, which proves that the power of the mobile terminal is insufficient, and at this time, the user should be asked whether to supply power to the object preventer.
Specifically, the event display area is used for prompting the user whether to supply power to the alarm, and may include statements like "the mobile terminal has insufficient power, asks whether to supply power to the alarm" or not; the selection area is provided with keys of 'yes' and 'no' for selection by a user.
(3): and executing the step of controlling the mobile terminal to supply power to the object preventer according to the selection operation of the user on the selection key.
Specifically, if the user selects "yes", the step of controlling the mobile terminal to supply power to the object preventer is executed, and if the user selects "no", the step of controlling the mobile terminal to supply power to the object preventer is not executed.
S206, judging that the port is not provided with the object preventer.
Specifically, if 0x12 is not obtained, it indicates that the mobile terminal is not connected to the alarm, and it may be determined that the alarm is not installed on the port.
And S207, judging that the current port has the risk of foreign matter entering.
Specifically, if the port is not provided with the object preventer, the area of the port part is completely exposed, and foreign objects can easily enter, so that it is determined that there is a risk of entering the foreign objects at present.
And S208, acquiring the current reminding mode of the mobile terminal.
Specifically, the alert mode of the mobile terminal may include: ringing, vibrating, muting, etc. The reminding mode is set manually by the user, so that the reminding mode obtained here can be used for subsequently determining the reminding strategy.
And S209, determining a prompt strategy according to the prompt mode.
In some embodiments, step ii may specifically include the following sub-steps:
if the sound state of the mobile terminal is ringing, the voice prompt is used as a prompt strategy;
and if the sound state of the mobile terminal is not ringing, vibrating and displaying a prompt dialog box as a prompt strategy.
Specifically, when the reminding mode is vibration or mute, it can be understood that the user is in the non-disturbance state at this time, and does not want the mobile terminal to make a sound, then a strong reminding mode should be avoided, so that vibration and a prompt dialog box are displayed as a reminding strategy, when the reminding mode is ringing, it can be understood that the user is not in the non-disturbance state at this time, and even if the mobile terminal makes a sound, the user is not troubled, so that the voice prompt can be used as the reminding strategy.
And S210, prompting the user that the risk of foreign matter entering the current port exists according to a prompt strategy.
Specifically, according to the prompt policy determined in the previous step, the user is prompted that the current port is at risk of entering foreign matters, and the user can perform corresponding operations when receiving the prompt, for example, installing an object preventer or setting no-more-prompt and the like.
As can be seen from the above, the port detection method provided in this embodiment is applied to a mobile terminal, and includes: judging whether the preset value is successfully obtained from the storage unit, if so, judging that the port is provided with the object preventer and judging that the current port has no risk of foreign matter entering, then, obtaining the electric quantity value of the object preventer, if the current electric quantity value is smaller than the preset electric quantity value, controlling the mobile terminal to supply power to the object preventer, if not, judging that the port is not provided with the object preventer and judging that the current port has the risk of foreign matter entering, then, obtaining the current reminding mode of the mobile terminal, then, determining a reminding strategy according to the reminding mode, and then, reminding a user that the current port has the risk of foreign matter entering according to the reminding strategy. And the user experience is improved.
According to the method described in the foregoing embodiment, the present embodiment will be further described from the perspective of a port detection device, which may be specifically implemented as an independent entity or integrated in a mobile terminal, where the mobile terminal may include a mobile phone, a tablet computer, and the like.
Referring to fig. 4, fig. 4 specifically illustrates that the port detection apparatus provided in the embodiment of the present application is applied to a mobile terminal, where the mobile terminal may be any intelligent electronic device with a mobile communication function, and includes at least one port, such as a smart phone, a tablet computer, a notebook computer, and the like. The port detection apparatus may include: a detection module 10, a first determination module 20 and a second determination module 30, wherein:
(1) detection module 10
And the detection module 10 is used for detecting whether the object preventer is installed on the port when the preset time length is reached.
Specifically, the port includes an earphone port, a charging port, and the like, and a timer is provided in the mobile terminal for timing.
In addition, the object preventer may include a chip, a circuit, etc., and is a small device that can communicate with a mobile terminal, and the mobile terminal can recognize the object when communicating with the object preventer, and the shape and the size of the object preventer are not limited to the specific case.
In some embodiments, the port is an earphone port, when the mobile terminal detects that the earphone is unplugged, timing is started, and when a preset duration is reached, whether an object preventer is installed at the earphone port is detected. In particular, the object guard may be an earphone plug.
In some embodiments, the port is a charging port, when the mobile terminal detects that no charging is performed, timing is started, and when a preset time length is reached, whether an object preventer is installed on the charging port is detected.
In some embodiments, the object preventer is provided with a storage unit, the storage unit stores preset values, and the detection module 10 may specifically be configured to:
judging whether the preset value is successfully acquired from the storage unit or not;
if yes, judging that the port is provided with an object preventer;
if not, the port is judged not to be provided with the object preventer.
Specifically, the preset value stored in the storage unit of the object preventer may be any value, and here, taking 0x12 as an example, when the object preventer is installed on the mobile terminal, the mobile terminal is connected to the mobile terminal, at this time, the mobile terminal may acquire 0x12, and if the preset value is not acquired, it indicates that the object preventer is not connected to the mobile terminal. Therefore, whether the port is provided with the object preventer can be determined by acquiring the preset value.
(2) First decision Module 20
The first determination module 20 is configured to determine that there is no risk of entering foreign objects at the current port if the port is determined to be a foreign object.
Specifically, when an object preventer is installed on a port of the mobile terminal, a foreign object cannot enter the port, and it can be determined that there is no risk of entering the foreign object in the current port.
In this embodiment, please refer to fig. 5, fig. 5 is another schematic structural diagram of the port detection device according to the embodiment of the present application, and as shown in fig. 5, the port detection device further includes a charging module 40 configured to:
after the first determination module 20 determines that the current port has no risk of foreign matter entering, acquiring an electric quantity value of the object preventer;
and if the current electric quantity value is smaller than the preset electric quantity value, controlling the mobile terminal to supply power to the object preventer so as to charge the object preventer.
Specifically, the object protector needs to be electrically connected with the mobile terminal, and the mobile terminal can acquire the preset value, so that the electric quantity of the object protector is ensured to be sufficient, and therefore, when the object protector is installed on the mobile terminal, the mobile terminal judges whether the object protector is charged in the subsequent steps or not by acquiring the electric quantity value of the object protector. Specifically, if the preset electric quantity value can be 100mA, when the electric quantity value of the object preventer is smaller than 100mA, the power is supplied to the object preventer, so that the risk of entering foreign matters due to the fact that the preset value cannot be obtained because the object preventer is powered off and the object preventer is not installed on the current port is judged by mistake.
In some embodiments, before the charging module 40 controls the mobile terminal to supply power to the object preventer, the charging module may further be configured to:
acquiring the electric quantity condition of the mobile terminal;
if the electric quantity condition indicates that the mobile terminal is in a power saving mode, displaying a selection dialog box, wherein the selection dialog box comprises an event display area and a selection area, the event display area is used for prompting a user whether to supply power to the object preventer, and the selection area is provided with a selection key;
and executing the step of supplying power to the object preventer by the controlled mobile terminal according to the selection operation of the user on the selection key.
Specifically, before the power is supplied to the object protector, it should be determined that the power of the mobile terminal is sufficient, and therefore, the power condition of the mobile terminal is obtained first and is used for judging whether the power is supplied to the object protector in the subsequent steps.
Further, when the electric quantity condition of the mobile terminal is less than twenty percent of the total electric quantity, the mobile phone enters a power saving mode, the electric quantity of the mobile terminal is proved to be insufficient, the user is inquired whether to supply power to the object preventer, namely, a selection dialog box is displayed, the event display area is used for prompting the user whether to supply power to the object preventer, and the event display area can include statements similar to 'the situation that the electric quantity of the mobile terminal is insufficient, and the user asks whether to supply power to the object preventer'; the selection area is provided with keys of 'yes' and 'no' for selection by a user, if the user selects 'yes', the step of controlling the mobile terminal to supply power to the object preventer is executed, and if the user selects 'no', the step of controlling the mobile terminal to supply power to the object preventer is not executed.
(3) Second determination module 30
And the second determination module 30 is configured to determine that there is a risk of entering a foreign object at the current port if the port is not the foreign object.
Specifically, when the port of the mobile terminal is not equipped with an object preventer, if a user puts the mobile terminal into a container such as a bag or a pocket, foreign objects or dust can easily enter the port, and therefore, it is determined that the current port is at risk of entering the foreign objects.
In some embodiments, as shown in fig. 5, the port detection apparatus further includes a prompt module 50, configured to, after the second determination module 30 determines that the current port is at risk of entering the foreign object:
acquiring a current reminding mode of the mobile terminal;
determining a prompt strategy according to the prompt mode;
and prompting the user that the risk of foreign matter entering the current port exists according to a prompting strategy.
Specifically, the alert mode of the mobile terminal may include: ringing, vibrating, muting, etc. The reminding mode is set manually by the user, so that the reminding mode obtained here can be used for subsequently determining the reminding strategy.
In some embodiments, the prompting module 50 is specifically configured to:
if the sound state of the mobile terminal is ringing, the voice prompt is used as a prompt strategy;
and if the sound state of the mobile terminal is not ringing, vibrating and displaying a prompt dialog box as a prompt strategy.
Specifically, when the reminding mode is vibration or mute, it can be understood that the user is in the non-disturbance state at this time, and does not want the mobile terminal to make a sound, then a strong reminding mode should be avoided, so that vibration and a prompt dialog box are displayed as a reminding strategy, when the reminding mode is ringing, it can be understood that the user is not in the non-disturbance state at this time, and even if the mobile terminal makes a sound, the user is not troubled, so that the voice prompt can be used as the reminding strategy.
Further, the user is prompted according to the prompt strategy determined in the previous step that the risk of foreign matter entering the current port exists, and the user can perform corresponding operations after receiving the prompt, for example, installing an object preventer or setting no-more reminding and the like.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
Therefore, the port detection device provided by the embodiment is applied to a mobile terminal, and when the preset time length is reached, the detection module 10 detects whether an object preventer is installed on a port, if so, the first judgment module 20 judges that the current port is not in risk of entering foreign objects, and if not, the second judgment module 30 judges that the current port is in risk of entering foreign objects, so that the mobile terminal can perform subsequent prompt operation conveniently, the user can pay attention to the operation, the abnormal connection condition caused by the fact that the port enters the foreign objects can be reduced, and the user experience can be improved.
In addition, the embodiment of the application further provides a mobile terminal, and the mobile terminal can be a smart phone, a tablet computer and other devices. As shown in fig. 6, the mobile terminal 500 includes a processor 501, a memory 502. The processor 501 is electrically connected to the memory 502.
The processor 501 is a control center of the mobile terminal 500, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or loading an application stored in the memory 502 and calling data stored in the memory 502, thereby integrally monitoring the mobile terminal.
In this embodiment, the processor 501 in the mobile terminal 500 loads instructions corresponding to processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 runs the application programs stored in the memory 502, so as to implement various functions:
when the preset time length is reached, detecting whether an object preventer is installed on the port or not;
if so, judging that the current port has no risk of foreign matter entering;
if not, the risk of foreign matter entering the current port is judged.
Fig. 7 is a block diagram illustrating a specific structure of a mobile terminal according to an embodiment of the present application, where the mobile terminal may be used to implement the port detection method provided in the foregoing embodiment. The mobile terminal 300 may be a smart phone or a tablet computer.
The RF circuit 310 is used for receiving and transmitting electromagnetic waves, and performs interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. RF circuitry 310 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. RF circuit 310 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (e.g., IEEE802.11a, IEEE802.11 b, IEEE 802.2.access, and/or IEEE802.11 n), Voice over Internet Protocol (VoIP), world wide Internet Protocol (Microwave Access), wimax, other suitable protocols for short message Communication, and any other suitable protocols, and may even include those protocols that have not yet been developed.
The memory 320 may be used for storing software programs and modules, such as the port detection method and the corresponding program instructions/modules in the above embodiments, and the processor 380 executes various functional applications and data processing, i.e. implements the communication data saving function, by running the software programs and modules stored in the memory 320. The memory 320 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 320 may further include memory located remotely from the processor 380, which may be connected to the mobile terminal 300 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 330 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 330 may include a touch-sensitive surface 331 as well as other input devices 332. The touch-sensitive surface 331, also referred to as a touch screen or touch pad, may collect touch operations by a user on or near the touch-sensitive surface 331 (e.g., operations by a user on or near the touch-sensitive surface 331 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 331 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 380, and can receive and execute commands sent by the processor 380. In addition, the touch-sensitive surface 331 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 330 may comprise other input devices 332 in addition to the touch sensitive surface 331. In particular, other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by or provided to the user and various graphical user interfaces of the mobile terminal 300, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 340 may include a Display panel 341, and optionally, the Display panel 341 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 331 may overlay display panel 341, and when touch-sensitive surface 331 detects a touch operation thereon or thereabout, communicate to processor 380 to determine the type of touch event, and processor 380 then provides a corresponding visual output on display panel 341 in accordance with the type of touch event. Although in FIG. 7, touch-sensitive surface 331 and display panel 341 are implemented as two separate components for input and output functions, in some embodiments, touch-sensitive surface 331 and display panel 341 may be integrated for input and output functions.
The mobile terminal 300 may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 341 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 341 and/or the backlight when the mobile terminal 300 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured on the mobile terminal 300, detailed descriptions thereof are omitted.
Audio circuitry 360, speaker 361, and microphone 362 may provide an audio interface between a user and the mobile terminal 300. The audio circuit 360 may transmit the electrical signal converted from the received audio data to the speaker 361, and the audio signal is converted by the speaker 361 and output; on the other hand, the microphone 362 converts the collected sound signal into an electrical signal, which is received by the audio circuit 360 and converted into audio data, which is then processed by the audio data output processor 380 and then transmitted to, for example, another terminal via the RF circuit 310, or the audio data is output to the memory 320 for further processing. The audio circuit 360 may also include an earbud jack to provide communication of a peripheral headset with the mobile terminal 300.
The mobile terminal 300, which may assist the user in e-mail, web browsing, streaming media access, etc., through the transmission module 370 (e.g., a Wi-Fi module), provides the user with wireless broadband internet access. Although fig. 7 shows the transmission module 370, it is understood that it does not belong to the essential constitution of the mobile terminal 300 and may be omitted entirely within the scope not changing the essence of the invention as needed.
The processor 380 is a control center of the mobile terminal 300, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile terminal 300 and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby integrally monitoring the mobile phone. Optionally, processor 380 may include one or more processing cores; in some embodiments, processor 380 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 380.
The mobile terminal 300 also includes a power supply 390 (e.g., a battery) that provides power to the various components and, in some embodiments, may be logically coupled to the processor 380 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the mobile terminal 300 may further include a camera (e.g., a front camera, a rear camera), a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the mobile terminal is a touch screen display, the mobile terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
when the preset time length is reached, detecting whether an object preventer is installed on the port or not;
if so, judging that the current port has no risk of foreign matter entering;
if not, the risk of foreign matter entering the current port is judged.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, embodiments of the present application provide a storage medium including mobile terminal-executable instructions. The mobile terminal executable instructions, when executed by a mobile terminal processor, perform the steps of any one of the port detection methods provided by the embodiments of the present application.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any port detection method provided in the embodiments of the present invention, beneficial effects that can be achieved by any port detection method provided in the embodiments of the present invention may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
In summary, although the present application has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present application, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, so that the scope of the present application shall be determined by the appended claims.

Claims (10)

1. A port detection method is applied to a mobile terminal, and is characterized in that the mobile terminal comprises at least one port, and the port detection method comprises the following steps:
when the preset time length is reached, detecting whether an object preventer is installed on the port or not;
if so, judging that the port does not have the risk of entering foreign matters currently;
if not, judging that the port has the risk of entering foreign matters currently, and prompting a user that the port has the risk of entering foreign matters currently.
2. The port detection method according to claim 1, wherein a storage unit is provided on the object preventer, the storage unit stores a preset value, and the step of detecting whether the object preventer is installed on the port specifically includes:
judging whether the preset value is successfully acquired from the storage unit or not;
if yes, judging that the port is provided with an object preventer;
if not, judging that the port is not provided with the object preventer.
3. The port detection method according to claim 1, wherein after said determining that there is no risk of foreign object entering the port at present, further comprising:
acquiring an electric quantity value of the object preventer;
and if the current electric quantity value is smaller than a preset electric quantity value, controlling the mobile terminal to supply power to the object preventer so as to charge the object preventer.
4. The port detection method according to claim 3, further comprising, before the controlling the mobile terminal to supply power to the object preventer:
acquiring the electric quantity condition of the mobile terminal;
if the electric quantity condition indicates that the mobile terminal is in a power saving mode, displaying a selection dialog box, wherein the selection dialog box comprises an event display area and a selection area, the event display area is used for prompting a user whether to supply power to the object preventer, and the selection area is provided with a selection key;
and according to the selection operation of the user on the selection key, executing the step of controlling the mobile terminal to supply power to the object preventer.
5. The port detection method according to claim 1, wherein the prompting of the user that the port is currently at risk of entry of foreign matter specifically includes:
acquiring a current reminding mode of the mobile terminal;
determining a prompt strategy according to the prompt mode;
and prompting the user that the risk of foreign matter entering the port exists at present according to the prompting strategy.
6. The port detection method according to claim 5, wherein the determining a prompt policy according to the alert mode specifically includes:
if the sound state of the mobile terminal is ringing, using voice prompt as a prompt strategy;
and if the sound state of the mobile terminal is not ringing, vibrating and displaying a prompt dialog box as a prompt strategy.
7. A port detection device is applied to a mobile terminal, and is characterized in that the mobile terminal comprises a port, and the port detection device comprises:
the detection module is used for detecting whether the object preventer is installed on the port or not when the preset time length is reached;
the first judgment module is used for judging that the port does not have the risk of entering foreign matters currently if the port does not have the risk of entering foreign matters;
and the second judgment module is used for judging that the port has the risk of foreign matter entering at present and prompting a user that the port has the risk of foreign matter entering at present if the port does not have the risk of foreign matter entering at present.
8. The port detection device according to claim 7, wherein a storage unit is disposed on the object preventer, the storage unit stores preset values, and the detection module is specifically configured to:
judging whether the preset value is successfully acquired from the storage unit or not;
if yes, judging that the port is provided with an object preventer;
if not, judging that the port is not provided with the object preventer.
9. A computer-readable storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor to perform the port detection method of any of claims 1 to 6.
10. A mobile terminal comprising a processor and a memory, the processor being electrically connected to the memory, the memory being configured to store instructions and data, the processor being configured to perform the steps of the port detection method according to any one of claims 1 to 6.
CN202010186868.0A 2020-03-17 2020-03-17 Port detection method and device, mobile terminal and storage medium Active CN111343325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010186868.0A CN111343325B (en) 2020-03-17 2020-03-17 Port detection method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010186868.0A CN111343325B (en) 2020-03-17 2020-03-17 Port detection method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111343325A CN111343325A (en) 2020-06-26
CN111343325B true CN111343325B (en) 2021-04-09

Family

ID=71187631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010186868.0A Active CN111343325B (en) 2020-03-17 2020-03-17 Port detection method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111343325B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101946486B1 (en) * 2012-08-23 2019-04-26 삼성전자 주식회사 Ear-phone Operation System and Ear-phone Operating Method, and Portable Device supporting the same
JP6044830B2 (en) * 2012-12-27 2016-12-14 パナソニックIpマネジメント株式会社 Electronics
CN103986810A (en) * 2014-05-30 2014-08-13 深圳市中兴移动通信有限公司 Mobile terminal and information prompting method based on mobile terminal interfaces
US9729187B1 (en) * 2016-02-01 2017-08-08 Otter Products, Llc Case with electrical multiplexing
CN105846223B (en) * 2016-04-22 2019-04-12 北京小米移动软件有限公司 USB interface plug, control method and device

Also Published As

Publication number Publication date
CN111343325A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2014201863A1 (en) Volume adjusting method, volume adjusting apparatus and electronic device using the same
CN107834640B (en) Charging method and terminal
CN109714476B (en) Data processing method and device, mobile terminal and storage medium
CN110691168B (en) Screen control method and device of mobile terminal and storage medium
US11476684B2 (en) Charging protection method, terminal, and charger
CN106532876B (en) Power supply control method and device and computer equipment
CN111443803A (en) Mode switching method, device, storage medium and mobile terminal
CN111008090A (en) Battery electric quantity control method and device, storage medium and terminal equipment
CN108307075B (en) Incoming call processing method and mobile terminal
CN110958345B (en) Method and device for detecting rear cover of mobile terminal and computer readable storage medium
CN109327866B (en) Flow control method, flow control device, mobile terminal and storage medium
CN110851014A (en) Touch identification method and device, storage medium and terminal equipment
CN111343325B (en) Port detection method and device, mobile terminal and storage medium
CN112542867B (en) Mobile terminal power supply control method and device, terminal equipment and storage medium
CN112486350B (en) Detection method and device for touch screen of mobile terminal, storage medium and mobile terminal
CN111083288B (en) Screen control method and device, terminal equipment and storage medium
CN109672242B (en) Terminal charging control method and device and storage medium
CN111273774A (en) Terminal device display screen control method and system, storage medium and terminal device
CN112235783A (en) Multi-SIM card management control method and device, storage medium and mobile terminal
CN109995441B (en) Communication information processing method, device and storage medium
CN110572516B (en) Call control method, device, storage medium and terminal equipment
CN111984107B (en) Method and device for processing power supply abnormity of terminal equipment
CN111987764B (en) Discharge control method and device, storage medium and mobile terminal
CN110046063B (en) Device and method for restoring factory settings of mobile terminal and storage medium
CN113079249B (en) Prompting method, prompting device, storage medium and mobile terminal

Legal Events

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

Effective date of registration: 20230925

Address after: Room 1808, No. 1022 Xingang East Road, Haizhu District, Guangzhou City, Guangdong Province, 510308 (office only)

Patentee after: Guangdong Detonation Media Technology Co.,Ltd.

Address before: 10 / F, No.5 Lane 999, Yangfan Road, high tech Zone, Ningbo City, Zhejiang Province

Patentee before: TCL mobile communication technology (Ningbo) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240123

Address after: Room 1110, 11th Floor, No. 165 Qiaozhong Middle Road, Liwan District, Guangzhou City, Guangdong Province, 510000

Patentee after: Guangzhou Anhui Technology Co.,Ltd.

Country or region after: China

Address before: Room 1808, No. 1022 Xingang East Road, Haizhu District, Guangzhou City, Guangdong Province, 510308 (office only)

Patentee before: Guangdong Detonation Media Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right