Interface state control method and apparatus, and electronic device

By managing the state of the control interface in electronic devices, the problem of data interface being unusable when the main control module cannot communicate is solved, achieving resource conservation and normal data interface use when the control interface is normal or abnormal.

WO2026067172A1PCT designated stage Publication Date: 2026-04-02VIVO MOBILE COMM CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

When the main control module cannot communicate normally with the functional modules, the user cannot use the specific data interface in the functional module.

Method used

By enabling all interfaces when the first module is powered on, disabling all data interfaces upon receiving the first instruction, enabling specific data interfaces upon receiving the second instruction, and keeping the interfaces enabled when the control interface malfunctions, the normal use of the data interfaces is ensured.

Benefits of technology

Whether the control interface is normal or abnormal, the normal use of the data interface can be guaranteed, reducing resource consumption and ensuring that the user can use the data interface of the functional module normally.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025122056_02042026_PF_FP_ABST
    Figure CN2025122056_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of electronic devices. Disclosed are an interface state control method and apparatus, and an electronic device. The method in the embodiments of the present application comprises: when it is detected that a first module is powered on, enabling a plurality of interfaces; when a control interface has received a first instruction sent by a second module, disabling all data interfaces, wherein the first instruction is used for instructing the disabling of all the data interfaces; and when the control interface has received a second instruction sent by the second module, enabling a first data interface among the data interfaces, wherein the second instruction is used for instructing the enabling of the first data interface.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and electronic equipment for controlling interface state

[0001] Cross-reference to related applications

[0002] The present application claims priority from Chinese Patent Application No. 202411344801.X filed on September 25, 2024, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present application belongs to the technical field of electronic equipment, and specifically relates to a method, device and electronic equipment for controlling interface state. BACKGROUND

[0004] In related technologies, a functional module of an electronic device has one or more data interfaces. The opening or closing of these data interfaces is controlled by a master module of the electronic device. When a user needs to use a specific data interface among the data interfaces, the master module notifies the functional module to start the specific data interface. However, in related technologies, all data interfaces of the functional module are closed after the functional module is powered on. Thus, when the master module cannot normally communicate with the functional module, the user cannot use the specific data interface in the functional module. SUMMARY

[0005] Embodiments of the present application provide a method, device and electronic equipment for controlling interface state, which can solve the problem that a user cannot use a specific data interface in a functional module when a master module cannot normally communicate with the functional module.

[0006] In a first aspect, embodiments of the present application provide a method for controlling interface state, applied to a first module of an electronic device. The first module includes a plurality of interfaces, the plurality of interfaces including a control interface and a data interface, and the control interface is connected to a second module of the electronic device. The method includes:

[0007] In a case where it is detected that the first module is powered on, the plurality of interfaces are opened.

[0008] In a case where the control interface receives a first instruction sent by the second module, all data interfaces are closed, wherein the first instruction is used to instruct to close all data interfaces.

[0009] In a case where the control interface receives a second instruction sent by the second module, a first data interface in the data interface is opened, wherein the second instruction is used to instruct to open the first data interface.

[0010] In a second aspect, a control device of interface state is provided, which is applied to a first module of an electronic device, the first module includes a plurality of interfaces, the plurality of interfaces includes a control interface and a data interface, the control interface is connected with a second module of the electronic device, and the device includes:

[0011] a first processing module, configured to start the plurality of interfaces when power-on of the first module is detected;

[0012] a second processing module, configured to close all data interfaces when the control interface receives a first instruction sent by the second module, wherein the first instruction is used to instruct to close all data interfaces;

[0013] a third processing module, configured to start a first data interface in the data interfaces when the control interface receives a second instruction sent by the second module, wherein the second instruction is used to instruct to start the first data interface.

[0014] In a third aspect, an electronic device is provided, which includes a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method according to the first aspect.

[0015] In a fourth aspect, a readable storage medium is provided, which stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the method according to the first aspect.

