CN111262737B - Port configuration management method and device, storage medium and terminal - Google Patents

Port configuration management method and device, storage medium and terminal Download PDF

Info

Publication number
CN111262737B
CN111262737B CN202010048617.6A CN202010048617A CN111262737B CN 111262737 B CN111262737 B CN 111262737B CN 202010048617 A CN202010048617 A CN 202010048617A CN 111262737 B CN111262737 B CN 111262737B
Authority
CN
China
Prior art keywords
configuration information
connection configuration
usb
current
historical
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
CN202010048617.6A
Other languages
Chinese (zh)
Other versions
CN111262737A (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.)
Yuanshan Electronic Technology Shenzhen Co ltd
Original Assignee
Yuanshan Electronic Technology Shenzhen Co 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 Yuanshan Electronic Technology Shenzhen Co ltd filed Critical Yuanshan Electronic Technology Shenzhen Co ltd
Priority to CN202010048617.6A priority Critical patent/CN111262737B/en
Publication of CN111262737A publication Critical patent/CN111262737A/en
Application granted granted Critical
Publication of CN111262737B publication Critical patent/CN111262737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Abstract

The embodiment of the application discloses a port configuration management method, a device, a storage medium and a terminal. The port configuration management method comprises the following steps: when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device; matching the current connection configuration information with the historical connection configuration information; if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information; and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base. According to the embodiment of the application, the connection conditions of a plurality of USB devices stored in the terminal are detected on time, the connection configuration information of the USB devices which are not connected for a long time is cleaned, more memory space is released, and the system running speed of the mobile terminal can be improved.

Description

