A port protection method and device of an electronic device and the electronic device

CN122655162APending Publication Date: 2026-08-28LCFC HEFEI ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610774615.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-01
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

当用户不小心将中高阻值的异物(例如曲别针、铅笔等)插入端口时,由于回路电流较小,这种情况无法达到过流保护(Over Current Protection,OCP)功能的触发阈值,导致保护机制完全失效

Benefits of technology

[0014] Compared with the prior art, the beneficial effects of the embodiments of this application are as follows: This application, by determining that the resistance of the foreign object inserted at the port is large when the value of the first electrical parameter at the port is less than the first preset threshold range, and after obtaining the temperature detection information of the corresponding port, generates a warning message when the value of the second electrical parameter at the port, which is represented by the temperature detection information, is within the second preset threshold range. This avoids the situation where the first electrical parameter at the port is less than the first preset threshold range, i.e., when the resistance of the foreign object inserted at the port is large, and can provide timely warnings, thus informing the user that the port is abnormal and requesting timely handling. This prevents the foreign object from rapidly heating up due to the Joule effect under continuous power, which could lead to serious consequences such as smoke or even fire. It achieves proactive pre-warning, that is, timely warnings can be given in the early stages of a dangerous situation, significantly advancing the protection opportunity. Furthermore, generating warning information does not directly disconnect the electronic device, effectively avoiding unnecessary disconnection of the electronic device due to misjudgment. In other words, the warning mechanism gives the user an opportunity to handle the abnormality, avoiding unnecessary work interruptions, achieving a dual improvement in device safety and user experience, and improving the accuracy of protection and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122655162A_ABST
    Figure CN122655162A_ABST
Patent Text Reader

Abstract

The application provides a port protection method and device of an electronic device and the electronic device. The method comprises the following steps: determining a first electrical parameter at a port of the electronic device; acquiring temperature detection information of the corresponding port when the first electrical parameter at the port is less than a first preset threshold; determining to generate early warning information that foreign matter exists in the port when the temperature detection information indicates that a second electrical parameter at the port is in a second preset threshold; and determining that the temperature detection information indicates that the value of the second electrical parameter at the port is greater than a high threshold of the second preset threshold interval and canceling the early warning information when feedback information of a user is received within a preset time of generating the early warning information. In this way, timely early warning can be achieved to inform the user that the port is abnormal and to be handled in time, foreign matter can be prevented from rapidly heating due to the Joule effect under continuous power supply, and serious consequences such as smoking or even fire can be avoided, and active early warning is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of port protection technology for electronic devices, and in particular to a port protection method, apparatus, and electronic device for electronic devices. Background Technology

[0002] Currently, USB-A and Type-C ports on electronic devices have significant deficiencies in their foreign object insertion protection mechanisms. When a user accidentally inserts a medium-to-high resistance object (such as a paperclip or pencil) into the port, the low circuit current fails to trigger the overcurrent protection (OCP) function, causing the protection mechanism to completely fail. In this situation, the foreign object, under continuous power, will rapidly heat up due to the Joule effect, generating a large amount of heat sufficient to melt the port's plastic casing, potentially leading to smoke or even fire—serious safety hazards. This problem not only directly threatens user safety but may also cause irreversible damage to brand reputation. Summary of the Invention

[0003] In view of the above-mentioned technical problems existing in related technologies, this application provides a port protection method, apparatus and electronic device for electronic devices.

[0004] This application provides a port protection method for an electronic device, comprising: determining a first electrical parameter at a port of the electronic device; acquiring temperature detection information corresponding to the port when the value of the first electrical parameter at the port is less than a first preset threshold range; determining to generate a warning message indicating the presence of a foreign object at the port when the temperature detection information indicates that the value of the second electrical parameter at the port is within a second preset threshold range; and canceling the warning message when user feedback is received within a preset time period for generating the warning message, and determining that the temperature detection information indicates that the value of the second electrical parameter at the port is greater than a high threshold of the second preset threshold range; wherein the first electrical parameter and the second electrical parameter are different.

[0005] In some embodiments, after generating a warning message indicating the presence of a foreign object at the port, the method further includes: if no user feedback is received within a preset time period after generating the warning message, determining to control the electronic device to enter a shutdown state.

[0006] In some embodiments, obtaining the temperature detection information corresponding to the port specifically includes: obtaining the temperature detection information corresponding to the port detected by the temperature sensing element of the electronic device; wherein the temperature sensing element is disposed at the port of the electronic device.

[0007] In some embodiments, the method further includes: determining to control the electronic device to enter a shutdown state when the value of the second electrical parameter at the port, which is characterized by the temperature detection information, is less than the lower threshold of the second preset threshold range.