[0016] In a fifth aspect, a chip is provided, which includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used to run programs or instructions to implement the method according to the first aspect.

[0017] In a sixth aspect, a computer program product is provided, which is stored in a storage medium, and the program product is executed by at least one processor to implement the method according to the first aspect.

[0018] In the embodiment of the present application, when the control interface is normal, the first instruction is used to close the data interface, so as to reduce unnecessary resource consumption. When the user needs to use a specific data interface, the second instruction is used to open the specific data interface, so as to ensure that the user normally uses the data interface of the first module. When the control interface is abnormal, since each interface is in an open state after the first module is powered on, the user can also normally use the data interface of the first module. Therefore, the above scheme can ensure the normal use of the data interface of the first module, regardless of whether the control interface is normal or whether the first module can normally communicate with the second module. BRIEF DESCRIPTION OF DRAWINGS

[0019] FIG. 1 is a flow diagram of a method for controlling the state of an interface according to an embodiment of the present application;

[0020] FIG. 2 is a schematic diagram of an interface of a first module according to an embodiment of the present application;

[0021] FIG. 3 is a flow diagram of a method for controlling the state of an interface according to another embodiment of the present application;

[0022] FIG. 4 is a flow diagram of a method for controlling the state of an interface according to another embodiment of the present application;

[0023] FIG. 5 is a schematic diagram of a module for controlling the state of an interface according to an embodiment of the present application;

[0024] FIG. 6 is a block diagram of an electronic device according to an embodiment of the present application;

[0025] FIG. 7 is a block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present application will be described clearly below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.

[0027] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of a kind and are not limited in number. For example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.

[0028] The interface state control method provided by the embodiments of the present application will be described in detail below in combination with the drawings, specific embodiments and application scenarios.

[0029] As shown in FIG. 1, the present application provides an interface state control method, which is applied to a first module of an electronic device, the first module includes a plurality of interfaces, the plurality of interfaces include a control interface and a data interface, the control interface is connected with a second module of the electronic device, and the method includes:

[0030] Step 101: in the case of detecting that the first module is powered on, starting the plurality of interfaces.

[0031] In the embodiments of the present application, the data interface includes at least one input interface and at least one output interface. Optionally, the input interface and the output interface correspond to each other.

[0032] For example, as shown in FIG. 2, the first module includes an input interface one, an input interface two, an output interface one and an output interface two. Among them, the input interface one corresponds to the output interface one, and the input interface two corresponds to the output interface two, that is, data is input from the input interface one and output from the output interface one; or, data is input from the input interface two and output from the output interface two.

[0033] Step 102: in the case that the control interface receives a first instruction sent by the second module, closing all data interfaces, wherein the first instruction is used to instruct to close all data interfaces.

[0034] In the embodiments of the present application, after the second module detects that the first module is powered on, the second module sends a first instruction to the first module, so that the first module closes all data interfaces according to the first instruction, thereby achieving the purpose of saving resource power consumption.

[0035] Optionally, the second module is a master module of the electronic device. For example, the master module is an electronic controller. The master module controls the opening or closing of each data interface of the first module by sending instructions.

[0036] Step 103: in the case that the control interface receives a second instruction sent by the second module, starting a first data interface in the data interface, wherein the second instruction is used to instruct to start the first data interface.

[0037] In the embodiments of the present application, in the case that the second module receives a use demand of a user using the first data interface, the second module sends a second instruction to the first module, and the first module starts the first data interface according to the second instruction, for example, the first data interface includes a first access interface and a first output interface.

[0038] Optionally, the user is a module other than the first module in the electronic device, or is a user.

[0039] In the embodiments of the present application, when the control interface is normal, closing the data interface through the first instruction can reduce unnecessary resource consumption, and when the user needs to use a specific data interface, the specific data interface can be opened through the second instruction, thereby ensuring the normal use of the data interface of the first module by the user. When the control interface is abnormal, since each interface is in an open state after the first module is powered on, the normal use of the data interface of the first module by the user can also be ensured, and therefore, the above-mentioned solution can ensure the normal use of the data interface of the first module regardless of whether the control interface is normal or not, that is, regardless of whether the first module can normally communicate with the second module or not.