Port configuration management method and device, storage medium and terminal
Technical Field
The present application relates to the field of mobile terminal applications, and in particular, to a method and apparatus for managing port configuration, a storage medium, and a terminal.
Background
Currently, a USB (universal serial bus) interface is widely used in a mobile terminal, charging is performed through The USB interface, OTG (On-The-Go) is used for data transmission with other devices, and USB is an external bus standard for standardizing connection and communication between a computer and an external device. The USB interface has plug-and-play and hot plug functions. The USB interface can be connected with 127 kinds of peripheral equipment, such as a mouse, a keyboard and the like. USB has been successfully replaced serial ports and parallel ports after being introduced in 1994 by the combination of Intel et al companies in 1996, and has become a necessary interface between computers and a large number of intelligent devices. The USB system adopts a cascade star topology, which consists of three basic components: host, hub and functional device.
In the related art, the mobile terminal has more functions, and after the mobile terminal is connected with the USB host, a plurality of ports are displayed for different functions, and as the number of the hosts connected with the mobile terminal increases, the USB host port configuration saves a plurality of copies in the mobile terminal, occupies more mobile terminal memories, and influences the operation efficiency of the mobile terminal.
Disclosure of Invention
The embodiment of the application provides a port configuration management method, a device, a storage medium and a terminal, which can improve the system operation rate of a mobile terminal.
The embodiment of the application provides a port configuration management method, which comprises the following steps:
when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device;
matching the current connection configuration information with the historical connection configuration information;
if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information;
and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base.
Correspondingly, the embodiment of the application also provides a port configuration management device, which comprises:
the first acquisition unit is used for acquiring current connection configuration information of the USB equipment when receiving a connection request sent by the USB equipment;
the matching unit is used for matching the current connection configuration information with the historical connection configuration information;
the adding unit is used for adding the current connection configuration information into a configuration information base if the matching fails, wherein the configuration information base comprises a plurality of historical connection configuration information;
and the removing unit is used for removing the current connection configuration information from the configuration information base if the connection with the USB equipment is not detected within the preset time period.
Accordingly, an embodiment of the present application further provides a storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the port configuration management method as described above.
Correspondingly, the embodiment of the application also provides a terminal, which comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the steps in the port configuration management method.
According to the embodiment of the application, the connection conditions of a plurality of USB devices stored in the terminal are detected on time, the connection configuration information of the USB devices which are not connected for a long time is cleaned, more memory space is released, and the system running speed of the mobile terminal can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a first port configuration management method according to an embodiment of the present application.
Fig. 2 is a flow chart of a second method for port configuration management according to an embodiment of the present application.
Fig. 3 is a block diagram of a first port configuration management device according to an embodiment of the present application.
Fig. 4 is a block diagram of a second port configuration management device according to an embodiment of the present application.
Fig. 5 is a block diagram of a third port configuration management device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
Based on the above problems, the embodiments of the present application provide a method, an apparatus, a storage medium, and a terminal for managing port configuration, which can improve the system operation rate of a mobile terminal. The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
Referring to fig. 1, fig. 1 is a flowchart of a port configuration management method according to an embodiment of the present application. The port configuration management method can be applied to mobile terminals such as mobile phones, tablet computers, notebook computers, palm computers, portable media players (Portable Media Player, PMP) and fixed terminals such as desktop computers. The specific flow of the port configuration management method can be as follows:
101. and when receiving a connection request sent by the USB equipment, acquiring current connection configuration information of the USB equipment.
Specifically, a connection request sent by a USB device is received, where the USB device is a piece of hardware at the end of a USB cable, and performs a user function. USB devices can be divided into USB bus interfaces, USB logic devices, and functional devices. The host-to-device connection needs to be through interactions between multiple layers and multiple entities, the USB bus interface layer providing the underlying transport of data over the USB data lines. According to the different functions of the USB device, the USB device can be divided into two main types, namely a hub and a functional device. Hubs (Hub) are key components of USB systems that provide an electrical interface between USB devices and a host. The connection point of the USB connector is called a port, which is used to extend the USB port of the host, through which USB devices (including functional devices and other hubs) can connect into the host.
For example, the USB device may be a USB flash drive (collectively USB flash drive), a keyboard, a mouse, or the like.
When the USB device is detected to be accessed, the USB device can be identified, and a connection request of the USB device is received. The connection request may carry connection configuration information of the USB device, for example, the connection configuration information may include a device identifier, an application function, and the like.
Wherein each USB device provides different levels of configuration information, which may include one or more configurations, which cause the device to exhibit different combinations of functions (one to be selected from during probing/connection), the configurations being made up of a plurality of interfaces.
For example, when a connection with a USB device is detected, current connection configuration information of the USB device may be obtained: AAA (device identification), charging (application function), etc.
In some embodiments, after the step of "obtaining the current connection configuration information of the USB device", the method may further include the steps of:
determining the device type of the USB device based on the current connection configuration information;
acquiring a device type set of the historically connected USB device according to the historical connection configuration information;
and when the device type set comprises the device type, clearing the connection configuration information of the USB device corresponding to the device type identical to the device type.
Specifically, the device type of the USB device is determined based on the current connection configuration information, and the device type may be various, for example, the USB device may be a USB flash disk (USB flash disk), a USB interface data line, a wired keyboard, a wired mouse, or the like.
Specifically, a set of historically connected USB device types is obtained according to the historical connection configuration information, where the set of device types includes various USB devices connected to the terminal, for example, the set of device types may include a wired keyboard, a wired mouse, and the like.
And matching the current USB equipment type with the equipment type in the equipment type set, and when the equipment type set is detected to comprise the current equipment type, clearing the connection configuration information of the USB equipment corresponding to the equipment type successfully matched with the current equipment type in the equipment type set.
For example, the current device type may be a wired keyboard, the device type set may include a wired keyboard, a wired mouse, and the like, it may be determined that the device type set includes the current device type, and if the device type set is the wired keyboard, connection configuration information of the wired keyboard type may be obtained from historical connection configuration information, and connection configuration information corresponding to the wired keyboard is cleared, so that configuration information of devices of the same type may be prevented from being repeatedly stored in a terminal memory, and memory space is occupied.
102. And matching the current connection configuration information with the historical connection configuration information.
Specifically, after the current connection configuration information of the USB device is obtained, the current connection configuration information may be matched with the historical connection configuration information. The history connection configuration information may be configuration information of a history connection USB device connected to the terminal.
For example, the history connection configuration information may be history configuration information a, history configuration information b, history configuration information c, and the like, where the history configuration information a may be AAA, file transfer, the history configuration information b may be BBB, file transfer, and the history configuration information c may be CCC, charging, and the like.
Specifically, the current connection configuration information and the historical connection configuration information are matched, so that whether the historical connection configuration information identical to the current connection configuration information exists in the terminal memory or not can be found out quickly, the device identifier of the current USB device can be matched with the historical USB connection device identifier first, and if the USB device identical to the device identifier of the current USB device exists, whether the current same function is realized by using the USB device can be further determined.
For example, the current configuration information may be: AAA and charging; the historical connection configuration information may be: AAA, file transfer, BBB, file transfer, CCC, charge, etc., then it may be determined that the current configuration information fails to match the historical configuration information.
For another example, the current configuration information may be: AAA and charging; the historical connection configuration information may be: AAA, charging, BBB, file transfer, CCC, charging, etc., then it may be determined that the current configuration information matches the historical configuration information successfully.
103. If the matching fails, the current connection configuration information is added into a configuration information base, and the configuration information base comprises a plurality of historical connection configuration information.
Specifically, if the matching of the current connection configuration information and the historical connection configuration information fails, it may be determined that the current terminal memory does not store the same configuration information as the current connection configuration information. The historical connection configuration information can be stored in a configuration information base, the configuration information base can be stored in the terminal in the form of a folder, and each historical connection configuration information can be seen when the folder is opened.
Furthermore, the current connection configuration information can be added into a configuration information base and stored, so that the connection configuration information can be directly obtained when the terminal and the currently connected USB device are connected next time.
In some embodiments, the port configuration management method may further include the steps of:
If the current connection configuration information is successfully matched with the historical connection configuration information, acquiring current time information;
acquiring historical time information corresponding to the historical connection configuration information;
and updating the historical time information based on the current time information.
And if the current connection configuration information is successfully matched with the historical connection configuration information, completing connection with the USB equipment according to the historical connection configuration information.
Specifically, if the current connection configuration information and the historical connection configuration information are successfully matched, it can be determined that the current terminal memory stores the configuration information identical to the current connection configuration information. And completing connection configuration with the current USB equipment through the successfully matched historical connection configuration information so as to execute corresponding functions.
For example, the current connection configuration information is AAA and charging, and charging can be performed directly through the current USB device.
Specifically, when connection with the USB device is completed according to the history connection configuration information that the matching is successful, current time information may be obtained, where the time information may include a date and a time, for example, the current time information may include: 2019, 12, 30, 17, 55 minutes and 40 seconds.
Specifically, the historical time information corresponding to the historical connection configuration information is obtained, and the historical time information may be historical connection information closest to the current connection time.
For example, the time information corresponding to the historical connection configuration information may include 55 minutes and 40 seconds at the time of 17 days of 12 months of 2019, 23 days of 12 months of 23, 55 minutes and 40 seconds at the time of 17 days of 2019 may be updated into the information configuration library, according to the time information, the storage duration of the historical connection configuration information in the terminal may be determined, if the storage duration exceeds the preset duration and connection is not performed, the historical connection configuration information may be cleared, and the terminal operation rate may be ensured.
In some embodiments, before the step of adding the current connection configuration information to the configuration information base, the method may further include the steps of:
acquiring the security level of the USB equipment;
when the security level is smaller than or equal to a preset level, after the connection with the USB equipment is completed, clearing the current connection configuration information;
and when the security level is greater than a preset level, adding the current connection configuration information into a configuration information base.
Specifically, the security level of the USB device may be obtained, and the security level may be detected by security detection software installed in the terminal, for example, when the terminal is connected to the USB device, the security detection software may obtain information data of the USB device, and detect, according to the obtained information data, the security level of the USB device, and specifically may indicate that the terminal cannot determine the data content of the data source through the obtained unknown content carried in the information data center, and when the USB device is connected to more terminals, the more unknown data may be, so that potential safety hazards may exist.
For example, the security level may be divided into, in order from weak to strong: the first security level, the second security level, the third security level, the fourth security level, etc., and the obtained security level of the USB device may be the third security level.
After the security level of the USB equipment is obtained, the security level can be compared with a preset level, the preset level can be set according to actual conditions, and if the current terminal security level is higher in requirement, the preset level can be set to be a fourth security level; if the security level of the current terminal is generally required, the preset level may be set to be the second security level, and so on.
For example, the security level of the current USB device may be the third security level, and the preset level may be the fourth security level, and then it may be determined that the current security level is smaller than the preset security level, and then the current USB device may have a potential safety hazard, and after the connection with the USB device is completed, the connection configuration information of the USB device may be deleted.
For another example, the security level of the current USB device may be a third security level, and the preset level may be a second security level, and then it may be determined that the current security level is greater than the preset security level, and then the current USB device does not affect the security of the terminal used, and after the connection with the USB device is completed, the connection configuration information of the USB may be stored, so that the terminal may be directly connected with the USB device next time.
104. And if the connection with the USB device is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base.
Specifically, the preset time period may be set according to the running speed of the terminal processor or the size of the memory space within the preset time period. For example, the preset time may be 5 days, etc.
Detecting whether to connect with the USB device again between preset time periods may refer to starting timing from the current time, taking the preset time period as a timing duration, detecting whether to connect with the USB device in the preset time period after the timing duration is reached, if not, determining that the function executed by the current configuration information of the USB device is a function which is not commonly used, deleting the current configuration information, and releasing more memory space.
For example, the current time information may be 55 minutes and 40 seconds at 30/17/5 days, and if it is detected that the current configuration connection information of the USB device is not connected to the USB device between 55 minutes and 40 seconds at 17/30/17/55/40 seconds/1/4/17/2020, the current configuration connection information of the USB device may be deleted.
In some embodiments, before the step of "removing the current connection configuration information from the configuration information base", the following steps may be further included:
acquiring historical connection times with the USB equipment;
determining the importance level of the USB equipment according to the historical connection times;
and when the importance level is lower than a preset level, removing the current connection configuration information from the configuration information base.
Specifically, after determining that the current connection configuration information exists in the connection information configuration library, the historical connection times with the USB device may be obtained, and whether the historical connection times are smaller than a preset threshold may be determined, where the preset threshold may be set according to an actual situation.
For example, the preset threshold may be 5 times, and it may be determined that the USB device is not an unusual device when the number of times of historical connection with the USB device is less than 5 times, and the current configuration information may be deleted when no connection is detected according to detection within a preset period of time. Specifically, after determining that the current connection configuration information exists in the connection information configuration library, the importance level of the USB device may be obtained, for example, the importance level may be classified into a first level, a second level, a third level, and so on according to the importance level. When the terminal is connected with the USB device for the first time, an important grade can be set for the USB device so as to preserve connection configuration information of the important USB device.
The importance level of the currently connected USB device is detected, for example, the importance level of the currently connected USB device may be detected as a first level, the first level may be the important USB device, and then connection configuration information of the current USB device may be reserved, so that the user may make multiple connections.
For another example, the importance level of the USB device that detects the current connection may be a third level, and the third level may be a non-important USB device, and then the current configuration information may be deleted when the connection is not detected according to the detection within the preset period of time.
The embodiment of the application discloses a port configuration management method, which comprises the following steps: when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device; matching the current connection configuration information with the historical connection configuration information; if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information; and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base. According to the embodiment of the application, the connection conditions of a plurality of USB devices stored in the terminal are detected on time, the connection configuration information of the USB devices which are not connected for a long time is cleaned, more memory space is released, and the system running speed of the mobile terminal can be improved.
Referring to fig. 2, fig. 2 is a flowchart of a second port configuration management method according to an embodiment of the present application. The specific scenario application of the port configuration management method can be as follows:
201. and the terminal receives the unlocking instruction of the user and performs unlocking operation according to the unlocking instruction.
Specifically, the scenario of the embodiment may be applied to detecting the stored configuration information of the USB device when the trigger terminal starts to work. When the terminal receives an unlocking instruction of the user, the terminal can start to execute corresponding functions after the unlocking operation is completed according to the unlocking operation executed according to the unlocking instruction of the user.
202. The terminal acquires connection information of the historically connected USB device, wherein the connection information comprises configuration information and historical connection time.
Specifically, after the terminal finishes unlocking, connection information of the historically connected USB device may be obtained, where the connection information may include connection configuration information and a historical connection time.
For example, the connection information of the historically connected USB device acquired by the terminal may include connection information 1, connection information 2, connection information 3, and so on, where connection information 1 may be: configuration information 1+connection time 1, connection information 2 may be: configuration information 2+ connection time 2, connection information 3 may be: configuration information 3+ connection time 3, etc.
203. The terminal obtains the time difference between the current time and the historical connection time and judges whether the time difference is larger than a preset difference.
Specifically, the terminal may obtain a time difference between the current time and the historical connection time, and then determine whether the time difference is greater than a preset difference, where the preset difference may be a duration of storage of the USB device connection information in the terminal memory.
For example, the current time may be 17 minutes at day 19 of 2019 12 month 30, the connection time 1 may be 17 minutes at day 19 of 2019 12 month 25, the connection time 2 may be 17 minutes at day 19 of 2019 12 month 23, the connection time 3 may be 17 minutes at day 19 of 2019 12 month 29, and the preset time difference may be 3 days, then it may be determined that the time difference between the continuous time 1 and the continuous time 2 and the current time is greater than the preset time difference, and the time difference between the continuous time 3 and the current time is less than the preset time difference; step 204 may be performed for connection information corresponding to continuous time 1 and continuous time 2, and step 205 may be performed for connection information corresponding to continuous time 3.
204. And deleting the connection information of the USB equipment corresponding to the time difference value larger than the preset time difference value by the terminal.
Specifically, after the time difference between the connection time and the current time is determined to be greater than the preset difference, it may be determined that the terminal is not connected to the USB device corresponding to the connection time for a long time, and at this time, configuration information of the USB device is stored in the terminal memory, and occupies operation content, so that the operation speed is affected, and therefore, connection information corresponding to the USB device may be cleared.
For example, after determining that the time difference between the continuous time 1 and the continuous time 2 and the current time is greater than the preset time difference, the connection information 1 corresponding to the continuous time 1 and the connection time 2 corresponding to the continuous time 2 may be deleted.
205. And updating the connection information of the USB equipment corresponding to the time difference value larger than the preset time difference value based on the current time by the terminal.
Specifically, after determining that the time difference between the connection time and the current time is smaller than the preset difference, the connection information may be updated based on the current time, for example, after determining that the time difference between the continuous time 3 and the current time is smaller than the preset time difference, the connection information 3 corresponding to the continuous time 3 may be updated, that is, the current time may be updated as the connection time 3, and the operation may be performed on the connection information 3 again based on the updated time.
The embodiment of the application discloses a port configuration management method, which comprises the following steps: when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device; matching the current connection configuration information with the historical connection configuration information; if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information; and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base. According to the embodiment of the application, the connection conditions of a plurality of USB devices stored in the terminal are detected on time, the connection configuration information of the USB devices which are not connected for a long time is cleaned, more memory space is released, and the system running speed of the mobile terminal can be improved.
In order to facilitate better implementation of the port configuration management method provided by the embodiment of the application, the embodiment of the application also provides a device based on the port configuration management method. Where the meaning of the terms is the same as in the port configuration management method described above, specific implementation details may be referred to in the description of the method embodiment.
Referring to fig. 3, fig. 3 is a block diagram of a first port configuration management device according to an embodiment of the present application, where the port configuration management device may be applied to a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a portable media player (Portable Media Player, PMP), and a fixed terminal such as a desktop computer, and the device includes:
a first obtaining unit 301, configured to obtain current connection configuration information of a USB device when a connection request sent by the USB device is received;
a matching unit 302, configured to match the current connection configuration information with historical connection configuration information;
an adding unit 303, configured to add the current connection configuration information to a configuration information base if the matching fails, where the configuration information base includes a plurality of historical connection configuration information;
and the removing unit 304 is configured to remove the current connection configuration information from the configuration information base if the connection with the USB device is not detected to be performed again within the preset period of time.
In some embodiments, referring to fig. 4, fig. 4 is a block diagram of a second port configuration management apparatus according to an embodiment of the present application, where the port configuration management apparatus may further include:
a second obtaining unit 305, configured to obtain a historical connection number with the USB device;
a first determining unit 306, configured to determine an importance level of the USB device according to the historical connection times;
and a removing unit 307, configured to remove the current connection configuration information from the configuration information base when the importance level is lower than a preset level.
In some embodiments, referring to fig. 5, fig. 5 is a block diagram of a third port configuration management apparatus according to an embodiment of the present application, where the port configuration management apparatus may further include:
a third obtaining unit 308, configured to obtain current time information if the current connection configuration information is successfully matched with the historical connection configuration information;
a fourth obtaining unit 309, configured to obtain historical time information corresponding to the historical connection configuration information;
an updating unit 310, configured to update the historical time information based on the current time information.
In some embodiments, the port configuration management apparatus may further include:
A second determining unit, configured to determine a device type of the USB device based on the current connection configuration information;
a fifth obtaining unit, configured to obtain a device type set of the historically connected USB device according to the historical connection configuration information;
and the first clearing unit is used for clearing the connection configuration information of the USB device corresponding to the device type identical to the device type when the device type set comprises the device type.
In some embodiments, the port configuration management apparatus may further include:
a sixth obtaining unit, configured to obtain a security level of the USB device;
a second clearing unit, configured to clear the current connection configuration information after completing connection with the USB device when the security level is less than or equal to a preset level;
and the execution unit is used for adding the current connection configuration information into a configuration information base when the security level is greater than a preset level.
The embodiment of the application discloses a port configuration management device, which comprises: when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device; matching the current connection configuration information with the historical connection configuration information; if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information; and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base. According to the embodiment of the application, the connection conditions of a plurality of USB devices stored in the terminal are detected on time, the connection configuration information of the USB devices which are not connected for a long time is cleaned, more memory space is released, and the system running speed of the mobile terminal can be improved.
The embodiment of the application also provides a terminal. As shown in fig. 6, the terminal may include Radio Frequency (RF) circuitry 601, memory 602 including one or more storage media, input unit 603, display unit 604, sensor 605, audio circuit 606, wireless fidelity (WiFi, wireless Fidelity) module 607, processor 608 including one or more processing cores, and power supply 609. It will be appreciated by those skilled in the art that the terminal structure shown in fig. 6 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the RF circuit 601 may be used for receiving and transmitting signals during the process of receiving and transmitting information, in particular, after receiving downlink information of a base station, the downlink information is processed by one or more processors 608; in addition, data relating to uplink is transmitted to the base station. Typically, RF circuitry 601 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM, subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 601 may also communicate with networks and other devices through wireless communications.
The memory 602 may be used to store software programs and modules that are stored in the memory 602 for execution by the processor 608 to perform various functional applications and data processing. The memory 602 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 608 and the input unit 603.
The input unit 603 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 603 may include a touch-sensitive surface, as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations thereon or thereabout by a user using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. The input unit 603 may comprise other input devices in addition to a touch sensitive surface. In particular, other input devices 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, mouse, joystick, etc.
The display unit 604 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the server, which may be composed of graphics, text, icons, video and any combination thereof. The display unit 604 may include a display panel, which may be optionally configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay a display panel, and upon detection of a touch operation thereon or thereabout, the touch-sensitive surface is passed to the processor 608 to determine the type of touch event, and the processor 608 then provides a corresponding visual output on the display panel based on the type of touch event. Although in fig. 6 the touch sensitive surface and the display panel are implemented as two separate components for input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement the input and output functions.
The terminal may also include at least one sensor 605, 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 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and the backlight when the server moves to the ear.
Audio circuitry 606, speakers, and a microphone may provide an audio interface between the user and the server. The audio circuit 606 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted to a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 606 and converted into audio data, which are processed by the audio data output processor 608 for transmission to, for example, a terminal via the RF circuit 601, or which are output to the memory 602 for further processing. The audio circuit 606 may also include an ear bud jack to provide communication between the peripheral ear bud and the server.
The WiFi belongs to a short-distance wireless transmission technology, and the terminal can help the user to send and receive e-mail, browse web pages, access streaming media and the like through the WiFi module 607, so that wireless broadband internet access is provided for the user. Although fig. 6 shows a WiFi module 607, it is understood that it does not belong to the essential constitution of the terminal, and can be omitted entirely as required within a range that does not change the essence of the application.
The processor 608 is a control center of the terminal, and connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and modules stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the mobile phone. Optionally, the processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The terminal also includes a power supply 609 (e.g., a battery) for powering the various components, which may be logically connected to the processor 608 via a power management system so as to provide for managing charging, discharging, and power consumption by the power management system. The power supply 609 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Specifically, in this embodiment, the processor 608 in the terminal loads executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 608 executes the application programs stored in the memory 602, so as to implement various functions:
when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device;
matching the current connection configuration information with the historical connection configuration information;
if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information;
and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base.
The embodiment of the application discloses a port configuration management method, a device, a storage medium and a terminal. The port configuration management method comprises the following steps: when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device; matching the current connection configuration information with the historical connection configuration information; if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information; and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base. According to the embodiment of the application, the connection conditions of a plurality of USB devices stored in the terminal are detected on time, the connection configuration information of the USB devices which are not connected for a long time is cleaned, more memory space is released, and the system running speed of the mobile terminal can be improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be performed by instructions, or by controlling associated hardware by instructions, which may be stored in a storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any of the port configuration management methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
when a connection request sent by a USB device is received, acquiring current connection configuration information of the USB device; matching the current connection configuration information with the historical connection configuration information; if the matching fails, the current connection configuration information is added into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information; and if the connection with the USB equipment is not detected to be carried out again within the preset time period, removing the current connection configuration information from the configuration information base.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The instructions stored in the storage medium can execute the steps in any of the port configuration management methods provided in the embodiments of the present application, so that the beneficial effects that any of the port configuration management methods provided in the embodiments of the present application can be achieved, and detailed descriptions of the previous embodiments are omitted.
The port configuration management method, device, storage medium and terminal provided by the embodiment of the present application are described in detail, and specific examples are applied to illustrate the principles and implementation of the present application, and the description of the above embodiments is only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (8)