[0008] In some embodiments, the method further includes triggering an overcurrent protection function when the value of a first electrical parameter at the port is not less than the first preset threshold range.

[0009] In some embodiments, determining the generation of warning information for the presence of foreign objects at the port specifically includes: generating a standardized signal to be sent to the input / output system when the value of the second electrical parameter at the port, as indicated by the temperature detection information, is within a second preset threshold range; converting the standardized information into a standardized event via the input / output system and sending the standardized event to the operating system driver layer; and generating the warning information presented on the display interface of the electronic device based on the standardized event.

[0010] In some embodiments, the first electrical parameter is current; and / or, the second electrical parameter is voltage.

[0011] This application also provides a port protection device for an electronic device. The port protection device includes a first determining module, an acquiring module, and a second determining module. The first determining module determines a first electrical parameter at a port of the electronic device; the acquiring module acquires temperature detection information corresponding to the port when the value of the first electrical parameter at the port is less than a first preset threshold range; the second determining module determines to generate a warning message indicating the presence of a foreign object at the port when the temperature detection information indicates that the value of the second electrical parameter at the port is within a second preset threshold range; and, if user feedback is received within a preset time period for generating the warning message, determines that the value of the second electrical parameter at the port, as indicated by the temperature detection information, is greater than a high threshold of the second preset threshold range, and cancels the warning message; wherein the first electrical parameter and the second electrical parameter are different.

[0012] In some embodiments, the second determining module is further configured to: after generating a warning message that there is a foreign object in the port, and if no feedback message from the user is received within a preset time after generating the warning message, determine to control the electronic device to enter a shutdown state.

[0013] This application also provides an electronic device, which includes at least a controller and ports and a temperature sensing element electrically connected thereto. The temperature sensing element is used to generate temperature detection information corresponding to the port. The controller is used to execute at least the port protection method of the electronic device as described in any of the above embodiments.

[0014] Compared with the prior art, the beneficial effects of the embodiments of this application are as follows: This application, by determining that the resistance of the foreign object inserted at the port is large when the value of the first electrical parameter at the port is less than the first preset threshold range, and after obtaining the temperature detection information of the corresponding port, generates a warning message when the value of the second electrical parameter at the port, which is represented by the temperature detection information, is within the second preset threshold range. This avoids the situation where the first electrical parameter at the port is less than the first preset threshold range, i.e., when the resistance of the foreign object inserted at the port is large, and can provide timely warnings, thus informing the user that the port is abnormal and requesting timely handling. This prevents the foreign object from rapidly heating up due to the Joule effect under continuous power, which could lead to serious consequences such as smoke or even fire. It achieves proactive pre-warning, that is, timely warnings can be given in the early stages of a dangerous situation, significantly advancing the protection opportunity. Furthermore, generating warning information does not directly disconnect the electronic device, effectively avoiding unnecessary disconnection of the electronic device due to misjudgment. In other words, the warning mechanism gives the user an opportunity to handle the abnormality, avoiding unnecessary work interruptions, achieving a dual improvement in device safety and user experience, and improving the accuracy of protection and user experience. Attached Figure Description

[0015] In drawings that are not necessarily drawn to scale, the same reference numerals may describe similar parts in different views. The drawings generally illustrate various embodiments by way of example rather than limitation and are used, together with the description and claims, to illustrate the disclosed embodiments. Where appropriate, the same reference numerals are used in all drawings to refer to the same or similar parts. Such embodiments are illustrative and not intended to be exhaustive or exclusive embodiments of the apparatus or method.

[0016] Figure 1 This is a first flowchart of a port protection method for an electronic device according to an embodiment of this application.

[0017] Figure 2 This is a second flowchart of a port protection method for an electronic device according to an embodiment of this application.

[0018] Figure 3 This is a third flowchart of a port protection method for an electronic device according to an embodiment of this application.

[0019] Figure 4 This is a flowchart illustrating the software and hardware interaction process of the electronic device in an embodiment of this application.

[0020] Figure 5 This is a block diagram of the hardware architecture and signal link of the electronic device in the embodiment of this application.

[0021] Figure 6 This is a structural block diagram of a port protection device for an electronic device according to an embodiment of this application.

[0022] Figure 7 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0023] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.

[0024] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0025] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0026] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.

[0027] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0028] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the embodiments are merely examples of this application, which may be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.

[0029] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.

[0030] This application provides a port protection method for electronic devices, which can be applied to electronic devices with ports. In this application, the electronic device can refer to various electronic devices such as smartphones, tablets, and laptops. This application does not limit the specific type of electronic device, as long as it has a port.