[0040] Optionally, the method further comprises:

[0041] In the case that the control interface receives a third instruction sent by the second module, the first data interface is closed, wherein the third instruction is used to close the first data interface.

[0042] In the embodiments of the present application, when the second module learns that the user no longer needs to use the first data interface of the first module, the third instruction is sent to the first module through the control interface, and the first module closes the first data interface according to the third instruction, so as to avoid energy waste.

[0043] Optionally, the first instruction or the second instruction is an instruction transmitted through a serial communication protocol.

[0044] In the embodiments of the present application, the first module and the second module transmit the first instruction or the second instruction through a serial communication protocol, so as to open or close the corresponding interface according to the corresponding instruction. For example, the serial communication protocol can be an Inter-Integrated Circuit (I2C) protocol, a Serial Peripheral Interface (SPI) protocol, etc.

[0045] Optionally, the first module includes at least one of a power management module and a multimedia processing module, but is not limited thereto. The first module can be any functional module in the electronic device which includes multiple interfaces.

[0046] Through the solution of the present application, when the control interface is normal, the normal use of the interfaces of the power management module, the multimedia processing module, etc. can be ensured on the premise of avoiding unnecessary resource consumption, and when the control interface is abnormal, the normal use of the interfaces of the power management module, the multimedia processing module, etc. can also be ensured.

[0047] The overall flow of the interface state control method of the application will be described below in combination with an embodiment.

[0048] In the embodiment of the application, as shown in FIG. 3, the flow includes:

[0049] Step 301: power on the first module.

[0050] Step 302: the first module opens all interfaces.

[0051] After connecting the power supply, the first module will be initialized, and in the initialization process, the first module opens all interfaces and prepares to receive the communication instruction from the second module. The second module is specifically the master module of the electronic device.

[0052] Step 303: the second module sends a first instruction using a communication protocol, and the first instruction is used to instruct to close all data interfaces.

[0053] The communication protocol is a communication protocol for direct data exchange between the first module and the second module, such as I2C protocol, SPI protocol, etc.

[0054] Step 304: the first module closes all data interfaces.

[0055] Step 305: the second module learns that the user needs to use the first data interface, and sends a second instruction to the first module using the communication protocol, and the second instruction is used to instruct to open the first data interface.

[0056] The user is another module connected to the corresponding input or output of the first module, and the output or input of the user depends on the input interface or output interface of the first module being in an open state.

[0057] Step 306: the first module opens the first data interface.

[0058] After receiving the second instruction of opening the first data interface sent by the second module to the module through the communication protocol, the first module executes according to the instruction content, at this time the first data interface has its corresponding function to ensure the normal function of the user and the first module.

[0059] Step 307: the first data interface is normally used.

[0060] At this time, the corresponding function of the first data interface works normally.

[0061] Step 308: when the second module learns that the user no longer needs to use the first data interface, a third instruction is sent through the communication protocol, and the third instruction is used to close the first data interface.

[0062] Step 309: The first module closes the first data interface.

[0063] After receiving the instruction of closing the first data interface sent by the second module to the first module through the communication protocol, the first module executes the instruction, and at this time, the first data interface no longer has its corresponding function, and the function participated by the user and the first module no longer runs.

[0064] Step 310: The first module is powered off.

[0065] After the first module is powered off, all interfaces are closed.

[0066] In the above process, the control interface normally works, and through the above first instruction and second instruction, the normal use of the interface of the first module can be ensured on the premise of avoiding unnecessary resource consumption.

[0067] In the embodiment of the present application, as shown in FIG. 4, the process includes:

[0068] Step 401: The first module is powered on.

[0069] Step 402: The first module opens all interfaces.