1. A port configuration management method, comprising:
when a connection request sent by a USB device is received, current connection configuration information of the USB device is obtained, wherein the current connection configuration information comprises a device identifier and an application function of the USB device, the USB device comprises at least one configuration, and different configurations are used for realizing different application functions;
determining the device type of the USB device based on the current connection configuration information;
acquiring a device type set of the USB device connected with the history according to the history connection configuration information, wherein the device type set comprises all USB devices connected with the terminal;
When the device type set comprises the device type, clearing connection configuration information of USB devices corresponding to the device type identical to the device type;
matching the device identifier in the current connection configuration information with the device identifier in the historical connection configuration information, and if the current connection configuration information is successfully matched with the device identifier of the historical connection configuration information, matching the application function in the current connection configuration information with the application function corresponding to the device identifier of the historical connection configuration information, wherein the historical connection configuration information comprises the device identifier of the USB device connected with the terminal before the current moment and the historical application function;
if the matching fails, acquiring information data of the USB equipment, and detecting the security level of the USB equipment according to data content of unknown data sources carried in the information data; when the security level is greater than a preset level, adding the current connection configuration information into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information;
if the connection with the USB equipment is not detected to be carried out again within the preset time period, the current connection configuration information is removed from the configuration information base;
And when the security level is smaller than or equal to a preset level, clearing the current connection configuration information after the connection with the USB equipment is completed.
2. The method of claim 1, further comprising, prior to removing the current connection configuration information from the configuration information repository:
acquiring historical connection times with the USB equipment;
determining the importance level of the USB equipment according to the historical connection times;
and when the importance level is lower than a preset level, removing the current connection configuration information from the configuration information base.
3. The method as recited in claim 1, further comprising:
if the current connection configuration information is successfully matched with the historical connection configuration information, acquiring current time information;
acquiring historical time information corresponding to the historical connection configuration information;
and updating the historical time information based on the current time information.
4. A port configuration management apparatus, comprising:
the first obtaining unit is used for obtaining current connection configuration information of the USB equipment when a connection request sent by the USB equipment is received, wherein the current connection configuration information comprises equipment identification and current application functions of the USB equipment, the USB equipment comprises at least one configuration, and different configurations are used for realizing different application functions;
A second determining unit, configured to determine a device type of the USB device based on the current connection configuration information;
a fifth obtaining unit, configured to obtain, according to the history connection configuration information, a device type set of the USB devices that are connected in history, where the device type set includes all USB devices that are connected with the terminal;
a first clearing unit, configured to clear connection configuration information of a USB device corresponding to a device type that is the same as the device type when the device type set includes the device type;
a matching unit, configured to match a device identifier in the current connection configuration information with a device identifier in the historical connection configuration information, and if the current connection configuration information is successfully matched with the device identifier of the historical connection configuration information, match an application function in the current connection configuration information with an application function corresponding to the device identifier of the historical connection configuration information, where the historical connection configuration information includes a device identifier of a USB device connected with a terminal before the current time and a historical application function;
the adding unit is used for acquiring information data of the USB equipment if the matching fails, and detecting the security level of the USB equipment according to the data content of unknown data sources carried in the information data; when the security level is greater than a preset level, adding the current connection configuration information into a configuration information base, wherein the configuration information base comprises a plurality of historical connection configuration information;
The removing unit is used for removing the current connection configuration information from the configuration information base if the connection with the USB equipment is not detected to be carried out again within the preset time period;
and the second clearing unit is used for clearing the current connection configuration information after the connection with the USB equipment is completed when the security level is smaller than or equal to a preset level.
5. The apparatus as recited in claim 4, further comprising:
a second obtaining unit, configured to obtain a historical connection number with the USB device;
a first determining unit, configured to determine an importance level of the USB device according to the historical connection times;
and the removing unit is used for removing the current connection configuration information from the configuration information base when the importance level is lower than a preset level.
6. The apparatus as recited in claim 4, further comprising:
a third obtaining unit, configured to obtain current time information if the current connection configuration information is successfully matched with the historical connection configuration information;
a fourth obtaining unit, configured to obtain historical time information corresponding to the historical connection configuration information;
and the updating unit is used for updating the historical time information based on the current time information.
7. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the port configuration management method of any one of claims 1 to 3.
8. A terminal comprising a processor and a memory, the memory storing a plurality of instructions, the processor loading the instructions to perform the steps in the port configuration management method of any one of claims 1 to 3.
CN202010048617.6A 2020-01-16 2020-01-16 Port configuration management method and device, storage medium and terminal Active CN111262737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010048617.6A CN111262737B (en) 2020-01-16 2020-01-16 Port configuration management method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010048617.6A CN111262737B (en) 2020-01-16 2020-01-16 Port configuration management method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN111262737A CN111262737A (en) 2020-06-09
CN111262737B true CN111262737B (en) 2023-11-28