[0031] like Figure 1 As shown, the port protection method for electronic devices includes steps S101 to S104.

[0032] Step S101: Determine the first electrical parameter at the port of the electronic device.

[0033] The aforementioned port can be a USB-A port, a Type-C port, or other types of ports. This application does not limit the specific physical form, size, interface standard, or manufacturing material of the port. In other words, this method is applicable regardless of changes in the port's appearance, connector specifications, pin arrangement, or the electrical standards it carries.

[0034] Step S102: If the value of the first electrical parameter at the port is less than the first preset threshold range, obtain the temperature detection information corresponding to the port.

[0035] like Figure 2 As shown, when a foreign object is inserted into the port, the first electrical parameter at the port will change. It can then be determined whether the value of the first electrical parameter at the port is less than a first preset threshold range. If so, it indicates that the resistance of the foreign object inserted at the port is high, and the port is continuously generating heat, which will be transferred to a temperature sensing element (such as an NTC). If not, it indicates that the resistance of the foreign object inserted at the port is low, triggering OCP protection (Over Current Protection). OCP protection can automatically cut off the circuit or limit the current when it detects that the current exceeds a set safe value, to prevent damage to components in the circuit (such as power supplies, batteries, chips, etc.) due to excessive current.

[0036] Specifically, when the resistance of the foreign object inserted at the port is greater than or equal to a preset resistance value, the value of the first electrical parameter at the port is less than a first preset threshold range. In this case, the temperature detection information of the corresponding port can be obtained through the temperature sensing element. When the resistance of the foreign object inserted at the port is less than the preset resistance value, the value of the first electrical parameter at the port is not less than the first preset threshold range. In this case, OCP protection can be directly triggered. For example, the preset resistance value can be greater than or equal to 2.5 ohms, specifically greater than or equal to 2.77 ohms. That is, if the resistance of the foreign object inserted at the port is greater than or equal to 2.77 ohms, it is determined that the resistance of the foreign object inserted at the port is relatively large; if the resistance of the foreign object inserted at the port is less than 2.77 ohms, it is determined that the resistance of the foreign object inserted at the port is relatively small.

[0037] Step S103: When the value of the second electrical parameter at the port, as indicated by the temperature detection information, is within the second preset threshold range, a warning message indicating the presence of a foreign object at the port is generated; wherein the first electrical parameter and the second electrical parameter are different.

[0038] The aforementioned method of generating early warning information can promptly notify users via pop-up windows, informing them that the port is experiencing an anomaly, so that users can handle it in a timely manner.

[0039] If the value of the second electrical parameter at the port, as indicated by the temperature detection information, is within the second preset threshold range, it can be determined that the foreign object inserted into the port is conductive, has strong conductivity, and a large resistance value. If it is not dealt with in time, it will pose a safety hazard.

[0040] The temperature detection information of the aforementioned port can be continuously and in real time. When the temperature detection information indicates that the value of the second electrical parameter at the port is within the second preset threshold range, a warning message will pop up in time to clearly inform the user that "there is a foreign object in the port, please deal with it in time".

[0041] like Figure 2 As shown, when the value of the second electrical parameter at the port, which is characterized by temperature detection information, is greater than the second preset threshold range, it can be determined that the electronic device is in normal working condition.

[0042] Step S104: If feedback information from the user is received within a preset time period for generating the warning information, and it is determined that the value of the second electrical parameter at the port represented by the temperature detection information is greater than the high threshold of the second preset threshold range, the warning information is cancelled.

[0043] Thus, after generating an early warning message about the presence of foreign objects at the port, if user feedback is received within a preset time, it can be determined that the value of the second electrical parameter at the port, which is represented by the temperature detection information, is greater than the high threshold of the second preset threshold range. At this time, the early warning message can be automatically canceled, thereby avoiding false alarms or excessive intervention, improving the accuracy of early warning judgment and the continuity of equipment operation, while taking into account both safety and user experience, and realizing intelligent port protection management.

[0044] Taking a preset time of 30 seconds as an example, Figure 2 As shown, a 30-second countdown is started to determine whether user feedback information has been received; if not, the countdown ends and the electronic device enters the shutdown state; if yes, it indicates that the temperature has dropped, the NTC resistance has recovered, and the value of the second electrical parameter at the port is greater than the high threshold of the second preset threshold range. At this time, the warning can be canceled and normal operation can be restored.