[0070] After connecting the power supply, the first module will be initialized, and in the initialization process, the first module opens all interfaces and prepares to receive communication instructions from the master module.

[0071] Step 403: The second module sends a first instruction using a communication protocol, and the first instruction is used to indicate to close all data interfaces.

[0072] The communication protocol is a communication protocol for direct data exchange between the first module and the second module, such as I2C protocol, SPI protocol, etc.

[0073] Step 404: The control interface is abnormal, and all data interfaces of the first module remain in an open state.

[0074] Due to the abnormality of the control interface, the first module cannot receive the above-mentioned first instruction, and all data interfaces of the first module remain in an open state.

[0075] Step 405: The second module learns that the user needs to use the first data interface, and sends a second instruction to the first module using a communication protocol, and the second instruction is used to indicate to open the first data interface.

[0076] The user is another module connected to the corresponding input or output of the first module, and the output or input of the user depends on the input interface or output interface of the first module being in an open state.

[0077] Step 406: control the interface exception, and all data interfaces of the first module remain in an open state.

[0078] Due to the control interface exception, the first module cannot receive the second instruction, and all data interfaces of the first module remain in an open state. At this time, the first data interface has its corresponding function, and the function of the user and the first module can be ensured to be normal.

[0079] Step 407: the first data interface is normally used.

[0080] At this time, the corresponding function of the first data interface is normally working.

[0081] Step 408: when the second module learns that the user no longer needs to use the first data interface, a third instruction is sent through a communication protocol, and the third instruction is used to close the first data interface.

[0082] Step 409: control the interface exception, and all data interfaces of the first module remain in an open state.

[0083] Due to the control interface exception, the first module cannot receive the third instruction, and all data interfaces of the first module remain in an open state.

[0084] Step 410: the first module is powered off.

[0085] After the first module is powered off, all interfaces are closed.

[0086] In the above process, the control interface is abnormal, and the first module and the second module cannot normally communicate. However, because each interface of the first module is in an open state after the first module is powered on, the user can normally use the data interface of the first module when the first module and the second module cannot normally communicate.

[0087] The interface state control method provided in the embodiment of the application can be executed by the interface state control device. In the embodiment of the application, the interface state control method executed by the interface state control device is taken as an example to illustrate the interface state control device provided in the embodiment of the application.

[0088] As shown in FIG. 5, the embodiment of the application provides an interface state control device 500 applied to a first module of an electronic device, the first module includes a plurality of interfaces, the plurality of interfaces include a control interface and a data interface, the control interface is connected with a second module of the electronic device, and the device includes:

[0089] A first processing module 501 is configured to open the plurality of interfaces when it is detected that the first module is powered on.

[0090] The second processing module 502 is configured to close all the data interfaces when the control interface receives the first instruction sent by the second module, wherein the first instruction is used to instruct to close all the data interfaces.

[0091] The third processing module 503 is configured to open a first data interface in the data interfaces when the control interface receives the second instruction sent by the second module, wherein the second instruction is used to instruct to open the first data interface.

[0092] Optionally, the apparatus provided in the embodiments of the present application further comprises:

[0093] The fourth processing module is configured to close the first data interface when the control interface receives the third instruction sent by the second module, wherein the third instruction is used to close the first data interface.

[0094] Optionally, the first instruction or the second instruction is an instruction transmitted through a serial communication protocol.

[0095] Optionally, the first module comprises at least one of a power management module and a multimedia processing module.

[0096] Optionally, the second module is a master module of the electronic device.

[0097] In the embodiments of the present application, when the control interface is normal, the closing of the data interfaces through the first instruction can reduce unnecessary resource consumption, and when a user needs to use a specific data interface, the specific data interface can be opened through the second instruction, thereby ensuring the normal use of the data interfaces of the first module by the user. When the control interface is abnormal, since each interface is in an open state after the first module is powered on, the normal use of the data interfaces of the first module by the user can also be ensured, and therefore, the above-mentioned solution can ensure the normal use of the data interfaces of the first module regardless of whether the control interface is normal or not, that is, regardless of whether the first module can normally communicate with the second module or not.

