Interface processing method and device
By reading the functional parameters of the second device in the first device and matching them, determining the target interface is solved, and the difficulty of users when selecting the interface is achieved, efficient interface automatic identification and output is achieved.
Patent Information
- Application Number
- CN202411978708.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-15
AI Technical Summary
The interface functions of existing electronic devices cannot be fully consistent, making it difficult for users to select the right interface, especially if they do not know the peripheral specifications.
By reading the functional parameters of the second device in the first device and matching them with the interface information of the first device, the target interface to which the second device is applicable is determined.
Automatically identify and output target interfaces suitable for the second device are realized, which improves the convenience and accuracy of users when selecting interfaces and reduces the possibility of errors.
Smart Images

Figure CN119829498A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of interface processing, and relates to but is not limited to an interface processing method and device. Background Art
[0002] With the continuous development of interface technology, the number of interfaces of electronic devices (such as laptops) is increasing. For the same interface, the corresponding interface functions cannot be completely consistent. For example, for the type-C port, the functions of each port (such as speed, charging, display resolution) may also be different. In this way, users cannot quickly find the most suitable port without knowing the specifications of the peripherals. Summary of the invention
[0003] The embodiment of the present application provides a method and device for processing an interface. The technical solution of the present application is implemented as follows:
[0004] In a first aspect, the present application provides a method for processing an interface, the method being applied to a first device, and the method comprising:
[0005] When at least one first interface of the first device is connected to the second device, reading the functional parameters of the second device; the first device has at least two first interfaces, and each of the at least two first interfaces has the same interface type and different interface functional parameters;
[0006] At least functional parameters of the second device are matched with the interface information of the first device respectively to obtain a target interface applicable to the second device; the interface information includes functional parameters of each of at least two first interfaces;
[0007] Outputs the target interface for the second device.
[0008] In a second aspect, the present application provides an interface processing device, which is deployed on a first device, and includes:
[0009] A reading unit, configured to read a functional parameter of the second device when at least one first interface of the first device is connected to the second device; the first device has at least two first interfaces, and each of the at least two first interfaces has the same interface type and different interface functional parameters;
[0010] A matching unit, used to match at least the functional parameters of the second device with the interface information of the first device respectively, to obtain a target interface applicable to the second device; the interface information includes the functional parameters of each of the at least two first interfaces;
[0011] The output unit is used to output a target interface applicable to the second device.
[0012] In a third aspect, the present application provides an electronic device, the electronic device having at least two first interfaces and a processor; wherein each of the at least two first interfaces has the same interface type and different interface function parameters;
[0013] At least two first interfaces are used to: access a second device;
[0014] The processor is used to: read the functional parameters of the second device when at least one first interface of the electronic device is connected to the second device; at least match the functional parameters of the second device with the interface information of the electronic device respectively to obtain the target interface applicable to the second device; the interface information includes the functional parameters of each of the at least two first interfaces;
[0015] The output interface is used to: output a target interface applicable to the second device.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method provided in the first aspect is implemented.
[0017] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method provided in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 An optional schematic diagram of a device interface provided in an embodiment of the present application;
[0019] Figure 2 A first optional flow chart of the method for processing an interface provided in an embodiment of the present application;
[0020] Figure 3 A second optional flow chart of the method for processing an interface provided in an embodiment of the present application;
[0021] Figure 4 A third optional flow chart of the method for processing an interface provided in an embodiment of the present application;
[0022] Figure 5 A fourth optional flow chart of the method for processing an interface provided in an embodiment of the present application;
[0023] Figure 6 A fifth optional schematic diagram of the interface processing method provided in the embodiment of the present application;
[0024] Figure 7 A sixth optional schematic diagram of the interface processing method provided in the embodiment of the present application;
[0025] Figure 8 An optional structural diagram of an interface of a notebook provided in an embodiment of the present application;
[0026] Fig. 9 An optional structural diagram of an interface processing device provided in an embodiment of the present application;
[0027] Fig.10 An optional structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0029] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0030] In the following description, the terms "first\second\third" are used only as examples to distinguish different objects, and do not represent a specific order for the objects, nor do they have a limitation on the order of precedence. It is understandable that "first\second\third" can be interchanged with a specific order or order of precedence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0032] The embodiments of the present application may provide an interface processing method, device, equipment, storage medium and computer program product. In practical applications, the interface processing method may be implemented by an interface processing device, and each functional entity in the interface processing device may be collaboratively implemented by hardware resources of the electronic device, such as computing resources such as a processor, and communication resources (such as for supporting various communication methods such as optical cables and cellular).
[0033] In a first aspect, an embodiment of the present application provides a method for processing an interface, which is applied to a first device.
[0034] The embodiment of the present application does not limit the specific type of the first device, and can be configured according to actual needs. For example, the first device can include but is not limited to any of the following: a tablet computer, a desktop computer, a server, a mobile phone, a tablet, etc., or a switching device with multiple interfaces such as a switching head, a router, a conference machine, etc.
[0035] For ease of understanding, the interface of the first device is described first.
[0036] In one example, the device interface can refer to Figure 1 As shown, the first device 10 has a plurality of first interfaces 101 .
[0037] The embodiment of the present application does not limit the specific number of the first interface 101, and can be configured according to actual needs. The embodiment of the present application does not limit the interface type of the first interface, and can be configured according to actual needs. For example, the first interface can include any one of a type-A interface, a type-B interface, a type-C interface, or a Universal Serial Bus (USB) interface.
[0038] In another example, the first device 10 may also include a second interface 102. The second interface 102 is different from the first interface 101.
[0039] refer to Figure 2 The processing method of this interface may include but is not limited to Figure 2 S201 to S203 shown.
[0040] S201: When at least one first interface of a first device is connected to a second device, the first device reads a functional parameter of the second device.
[0041] The first device has at least two first interfaces, and each of the at least two first interfaces has the same interface type and different interface function parameters.
[0042] The functional parameters of the device are used to characterize the functions supported by the device. The embodiment of the present application does not limit the type of functional parameters and can be configured as required. For example, the functional parameters can be parameters used to characterize the data transmission function, parameters used to characterize the charging function, etc.
[0043] The embodiment of the present application does not limit the number of first interfaces of the interface second device, and can be configured according to actual needs. For example, one first interface can be connected to one second device, or multiple first interfaces can be connected to multiple second devices.
[0044] The second device refers to a device connected to the first device through the first interface. This embodiment does not limit the specific type of the second device, and can be configured according to actual needs. For example, the second device can be any one of: an adapter, a mobile phone, a display, a USB flash drive, etc.
[0045] The first device monitors the interface, and when it is detected that the second device is connected to at least one first interface, reads the functional parameters of the second device through the output transmission protocol between the first interface and the interface of the second device.
[0046] In one example, the first device is notebook 1 and the second device is notebook 2. It is detected that notebook 2 is connected to a first interface 3 of notebook 1, and the interface of notebook 2 connected to the first interface 1 of notebook 1 is interface 1; notebook 1 reads the functional parameters of interface 1 of notebook 2 through the transmission protocol between the first interface 3 and interface 1.
[0047] In another example, the first device is notebook 1 and the second device is notebook 2. It is detected that notebook 2 is connected to a first interface 3 of notebook 1, and the interface of notebook 2 connected to the first interface 1 of notebook 1 is interface 1; notebook 1 reads the functional parameters of all interfaces of notebook 2 through the transmission protocol between the first interface 3 and interface 1.
[0048] For example, the functional parameters of the second device may refer to the content shown in Table 1.
[0049] Table 1 Example of functional parameters of the second device
[0050] interface Function parameters supported by the interface Interface 1 10G, PD, DP2.0 Interface 2 10G, PD, DP1.4 Interface 3 5G, DP1.4, OTG Interface 4 40G, PD, DP1.4
[0051] From Table 1, it can be seen that the second device includes 4 interfaces, and the functional parameters supported by interface 1 include: 10 Gigabit (G), power delivery management (Power Delivery, PD), display port (Display Port, DP) 2.0; the functional parameters supported by interface 2 include: 10G, PD, DP1.4; the functional parameters supported by interface 3 include: 5G, DP1.4, plug and play (On-The-Go, OTG); the functional parameters supported by interface 4 include: 40G, PD, DP1.4.
[0052] Among them, 10G, 5G, and 40G represent the output transmission rates of non-video data; PD represents the fast charging function; DP represents the video data transmission function; DP1.4 and DP2.0 represent different versions of the video transmission function; OTG represents the high-voltage reverse charging function.
[0053] S202: The first device matches at least functional parameters of the second device with the interface information of the first device to obtain a target interface applicable to the second device.
[0054] The interface information includes a function parameter of each of the at least two first interfaces.
[0055] The first device obtains the functional parameters of each first interface of at least two first interfaces, and then matches the functional parameters of the second device with the functional parameters of each first interface of the first device one by one, so as to determine which first interfaces can meet the needs of the second device, thereby determining the target interface applicable to the second device.
[0056] In one possible implementation, the interface information may include interface function parameters of the interface. In another possible implementation, the interface information may also include component information connected to the interface, for example, the interface information may also include graphics card information connected to the first interface.
[0057] For example, the interface information of the first device may refer to the content shown in Table 2.
[0058] Table 2 Example of interface information of the first device
[0059] First interface Function parameters supported by the interface First interface 1 40G, PD, DP1.4 First interface 2 10G, PD, DP1.4 First interface 3 10G, PD, DP2.0 First interface 4 5G, DP1.4, OTG
[0060] From Table 2, it can be seen that the first device includes 4 first interfaces, and the functional parameters of the first interface 1 include: 40G, PD, DP1.4; the functional parameters of the first interface 2 include: 10G, PD, DP1.4; the functional parameters of the first interface 3 include: 10G, PD, DP2.0; the functional parameters of the first interface 4 include: 5G, DP1.4, OTG.
[0061] S203: The first device outputs a target interface applicable to the second device.
[0062] The embodiment of the present application does not limit the output method here, and can be configured according to actual needs. For example, it can be displayed and output in the form of a schematic diagram, or it can be output in the form of a voice, or it can be indicated and output by an indicator light at the interface.
[0063] For example, if the second device interface 1 is connected to the first interface of the first device, since the functional parameters of the second device interface 1 are 10G, PD, DP2.0, referring to Table 2, the interface function parameters of the first interface 3 include: 10G, PD, DP2.0, it can be seen that the data transmission function of the first interface 3 is 10G, and the data transmission function requirement of the second device interface 1 is 10G, that is, the first interface 3 can meet the data transmission function requirement of the second device interface 1; the first interface 3 supports PD function, and the second device interface 1 has PD function, that is, the first interface 3 can meet the PD function requirement of the second device interface 1; the video transmission function of the first interface 3 is DP2.0, and the video transmission function of the second device interface 1 is DP2.0, that is, the first interface 3 can meet the video transmission function requirement of the second device interface 1; so the first interface 3 can meet the requirements of the interface 1 of the second device, so it is determined that the target interface can be the first interface 3.
[0064] An interface processing method provided by an embodiment of the present application is applied to a first device, and the method includes: when at least one first interface of the first device is connected to a second device, reading the functional parameters of the second device; the first device has at least two first interfaces, and each of the at least two first interfaces has the same interface type and different interface functional parameters; at least the functional parameters of the second device are matched with the interface information of the first device respectively to obtain a target interface applicable to the second device; the interface information includes the functional parameters of each of the at least two first interfaces; and outputting the target interface applicable to the second device.
[0065] It can be seen that in this embodiment, after the second device is connected to the first interface of the first device, the first device reads the functional parameters of the second device, and then matches the functional parameters of the second device with the interface parameters of each first interface, thereby obtaining the target interface applicable to the second device. In this way, after the second device is connected, the first device can automatically find the target interface used to access the second device for output. If the interface connected to the second device is wrong, the applicable target interface can be quickly and accurately found according to the output prompt. The entire implementation process has a high degree of automation, is convenient to implement, and has a high user experience.
[0066] Next, the process of outputting the target interface applicable to the second device in S203 is described.
[0067] The process may include but is not limited to any one of the following S2031 to S2033, or a combination of multiple ones.
[0068] S2031. Displaying a target interface applicable to the second device on a display screen of the first device in the form of a schematic diagram.
[0069] The schematic diagram is used to display the target interface used by the second device. The embodiment of the present application does not limit the specific method of the schematic diagram and can be configured according to actual needs.
[0070] For example, the target interface may be highlighted or represented by a special mark to be distinguished from other first interfaces.
[0071] For another example, if there are multiple second devices, each second device and the target device corresponding to the second device may be connected by arrows or lines.
[0072] In a possible implementation, the display screen of the first device may display the current connection mode between the second device and the first interface and the target connection mode between the second device and the target interface.
[0073] In another possible implementation, the target connection mode between the second device and the target interface may also be displayed on the display screen of the first device.
[0074] S2032: The first device indicates the target interface applicable to the second device by means of indicator lights at the positions of at least two first interfaces.
[0075] An indicator light is provided at the interface of the first interface, and the first device sends an on instruction to the indicator light of the target interface to light up the indicator light of the target interface, thereby enabling the user to intuitively and clearly distinguish the target interface.
[0076] S2033: Output a target interface applicable to the second device through the speaker of the first device.
[0077] The output content of the speaker can be configured according to actual needs. For example, the location of the target interface can be output, or the number of the target interface can be output, so that the user can intuitively and clearly distinguish the target interface.
[0078] For example, when the second device is a display, the location of the target interface is the first interface closest to the display screen, and the first device may output “Please move the display to the first interface close to the display screen” through the speaker.
[0079] In practice, one or more of the above output methods can be selected to remind the user according to actual needs. The output method can be configured by default, or multiple methods can be configured. One of them can be selected according to the user's preference, or multiple methods can be output simultaneously to make it easier for the user to receive and understand the prompt. This allows the user to quickly find the target interface used by the second device to prevent the wrong insertion, with a wide range of application scenarios and good user experience.
[0080] Next, the functional parameters of the first interface are described.
[0081] In a possible implementation, when the first interface is a type-C interface,
[0082] The functional parameters of the first interface include at least one of the following:
[0083] Data transmission rate, fast charging function parameters, video transmission function parameters, high voltage charging function parameters.
[0084] in:
[0085] The data transmission rate includes at least the transmission rate of the first data used to characterize the interface; the fast charging function parameters include at least: charging voltage and charging current; the video transmission function parameters include at least the video data transmission capability of the interface; the high voltage function parameters include at least: receiving voltage and receiving current.
[0086] It is understandable that the data transmission rate, fast charging function parameters, video transmission function parameters, and high-voltage charging function parameters may also include other parameters, which are not listed one by one here.
[0087] When the first interface is other types of interfaces, the specific implementation can refer to the description of the type-C interface, which will not be repeated here.
[0088] In this embodiment, the functional parameters of the first interface are relatively rich and can be configured and selected according to actual needs. The first device can be connected to the second device in various scenarios and has a wide range of applications.
[0089] The following describes a case where the number of the second device is one through an embodiment.
[0090] refer to Figure 3 As shown in the content, the interface processing process may include but is not limited to the following S301 to S305.
[0091] S301: When a first interface of a first device is connected to a second device, the first device reads a functional parameter of the second device.
[0092] The implementation of S301 may refer to the detailed description of the first device reading the functional parameters of the second device when at least one first interface of the first device is connected to the second device in the above S201, which will not be described in detail here.
[0093] S302: Match the function parameters of the second device with the function parameters of each of the at least two first interfaces included in the interface information.
[0094] Firstly, since the first device has at least two first interfaces, the functional parameters of the second device need to be matched with the functional parameters of each first interface respectively.
[0095] Secondly, when matching the functional parameters of a second device with the functional parameters of a first interface, since the functional parameters of the second device here can be one functional parameter or multiple functional parameters, when there are multiple functional parameters of the second device, each functional parameter needs to be matched with each functional parameter of the first interface respectively to determine whether the functional parameters of the interface meet the functional parameters of the device.
[0096] It should be noted that if the second device is a notebook, since the notebook itself has multiple interfaces, the functional parameters of the second device referred to and matched here are the interface parameters of the first interface of the notebook connected to the first device. In the case where the second device is an adapter, a display, or a mobile phone, the functional parameters of the second device are the functional parameters of these devices.
[0097] S303: Determine a matching interface that meets a matching condition among at least two first interfaces.
[0098] The matching condition includes: the functional parameters of the interface meet the functional parameters of the second device.
[0099] For example, when the functional parameter includes a data transmission rate, if the data transmission rate of a first interface is greater than or equal to the data transmission rate of the second device, it is determined that the first interface meets the matching condition.
[0100] In the case where the functional parameters include fast charging functional parameters, if the charging voltage and current of the fast charging functional parameters of a first interface meet the charging voltage and charging current requirements of the first device, it is determined that the first interface meets the matching condition.
[0101] In a possible implementation manner, if the function parameter includes multiple parameters, each parameter of the first interface satisfies the matching condition before it is determined that the first interface satisfies the matching condition.
[0102] In another possible implementation, if the function parameter includes multiple parameters and there is no completely matching interface, matching may be performed based on a priority parameter, and the interface that matches the priority parameter may be determined as the matching interface.
[0103] S304: Determine a target interface applicable to the second device in the matching interface.
[0104] In a possible implementation manner, if there is only one matching interface, the matching interface is determined as the target interface.
[0105] In another possible implementation, if there are multiple matching interfaces, the target interface is determined from the multiple matching interfaces according to the actual situation. For example, the matching interface with the best parameters among the multiple matching interfaces can be determined as the target interface, so as to maximize the guarantee of the function corresponding to the optimal parameters. For example, the matching interface with the worst parameters among the multiple matching interfaces can also be determined as the target interface. Since the matching interface can already meet the needs of the second device, determining the worst matching interface as the target interface can guarantee the functions of other devices and solve the problem of resources.
[0106] S305: The first device outputs a target interface applicable to the second device.
[0107] The implementation of S305 may refer to the detailed description of the target interface applicable to the second device output in S203 above, which will not be described in detail here.
[0108] In this embodiment, the matching interface is determined first, and then the target interface is determined in the matching interface. In this way, it can be ensured that the target interface can definitely meet the needs of the second device, and the reliability is high. In addition, the target interface can be determined from multiple matching interfaces according to actual needs, which is flexible, has a wide range of application scenarios, and has a high user experience.
[0109] In one embodiment, the target interface may be determined in combination with the device type.
[0110] refer to Figure 4 As shown in the content, when the number of the second device is one, the interface processing process may include but is not limited to the following S401 to S406.
[0111] S401: When a first interface of a first device is connected to a second device, the first device reads a functional parameter of the second device.
[0112] The implementation of S401 may refer to the detailed description of the first device reading the functional parameters of the second device when at least one first interface of the first device is connected to the second device in the above S201, which will not be described in detail here.
[0113] S402: The first device matches the function parameters of the second device with the function parameters of each of the at least two first interfaces included in the interface information, and determines a matching interface that meets a matching condition.
[0114] The matching condition includes: the functional parameters of the interface meet the functional parameters of the second device.
[0115] The implementation of S402 may refer to the detailed descriptions of S302 and S303 above, which will not be described in detail here.
[0116] S403: When there are multiple matching interfaces, the first device obtains the device type of the second device.
[0117] The first device reads the device identification of the second device through the interface connection protocol, and determines the device type of the second device based on the device identification of the second device.
[0118] S404: Determine a priority parameter in the functional parameters of the second device based on the device type of the second device.
[0119] Each second device has a priority parameter, which may be preset or determined by the first device according to the device type.
[0120] For example, when the second device is a display, the functional parameters of the second device include video transmission functional parameters and fast charging functional parameters. At this time, the priority parameter is determined to be the video transmission functional parameter.
[0121] S405: Determine a target interface from a plurality of matching interfaces based on a priority parameter of the second device.
[0122] For example, a matching interface with the best performance of the priority parameters may be determined as the target interface to maximize the protection of the functions corresponding to the priority parameters of the second device.
[0123] S406: The first device outputs a target interface applicable to the second device.
[0124] The implementation of S406 may refer to the detailed description of the target interface applicable to the second device output in S203 above, which will not be described in detail here.
[0125] The target interface determined in this way can give priority to the priority parameters of the second device. Since the priority parameters are generally the main functional parameters of the second device, the actual needs of the second device can be met. For example, for a display, the priority parameters are video transmission function parameters, so the determined target interface can give priority to the video transmission function parameters, thereby ensuring the video transmission function of the second device. Since the general application scenario of a display is video transmission, the main functions of the display can be maximized to improve the user experience.
[0126] In one embodiment, the target interface may be determined in combination with the current scenario of the second device.
[0127] refer to Figure 5 As shown in the content, when the number of the second device is one, the interface processing process may include but is not limited to the following S501 to S505.
[0128] S501: When a first interface of a first device is connected to a second device, the first device reads a functional parameter of the second device.
[0129] The implementation of S501 may refer to the detailed description of the first device reading the functional parameters of the second device when at least one first interface of the first device is connected to the second device in the above S201, which will not be described in detail here.
[0130] S502: The first device matches the function parameters of the second device with the function parameters of each of the at least two first interfaces included in the interface information, and determines a matching interface that meets a matching condition.
[0131] The matching condition includes: the functional parameters of the interface meet the functional parameters of the second device.
[0132] The implementation of S502 may refer to the detailed descriptions of S302 and S303 above, which will not be described in detail here.
[0133] S503: When there are multiple matching interfaces, the first device detects the current scene of the second device.
[0134] The implementation of this application does not limit the specific type of the current scene, which can be determined according to actual needs. For example, the current scene can be a low-battery scene or a game scene.
[0135] In the case of multiple matching interfaces, the first device detects the current scene of the second device through the interface protocol, which may be actively acquired by the first device or actively reported by the second device.
[0136] S504: The first device determines a target interface applicable to the second device from a plurality of matching interfaces based on a current scenario of the second device.
[0137] The first device selects a target interface suitable for the current scenario from multiple matching interfaces.
[0138] S505: The first device outputs a target interface applicable to the second device.
[0139] The implementation of S505 may refer to the detailed description of the target interface applicable to the second device output in S203 above, which will not be described in detail here.
[0140] In this embodiment, when determining the target interface applicable to the second device, the current scenario of the second device is combined, so that the target interface can not only meet the interface requirements of the second device, but also meet the requirements of the current scenario of the second device, further improving the user experience.
[0141] The following describes the process of determining the target interface applicable to the second device from a plurality of matching interfaces based on the current scenario of the second device in S504.
[0142] If the current scene of the second device is a game scene, the first interface connected to the independent graphics card is searched as the target interface among multiple matching interfaces.
[0143] For example, the first device includes multiple first interfaces, all of which support the video transmission function parameter DP. Among the multiple first interfaces supporting DP, there are first interfaces connected to the independent graphics card of the first device, and there are first interfaces connected to the integrated graphics card of the first device.
[0144] Since the current scene is a game scene, the requirements for the graphics card are relatively high, so using the first interface connected to the independent graphics card as the target interface can improve the quality of the output video data, thereby improving the user experience.
[0145] Here, the current scene of the second device may be determined through the running process of the second device.
[0146] If the current scenario of the second device is a low-battery scenario, then among multiple matching interfaces, the first interface with the largest charging power is searched as the target interface.
[0147] For example, the first device includes multiple first interfaces, each of which has fast charging function parameters, and the charging power of each of the multiple first interfaces that support the fast charging function parameters is obtained, and the first interface with the largest charging power is used as the target interface. In this way, the second device can be quickly charged, the impact caused by power feeding is reduced, the charging efficiency is fast, and the user experience is high.
[0148] In one embodiment, the target interface may be determined in combination with the energy consumption state of the first device.
[0149] refer to Figure 6 As shown in the content, when the number of the second device is one, the interface processing process may include but is not limited to the following S601 to S606.
[0150] S601: When a first interface of a first device is connected to a second device, the first device reads a functional parameter of the second device.
[0151] The implementation of S601 may refer to the detailed description of the first device reading the functional parameters of the second device when at least one first interface of the first device is connected to the second device in the above S201, which will not be described in detail here.
[0152] S602: Match the function parameters of the second device with the function parameters of each of the at least two first interfaces included in the interface information, and determine a matching interface that meets the matching condition.
[0153] The matching condition includes: the functional parameters of the interface meet the functional parameters of the second device.
[0154] The implementation of S502 may refer to the detailed descriptions of S302 and S303 above, which will not be described in detail here.
[0155] S603: When there are multiple matching interfaces, detect the energy consumption state of the first device.
[0156] The energy consumption state here may include but is not limited to: battery energy consumption state and power supply energy consumption state. The battery energy consumption state indicates that the power supply of the current first device includes a battery, and the power supply energy consumption state indicates that the power supply of the current first device includes a power supply.
[0157] S604: If the first device is in a battery consumption state, and the second device is a display with a fast charging function, then among multiple matching interfaces, a first interface that meets the fast charging function parameters is used to determine a target interface applicable to the second device.
[0158] The first device reads the device identification of the second device to determine that the second device is a display, and reads the interface parameters of the first device to determine that the second device has a fast charging function.
[0159] The fast charging function parameters can achieve fast forward charging and low voltage charging in the reverse direction.
[0160] In this way, the first device can perform low-voltage reverse charging through the fast charging function parameters in the display.
[0161] S605: If the first device is in a battery power consumption state and the battery power of the first device is lower than the power threshold, then, among multiple matching interfaces, determine the first interface with the lowest power consumption as the target interface applicable to the second device.
[0162] The first device obtains the current battery power of the battery and determines whether the battery power is lower than the power threshold. If the battery power of the first device is lower than the power threshold, the first interface with the lowest power consumption is determined as the target interface applicable to the second device among multiple matching interfaces.
[0163] This embodiment does not limit the specific value of the power threshold, which can be configured according to actual needs. For example, the power threshold is 20% of the total power.
[0164] In this way, the first device determines the target interface applicable to the second device using the first interface with the lowest power consumption, which can minimize the output of power and thus save power of the first device.
[0165] S606: The first device outputs a target interface applicable to the second device.
[0166] The implementation of S606 may refer to the detailed description of the target interface applicable to the second device output in S203 above, which will not be described in detail here.
[0167] In this embodiment, when determining the target interface, the power consumption state of the first device is combined, so that the determined target device can meet the power consumption requirement of the first device, and the user experience is high.
[0168] In one embodiment, when there are multiple second devices, the interface processing may include but is not limited to: Figure 7 S701 to S705 shown.
[0169] S701: When multiple first interfaces of a first device are connected to a second device, the first device reads a functional parameter of the second device.
[0170] The implementation process of the functional parameters of each second device is similar here. You can refer to the detailed description of the first device reading the functional parameters of the second device when at least one first interface of the first device is connected to the second device in the above S201, which will not be repeated here.
[0171] S702: For each second device among the multiple second devices, the first device matches the function parameter of each second device with the interface information respectively to obtain at least one matching interface matching each second device.
[0172] The manner of determining the matching interface for each second device is similar, and for details, reference may be made to the detailed descriptions in the above S302 and S303 , which will not be described in detail here.
[0173] It should be noted that the matching interfaces of multiple second devices may overlap or may not overlap.
[0174] Since there are multiple second devices here, the interfaces matched by each second device may or may not overlap.
[0175] If each second device has only one matching interface, and each matching interface is different, that is, the matching interfaces of each second device do not affect each other, then these matching interfaces are directly determined as the target interfaces of the corresponding second device.
[0176] For example, assuming that there are three second devices (second device 1, second device 2, and second device 3) connected to the three first interfaces of the first device, and the first device has five first interfaces, namely first interface 1, first interface 2, first interface 3, first interface 4, and first interface 5, the first device matches the functional parameters of the second device 1, the second device 2, and the second device 3 with the functional parameters of the five first interfaces of the first device, and determines that the matching interface of the second device 1 is the first interface 1, the matching interface of the second device 2 is the first interface 2, and the matching interface of the second device 3 is the first interface 3, then determines that the target interface of the second device 1 is the first interface 1, the target interface of the second device 2 is the first interface 2, and the target interface of the second device 3 is the first interface 3.
[0177] If each second device has one or more matching interfaces, but there is no overlap between the matching interfaces of each second device, then the target interface of each second device can be determined by referring to the above method for determining the target interface of a second device, so as to obtain the target interface of each second device.
[0178] For example, assuming that there are three second devices (second device 1, second device 2, and second device 3) connected to the three first interfaces of the first device, and the first device has five first interfaces, namely first interface 1, first interface 2, first interface 3, first interface 4, and first interface 5, the first device matches the functional parameters of the second device 1, the second device 2, and the second device 3 with the functional parameters of the five first interfaces of the first device, and determines that the matching interfaces of the second device 1 are the first interface 1 and the first interface 2, the matching interface of the second device 2 is the first interface 3, and the matching interface of the second device 3 is the first interface 3 and the first interface 5. Then, according to the method for determining the target interface of a second device connected as mentioned above, the target interface of the second device 1 is determined to be the first interface 1, the target interface of the second device 2 is the first interface 3, and the target interface of the second device 3 is the first interface 5.
[0179] If there is overlap between the matching interfaces of each second device, that is, the matching interfaces of the second devices affect each other, the target interface of each second device may be determined in the following S703 or S704.
[0180] S703: The first device determines a target interface applicable to each second device based on the device type of each second device and at least one matching interface matching each second device.
[0181] This embodiment does not limit the method for determining the device type, and can be configured according to actual needs. For example, the first device can obtain the identifier of the second device through the interface protocol, thereby determining the type of the second device.
[0182] The device type may include but is not limited to any of the following: mobile phone, adapter, display, notebook, USB flash drive, etc.
[0183] A most commonly used first interface is configured for each device type. When determining the target interface of each second device, the most commonly used first interface corresponding to the device type may be preferentially selected as the target interface.
[0184] For example, assuming that the first device has 5 first interfaces, the functional parameters of the first interface 1 include 40G, PD, DP1.4; the functional parameters of the first interface 2 include 10G, PD, DP1.4; the functional parameters of the first interface 3 include 10G, PD, DP2.0; the functional parameters of the first interface 4 include 5G, DP1.4, OTG; the functional parameters of the first interface 5 include 5G, DP1.4, PD; the commonly used interface of the U disk can be configured as the first interface 1, the commonly used interface of the display is the first interface 3, the commonly used interface of the mobile phone is the first interface 4, and the commonly used interface of the notebook is the first interface 2.
[0185] Assuming that there are three second devices (a mobile phone and a display) connected to the two first interfaces of the first device, the first device matches the functional parameters of the mobile phone and the display with the functional parameters of the five first interfaces of the first device, and determines that the matching interfaces of the mobile phone are the first interface 1 and the first interface 4, and the matching interfaces of the display are the first interface 1, the first interface 2 and the first interface 3. Then, based on the commonly used interfaces of the mobile phone, it is determined that the target interface of the mobile phone is the first interface 4, and the target interface of the display is the first interface 3.
[0186] S704: The first device determines a target interface applicable to each second device based on the device type of each second device, the priority of the device type, and at least one matching interface matching each second device.
[0187] In one possible implementation, if there is overlap in the matching interfaces of the second devices, the type of the second device and the priority of the type are obtained, and the target interface is determined for each type of second device in descending order of priority, thereby avoiding the impact of overlapping matching interfaces of multiple second devices.
[0188] For example, assuming that there are three second devices (a mobile phone, a USB flash drive and a monitor) connected to the three first interfaces of the first device, the first device matches the functional parameters of the mobile phone, the USB flash drive and the monitor with the functional parameters of the five first interfaces of the first device, and determines that the matching interfaces of the mobile phone are the first interface 1 and the first interface 4, the matching interfaces of the USB flash drive are the first interface 1, the first interface 3 and the first interface 5, and the matching interfaces of the monitor are the first interface 1, the first interface 2 and the first interface 3. In this way, the priority of determining the device type is from high to low: mobile phone, monitor and USB flash drive. First, determine that the target interface of the mobile phone is the first interface 4, then determine that the first interface of the monitor is 3, and the first interface of the USB flash drive is the first interface 1.
[0189] Among them, one of S703 and S704 can be selected for execution.
[0190] S705: The first device outputs a target interface applicable to each second device.
[0191] The implementation of S705 may refer to the detailed description of the target interface applicable to the second device output in S203 above, which will not be described in detail here.
[0192] In this embodiment, when multiple second devices are connected to multiple first interfaces, multiple-to-multiple solutions are provided, which expands the application scenarios and provides a high user experience. In addition, for the multiple-to-multiple solutions, a solution for determining the target interface based on the common interface of the device type and a solution for determining the target interface based on the priority of the device type are provided. Users can choose according to actual needs, which is flexible and widely applicable.
[0193] Below, taking the first device being a notebook as an example, the interface processing process is described through an embodiment.
[0194] There are more and more Type-C ports on laptops now, and the functions of each port vary greatly, including speed, charging, display resolution, etc. Users cannot use the most suitable port, especially when they don’t know the specifications of the peripherals.
[0195] For example, refer to Figure 8 As shown, the notebook 80 includes 4 type-C ports, namely type-C port 1 801 , type-C port 2 802 , type-C port 3 803 , type-C port 4 804 , and other interfaces 805 .
[0196] In the related art, there are laser engraved logos on the type-C port to distinguish different ports. For example, the lightning logo is a full-function type-C port; the tree-shaped function is a type-C port with data transmission function.
[0197] The processing procedure of this embodiment may include but is not limited to the following steps 1 to 4.
[0198] Step 1: A table A (equivalent to the above-mentioned table 2) is stored in the system (equivalent to the above-mentioned first device), which displays the function and supported parameters of each type-C port (equivalent to the above-mentioned first interface).
[0199] Step 2: After inserting a device (equivalent to the second device mentioned above), the system reads the peripheral information (equivalent to the functional parameters of the second device mentioned above) and fills it into another table B (equivalent to the above table 1).
[0200] Step 3: After comparing Table A and Table B, determine which Type C port (equivalent to the target interface) should be plugged in and output it in the form of a schematic diagram.
[0201] Step 4: Insert multiple devices and give the best insertion plan according to the current status of the system.
[0202] For example, if the current situation is DC, you need to plug a display that can provide greater power capacity into the port with PD.
[0203] In this process, the appropriate interface can also be determined in combination with the judgment of the user's usage scenario.
[0204] For example, in the battery state, if it is detected that the monitor plugged in by the user has a charging function, the user is reminded to plug the monitor into a port that supports PD.
[0205] If the monitor supports PD charging, the system will remind the user to plug the monitor into a PD-enabled port. For example, some monitors have 90W PD charging capabilities.
[0206] For example, if the battery level is low, the user can be reminded to plug the monitor into a more power-efficient Type-C port.
[0207] If the battery level is low, the system will suggest that the user plug the monitor into a more power-efficient Type-C port. This helps extend the battery life of the device and ensures stable power supply when the battery is low.
[0208] For example, if the user is in a gaming scenario, the user will be reminded to access a better interface.
[0209] For gamers, the DP interface is generally more suitable for high refresh rate and high resolution gaming experience than the HDMI interface. In addition, some gaming monitors are also equipped with DP1.4 or higher interfaces to provide optimal performance.
[0210] For example, if the battery of the connected device is low, the user is reminded to connect to an interface that supports greater output power. For systems with external graphics cards, it is recommended that users plug in the appropriate port based on the current graphics processing unit (GPU) scenario. For example, in independent GPU mode, a type-C port that supports external graphics cards needs to be plugged in.
[0211] In this embodiment, the system and peripherals are intelligently matched to achieve optimal performance; multiple peripherals are connected to provide the most appropriate connection combination; the best adaptation is given according to the user's actual usage environment, such as under DC conditions and insufficient power, an interface with a relatively small resolution is suitable; the interface requirements of various scenarios can be met, and the user experience is good.
[0212] Through these judgments and reminders, the system can optimize the user experience and device usage efficiency according to different usage scenarios and device status.
[0213] In a second aspect, in order to implement the above processing method, an interface processing device of an embodiment of the present application is deployed on a first device. Fig. 9 The structure of the processing device 90 of the interface is described with reference to the schematic diagram of the structure of the processing device 90 of the interface shown.
[0214] like Fig. 9 As shown, the interface processing device 90 includes: a reading unit 901 , a matching unit 902 and an output unit 903 .
[0215] in:
[0216] A reading unit 901 is used to read the functional parameters of the second device when at least one first interface of the first device is connected to the second device; the first device has at least two first interfaces, and each of the at least two first interfaces has the same interface type and different interface functional parameters;
[0217] A matching unit 902, configured to match at least the functional parameters of the second device with the interface information of the first device, respectively, to obtain a target interface applicable to the second device; the interface information includes the functional parameters of each of the at least two first interfaces;
[0218] The output unit 903 is used to output a target interface applicable to the second device.
[0219] In some embodiments, the output unit 903 is further configured to:
[0220] On the display screen of the first device, the target interface applicable to the second device is displayed in the form of a schematic diagram; or, at the positions of at least two first interfaces, the target interface applicable to the second device is indicated by indicator lights; or, the target interface applicable to the second device is output through the speaker of the first device.
[0221] In some embodiments, when the first interface is a type-C interface, the functional parameters of the first interface include at least one of the following: data transmission rate, fast charging function parameters, video transmission function parameters, and high-voltage charging function parameters.
[0222] In some embodiments, when the number of the second device is one, the matching unit 902 is further configured to:
[0223] Match the functional parameters of the second device with the functional parameters of each of the at least two first interfaces included in the interface information; among the at least two first interfaces, determine a matching interface that meets a matching condition; wherein the matching condition includes: the functional parameters of the interface meet the functional parameters of the second device; among the matching interfaces, determine a target interface applicable to the second device.
[0224] In some embodiments, when the number of the second device is one, the matching unit 902 is further configured to:
[0225] Match the functional parameters of the second device with the functional parameters of each of the at least two first interfaces included in the interface information, and determine a matching interface that meets the matching conditions; wherein the matching conditions include: the functional parameters of the interface meet the functional parameters of the second device; in the case of multiple matching interfaces, obtain the device type of the second device; based on the device type of the second device, determine a priority parameter in the functional parameters of the second device; based on the priority parameter of the second device, determine a target interface among multiple matching interfaces.
[0226] In some embodiments, when the number of the second device is one, the matching unit 902 is further configured to:
[0227] Match the functional parameters of the second device with the functional parameters of each of the at least two first interfaces included in the interface information, and determine a matching interface that meets the matching conditions; wherein the matching conditions include: the functional parameters of the interface meet the functional parameters of the second device; in the case of multiple matching interfaces, detect the current scenario of the second device; based on the current scenario of the second device, determine the target interface applicable to the second device from the multiple matching interfaces.
[0228] In some embodiments, the matching unit 902 is also used for: if the current scene of the second device is a game scene, then among multiple matching interfaces, searching for the first interface connected to the independent graphics card as the target interface; if the current scene of the second device is a low power scene, then among multiple matching interfaces, searching for the first interface with the largest charging power as the target interface.
[0229] In some embodiments, when the number of the second device is one, the matching unit 902 is further configured to:
[0230] Match the functional parameters of the second device with the functional parameters of each of the at least two first interfaces included in the interface information respectively, and determine a matching interface that meets the matching conditions; wherein the matching conditions include: the functional parameters of the interface meet the functional parameters of the second device; in the case of multiple matching interfaces, detect the power consumption state of the first device; if the first device is in a battery power consumption state, and the second device is a display with a fast charging function, then among multiple matching interfaces, the first interface that meets the fast charging function parameters is determined as the target interface applicable to the second device; if the first device is in a battery power consumption state, and the battery power of the first device is lower than the power threshold, then among multiple matching interfaces, the first interface with the lowest power consumption is determined as the target interface applicable to the second device.
[0231] In some embodiments, when there are multiple second devices, the matching unit 902 is further configured to:
[0232] For each second device among the multiple second devices, the functional parameters of each second device are matched with the interface information respectively to obtain at least one matching interface matching each second device; based on the device type of each second device and at least one matching interface matching each second device, the target interface applicable to each second device is determined; or, based on the device type of each second device, the priority of the device type and at least one matching interface matching each second device, the target interface applicable to each second device is determined.
[0233] It should be noted that the processing device of the interface provided in the embodiment of the present application includes the various units included, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, MicroProcessor Unit), a digital signal processor (DSP, Digital Signal Processor) or a field programmable gate array (FPGA, Field-Prog rammable Gate Array), etc.
[0234] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0235] It should be noted that in the embodiment of the present application, if the above-mentioned processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the processing method of the interface of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0236] In the third aspect, in order to implement the above-mentioned processing method, an embodiment of the present application provides an electronic device, including a memory and a processor, the processing memory of the interface stores a computer program that can be run on the processor, and the processing processor of the interface implements the interface processing method provided in the above-mentioned embodiment when executing the processing program of the interface.
[0237] Combine the following Fig.10 The electronic device 100 shown is a block diagram of the electronic device.
[0238] In one example, the electronic device has at least two first interfaces 1001, a processor 1002, and an output interface 1003; wherein each of the at least two first interfaces 1001 has the same interface type and different interface function parameters;
[0239] At least two first interfaces 1001 are used to: access a second device;
[0240] The processor 1002 is used to: when at least one first interface of the electronic device is connected to the second device, read the functional parameters of the second device; at least match the functional parameters of the second device with the interface information of the electronic device respectively to obtain the target interface applicable to the second device; the interface information includes the functional parameters of each of the at least two first interfaces;
[0241] The output interface 1003 is used to output a target interface applicable to the second device.
[0242] In some embodiments, the electronic device 100 may also implement any interface processing method provided in the first aspect of the above embodiments.
[0243] In a fourth aspect, an embodiment of the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any one of the interface processing methods provided in the first aspect of the above-mentioned embodiment.
[0244] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements any one of the interface processing methods provided in the first aspect of the above-mentioned embodiment.
[0245] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0246] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0247] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0248] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the processing unit of the interface is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0249] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0250] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0251] A person skilled in the art can understand that all or part of the steps of the above method embodiment can be completed by hardware related to program instructions, and the above program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium includes: a mobile storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and other media that can store program codes.
[0252] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the processing method of the interface of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0253] The above interface processing is only an implementation method of this application, but the protection scope of this application is not limited to this. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be included in the protection scope of this application. Therefore, the protection scope of this application should be based on the protection scope of the interface processing claim.
Claims
1. A method for processing an interface, the method being applied to a first device, the method comprising: When at least one first interface of the first device is connected to a second device, reading a functional parameter of the second device; The first device has at least two first interfaces, and each of the at least two first interfaces has the same interface type and different interface function parameters; at least matching the functional parameters of the second device with the interface information of the first device respectively, to obtain a target interface applicable to the second device; the interface information includes the functional parameters of each of the at least two first interfaces; The target interface applicable to the second device is output.
2. The method according to claim 1, wherein the outputting the target interface applicable to the second device comprises: On the display screen of the first device, displaying the target interface applicable to the second device in the form of a schematic diagram; Alternatively, at the positions of the at least two first interfaces, the target interface applicable to the second device is indicated by means of an indicator light; Alternatively, the target interface applicable to the second device is output through a speaker of the first device.
3. The method according to claim 1, wherein when the first interface is a type-C interface, The functional parameters of the first interface include at least one of the following: Data transmission rate, fast charging function parameters, video transmission function parameters, high voltage charging function parameters.
4. The method according to any one of claims 1 to 3, wherein when the number of the second device is one, the at least matching the functional parameters of the second device with the interface information of the first device to obtain the target interface applicable to the second device comprises: Matching the function parameters of the second device with the function parameters of each of the at least two first interfaces included in the interface information respectively; Determine a matching interface that satisfies a matching condition among the at least two first interfaces; wherein the matching condition includes: a functional parameter of the interface satisfies a functional parameter of the second device; Among the matching interfaces, a target interface applicable to the second device is determined.
5. The method according to any one of claims 1 to 3, wherein when the number of the second device is one, the at least matching the functional parameters of the second device with the interface information of the first device to obtain the target interface applicable to the second device comprises: Matching the functional parameters of the second device with the functional parameters of each of the at least two first interfaces included in the interface information, respectively, to determine a matching interface that meets a matching condition; wherein the matching condition includes: the functional parameters of the interface meet the functional parameters of the second device; In the case where there are multiple matching interfaces, obtaining a device type of the second device; determining a priority parameter among functional parameters of the second device based on a device type of the second device; The target interface is determined among the plurality of matching interfaces based on a priority parameter of the second device.
6. The method according to any one of claims 1 to 3, wherein when the number of the second device is one, the at least matching the functional parameters of the second device with the interface information of the first device to obtain the target interface applicable to the second device comprises: Matching the functional parameters of the second device with the functional parameters of each of the at least two first interfaces included in the interface information, respectively, to determine a matching interface that meets a matching condition; wherein the matching condition includes: the functional parameters of the interface meet the functional parameters of the second device; In the case where there are multiple matching interfaces, detecting a current scene of the second device; Based on a current scenario of the second device, a target interface applicable to the second device is determined from a plurality of matching interfaces.
7. The method according to claim 6, wherein determining the target interface applicable to the second device from the plurality of matching interfaces based on the current scenario of the second device comprises: If the current scene of the second device is a game scene, searching the first interface connected to the independent graphics card as the target interface among the multiple matching interfaces; If the current scenario of the second device is a low-battery scenario, then among the multiple matching interfaces, a first interface with the largest charging power is searched as the target interface.
8. The method according to any one of claims 1 to 3, wherein when the number of the second device is one, the at least matching the functional parameters of the second device with the interface information of the first device to obtain the target interface applicable to the second device comprises: Matching the functional parameters of the second device with the functional parameters of each of the at least two first interfaces included in the interface information, respectively, to determine a matching interface that meets a matching condition; wherein the matching condition includes: the functional parameters of the interface meet the functional parameters of the second device; In the case where there are multiple matching interfaces, detecting the energy consumption state of the first device; If the first device is in a battery consumption state, and the second device is a display with a fast charging function, then among multiple matching interfaces, a first interface that meets the fast charging function parameters is used to determine a target interface applicable to the second device; If the first device is in a battery power consumption state and the battery power of the first device is lower than a power threshold, then among the multiple matching interfaces, the first interface with the lowest power consumption is used to determine the target interface applicable to the second device.
9. The method according to any one of claims 1 to 3, wherein when there are multiple second devices, one of the second devices is connected to the first device through one of the first interfaces, and the at least matching the functional parameters of the second device with the interface information of the first device to obtain the target interface applicable to the second device comprises: For each of the plurality of second devices, matching the function parameters of each of the second devices with the interface information respectively to obtain at least one matching interface matching each of the second devices; Determine a target interface applicable to each of the second devices based on a device type of each of the second devices and at least one matching interface matching each of the second devices; Alternatively, based on the device type of each second device, the priority of the device type, and at least one matching interface matching each second device, the target interface applicable to each second device is determined.
10. An electronic device, comprising at least two first interfaces, a processor, and an output interface; wherein: Each of the at least two first interfaces has the same interface type and different interface function parameters; The at least two first interfaces are used to: access the second device; The processor is used to: when at least one first interface of the electronic device is connected to a second device, read the functional parameters of the second device; at least match the functional parameters of the second device with the interface information of the electronic device respectively to obtain a target interface applicable to the second device; the interface information includes the functional parameters of each of the at least two first interfaces; The output interface is used to output a target interface applicable to the second device.