[0045] This application determines that a foreign object inserted at a port has a high resistance when the value of the first electrical parameter at the port is less than a first preset threshold range. After obtaining the temperature detection information of the corresponding port, it generates a warning message when the value of the second electrical parameter at the port, as indicated by the temperature detection information, falls within the second preset threshold range. This avoids situations where the first electrical parameter at the port is less than the first preset threshold range, indicating a high resistance of the foreign object. It provides timely warnings to inform the user of port abnormalities and to address them promptly. This prevents the foreign object from rapidly heating up due to the Joule effect under continuous power, potentially leading to smoke or even fire. This proactive warning system significantly advances the protection opportunity by providing timely warnings in the early stages of a dangerous situation. Furthermore, generating a warning message does not directly disconnect the electronic device, effectively avoiding unnecessary disconnection due to misjudgment. The warning mechanism gives the user an opportunity to handle the abnormality, preventing unnecessary work interruptions and achieving a dual improvement in device safety and user experience. This enhances both the accuracy of protection and the user experience.

[0046] In some embodiments, after generating a warning message about the presence of a foreign object at the port in step S103, the method further includes: If no user feedback is received within a preset time period after the warning information is generated, the electronic device is controlled to enter a shutdown state.

[0047] Thus, by setting a preset time to wait for user feedback after generating a warning message about foreign objects in the port, and if no feedback is received within the preset time, the electronic device can be automatically shut down. This effectively prevents damage or short circuits caused by foreign objects, improving the safety and reliability of the device. This provides users with a buffer time while avoiding the risk of work interruption that might result from a direct shutdown, achieving the goal of tiered protection. It represents an upgrade from a "one-size-fits-all" approach to "precise control," effectively avoiding unnecessary shutdowns due to misjudgments and improving the accuracy of protection and user experience.

[0048] Furthermore, a multi-level collaborative decision-making mechanism of "hardware perception - software decision-making - user interaction" can be constructed. That is, the temperature detection information of the temperature sensing element of the electronic device senses the temperature detection information of the port, the software generates the early warning information of the presence of foreign objects, and receives the user's feedback on the early warning information. The time dimension and user interaction are introduced, which breaks through the limitations of traditional hardware protection and realizes intelligent and scenario-based judgment and response.

[0049] The aforementioned preset time can be understood as the processing time provided to the user. If the user promptly removes the foreign object at the port within this time, the port temperature will decrease, and the value of the second electrical parameter at the port will rise to the high threshold of the second preset threshold range, at which point the electronic device is in normal working condition. However, if the user fails to handle the issue promptly, or if the value of the second electrical parameter falls below the low threshold of the second preset threshold range, a forced shutdown operation will be immediately executed, meaning the electronic device will enter a shutdown state to ensure its safety.

[0050] In some embodiments, the step S102 of obtaining the temperature detection information corresponding to the port specifically includes: obtaining the temperature detection information corresponding to the port detected by the temperature sensing element of the electronic device; wherein the temperature sensing element is disposed at the port of the electronic device.

[0051] In this way, the temperature detection information detected by the temperature sensing element set at the port of the electronic device can be obtained in real time, thereby accurately monitoring the temperature change of the port, which can effectively improve the accuracy of temperature data acquisition and provide a reliable basis for subsequent determination of electrical parameters.

[0052] The aforementioned temperature sensing element can specifically be a thermistor (NTC). A high-precision thermistor can be placed next to the motherboard soldered to the port. The controller of the electronic device will monitor the voltage of this thermistor through the signal line to determine the second electrical parameter at the port.

[0053] In some embodiments, such as Figure 2As shown, the method further includes: when the value of the second electrical parameter at the port, which is characterized by the temperature detection information, is less than the lower threshold of the second preset threshold range, determining that the electronic device should be controlled to enter a power-off state.

[0054] Thus, by monitoring the temperature detection information at the monitoring port, when the value of the second electrical parameter is less than the lower threshold of the second preset threshold range, the electronic device is automatically judged to have an abnormal situation, and the electronic device is promptly controlled to enter the shutdown state. This achieves improved safety and stability of the electronic device through intelligent temperature monitoring and automatic protection mechanisms.

[0055] In some embodiments, the method further includes triggering an overcurrent protection function (OCP protection) when the value of the first electrical parameter at the port is not less than the first preset threshold range.

[0056] In this way, by monitoring the first electrical parameter at the port in real time, when the value of the parameter is not less than the first preset threshold range, the overcurrent protection function is automatically triggered. This allows for timely protection measures to be taken when the current is too high, preventing damage or overheating of electronic equipment due to overcurrent, enhancing the anti-interference capability and safety of electronic equipment, and ensuring the stable operation and long-term reliability of electronic equipment.

[0057] In some embodiments, such as Figure 3 As shown, step S103, which determines the generation of a warning message indicating the presence of a foreign object at the port, specifically includes steps S201 to S203.