[0098] The interface state control apparatus in the embodiments of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, and the embodiments of the present application are not limited in this regard.

[0099] The interface state control apparatus in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.

[0100] The interface state control apparatus provided in the embodiments of the present application can implement each process implemented by the method embodiments of FIGS. 1 to 4, and thus repeated descriptions are not given herein.

[0101] Optionally, as shown in FIG. 6, the embodiments of the present application further provide an electronic device 600, which includes a processor 601 and a memory 602, and the memory 602 stores programs or instructions executable on the processor 601, and the programs or instructions are executed by the processor 601 to implement each step of the above-mentioned interface state control method embodiments and achieve the same technical effects, and thus repeated descriptions are not given herein.

[0102] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device.

[0103] FIG. 7 is a schematic diagram of a hardware structure of an electronic device for implementing the embodiments of the present application.

[0104] The electronic device 700 includes, but is not limited to, a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, etc.

[0105] Those skilled in the art can understand that the electronic device 700 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 710 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. The electronic device structure shown in FIG. 7 does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown, or combine certain components, or different component arrangements, which will not be described here.

[0106] The processor 710 is configured to, in a case where it is detected that the first module is powered on, open the plurality of interfaces; in a case where the control interface receives a first instruction sent by the second module, close all data interfaces, wherein the first instruction is used to instruct to close all data interfaces; in a case where the control interface receives a second instruction sent by the second module, open a first data interface in the data interfaces, wherein the second instruction is used to instruct to open the first data interface. Optionally, the processor 710 is further configured to, in a case where the control interface receives a third instruction sent by the second module, close the first data interface, wherein the third instruction is used to close the first data interface.

[0107] Optionally, the first instruction or the second instruction is an instruction transmitted through a serial communication protocol.

[0108] Optionally, the first module includes at least one of a power management module and a multimedia processing module.

[0109] Optionally, the second module is a master module of the electronic device.

[0110] In the embodiments of the present application, when the control interface is normal, closing the data interfaces through the above-mentioned first instruction can reduce unnecessary resource consumption, and when a user needs to use a specific data interface, the specific data interface can be opened through the above-mentioned second instruction, so as to ensure that the user normally uses the data interfaces of the first module. When the control interface is abnormal, since each interface is in an open state after the first module is powered on, the normal use of the data interfaces of the first module by the user can also be ensured, and therefore, the above-mentioned scheme can ensure the normal use of the data interfaces of the first module regardless of whether the control interface is normal or not, that is, regardless of whether the first module can normally communicate with the second module or not.

[0111] It should be understood that in the embodiments of the present application, the input unit 704 can include a graphics processor (GPU) 7041 and a microphone 7042. The graphics processor 7041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 706 can include a display panel 7061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also referred to as a touch screen. The touch panel 7071 can include two parts of a touch detection device and a touch controller. The other input devices 7072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, and the like), a trackball, a mouse, a joystick, and the like, which will not be described here.

[0112] The memory 709 can be used to store software programs and various data. The memory 709 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, and the like), and the like. In addition, the memory 709 can include a volatile memory or a non-volatile memory, or the memory 709 can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 709 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0113] The processor 710 can include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 710.

[0114] The embodiment of the application further provides a readable storage medium, the readable storage medium stores a program or instructions, the program or instructions are executed by a processor to realize each process of the interface state control method embodiment, and the same technical effects can be achieved. To avoid repetition, details are not repeated here.

[0115] The processor is the processor in the electronic device in the above-mentioned embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0116] The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used to run a program or instructions to realize each process of the interface state control method embodiment, and the same technical effects can be achieved. To avoid repetition, details are not repeated here.

[0117] It should be understood that the chip mentioned in the embodiment of the application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.

[0118] The embodiment of the application provides a computer program product, the program product is stored in a storage medium, the program product is executed by at least one processor to realize each process of the interface state control method embodiment, and the same technical effects can be achieved. To avoid repetition, details are not repeated here.