Family

ID=70948868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010048617.6A Active CN111262737B (en) 2020-01-16 2020-01-16 Port configuration management method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN111262737B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11856327B2 (en) * 2022-04-22 2023-12-26 Kyndryl, Inc. Adaptive audio quality amelioration for video conferencing

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001089151A1 (en) * 2000-05-16 2001-11-22 Robert Bosch Gmbh Method for integrating a device into a vehicle communications network
JP2007299192A (en) * 2006-04-28 2007-11-15 Toshiba Corp Information processing apparatus, control method thereof and control program thereof
CN101957725A (en) * 2009-07-13 2011-01-26 联想(北京)有限公司 Method for managing external equipment of computer
CN102394673A (en) * 2011-11-17 2012-03-28 深圳市中兴移动通信有限公司 Ordering method of bluetooth devices and system thereof
CN103678337A (en) * 2012-09-06 2014-03-26 华为技术有限公司 Data eliminating method, device and system
CN104090773A (en) * 2014-07-24 2014-10-08 福州瑞芯微电子有限公司 Intelligent initializing method and system
CN104463033A (en) * 2014-12-29 2015-03-25 宇龙计算机通信科技(深圳)有限公司 Storage region setting method, storage region setting device and terminal
CN105701025A (en) * 2015-12-31 2016-06-22 华为技术有限公司 Memory recovery method and device
CN106028286A (en) * 2016-07-12 2016-10-12 努比亚技术有限公司 Wireless local area network access device and method
CN107704765A (en) * 2017-08-28 2018-02-16 深圳市诚壹科技有限公司 A kind of interface access method, server and computer-readable recording medium
CN108121575A (en) * 2017-12-20 2018-06-05 上海创功通讯技术有限公司 A kind of expansion equipment and the method and device of access device configuration
CN109213539A (en) * 2016-09-27 2019-01-15 华为技术有限公司 A kind of method for recovering internal storage and device
CN109815006A (en) * 2018-12-13 2019-05-28 平安科技(深圳)有限公司 Browser EMS memory management process, device, computer equipment and storage medium
CN110087182A (en) * 2019-04-18 2019-08-02 惠州Tcl移动通信有限公司 Approaches to IM, device, mobile terminal and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070271303A1 (en) * 2006-05-18 2007-11-22 Manuel Emilio Menendez Personal file version archival management and retrieval
US9143563B2 (en) * 2011-11-11 2015-09-22 Rockwell Automation Technologies, Inc. Integrated and scalable architecture for accessing and delivering data
CN105740266A (en) * 2014-12-10 2016-07-06 国际商业机器公司 Data deduplication method and device
US10503426B2 (en) * 2017-07-12 2019-12-10 International Business Machines Corporation Efficient space allocation in gathered-write backend change volumes

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001089151A1 (en) * 2000-05-16 2001-11-22 Robert Bosch Gmbh Method for integrating a device into a vehicle communications network
JP2007299192A (en) * 2006-04-28 2007-11-15 Toshiba Corp Information processing apparatus, control method thereof and control program thereof
CN101957725A (en) * 2009-07-13 2011-01-26 联想(北京)有限公司 Method for managing external equipment of computer
CN102394673A (en) * 2011-11-17 2012-03-28 深圳市中兴移动通信有限公司 Ordering method of bluetooth devices and system thereof
CN103678337A (en) * 2012-09-06 2014-03-26 华为技术有限公司 Data eliminating method, device and system
CN104090773A (en) * 2014-07-24 2014-10-08 福州瑞芯微电子有限公司 Intelligent initializing method and system
CN104463033A (en) * 2014-12-29 2015-03-25 宇龙计算机通信科技(深圳)有限公司 Storage region setting method, storage region setting device and terminal
CN105701025A (en) * 2015-12-31 2016-06-22 华为技术有限公司 Memory recovery method and device
CN106028286A (en) * 2016-07-12 2016-10-12 努比亚技术有限公司 Wireless local area network access device and method
CN109213539A (en) * 2016-09-27 2019-01-15 华为技术有限公司 A kind of method for recovering internal storage and device
CN107704765A (en) * 2017-08-28 2018-02-16 深圳市诚壹科技有限公司 A kind of interface access method, server and computer-readable recording medium
CN108121575A (en) * 2017-12-20 2018-06-05 上海创功通讯技术有限公司 A kind of expansion equipment and the method and device of access device configuration
CN109815006A (en) * 2018-12-13 2019-05-28 平安科技(深圳)有限公司 Browser EMS memory management process, device, computer equipment and storage medium
CN110087182A (en) * 2019-04-18 2019-08-02 惠州Tcl移动通信有限公司 Approaches to IM, device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN111262737A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN106786962B (en) Charging control method and device and terminal
US10474507B2 (en) Terminal application process management method and apparatus
CN106775833B (en) Device driver loading method, terminal and system
CN106649010B (en) terminal equipment test method and terminal equipment
US9588757B2 (en) Data update method, user terminal, and data update system
CN106569916A (en) Data backup method and mobile terminal
US20220300328A1 (en) Application optimization method and device, storage medium, and electronic equipment
CN111399874A (en) System upgrading method and device, storage medium and intelligent wearable device
CN111273955A (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN111262737B (en) Port configuration management method and device, storage medium and terminal
CN105278942B (en) Component management method and device
WO2018214745A1 (en) Application control method and related product
WO2019072179A1 (en) Application running control method and apparatus
EP3447641A1 (en) Sound effect processing method and terminal
CN106709330B (en) Method and device for recording file execution behaviors
CN111404242A (en) Charging method, charging device, storage medium and mobile terminal
CN111142900A (en) Program updating method and device and terminal equipment
CN110944318A (en) Lock card setting method and device, storage medium and terminal
CN106155733B (en) Method and device for running application program
CN110471622B (en) SD card data writing method and device, storage medium and terminal
CN114968558A (en) Memory cleaning method and related equipment
CN110896240B (en) Charging control method and device, computer readable storage medium and terminal
CN114338770A (en) Cross-block-chain data processing method and device, storage medium and terminal equipment
CN106776041A (en) A kind of data processing method and device
CN112261634A (en) Bluetooth transmission control method, device, terminal equipment and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231023

Address after: Floor 8, Bojiexin Industrial Park, No. 38 Ping'an Road, Songxuan Community, Guanhu Street, Longhua District, Shenzhen City, Guangdong Province, 518000

Applicant after: Yuanshan Electronic Technology (Shenzhen) Co.,Ltd.

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

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

GR01 Patent grant
GR01 Patent grant