[0058] Step S201: When the value of the second electrical parameter at the port, as indicated by the temperature detection information, is within the second preset threshold range, a standardized signal is generated and sent to the input / output system.

[0059] Step S202: The standardized information is converted into a standardized event via the input / output system, and the standardized event is sent to the operating system driver layer.

[0060] Step S203: Generate the warning information to be displayed on the display interface of the electronic device based on the standardized event.

[0061] In this way, by converting temperature detection information into standardized signals and processing them through an input / output system to generate standardized events, these events are further transmitted to the operating system driver layer. Based on these events, warning information can be automatically generated and presented on the display interface of electronic devices. This effectively automates the process from temperature detection to event response, ensuring that the equipment can promptly and accurately report potential anomalies. This enhances the intelligent monitoring and fault warning capabilities of the equipment, providing users with a means to respond quickly and prevent risks.

[0062] like Figure 4 As shown, the EC (controller) of an electronic device can detect hardware events, namely, when it detects that the value of the second electrical parameter at the port of EC_Shutdown_Detect (a signal used to detect the device's shutdown state) is within the second preset threshold range, it can convert this event into a standardized signal sent to the BIOS (input / output system).

[0063] Continue to combine Figure 4 The BIOS (BIOS Input / Output System) can convert standardized information into standardized events, i.e., standard ACPI events, and send these events to the OS (Operating System Driver). The OS will launch the ACPI driver to receive the standardized events sent by the BIOS, convert them into internal operating system messages, and then notify user space, i.e., pass them to the corresponding system services or applications. The application will call the pop-up API to display warning information on the electronic device's interface, such as displaying a warning dialog box. It will obtain user feedback on the warning information; for example, if the user clicks the "Process" button, the application will send control commands to the OS. The OS will then inform the BIOS via ACPI methods, and the BIOS will send a message to the EC (Electronic Control Panel) to reset its monitoring status, enabling the EC to continuously and in real-time monitor the port's temperature information.

[0064] like Figure 5 As shown, the NTC R5019 thermistor can be understood as a temperature sensing element; its resistance change alters the voltage drop value at the EC_Shutdown_Detect measurement point. Taking USB-A or Type-C ports as an example, under normal circumstances, when an external device is plugged into the USB-A / Type-C Connect interface, data communication is conducted through the USB-A / Type-C Switch chip to determine whether the external device is performing data transfer, charging, reverse charging, or other functions, and this information is transmitted to the EC for unified allocation. When a foreign object with a large resistance value is inserted into the USB-A / Type-C port, i.e., a foreign object with a resistance greater than the preset resistance value, the first electrical parameter will be too low, such as less than or equal to ≤1.8A (the first preset threshold range can be ≤1.8A). In this case, the OCP function cannot be triggered, and the EC transmits this information sequentially to the BIOS and OS to notify the user of the abnormal situation of a foreign object inserted into the port. If the user does not operate within a preset time, or if the value of the second electrical parameter at the port is less than the lower threshold of the second preset threshold range, the EC directly performs a shutdown operation, i.e., controls the electronic device to enter the shutdown state. The CPU communicates with the EC to determine if the electronic device has entered a shutdown state. Among other things, Figure 5 R5020 shown is the resistor for normal detection and monitoring of the voltage at the monitoring point.

[0065] In some embodiments, the first electrical parameter is current; and / or, the second electrical parameter is voltage.

[0066] The first electrical parameter mentioned above can be either the input current or the output current. The second electrical parameter can be either the input voltage or the output voltage.

[0067] The high threshold of the aforementioned second preset threshold range can be the real-time second electrical parameter at the port at room temperature, and the low threshold of the second preset threshold range can be the real-time second electrical parameter when the temperature reaches the risk temperature. For example, when the thermistor NTC is at room temperature, its resistance is 22 kΩ. According to Ohm's law, the voltage division of the EC_Shutdown_Detect signal is 3.15V. If there is no abnormality at the port, the port temperature remains normal; therefore, the voltage division of 3.15V at room temperature is set as the high threshold of the second preset threshold range. When the temperature rises to 40 degrees Celsius, the voltage division of the EC_Shutdown_Detect signal drops to 3.02V, and 3.02V is designated as the low threshold of the second preset threshold range.

[0068] This application also provides a port protection device 100 for an electronic device. For example... Figure 6 As shown, the port protection device 100 of the electronic device includes a first determining module 101, an acquiring module 102, and a second determining module 103. The first determining module 101 is used to determine a first electrical parameter at the port of the electronic device. The acquiring module 102 is used to acquire temperature detection information corresponding to the port when the value of the first electrical parameter at the port is less than a first preset threshold range. The second determining module 103 is used to determine and generate a warning message indicating the presence of a foreign object at the port when the temperature detection information indicates that the value of the second electrical parameter at the port is within a second preset threshold range; and, if user feedback is received within a preset time period for generating the warning message, to determine that the value of the second electrical parameter at the port, indicated by the temperature detection information, is greater than a high threshold of the second preset threshold range, and to cancel the warning message; wherein the first electrical parameter and the second electrical parameter are different.

[0069] The aforementioned port can be a USB-A port, a Type-C port, or other types of ports. This application does not limit the specific physical form, size, interface standard, or manufacturing material of the port. In other words, this method is applicable regardless of changes in the port's appearance, connector specifications, pin arrangement, or the electrical standards it carries.

[0070] like Figure 2As shown, when a foreign object is inserted into the port, the first electrical parameter at the port will change. It can then be determined whether the value of the first electrical parameter at the port is less than a first preset threshold range. If so, it indicates that the resistance of the foreign object inserted at the port is high, and the port is continuously generating heat, which will be transferred to a temperature sensing element (such as an NTC). If not, it indicates that the resistance of the foreign object inserted at the port is low, triggering OCP protection (Over Current Protection). OCP protection can automatically cut off the circuit or limit the current when it detects that the current exceeds a set safe value, to prevent damage to components in the circuit (such as power supplies, batteries, chips, etc.) due to excessive current.

[0071] Specifically, when the resistance of the foreign object inserted at the port is greater than or equal to a preset resistance value, the value of the first electrical parameter at the port is less than a first preset threshold range. In this case, the temperature detection information of the corresponding port can be obtained through the temperature sensing element. When the resistance of the foreign object inserted at the port is less than the preset resistance value, the value of the first electrical parameter at the port is not less than the first preset threshold range. In this case, OCP protection can be directly triggered. For example, the preset resistance value can be greater than or equal to 2.5 ohms, specifically greater than or equal to 2.77 ohms. That is, if the resistance of the foreign object inserted at the port is greater than or equal to 2.77 ohms, it is determined that the resistance of the foreign object inserted at the port is relatively large; if the resistance of the foreign object inserted at the port is less than 2.77 ohms, it is determined that the resistance of the foreign object inserted at the port is relatively small.

[0072] The aforementioned method of generating early warning information can promptly notify users via pop-up windows, informing them that the port is experiencing an anomaly, so that users can handle it in a timely manner.

[0073] If the value of the second electrical parameter at the port, as indicated by the temperature detection information, is within the second preset threshold range, it can be determined that the foreign object inserted into the port is conductive, has strong conductivity, and a large resistance value. If it is not dealt with in time, it will pose a safety hazard.

[0074] The temperature detection information of the aforementioned port can be continuously and in real time. When the temperature detection information indicates that the value of the second electrical parameter at the port is within the second preset threshold range, a warning message will pop up in time to clearly inform the user that "there is a foreign object in the port, please deal with it in time".

[0075] like Figure 2 As shown, when the value of the second electrical parameter at the port, which is characterized by temperature detection information, is greater than the second preset threshold range, it can be determined that the electronic device is in normal working condition.

[0076] This application, after generating a warning message about the presence of foreign objects at a port, can determine if, within a preset time, that the temperature detection information indicates that the value of the second electrical parameter at the port is greater than the high threshold of the second preset threshold range if user feedback is received. In this case, the warning message can be automatically canceled, thereby avoiding false alarms or excessive intervention, improving the accuracy of warning judgment and the continuity of equipment operation, while taking into account both security and user experience, and realizing intelligent port protection management.

[0077] Taking a preset time of 30 seconds as an example, Figure 2 As shown, a 30-second countdown is started to determine whether user feedback information has been received; if not, the countdown ends and the electronic device enters the shutdown state; if yes, it indicates that the temperature has dropped, the NTC resistance has recovered, and the value of the second electrical parameter at the port is greater than the high threshold of the second preset threshold range. At this time, the warning can be canceled and normal operation can be restored.

[0078] This application determines that a foreign object inserted at a port has a high resistance when the value of the first electrical parameter at the port is less than a first preset threshold range. After obtaining the temperature detection information of the corresponding port, it generates a warning message when the value of the second electrical parameter at the port, as indicated by the temperature detection information, falls within the second preset threshold range. This avoids situations where the first electrical parameter at the port is less than the first preset threshold range, indicating a high resistance of the foreign object. It provides timely warnings to inform the user of port abnormalities and to address them promptly. This prevents the foreign object from rapidly heating up due to the Joule effect under continuous power, potentially leading to smoke or even fire. This proactive warning system significantly advances the protection opportunity by providing timely warnings in the early stages of a dangerous situation. Furthermore, generating a warning message does not directly disconnect the electronic device, effectively avoiding unnecessary disconnection due to misjudgment. The warning mechanism gives the user an opportunity to handle the abnormality, preventing unnecessary work interruptions and achieving a dual improvement in device safety and user experience. This enhances both the accuracy of protection and the user experience.

[0079] In some embodiments, the second determining module 103 is further configured to determine, after generating a warning message that there is a foreign object in the port, and if no feedback message from the user is received within a preset time after generating the warning message, to control the electronic device to enter a shutdown state.

[0080] In some embodiments, after generating a warning message about the presence of a foreign object at the port, the second determining module 103 is further configured to: if feedback information from the user is received within a preset time period for generating the warning message, determine that the value of the second electrical parameter at the port represented by the temperature detection information is greater than the high threshold of the second preset threshold range, and cancel the warning message.

[0081] In some embodiments, the acquisition module 102 is further configured to: acquire temperature detection information corresponding to the port detected by the temperature sensing element of the electronic device; wherein the temperature sensing element is disposed at the port of the electronic device.

[0082] In some embodiments, the second determining module 103 is further configured to: determine that the electronic device enters a power-off state when the value of the second electrical parameter at the port, as represented by the temperature detection information, is less than the lower threshold of the second preset threshold range.

[0083] In some embodiments, the second determining module 103 is further configured to: trigger an overcurrent protection function when the value of the first electrical parameter at the port is not less than the first preset threshold range.

[0084] In some embodiments, the second determining module 103 is further configured to: generate a standardized signal to be sent to the input / output system when the value of the second electrical parameter at the port, as indicated by the temperature detection information, is within a second preset threshold range; convert the standardized information into a standardized event via the input / output system and send the standardized event to the operating system driver layer; and generate the warning information presented on the display interface of the electronic device based on the standardized event.

[0085] In some embodiments, the first electrical parameter is current; and / or, the second electrical parameter is voltage.

[0086] This application also provides an electronic device 200. For example... Figure 7 As shown, the electronic device 200 includes at least a controller 201 and a port and a temperature sensing element 202 electrically connected thereto. The temperature sensing element 202 is used to generate temperature detection information corresponding to the port. The controller 201 is used to execute the port protection method of the electronic device 200 as described in any of the above embodiments.

[0087] This application determines that a foreign object inserted at a port has a high resistance when the value of the first electrical parameter at the port is less than a first preset threshold range. After obtaining the temperature detection information of the corresponding port, it generates a warning message when the value of the second electrical parameter at the port, as indicated by the temperature detection information, falls within the second preset threshold range. This avoids situations where the first electrical parameter at the port is less than the first preset threshold range, indicating a high resistance of the foreign object. It provides timely warnings to inform the user of port abnormalities and to address them promptly. This prevents the foreign object from rapidly heating up due to the Joule effect under continuous power, potentially leading to smoke or even fire. This proactive warning mechanism significantly advances the protection opportunity by providing timely warnings in the early stages of a dangerous situation. Furthermore, generating a warning message does not directly disconnect the electronic device 200, effectively avoiding unnecessary disconnection due to misjudgment. The warning mechanism gives the user an opportunity to handle the abnormality, preventing unnecessary work interruptions and achieving a dual improvement in equipment safety and user experience. This enhances both the accuracy of protection and the user experience.

[0088] Note that the various units in the embodiments of this application can be implemented as computer-executable instructions stored in memory, which, when executed by a processor, can perform corresponding steps; they can also be implemented as hardware with corresponding logical computing capabilities; or they can be implemented as a combination of software and hardware (firmware). In some embodiments, the processor can be implemented as any of an FPGA, ASIC, DSP chip, SOC (System-on-a-Chip), MPU (e.g., but not limited to Cortex), etc. The processor can be communicatively coupled to the memory and configured to execute computer-executable instructions stored therein. The memory can include read-only memory (ROM), flash memory, random access memory (RAM), dynamic random access memory (DRAM) such as synchronous DRAM (SDRAM) or Rambus DRAM, static memory (e.g., flash memory, static random access memory), etc., on which computer-executable instructions are stored in any format. The computer-executable instructions can be accessed by the processor, read from the ROM or any other suitable storage location, and loaded into the RAM for the processor to execute, to implement the wireless communication methods according to the embodiments of this application.

[0089] It should be noted that in the system of this application, the components are logically divided according to the functions they are to perform. However, this application is not limited to this and can re-divide or combine the components as needed. For example, some components can be combined into a single component, or some components can be further decomposed into more sub-components.

[0090] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the system according to the embodiments of this application. This application can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such a program implementing this application can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form. Furthermore, this application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0091] Furthermore, although exemplary embodiments have been described herein, their scope includes any and all embodiments based on this application that have equivalent elements, modifications, omissions, combinations (e.g., schemes involving intersections of various embodiments), adaptations, or alterations. Elements in the claims will be interpreted broadly based on the language used in the claims and are not limited to the examples described in this specification or during the implementation of this application, and such examples will be interpreted as non-exclusive.