[0119] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element. Furthermore, it is to be understood that the method and apparatus of the present application can be carried out by more than one process, method, article, or apparatus either simultaneously, concurrently, or with intervening action that are carried out at the same time, either in a simultaneous fashion or in a fashion that is interleaved in time. For example, the described methods can be performed in a different order from that described, and / or various steps can be combined or omitted, and / or additional steps can be added, without departing from the scope of the present application. Also, features described with respect to certain examples can be combined in other examples.

[0120] From the above description of the embodiments, it is apparent that the above-mentioned method of the embodiments can be realized by means of software plus necessary universal hardware platforms, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present application.

[0121] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are merely illustrative, rather than limiting, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the protection scope of the claims, and all of them belong to the protection scope of the present application.

Claims

1. A method for controlling interface states, applied to a first module of an electronic device, the first module comprising a plurality of interfaces, the plurality of interfaces comprising a control interface and data interfaces, the control interface being connected to a second module of the electronic device, the method comprising: starting the plurality of interfaces when power-on of the first module is detected; closing all the data interfaces when a first instruction sent by the second module is received by the control interface, wherein the first instruction is used to instruct to close all the data interfaces; and starting a first data interface of the data interfaces when a second instruction sent by the second module is received by the control interface, wherein the second instruction is used to instruct to start the first data interface. The method further comprises: closing the first data interface when a third instruction sent by the second module is received by the control interface, wherein the third instruction is used to close the first data interface. The first instruction or the second instruction is an instruction transmitted through a serial communication protocol. The first module comprises at least one of a power management module and a multimedia processing module.

2. The method of claim 1, wherein, The second module is a master module of the electronic device. 6.A device for controlling interface states, applied to a first module of an electronic device, the first module comprising a plurality of interfaces, the plurality of interfaces comprising a control interface and data interfaces, the control interface being connected to a second module of the electronic device, the device comprising: a first processing module configured to start the plurality of interfaces when power-on of the first module is detected; a second processing module configured to close all the data interfaces when a first instruction sent by the second module is received by the control interface, wherein the first instruction is used to instruct to close all the data interfaces; and a third processing module configured to start a first data interface of the data interfaces when a second instruction sent by the second module is received by the control interface, wherein the second instruction is used to instruct to start the first data interface.

3. The method of claim 1, wherein, The device further comprises: a fourth processing module configured to close the first data interface when a third instruction sent by the second module is received by the control interface, wherein the third instruction is used to close the first data interface.

4. The method of claim 1, wherein, The first instruction or the second instruction is an instruction transmitted through a serial communication protocol.

5. The method of claim 1, wherein, The first module comprises at least one of a power management module and a multimedia processing module. The second module is a master module of the electronic device. 11.An electronic device comprising a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions being executed by the processor to implement the steps of the method for controlling interface states according to any one of claims 1-5. 12.A readable storage medium, the readable storage medium storing programs or instructions, the programs or instructions being executed by a processor to implement the steps of the method for controlling interface states according to any one of claims 1-5. ​ 7. The apparatus of claim 6, wherein, ​ ​ 8. The apparatus of claim 6, wherein, ​ 9. The apparatus of claim 6, wherein, ​ 10. The apparatus of claim 6, wherein, ​ ​ ​ 13. A computer program product comprising computer instructions which, when executed by a processor, implement the steps of the method for controlling the state of an interface according to any one of claims 1 to 5.

14. A chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to run a program or instructions, implementing the steps of the method for controlling the state of an interface according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Electronic device and analog signal port multiplexing method

    CN102831094A

  • Electronic equipment and control method

    CN113360126A

  • JTAG (Joint Test Action Group) interface control method, interface control module, chip and electronic equipment

    CN116959546A

  • Interface state control method and device and electronic equipment

    CN119441084A

  • Interface circuit, interface device, and charger

    CN220475760U