[0092] The above description is intended to be illustrative and not restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. Other embodiments can be used by those skilled in the art when reading the above description. Furthermore, in the above detailed description, various features may be grouped together to simplify the application. This should not be construed as an intention that a disclosed feature not claimed is necessary for any claim. Rather, the subject matter of the application may be less than all the features of a particular disclosed embodiment. Thus, the claims are incorporated herein by reference as examples or embodiments, wherein each claim is an independent, separate embodiment, and these embodiments are contemplated as being able to be combined with each other in various combinations or arrangements. The scope of this application should be determined by reference to the appended claims and the full scope of their equivalents.

[0093] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.

Claims

1. A port protection method for an electronic device, characterized in that, include: Determine the first electrical parameters at the port of the electronic device; If the value of the first electrical parameter at the port is less than a first preset threshold range, the temperature detection information of the corresponding port is obtained. If the value of the second electrical parameter at the port, as indicated by the temperature detection information, is within a second preset threshold range, a warning message indicating the presence of a foreign object at the port is generated. If user feedback is received within a preset time period for generating the warning information, and it is determined that the value of the second electrical parameter at the port, which is characterized by the temperature detection information, is greater than the high threshold of the second preset threshold range, the warning information is cancelled; wherein the first electrical parameter and the second electrical parameter are different.

2. The port protection method for electronic devices according to claim 1, characterized in that, After generating a warning message indicating the presence of a foreign object at the port, the method further includes: If no user feedback is received within a preset time period after the warning information is generated, the electronic device is controlled to enter a shutdown state.

3. The port protection method for electronic devices according to claim 1 or 2, characterized in that, The step of obtaining the temperature detection information corresponding to the port specifically includes: The temperature detection information corresponding to the port is obtained via the temperature sensing element of the electronic device; wherein the temperature sensing element is disposed at the port of the electronic device.

4. The port protection method for electronic devices according to claim 1 or 2, characterized in that, The method further includes: If the value of the second electrical parameter at the port, as indicated by the temperature detection information, is less than the lower threshold of the second preset threshold range, it is determined that the electronic device should be controlled to enter a shutdown state.

5. The port protection method for electronic devices according to claim 1 or 2, characterized in that, The method further includes: If the value of the first electrical parameter at the port is not less than the first preset threshold range, the overcurrent protection function is triggered.

6. The port protection method for electronic devices according to claim 1 or 2, characterized in that, The determination of the presence of foreign objects in the port specifically includes: When the value of the second electrical parameter at the port, which is characterized by the temperature detection information, is within a second preset threshold range, a standardized signal is generated and sent to the input / output system. The standardized information is transformed into standardized events through the input / output system, and the standardized events are sent to the operating system driver layer. The warning information is generated based on the standardized events and presented on the display interface of the electronic device.

7. The port protection method for an electronic device according to claim 1 or 2, characterized in that, The first electrical parameter is current; and / or, the second electrical parameter is voltage.

8. A port protection device for an electronic device, characterized in that, include: A first determining module is used to determine a first electrical parameter at a port of the electronic device; The acquisition module is used to acquire temperature detection information corresponding to the port when the value of the first electrical parameter at the port is less than a first preset threshold range. The second determining module is used to determine and generate a warning message that there is a foreign object in the port when the value of the second electrical parameter represented by the temperature detection information at the port is within a second preset threshold range. as well as, If user feedback is received within a preset time period for generating the warning information, and it is determined that the value of the second electrical parameter at the port, which is characterized by the temperature detection information, is greater than the high threshold of the second preset threshold range, the warning information is cancelled; wherein the first electrical parameter and the second electrical parameter are different.

9. The port protection device for electronic devices according to claim 8, characterized in that, The second determining module is further configured to: after generating a warning message that there is a foreign object in the port, and if no feedback message from the user is received within a preset time after generating the warning message, determine to control the electronic device to enter a shutdown state.

10. An electronic device, characterized in that, It includes at least a controller and ports and a temperature sensing element electrically connected thereto, the temperature sensing element being used to generate temperature detection information corresponding to the port, and the controller being used at least to perform the port protection method of the electronic device as described in any one of claims 1 to 8.