Electronic system control method, device, equipment and storage medium
By uniformly managing the wake-up lock interface in the electronic system, the wake-up lock request and release sequence is optimized, and the standby state is introduced, the problems of the number of wake-up locks and interface complexity in the electronic system are solved, and resource utilization is improved and power consumption is reduced.
Patent Information
- Application Number
- CN202210412341.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-04-19
AI Technical Summary
Electronic systems need to frequently apply for wake locks when performing services, resulting in complex number and interface types of wake locks, increasing power consumption and management difficulty.
Manage wake-up lock requests of multiple modules through a wake-up lock interface, reduce the number and interface types of wake-up locks, optimize the request and release order of wake-up locks using sorting indicators, and introduce standby state to improve resource utilization.
It effectively reduces the number of wake locks and interface types, improves resource utilization, reduces power consumption, and simplifies management complexity.
Smart Images

Figure CN115016849B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to an electronic system control method, device, equipment and storage medium. Background Art
[0002] With the development of science and technology, the power consumption of electronic systems is getting higher and higher. In order to save power consumption, the electronic system can enter a sleep state. However, in order to perform business, the electronic system needs to apply for a wake-up lock so that the electronic system is always in a working state when performing business. Among them, since the electronic system includes multiple modules, different modules may request a wake-up lock through different interfaces, resulting in a complex type of wake-up lock interface. In addition, since the electronic system in a working state will request a wake-up lock multiple times, the number of wake-up locks may increase. Summary of the invention
[0003] The embodiments of the present application provide an electronic system control method, device, equipment and storage medium. By providing wake-up lock resources of one or more modules through a wake-up lock, the number of wake-up locks can be reduced, and the types of wake-up lock interfaces can be reduced.
[0004] In a first aspect, an embodiment of the present application provides an electronic system control method, the electronic system control method comprising:
[0005] Obtaining a wake-up lock request instruction, where the wake-up lock request instruction comes from one or more modules in the electronic system that request a wake-up lock resource;
[0006] The wake-up lock is controlled through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0007] In an embodiment of the present application, the electronic system can obtain a wake-up lock request instruction from one or more modules in the electronic system that request a wake-up lock resource, and control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules that request a wake-up lock resource hold the wake-up lock resource. It can be seen that the wake-up lock request instruction of one or more modules that request a wake-up lock resource is used to control a wake-up lock to obtain a wake-up lock resource, which can avoid an increase in the number of wake-up locks. In addition, different modules control the wake-up lock through the same first interface, which can avoid the complexity of the interface types of the wake-up lock.
[0008] In combination with the first aspect, in some feasible implementations, controlling the wake-up lock through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource includes:
[0009] Based on the wake-up lock request instruction, controlling the wake-up lock to maintain a working state through the first interface;
[0010] The first function is called to obtain a wake-up lock resource from a wake-up lock in a working state through a first interface, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0011] In combination with the first aspect, in some feasible implementations, obtaining a wake-up lock request instruction includes:
[0012] Obtain a wake-up lock request instruction from a first module requesting a wake-up lock resource, and / or obtain a wake-up lock request instruction from a second module requesting a wake-up lock resource.
[0013] In combination with the first aspect, in some feasible implementations, controlling the wakeup lock through the first interface based on the wakeup lock request instruction includes:
[0014] Obtaining a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module;
[0015] If the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module.
[0016] In conjunction with the first aspect, in some feasible implementations, the method further includes:
[0017] Obtaining a wake-up lock release instruction, where the wake-up lock release instruction comes from one or more modules in the electronic system that release wake-up lock resources;
[0018] The wake-up lock is controlled through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources.
[0019] In combination with the first aspect, in some feasible implementations, controlling the wake-up lock through the first interface based on the wake-up lock release instruction so that one or more modules holding the wake-up lock resources release the wake-up lock resources includes:
[0020] Based on the wake-up lock release instruction, controlling the wake-up lock to maintain a sleep state through the first interface;
[0021] The second function is called to release the wake-up lock resource of the module holding the wake-up lock resource through the first interface.
[0022] In combination with the first aspect, in some feasible implementations, based on the wake-up lock release instruction, controlling the wake-up lock to maintain a sleep state through the first interface includes:
[0023] When the wake-up lock release instruction is obtained, controlling the wake-up lock to maintain a standby state through the first interface and starting the first timer;
[0024] When the timing duration of the first timer reaches the first timeout duration, the wake-up lock is controlled through the first interface to maintain a sleep state.
[0025] When the timing duration of the first timer is less than the first timeout duration, the wake-up lock is controlled through the first interface to maintain a standby state in which the wake-up lock resource is not released, so as to avoid releasing the wake-up lock resource immediately upon receiving the wake-up lock release instruction. This can avoid releasing the wake-up lock resource too promptly, and effectively improve the utilization rate of the wake-up lock resource.
[0026] In conjunction with the first aspect, in some feasible implementations, the method further includes:
[0027] When a wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration, the first timer is turned off and the wake-up lock is controlled to remain in a working state through the first interface based on the wake-up lock request instruction.
[0028] In conjunction with the first aspect, in some feasible implementations, the method includes:
[0029] Obtaining a resource request instruction, the resource request instruction coming from one or more modules in the electronic system requesting any resource;
[0030] The electronic system is controlled to maintain a working state through the second interface based on the resource request instruction.
[0031] In combination with the first aspect, in some feasible implementations, controlling the electronic system to maintain a working state through the second interface based on the resource request instruction includes:
[0032] Based on the resource request instruction, controlling the electronic system to maintain a working state through the second interface;
[0033] The corresponding resource is obtained through the second interface.
[0034] In an embodiment of the present application, the electronic system can obtain a resource request instruction from one or more modules requesting resources in the electronic system, and control the electronic system to maintain a working state through the second interface based on the resource request instruction. The state of the electronic system is not bound to the wake-up lock resource. When the electronic system obtains a resource request instruction requesting any resource, it can control the electronic system to maintain a working state through the second interface based on the resource request instruction, which can more conveniently control the state of the electronic system.
[0035] In conjunction with the first aspect, in some feasible implementations, the method further includes:
[0036] Obtaining a resource release instruction, where the resource release instruction comes from one or more resource release modules in the electronic system;
[0037] Based on the resource release instruction, the electronic system is controlled to maintain a sleep state through the second interface.
[0038] In combination with the first aspect, in some feasible implementations, controlling the electronic system to maintain a sleep state through the second interface based on the resource release instruction includes:
[0039] When a resource release instruction is obtained, the electronic system is controlled to remain in a standby state and a second timer is started;
[0040] When the timing duration of the second timer reaches the second timeout duration, the electronic system is controlled to maintain a sleep state through the second interface.
[0041] In conjunction with the first aspect, in some feasible implementations, the method further includes:
[0042] When the resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration, the second timer is turned off and the electronic system is controlled to keep working through the second interface based on the resource request instruction.
[0043] In conjunction with the first aspect, in some feasible implementations, the method further includes:
[0044] When the electronic system in the sleep state obtains the resource request instruction, the electronic system is controlled to keep in the working state.
[0045] In a second aspect, an embodiment of the present application provides an electronic system control device, the device comprising:
[0046] An acquisition unit, configured to acquire a wake-up lock request instruction, the wake-up lock request instruction coming from one or more modules requesting a wake-up lock resource in the electronic system control device;
[0047] A control unit is used to control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0048] In combination with the second aspect, in some feasible implementations, the control unit is used to control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource, including:
[0049] Based on the wake-up lock request instruction, controlling the wake-up lock to maintain a working state through the first interface;
[0050] The first function is called to obtain a wake-up lock resource from a wake-up lock in a working state through a first interface, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0051] In conjunction with the second aspect, in some feasible implementations, the acquiring unit is used to acquire the wake-up lock request instruction, including:
[0052] Obtain a wake-up lock request instruction from a first module requesting a wake-up lock resource, and / or obtain a wake-up lock request instruction from a second module requesting a wake-up lock resource.
[0053] In conjunction with the second aspect, in some feasible implementations, the control unit is used to control the wakeup lock through the first interface based on the wakeup lock request instruction, including:
[0054] Obtaining a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module;
[0055] If the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module.
[0056] In conjunction with the second aspect, in some feasible implementations, the control unit is further configured to:
[0057] Acquire a wake-up lock release instruction, where the wake-up lock release instruction comes from one or more modules for releasing wake-up lock resources in the electronic system control device;
[0058] The wake-up lock is controlled through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources.
[0059] In combination with the second aspect, in some feasible implementations, the control unit is used to control the wake-up lock through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources, including:
[0060] Based on the wake-up lock release instruction, controlling the wake-up lock to maintain a sleep state through the first interface;
[0061] The second function is called to release the wake-up lock resource of the module holding the wake-up lock resource through the first interface.
[0062] In combination with the second aspect, in some feasible implementations, the control unit is used to control the wake-up lock to maintain a sleep state through the first interface based on the wake-up lock release instruction, including:
[0063] When the wake-up lock release instruction is obtained, controlling the wake-up lock to maintain a standby state through the first interface and starting the first timer;
[0064] When the timing duration of the first timer reaches the first timeout duration, the wake-up lock is controlled through the first interface to maintain a sleep state.
[0065] In conjunction with the second aspect, in some feasible implementations, the control unit is further configured to:
[0066] When a wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration, the first timer is turned off and the wake-up lock is controlled to remain in a working state through the first interface based on the wake-up lock request instruction.
[0067] In conjunction with the second aspect, in some feasible implementations, the control unit is further configured to:
[0068] Obtaining a resource request instruction, the resource request instruction coming from one or more modules in the electronic system control device requesting any resource;
[0069] Based on the resource request instruction, the electronic system control device is controlled through the second interface to maintain the working state.
[0070] In conjunction with the second aspect, in some feasible implementations, the control unit is used to control the electronic system control device to maintain a working state through the second interface based on the resource request instruction, including:
[0071] Based on the resource request instruction, controlling the electronic system control device through the second interface to keep the electronic system control device in working state;
[0072] The corresponding resource is obtained through the second interface.
[0073] In conjunction with the second aspect, in some feasible implementations, the control unit is further configured to:
[0074] Acquire a resource release instruction, where the resource release instruction comes from one or more resource release modules in the electronic system control device;
[0075] Based on the resource release instruction, the electronic system control device is controlled to maintain a sleep state through the second interface.
[0076] In conjunction with the second aspect, in some feasible implementations, the control unit is used to control the electronic system control device to maintain a sleep state through the second interface based on the resource release instruction, including:
[0077] When a resource release instruction is obtained, the electronic system control device is controlled to maintain a standby state and start a second timer;
[0078] When the timing duration of the second timer reaches the second timeout duration, the electronic system control device is controlled to maintain a sleep state through the second interface.
[0079] In conjunction with the second aspect, in some feasible implementations, the control unit is further configured to:
[0080] When the resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration, the second timer is turned off and the electronic system control device is controlled to keep working through the second interface based on the resource request instruction.
[0081] In conjunction with the second aspect, in some feasible implementations, the control unit is further configured to:
[0082] When the electronic system control device in the sleep state obtains the resource request instruction, the electronic system control device is controlled to maintain the working state.
[0083] In a third aspect, an embodiment of the present application provides an electronic system, which includes a processor and a memory, which are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the electronic system control method of the first aspect.
[0084] In a fourth aspect, an embodiment of the present application provides a chip, the chip is used to obtain a wake-up lock request instruction, the wake-up lock request instruction comes from one or more modules in the chip that request a wake-up lock resource;
[0085] The wake-up lock is controlled through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0086] In a fifth aspect, an embodiment of the present application provides a module device, the module device comprising a processor and a communication interface, the processor is connected to the communication interface, the communication interface is used to send and receive signals, and the processor is used to:
[0087] Obtaining a wake-up lock request instruction, where the wake-up lock request instruction comes from one or more modules in the module device that request a wake-up lock resource;
[0088] The wake-up lock is controlled through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0089] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, enable the processor to execute the control method of the electronic system of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0091] Figure 1 is a structural schematic diagram of an electronic system provided in an embodiment of the present application;
[0092] Figure 2 is a flow chart of an electronic system control method provided in an embodiment of the present application;
[0093] Figure 3a This is a state transition diagram of a wake-up lock provided in an embodiment of the present application;
[0094] Figure 3b is another state transition diagram of a wake-up lock provided in an embodiment of the present application;
[0095] Figure 4 is a flow chart of another electronic system control method provided in an embodiment of the present application;
[0096] Figure 5a is a state transition diagram of an electronic system provided by an embodiment of the present application;
[0097] Figure 5b is a state transition diagram of another electronic system provided by an embodiment of the present application;
[0098] Figure 6 is a schematic diagram of the structure of another electronic system provided in an embodiment of the present application;
[0099] Figure 7 is a structural schematic diagram of an electronic system control device provided in an embodiment of the present application;
[0100] Figure 8 It is a structural diagram of another electronic system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0101] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0102] With the improvement of the processing power of electronic systems, the increase of screen size and the improvement of resolution, the power consumption of electronic systems is getting faster and faster, and the standby time of electronic systems is getting shorter and shorter. For example, the standby time of many electronic systems is less than one day, which reduces the user experience. In order to reduce power consumption and extend the standby time of the electronic system, the electronic system can be controlled to enter a sleep state when it is detected that there is no business execution in the electronic system. When there is a business to be executed, the electronic system needs to apply for a wake-up lock so that the electronic system is always in a working state when executing the business. Among them, since the electronic system includes multiple modules, each module may request a different wake-up lock (for example, the electronic system can be a modem (Modem), the Modem includes a modem loader (Modem Loader), an inter-process communication (Inter-Process Communication, IPC) module and an IP accelerator (IPA) module. One or more of the modules, the Modem Loader may request a wake-up lock through interface A, the IPC module may request a wake-up lock through interface B, and the IPA module may request a wake-up lock through interface C), resulting in a complex type of wake-up lock interface. Furthermore, since an electronic system in operation may request a wake-up lock multiple times (for example, the electronic system includes multiple modules, each module requests one or more wake-up locks, and multiple modules request multiple wake-up locks), the number of wake-up locks increases.
[0103] Based on this, an embodiment of the present application provides an electronic system control method, device, equipment and storage medium. In this method, the electronic system can obtain a wake-up lock request instruction from one or more modules in the electronic system that request wake-up lock resources, and control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting wake-up lock resources hold the wake-up lock resources. In an embodiment of the present application, the wake-up lock request instruction of one or more modules in the electronic system controls the same wake-up lock through the first interface to obtain the wake-up lock resources, which can effectively reduce the number of wake-up locks and the types of interfaces of the wake-up locks.
[0104] In one embodiment, the embodiment of the present application can be applied to an electronic system, and the electronic system can be any system with data processing capability. For example, the electronic system can include but is not limited to terminal equipment, access terminal equipment, user unit, user station, mobile station, mobile station, remote station, remote terminal equipment, mobile equipment, user terminal equipment, intelligent terminal equipment, wireless communication equipment, user agent or user device. For example, the terminal equipment can also be a cellular phone, a cordless phone, a Session Initiation Protocol (Session Initiation Protocol, SIP) phone, a Wireless Local Loop (Wireless Local Loop, WLL) station, a Personal Digital Assistant (Personal Digital Assistant, PDA), a handheld device with wireless communication function, a computing device, a business device, a modem or other processing equipment connected to a modem, a relay device, a vehicle-mounted device, a wearable device, a terminal device in a next-generation communication system or a terminal device in a future-evolved Public Land Mobile Network (Public Land Mobile Network, PLMN), a terminal device in a wireless communication network (Wireless Communication Network, WCN), etc., without specific limitation.
[0105] Optional, Figure 1 FIG. 1 shows a schematic diagram of the structure of an electronic system. Figure 1As shown, the electronic system can be a modem 100, and the modem 100 can include one or more of a modem loader 101, an inter-process communication module 102, and an IP accelerator module 103. It should be noted that the multiple modules in the electronic system are only exemplary and do not constitute a limitation. Among them, the modem loader 101 can be used to load the image file in the modem or start the modem, etc., and the inter-process communication module 102 can be used to provide shared memory communication between the modem 100 and the wireless access point (Wireless Access Point, AP). The IP accelerator module 103 can be used to provide transmission data packets. The data packet may be a data packet in a Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), 5th Generation Mobile Networks (5G), Wireless Local Area Networks (WLAN), or Wireless Fidelity (Wi-Fi) network, but this application does not limit this.
[0106] Next, the electronic system control method of the embodiment of the present application will be described in detail. Figure 2 , Figure 2 A schematic flow chart of an electronic system control method is shown. The electronic system control method can be applied to Figure 1 In the electronic system shown. Figure 2 As shown, the electronic system control method specifically includes S201-S202:
[0107] S201: Obtain a wake-up lock request instruction, where the wake-up lock request instruction comes from one or more modules in the electronic system that request a wake-up lock resource.
[0108] In one embodiment, when a module in an electronic system executes a business, the electronic system needs to remain in a working state. In order to keep the electronic system in a working state when executing a business and avoid entering a sleep state, the module in the electronic system needs to request a wake-up lock resource. At this time, the module requesting the wake-up lock resource can generate a wake-up lock request instruction. For example, when the loader of the modem needs to load an image file or start the modem, the electronic system (such as a modem) is required to be in a working state at all times, and the loader of the modem needs to request a wake-up lock resource, and the wake-up lock request instruction from the loader of the modem can be obtained. For another example, when the IPC module needs to provide shared memory communication, the electronic system (such as a modem) is required to be in a working state at all times, and the IPC module needs to request a wake-up lock resource, and the wake-up lock request instruction from the IPC module can be obtained. For another example, when the IPA module needs to provide data transmission, the electronic system (such as a modem) is required to be in a working state at all times, and the IPA module needs to request a wake-up lock resource, and the wake-up lock request instruction from the IPA module can be obtained.
[0109] Optionally, the wake-up lock request instruction may come from a module in the electronic system that requests a wake-up lock resource. For example, the wake-up lock request instruction includes one or more wake-up lock request instructions from a first module that requests a wake-up lock resource. Among them, the first module may include but is not limited to any one of a loader, an IPC module, and an IPA module of a modem. Optionally, the wake-up lock request instruction may come from multiple modules in the electronic system that request wake-up lock resources. Specifically, the wake-up lock request instruction may come from two modules in the electronic system that request wake-up lock resources. For example, the wake-up lock request instruction includes a wake-up lock request instruction of a first module that requests a wake-up lock resource and a wake-up lock request instruction of a second module that requests a wake-up lock resource. Among them, the second module is different from the first module. For example, the first module is a loader for a modem, and the second module is an IPC module. For another example, the first module is a loader for a modem, and the second module is an IPA module. For another example, the first module is an IPC module, and the second module is an IPA module. And so on. It should be noted that the wake-up lock request instruction may also come from three modules in the electronic system that request wake-up lock resources. This application is not limited to this.
[0110] The wake-up lock request instruction may carry a module identifier, and the module identifier of the wake-up lock request instruction may be used to indicate the module that generates the wake-up lock request instruction. The module identifier may include but is not limited to one or more of a module name and a module unique identification code (Identity Document, ID).
[0111] S202: Control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0112] In one embodiment, the electronic system can control the wake-up lock to remain in a working state through the first interface based on a wake-up lock request instruction, and call the first function to obtain wake-up lock resources from the wake-up lock in a working state through the first interface, so that one or more modules requesting the wake-up lock resources hold the wake-up lock resources.
[0113] In one embodiment, the wake-up lock may include two states: a sleep state and a working state. When the wake-up lock is in the sleep state, the wake-up lock cannot provide wake-up lock resources. When the wake-up lock is in the working state, the wake-up lock can provide wake-up lock resources. Optionally, if the initial state of the wake-up lock is the sleep state, when the electronic system obtains the wake-up lock request instruction, the electronic system controls the wake-up lock to be converted from the sleep state to the working state through the first interface based on the wake-up lock request instruction. Optionally, if the initial state of the wake-up lock is the working state, when the electronic system obtains the wake-up lock request instruction, the electronic system controls the wake-up lock to remain in the working state through the first interface based on the wake-up lock request instruction.
[0114] Further, the first indication information may be used to indicate the state of the wake-up lock, and the first indication information includes but is not limited to one or more of a bit or a string. In one embodiment, the first indication information may be a bit. When the first indication information is a first value, the wake-up lock is in a sleep state. When the first indication information is a second value, the wake-up lock is in a working state. Wherein, the first value and the second value mentioned above refer to different bit values, for example, the first value may be "0" and the second value may be "1"; or, the first value may be "1" and the second value may be "0". In another embodiment, the first indication information may also be a string. When the first indication information is a first string, the wake-up lock is in a sleep state. When the first indication information is a second string, the wake-up lock is in a working state. Wherein, the first string and the second string mentioned above refer to different strings, for example, the first string may be "unlock" and the second string may be "lock".
[0115] The first function may refer to a function for acquiring a wake lock resource, and the first function may be expressed as a wake lock function. The first interface may refer to an interface for controlling a wake lock, and the first interface may be expressed as a wake lock interface.
[0116] In an embodiment of the present application, the electronic system may include a wake-up lock and an interface (i.e., a first interface) corresponding to the wake-up lock, and the wake-up lock request instruction may include multiple wake-up lock request instructions of the electronic system. In one embodiment, the electronic system may include a wake-up lock and an interface (i.e., a first interface) corresponding to the wake-up lock, and the wake-up lock request instruction may include multiple wake-up lock request instructions of the electronic system. In one embodiment, the multiple wake-up lock request instructions may include, but are not limited to, multiple wake-up lock request instructions of the first module, one wake-up lock request instruction of the first module and one wake-up lock request instruction of the second module, and multiple wake-up lock request instructions of the first module and multiple wake-up lock request instructions of the second module. One or more of these. The first module and the second module are different. When the electronic system obtains multiple wake-up lock request instructions, the electronic system may control the wake-up locks in sequence based on the sorting index of each wake-up lock request instruction to obtain the corresponding wake-up lock resource. In one embodiment, the sorting index of the wake-up lock request instruction can be used to indicate the processing order of the wake-up lock request instruction.
[0117] In one embodiment, when multiple wake-up lock request instructions include a wake-up lock request instruction of a first module and a wake-up lock request instruction of a second module, the electronic system can obtain a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module. If the ranking index of the wake-up lock request instruction of the first module is higher than the ranking index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module so that the first module holds the wake-up lock resources, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module so that the second module holds the wake-up lock resources.
[0118] Optionally, when the sorting index of the wake-up lock request instruction includes the reception time of the wake-up lock request instruction, if the reception time of the wake-up lock request instruction of the first module is earlier than the reception time of the wake-up lock request instruction of the second module, it is determined that the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module.
[0119] Optionally, when the sorting index of the wake-up lock request instruction includes the priority of the wake-up lock request instruction, if the priority of the wake-up lock request instruction of the first module is higher than the priority of the wake-up lock request instruction of the second module, it is determined that the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module.
[0120] Optionally, when the sorting index of the wake-up lock request instruction includes the sorting time and priority of the wake-up lock request instruction, if the reception time of the wake-up lock request instruction of the first module is earlier than the reception time of the wake-up lock request instruction of the second module, and / or the priority of the wake-up lock request instruction of the first module is higher than the priority of the wake-up lock request instruction of the second module, then it is determined that the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module.
[0121] In one embodiment, the electronic system first controls the wake-up lock through the first interface based on the wake-up lock request instruction of the first module, and then controls the wake-up lock through the first interface based on the wake-up lock request instruction of the second module, including: first, based on the wake-up lock request instruction of the first module, controlling the wake-up lock to remain in a working state through the first interface, and calling the first function to obtain the wake-up lock resources of the first module from the wake-up lock in a working state through the first interface. Then, based on the wake-up lock request instruction of the second module, controlling the wake-up lock to remain in a working state through the first interface, and calling the first function to obtain the wake-up lock resources of the second module from the wake-up lock in a working state through the first interface.
[0122] In one embodiment, when the business of the module holding the wake-up lock resources in the electronic system has been executed, the electronic system does not need to be in a working state all the time. At this time, the electronic system can control the release of the wake-up lock resources and control the wake-up lock to enter a sleep state.
[0123] The following is a detailed description of the relevant embodiments of the electronic system controlling the release of wake-up lock resources. Specifically, the following steps may be included:
[0124] s11: Obtain a wake-up lock release instruction, where the wake-up lock release instruction comes from one or more modules in the electronic system for releasing wake-up lock resources.
[0125] Specifically, when the business of the module holding the wake-up lock resources in the electronic system has been completed, there is no need for the electronic system to always be in working state. At this time, the module holding the wake-up lock resources can release the wake-up lock resources, that is, the module holding the wake-up lock resources can be a module that releases the wake-up lock resources. For example, when the IPC module holding the wake-up lock resources does not need to execute business, the IPC module can release the wake-up lock resources and obtain the wake-up lock release instruction from the IPC module.
[0126] Optionally, similar to the wake-up lock request instruction, the wake-up lock release instruction may come from a module in the electronic system that releases the wake-up lock resources, or may come from multiple modules in the electronic system that release the wake-up lock resources. For example, the wake-up lock release instruction includes a wake-up lock release instruction of a first module that releases the wake-up lock resources and / or a wake-up lock release instruction of a second module that releases the wake-up lock resources. That is, the wake-up lock release instruction includes a wake-up lock release instruction of the first module that releases the wake-up lock resources. Alternatively, the wake-up lock release instruction includes a wake-up lock release instruction of the second module that releases the wake-up lock resources. Alternatively, the wake-up lock release instruction includes a wake-up lock release instruction of the first module that releases the wake-up lock resources and a wake-up lock release instruction of the second module that releases the wake-up lock resources. Wherein, the first module and the second module are different.
[0127] The wake-up lock release instruction may carry a module identifier, and the module identifier of the wake-up lock release instruction is used to indicate a module that generates the wake-up lock release instruction.
[0128] s12: controlling the wake-up lock through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources.
[0129] In one embodiment, the electronic system may control the wake-up lock to remain in a sleep state through the first interface based on the wake-up lock release instruction, and call the second function to release the wake-up lock resource of the wake-up lock resource module through the first interface. The second function may refer to a function for releasing the wake-up lock resource, and the second function may include a wake unlock function.
[0130] Among them, similar to the wake-up lock request instruction, the wake-up lock release instruction may also include multiple wake-up lock release instructions, that is, the electronic system obtains the wake-up lock request instruction including: obtaining the wake-up lock release instruction from the first module that releases the wake-up lock resource, and obtaining the wake-up lock request instruction from the second module that releases the wake-up lock resource. Among them, the first module and the second module may be the same or different. Among them, the sorting index of the wake-up lock release instruction may be used to indicate the processing order of the wake-up lock request instruction. The electronic system may control the wake-up lock in sequence based on the sorting index of each wake-up lock release instruction to release the corresponding wake-up lock resource. The specific implementation method in which the wake-up lock release instruction includes multiple wake-up lock release instructions is similar to the implementation method in which the wake-up lock request instruction includes multiple wake-up lock request instructions, which will not be repeated here.
[0131] In an embodiment of the present application, one or more modules for releasing wake-up lock resources in the electronic system control a wake-up lock to release the wake-up lock resources through a first interface based on a wake-up lock release instruction, and the wake-up lock release instruction of one or more modules for releasing wake-up lock resources is used to control a wake-up lock to release the wake-up lock resources. The wake-up lock release instruction is used to control a wake-up lock to release the wake-up lock resources, which makes it easy to control the release timing of the wake-up lock.
[0132] It should be noted that each module within the electronic system shares a wake-up lock resource of a wake-up lock. When the wake-up lock request instruction comes from multiple modules in the electronic system that request the wake-up lock resource, the electronic system can first obtain the shared wake-up lock resource through the first interface based on the wake-up lock request instruction of the first module, so that the first module holds the shared wake-up lock resource. After the electronic system releases the shared wake-up lock resource through the first interface based on the wake-up lock release instruction, it obtains the shared wake-up lock resource through the first interface based on the wake-up lock request instruction of the second module, so that the second module holds the shared wake-up lock resource. Among them, the first module and the second module may be the same or different.
[0133] In an embodiment of the present application, the electronic system can control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource. And, based on the wake-up lock release instruction, control a wake-up lock through the first interface to release the wake-up lock resource, so that one or more modules holding the wake-up lock resource release the wake-up lock resource. The wake-up lock request instruction and / or the wake-up lock release instruction are used to control a wake-up lock, and the wake-up lock management is convenient.
[0134] Based on the above description, it can be known that the wakeup lock can switch between the sleep state and the working state. Figure 3a , Figure 3a A state transition diagram of a wake-up lock is shown. Figure 3a As shown, “unlock” can be used to indicate the sleep state of the wake-up lock, and “lock” can be used to indicate the working state of the wake-up lock.
[0135] 311. When the electronic system obtains the wake-up lock request instruction, it controls the wake-up lock to be converted from the sleep state (unlock) to the working state (lock) to obtain the wake-up lock resources.
[0136] 312. When the electronic system obtains the wake-up lock release instruction, it releases the wake-up lock resources and controls the wake-up lock to be converted from a working state (lock) to a sleeping state (unlock).
[0137] Optionally, since the release and request of wake-up lock resources are relatively time-consuming, releasing the wake-up lock resources too promptly may result in low utilization of the wake-up lock resources. In order to effectively improve the utilization of wake-up lock resources, a new standby state can be added in the working state and the sleep state. In one embodiment, when the wake-up lock release instruction is obtained, the wake-up lock is controlled to enter the standby state and the first timer is started. When the timing duration of the first timer reaches the first timeout duration (that is, the timing duration of the first timer is greater than or equal to the first timeout duration), the wake-up lock is controlled to remain in the sleep state through the first interface, and the wake-up lock resources are released (or the wake-up lock is controlled to remain in the sleep state through the first interface, the first timer is turned off and the wake-up lock resources are released). When the timing duration of the first timer is less than the first timeout duration, the wake-up lock is controlled to remain in the standby state without releasing the wake-up lock resources through the first interface, so as to avoid releasing the wake-up lock resources immediately when the wake-up lock release instruction is received. Excessively timely release of wake-up lock resources can be avoided, and the utilization of wake-up lock resources can be effectively improved. Among them, the first timeout duration can be set according to experience or business needs. Furthermore, the module holding the wake-up lock resources in the electronic system can also actively release the lock. Specifically, when a module holding the wake-up lock resource in the electronic system actively releases the wake-up lock resource, it is determined that the timing duration of the first timer reaches the first timeout duration, and the electronic system controls the wake-up lock to be in a sleep state.
[0138] It should be noted that when the wake-up lock request instruction is obtained again, the electronic system can control the wake-up lock to maintain the working state through the first interface based on the wake-up lock request instruction, so that the module requesting the wake-up lock resource obtains the wake-up lock resource. Optionally, when the wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration (that is, the wake-up lock is in a standby state), the electronic system can turn off the first timer and control the wake-up lock through the first interface based on the wake-up lock request instruction, so that the module requesting the wake-up lock resource obtains the wake-up lock resource. Specifically, when the timing duration of the first timer is less than the first timeout duration, the wake-up lock is in a standby state. At this time, if the wake-up lock request instruction is obtained, the electronic system turns off the first timer and controls the wake-up lock to maintain the working state through the first interface, so that the module requesting the wake-up lock resource obtains the wake-up lock resource. Optionally, when the timing duration of the first timer reaches the first timeout duration, the wake-up lock is in a sleep state. At this time, if the wake-up lock request instruction is obtained, the wake-up lock is controlled to be converted from a sleep state to a working state through the first interface, so that the module requesting the wake-up lock resource obtains the wake-up lock resource.
[0139] Among them, the wake-up lock may include a sleep state, a standby state, and a working state. Optionally, the first indication information may be used to indicate the state of the wake-up lock, and the first indication information includes but is not limited to one or more of a bitmap or a string. In one embodiment, the first indication information may be a bitmap. When the first indication information is a first bitmap, the wake-up lock is in a sleep state. When the first indication information is a second bitmap, the wake-up lock is in a standby state, and when the first indication information is a third bitmap, the wake-up lock is in a working state. Among them, the first bitmap, the second bitmap, and the third bitmap mentioned above refer to different bitmaps, for example, the first bitmap may be "00", the second bitmap may be "01", and the third bitmap may be "10"; this application does not limit this. In another embodiment, the first indication information may also be a string. When the first indication information is a first string, the wake-up lock is in a sleep state. When the first indication information is a second string, the wake-up lock is in a standby state, and when the first indication information is a third string, the wake-up lock is in a working state. The first character string, the second character string and the third character string mentioned above refer to different character strings. For example, the first character string may be “unlock”, the second character string may be “wait to unlock” and the third character string may be “lock”.
[0140] Based on the above description, it can be known that the wake-up lock can switch between the sleep state, standby state and working state. Figure 3b , Figure 3b Another state transition diagram of a wake-up lock is shown. Figure 3b As shown, "unlock" can be used to indicate the sleep state of the wake-up lock, "wait to unlock" can be used to indicate the standby state of the wake-up lock, and "lock" can be used to indicate the working state of the wake-up lock.
[0141] 321. When the electronic system obtains the wake-up lock request instruction, it controls the wake-up lock to be converted from the sleep state (unlock) to the working state (lock) to obtain the wake-up lock resources.
[0142] 322. When the electronic system obtains the wake-up lock release instruction, the first timer is started to control the wake-up lock to be converted from the working state (lock) to the standby state (wait to unlock).
[0143] 323. When the timing duration of the first timer is less than the first timeout duration, that is, the wake-up lock is in the standby state, a wake-up lock request instruction is obtained, the first timer is turned off and the wake-up lock is controlled to be converted from the standby state (wait to unlock) to the working state (lock) to obtain the wake-up lock resources.
[0144] 324. When the timing duration of the first timer reaches the first timeout duration and the wake-up lock request instruction is not obtained, control the wake-up lock to be converted from a standby state (wait to unlock) to a sleep state (unlock).
[0145] In an embodiment of the present application, the electronic system can obtain a wake-up lock request instruction from one or more modules in the electronic system that request a wake-up lock resource, and control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules that request a wake-up lock resource hold the wake-up lock resource. It can be seen that the wake-up lock request instruction of one or more modules that request a wake-up lock resource is used to control a wake-up lock to obtain a wake-up lock resource, which can avoid an increase in the number of wake-up locks. In addition, different modules control the wake-up lock through the same first interface, which can avoid the complexity of the interface types of the wake-up lock.
[0146] Generally speaking, the status of an electronic system is related to the situation in which the electronic system requests resources. Figure 4 , Figure 4 A flow chart of another electronic system control method is shown, such as Figure 4 As shown, the electronic system control method S401-S402:
[0147] S401: Obtain a resource request instruction, where the resource request instruction comes from one or more modules in the electronic system that request any resource.
[0148] In one embodiment, when a module in an electronic system is executing a business, the module in the electronic system needs resources required to execute the business. At this time, the module in the electronic system needs to request resources. At this time, the module requesting resources can generate a resource request instruction. For example, when the loader of a modem needs to load an image file, the loader of the modem needs to request the resources required to load the image file. At this time, the electronic system can obtain the resource request instruction from the loader of the modem. For another example, when the IPC module needs to provide shared memory communication, the IPC module needs to request the resources required to execute shared memory communication. At this time, the electronic system can obtain the resource request instruction from the IPC module. For another example, when the IPA module needs to provide data transmission, the IPA module needs to request the resources required to execute data transmission. At this time, the electronic system can obtain the resource request instruction from the IPA module.
[0149] Optionally, the resource request instruction may come from a module requesting resources in an electronic system. For example, the resource request instruction includes one or more resource request instructions from a first module requesting resources. Among them, the first module may include but is not limited to any one of a loader, an IPC module, and an IPA module of a modem. Optionally, the resource request instruction may come from multiple modules requesting resources in an electronic system. Specifically, the resource request instruction may come from two modules requesting resources in an electronic system. For example, the resource request instruction includes a resource request instruction of a first module requesting resources and a resource request instruction of a second module requesting resources. Among them, the second module is different from the first module. For example, the first module is a loader of a modem, and the second module is an IPC module. For another example, the first module is a loader of a modem, and the second module is an IPA module. For another example, the first module is an IPC module, and the second module is an IPA module. And so on. It should be noted that the resource request instruction may also come from three modules requesting resources in an electronic system. This application does not limit this.
[0150] Among them, the resources mentioned in this application may include any resources, such as memory resources, cloud resources, etc.
[0151] S402: Control the electronic system to maintain a working state through the second interface based on the resource request instruction.
[0152] In one embodiment, the electronic system may control the electronic system to maintain a working state through the second interface based on the resource request instruction, and obtain corresponding resources through the second interface.
[0153] The electronic system may include two states: a sleep state and a working state. When the electronic system is in the sleep state, the electronic system cannot perform business. When the electronic system is in the working state, the electronic system can perform business. Optionally, if the initial state of the electronic system is the sleep state, when the electronic system obtains a resource request instruction, the electronic system controls the electronic system to convert from the sleep state to the working state through the second interface based on the resource request instruction. Optionally, if the initial state of the electronic system is the working state, when the electronic system obtains a resource request instruction, the electronic system controls the electronic system to maintain the working state through the second interface based on the resource request instruction.
[0154] Optionally, similar to the aforementioned use of the first indication information to indicate the state of the wake-up lock, the second indication information may be used to indicate the state of the electronic system. The second indication information includes, but is not limited to, one or more of a bit or a string. In one embodiment, the second indication information may be a bit. When the second indication information is a fourth value, the electronic system is in a sleep state. When the second indication information is a fifth value, the electronic system is in a working state. Among them, the fourth value and the fifth value mentioned above refer to different bit values, for example, the fourth value may be "0" and the fifth value may be "1"; or, the fourth value may be "1" and the fifth value may be "0". In another embodiment, the second indication information may also be a string. When the second indication information is a fourth string, the electronic system is in a sleep state. When the second indication information is a fifth string, the electronic system is in a working state. Among them, the fourth string and the fifth string mentioned above refer to different strings, for example, the fourth string may be "IDEL" and the fifth string may be "BUSY".
[0155] Among them, the second interface may refer to an interface for controlling the state of the electronic system, and the second interface may be expressed as a resource interface. Optionally, the number of the second interface may be one. When a resource request instruction is obtained, the electronic system is controlled to remain in working state through this second interface. Optionally, the number of the second interface may be multiple, for example, one module corresponds to one second interface, and when the electronic system includes multiple modules, the number of the second interface may be multiple. For the first module, when the resource request instruction of the first module is obtained, the electronic system may be controlled to remain in working state through the second interface corresponding to the first module and the corresponding resource may be obtained through the second interface corresponding to the first module. For the second module, when the resource request instruction of the second module is obtained, the electronic system may be controlled to remain in working state through the second interface corresponding to the second module and the corresponding resource may be obtained through the second interface corresponding to the second module. For another example, a resource type corresponds to a second interface, and when the electronic system is used to request resources of multiple resource types, the number of the second interface may be multiple. Among them, the resource type may be divided in a variety of ways. Optionally, the resource type may be divided based on the resource type. For example, the resource type may include: wake-up lock resources, memory resources, and the like. When a resource request instruction for obtaining a wake-up lock resource is obtained, the electronic system can be controlled to remain in a working state through the second interface corresponding to the wake-up lock resource, and the corresponding wake-up lock resource can be obtained through the second interface corresponding to the wake-up lock resource. When a resource request instruction for obtaining a memory resource is obtained, the electronic system can be controlled to remain in a working state through the second interface corresponding to the memory resource, and the corresponding memory resource can be obtained through the second interface corresponding to the memory resource. Optionally, the resource type can be divided based on the electronic system. For example, the resource type may include: internal resources of the electronic system and external resources of the electronic system. When a resource request instruction for requesting internal resources of the electronic system is obtained, the electronic system can be controlled to remain in a working state through the second interface corresponding to the internal resources of the electronic system, and the corresponding internal resources can be obtained through the second interface corresponding to the internal resources of the electronic system. When a resource request instruction for requesting external resources of the electronic system is obtained, the electronic system can be controlled to remain in a working state through the second interface corresponding to the external resources of the electronic system, and the corresponding external resources can be obtained through the second interface corresponding to the external resources of the electronic system.
[0156] Wherein, in an embodiment of the present application, the electronic system may include an interface (i.e., a second interface), when the resource request instruction includes multiple resource request instructions of the electronic system. Wherein, the multiple resource request instructions may include, but are not limited to, multiple resource request instructions of the first module, a resource request instruction of the first module and a resource request instruction of the second module, a resource request instruction of the first module and multiple resource request instructions of the second module, and multiple resource request instructions of the first module and multiple resource request instructions of the second module. One or more. Wherein, the first module and the second module are different. When the electronic system obtains multiple resource request instructions, the electronic system can control the electronic system in sequence based on the sorting index of each resource request instruction to obtain the corresponding resources. Wherein, the sorting index of the resource request instruction can be used to indicate the processing order of the resource request instruction. For example, when multiple resource request instructions include resource request instructions of a first module and resource request instructions of a second module, the electronic system can obtain the ranking index of the resource request instruction of the first module and the ranking index of the resource request instruction of the second module. If the ranking index of the resource request instruction of the first module is higher than the ranking index of the resource request instruction of the second module, the electronic system is first controlled through the second interface based on the resource request instruction of the first module so that the first module obtains resources, and then the electronic system is controlled through the second interface based on the resource request instruction of the second module so that the second module obtains resources. The specific implementation method can be referred to the relevant embodiments of S202, which will not be repeated here.
[0157] Furthermore, when the service in the electronic system has been completed, in order to save power consumption and extend the use time, resources can also be released to enter a sleep state. That is, a resource release instruction is obtained, and the resource release instruction comes from one or more resource release modules in the electronic system. Based on the resource release instruction, the electronic system is controlled to remain in a sleep state through the second interface. The specific implementation method can be referred to the relevant embodiment of releasing the wake-up lock resource mentioned above, and this application will not elaborate on this.
[0158] Based on the above description, it can be seen that the electronic system can switch between the sleep state and the working state. Figure 5a , Figure 5a A state transition diagram of an electronic system is shown. Figure 5a As shown, “IDLE” can be used to indicate the sleep state of the electronic system, and “BUSY” can be used to indicate the working state of the electronic system.
[0159] 511. When the electronic system obtains a resource request instruction, the electronic system switches from a sleep state to a working state.
[0160] 512. When the electronic system obtains a resource release instruction, the electronic system switches from a working state to a sleeping state.
[0161] Optionally, since the release and request of resources are relatively time-consuming, releasing resources too timely may result in low resource utilization. In order to effectively improve the utilization of resources, the resource release instruction can be set as a delayed release instruction. In one embodiment, when the resource release instruction is obtained, the electronic system is controlled to remain in a standby state and the second timer is started. When the timing duration of the second timer reaches the second timeout duration, the electronic system is controlled to remain in a sleep state through the second interface, and the resources are released (or the resources are controlled to remain in a sleep state through the second interface, the second timer is turned off and the resources are released). When the timing duration of the second timer is less than the second timeout duration, the electronic system is controlled to remain in a standby state through the second interface, which can avoid releasing resources immediately when receiving the resource release instruction and entering a sleep state. Can avoid excessive and timely release of resources, effectively improve the utilization of resources. Wherein, the second timeout duration can be set according to experience or business needs.
[0162] It should be noted that when the resource request instruction is obtained again, the electronic system can control the electronic system to remain in the working state through the second interface based on the resource request instruction. Optionally, when the resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration (that is, the resource is in the standby state), the electronic system can turn off the second timer and control the electronic system through the second interface based on the resource request instruction, so that the electronic system is in the working state. Specifically, when the timing duration of the second timer is less than the second timeout duration, the resource is in the standby state. At this time, if the resource request instruction is obtained, the electronic system turns off the second timer and controls the resource to remain in the working state through the second interface. Optionally, when the timing duration of the second timer reaches the second timeout duration, the resource is in the sleep state. At this time, if the resource request instruction is obtained, the resource is controlled to be converted from the sleep state to the working state through the second interface.
[0163] Further, the second indication information may be used to indicate the state of the electronic system, and the second indication information includes but is not limited to one or more of a bitmap or a string. In one embodiment, the second indication information may be a bitmap. When the second indication information is a fourth bitmap, the electronic system is in a sleep state. When the second indication information is a fifth bitmap, the electronic system is in a standby state, and when the second indication information is a sixth bitmap, the electronic system is in a working state. Among them, the fourth bitmap, the fifth bitmap, and the sixth bitmap mentioned above refer to different bitmaps, for example, the fourth bitmap may be "00", the fifth bitmap may be "01", and the sixth bitmap may be "10"; this application does not limit this. In another embodiment, the second indication information may also be a string. When the second indication information is a fourth string, the electronic system is in a sleep state. When the second indication information is a fifth string, the electronic system is in a standby state, and when the second indication information is a sixth string, the electronic system is in a working state. The fourth character string, the fifth character string and the sixth character string mentioned above refer to different character strings. For example, the fourth character string may be "IDLE", the fifth character string may be "WAIT TO IDLE" and the sixth character string may be "BUSY".
[0164] Based on the above description, it can be seen that the electronic system can switch between the sleep state, standby state and working state. Figure 5b , Figure 5b Another state transition diagram of an electronic system is shown. Figure 5b As shown, “IDLE” can be used to indicate the sleep state of the electronic system, “WAIT TO IDLE” can be used to indicate the standby state of the electronic system, and “BUSY” can be used to indicate the working state of the electronic system.
[0165] 521. When the electronic system obtains a resource request instruction, the electronic system switches from a sleep state (IDLE) to a working state (BUSY).
[0166] 522. When the electronic system obtains the resource release instruction, the second timer is started to control the electronic system to switch from the working state (BUSY) to the standby state (WAIT TO IDLE).
[0167] 523. When the timing duration of the second timer is less than the second timeout duration (i.e., the electronic system is in standby mode), a resource request instruction is obtained, the second timer is turned off, and the electronic system is controlled to switch from the standby mode (WAIT TO IDLE) to the working mode (BUSY).
[0168] 524. When the timing duration of the second timer reaches the second timeout duration and no resource request instruction is obtained, control the electronic system to switch from the standby state (WAIT TO IDLE) to the sleep state (IDLE).
[0169] In an embodiment of the present application, the electronic system can obtain a resource request instruction from one or more modules requesting resources in the electronic system, and control the electronic system to maintain a working state through the second interface based on the resource request instruction. The state of the electronic system is not bound to the wake-up lock resource. When the electronic system obtains a resource request instruction requesting any resource, it can control the electronic system to maintain a working state through the second interface based on the resource request instruction, which can more conveniently control the state of the electronic system.
[0170] It should be noted that in some embodiments, Figure 4 The electronic system control method shown can be implemented separately. In some other embodiments, Figure 4 The electronic system control method shown can also be used with Figure 2 For example, the electronic system may first execute Figure 2 The electronic system control method shown in FIG. Figure 4 For another example, the electronic system may first execute Figure 4 The electronic system control method shown in FIG. Figure 2 For example, the electronic system can also execute Figure 2 The electronic system control method shown is Figure 4 The electronic system control method shown is not limited in the embodiments of the present application.
[0171] In one embodiment, the electronic system control method described in the embodiment of the present application can be specifically executed by a management unit in the electronic system. Figure 6 , Figure 6 FIG. 1 shows a schematic diagram of another electronic system. Figure 6 As shown, the electronic system may include a modem loader, an inter-process communication module, an IP accelerator module, a management unit, a wake-up lock, and resources. The modem loader communicates with the management unit via an interface 631, the inter-process communication module communicates with the management unit via an interface 632, and the IP accelerator module communicates with the management unit via an interface 633. The management unit communicates with the wake-up lock via a first interface (i.e., the management unit can control the wake-up lock via the first interface), and the management unit communicates with the resources via a second interface (i.e., the management unit can obtain resources via the second interface).
[0172] In one embodiment, when the interface 631 is in an on-state, the management unit can obtain a wake-up lock request instruction from the loader of the modem, and control the wake-up lock to remain in a working state through the first interface to obtain the wake-up lock resources. In another embodiment, when the interface 631 is in an on-state, the management unit can obtain a wake-up lock release instruction from the loader of the modem, and control the wake-up lock to remain in a sleep state through the first interface to release the wake-up lock resources. In addition, in one embodiment, when the interface 631 is in an on-state, the management unit can obtain a resource request instruction from the loader of the modem, and obtain resources through the second interface based on the resource request instruction. In another embodiment, when the interface 631 is in an on-state, the management unit can obtain a resource release instruction from the loader of the modem, and release resources through the second interface based on the resource release instruction.
[0173] In one embodiment, when the interface 632 is in the on state, the management unit can obtain a wake-up lock request instruction from the inter-process communication module, and control the wake-up lock to remain in a working state through the first interface to obtain the wake-up lock resources. In another embodiment, when the interface 632 is in the on state, the management unit can obtain a wake-up lock release instruction from the inter-process communication module, and control the wake-up lock to remain in a sleep state through the first interface to release the wake-up lock resources. In addition, in one embodiment, when the interface 632 is in the on state, the management unit can obtain a resource request instruction from the inter-process communication module, and obtain resources through the second interface based on the resource request instruction. In another embodiment, when the interface 632 is in the on state, the management unit can obtain a resource release instruction from the inter-process communication module, and release resources through the second interface based on the resource release instruction.
[0174] In one embodiment, when the interface 633 is in an on state, the management unit can obtain a wake-up lock request instruction from the IP accelerator module, and control the wake-up lock to remain in a working state through the first interface to obtain the wake-up lock resource. In another embodiment, when the interface 633 is in an on state, the management unit can obtain a wake-up lock release instruction from the IP accelerator module, and control the wake-up lock to remain in a sleep state through the first interface to release the wake-up lock resource. In addition, in one embodiment, when the interface 633 is in an on state, the management unit can obtain a resource request instruction from the IP accelerator module, and obtain resources through the second interface based on the resource request instruction. In another embodiment, when the interface 633 is in an on state, the management unit can obtain a resource release instruction from the IP accelerator module, and release resources through the second interface based on the resource release instruction.
[0175] See also Figure 7 , Figure 71 is a schematic diagram of the structure of an electronic system control device according to an embodiment of the present application. The device may be an electronic system, or a device in an electronic system, or a device that can be used in conjunction with an electronic system. Figure 7 The electronic system control device shown may include an acquisition unit 701 and a control unit 702. Among them:
[0176] The acquisition unit 701 is used to acquire a wake-up lock request instruction, where the wake-up lock request instruction comes from one or more modules of the electronic system control device that request a wake-up lock resource;
[0177] The control unit 702 is used to control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0178] In some feasible implementations, the control unit 702 is configured to control the wake-up lock through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource, including:
[0179] Based on the wake-up lock request instruction, controlling the wake-up lock to maintain a working state through the first interface;
[0180] The first function is called to obtain a wake-up lock resource from a wake-up lock in a working state through a first interface, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0181] In some feasible implementations, the acquiring unit 701 is used to acquire the wake-up lock request instruction, including:
[0182] Obtain a wake-up lock request instruction from a first module requesting a wake-up lock resource, and / or obtain a wake-up lock request instruction from a second module requesting a wake-up lock resource.
[0183] In some feasible implementations, the control unit 702 is configured to control the wakeup lock through the first interface based on the wakeup lock request instruction, including:
[0184] Obtaining a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module;
[0185] If the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module.
[0186] In some feasible implementations, the control unit 702 is further configured to:
[0187] Acquire a wake-up lock release instruction, where the wake-up lock release instruction comes from one or more modules for releasing wake-up lock resources in the electronic system control device;
[0188] The wake-up lock is controlled through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources.
[0189] In some feasible implementations, the control unit 702 is configured to control the wake-up lock through the first interface based on the wake-up lock release instruction so that one or more modules holding the wake-up lock resource release the wake-up lock resource, including:
[0190] Based on the wake-up lock release instruction, controlling the wake-up lock to maintain a sleep state through the first interface;
[0191] The second function is called to release the wake-up lock resource of the module holding the wake-up lock resource through the first interface.
[0192] In some feasible implementations, the control unit 702 is configured to control the wakeup lock to maintain a sleep state through the first interface based on the wakeup lock release instruction, including:
[0193] When the wake-up lock release instruction is obtained, controlling the wake-up lock to maintain a standby state through the first interface and starting the first timer;
[0194] When the timing duration of the first timer reaches the first timeout duration, the wake-up lock is controlled through the first interface to maintain a sleep state.
[0195] In some feasible implementations, the control unit 702 is further configured to:
[0196] When a wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration, the first timer is turned off and the wake-up lock is controlled to remain in a working state through the first interface based on the wake-up lock request instruction.
[0197] In some feasible implementations, the control unit 702 is further configured to:
[0198] Obtaining a resource request instruction, the resource request instruction coming from one or more modules in the electronic system control device requesting any resource;
[0199] Based on the resource request instruction, the electronic system control device is controlled through the second interface to maintain the working state.
[0200] In some feasible implementations, the control unit 702 is used to control the electronic system control device to maintain a working state through the second interface based on the resource request instruction, including:
[0201] Based on the resource request instruction, controlling the electronic system control device through the second interface to keep the electronic system control device in working state;
[0202] The corresponding resource is obtained through the second interface.
[0203] In some feasible implementations, the control unit 702 is further configured to:
[0204] Acquire a resource release instruction, where the resource release instruction comes from one or more resource release modules in the electronic system control device;
[0205] Based on the resource release instruction, the electronic system control device is controlled to maintain a sleep state through the second interface.
[0206] In some feasible implementations, the control unit 702 is used to control the electronic system control device to maintain a sleep state through the second interface based on the resource release instruction, including:
[0207] When a resource release instruction is obtained, the electronic system control device is controlled to maintain a standby state and start a second timer;
[0208] When the timing duration of the second timer reaches the second timeout duration, the electronic system control device is controlled to maintain a sleep state through the second interface.
[0209] In some feasible implementations, the control unit 702 is further configured to:
[0210] When the resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration, the second timer is turned off and the electronic system control device is controlled to keep working through the second interface based on the resource request instruction.
[0211] In some feasible implementations, the control unit 702 is further configured to:
[0212] When the electronic system control device in the sleep state obtains the resource request instruction, the electronic system control device is controlled to maintain the working state.
[0213] According to one embodiment of the present application, Figure 2 or Figure 4 Each step involved in the method shown can be performed by Figure 7 The various units in the electronic system control device shown are executed. For example, Figure 2 The S201 shown consists of Figure 7 The acquisition unit 701 shown in FIG. 1 is executed, and S202 is performed by Figure 7 Executed by the electronic system control unit 702 shown in FIG. Figure 4 The S401 shown consists of Figure 7 The acquisition unit 701 shown in FIG. 4 is executed, and S402 is performed by Figure 7 The electronic system control unit 702 shown in FIG.
[0214] The electronic system control device may be, for example, a chip or a module device. The various units included in the various devices and products described in the above embodiments may be software units or hardware units, or may be partially software units and partially hardware units. For example, for each device or product applied to or integrated in a chip, each unit contained therein may be implemented in the form of hardware such as circuits, or at least some of the units may be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) units may be implemented in the form of hardware such as circuits; for each device or product applied to or integrated in a module device, each unit contained therein may be implemented in the form of hardware such as circuits, and different units may be located in the same component (e.g., chip, circuit unit, etc.) or different components of the module device, or at least some of the units may be implemented in the form of software programs, which run on a processor integrated inside the module device, and the remaining (if any) units may be implemented in the form of hardware such as circuits; for each device or product applied to or integrated in an electronic system, each unit contained therein may be implemented in the form of hardware such as circuits, and different units may be located in the same component (e.g., chip, circuit unit, etc.) or different components in the electronic system, or at least some of the units may be implemented in the form of software programs, which run on a processor integrated inside the electronic system, and the remaining (if any) units may be implemented in the form of hardware such as circuits.
[0215] According to another embodiment of the present application, the system can include a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and other processing elements and storage elements. For example, a general computing device such as a computer can execute the following operations: Figure 2 or Figure 4 A computer program (including program code) for each step involved in the corresponding method shown in Figure 7 The electronic system control device shown in the figure and the electronic system control method for implementing the embodiment of the present application. The computer program can be recorded on a computer-readable recording medium, for example, and loaded into the above-mentioned electronic system through the computer-readable recording medium and run therein.
[0216] In an embodiment of the present application, an acquisition unit in an electronic system control device can acquire a wake-up lock request instruction from one or more modules in the electronic system control device that request a wake-up lock resource, and a control unit in the electronic system control device can control the wake-up lock through a first interface based on the wake-up lock request instruction, so that one or more modules requesting a wake-up lock resource hold the wake-up lock resource. It can be seen that the wake-up lock request instruction of one or more modules requesting a wake-up lock resource is used to control a wake-up lock to obtain a wake-up lock resource, which can avoid an increase in the number of wake-up locks. In addition, different modules control the wake-up lock through the same first interface, which can avoid the complexity of the types of interfaces of the wake-up lock.
[0217] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic system provided in an embodiment of the present application. The electronic system includes: a processor 801 and a memory 802 , wherein the processor 801 and the memory 802 are connected via one or more communication buses 803 .
[0218] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor 801 is configured to support the electronic system to execute the corresponding functions of the electronic system in the aforementioned electronic system control method.
[0219] The memory 802 may include a read-only memory and a random access memory, and provide computer programs and data to the processor 801. A portion of the memory 802 may also include a non-volatile random access memory. When the processor 801 calls a computer program, it is used to execute:
[0220] Obtaining a wake-up lock request instruction, where the wake-up lock request instruction comes from one or more modules of the electronic system that request a wake-up lock resource;
[0221] The wake-up lock is controlled through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0222] In some feasible implementations, the processor 801 is configured to control the wake-up lock through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource, including:
[0223] Based on the wake-up lock request instruction, controlling the wake-up lock to maintain a working state through the first interface;
[0224] The first function is called to obtain a wake-up lock resource from a wake-up lock in a working state through a first interface, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0225] In some feasible implementations, the processor 801 is used to obtain a wake-up lock request instruction, including:
[0226] Obtain a wake-up lock request instruction from a first module requesting a wake-up lock resource, and / or obtain a wake-up lock request instruction from a second module requesting a wake-up lock resource.
[0227] In some feasible implementations, the processor 801 is configured to control the wakeup lock through the first interface based on the wakeup lock request instruction, including:
[0228] Obtaining a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module;
[0229] If the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module.
[0230] In some feasible implementations, the processor 801 is further configured to:
[0231] Obtaining a wake-up lock release instruction, where the wake-up lock release instruction comes from one or more modules in the electronic system that release wake-up lock resources;
[0232] The wake-up lock is controlled through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources.
[0233] In some feasible implementations, the processor 801 is configured to control the wake-up lock through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resource release the wake-up lock resource, including:
[0234] Based on the wake-up lock release instruction, controlling the wake-up lock to maintain a sleep state through the first interface;
[0235] The second function is called to release the wake-up lock resource of the module holding the wake-up lock resource through the first interface.
[0236] In some feasible implementations, the processor 801 is configured to control the wakeup lock to maintain a sleep state through the first interface based on the wakeup lock release instruction, including:
[0237] When the wake-up lock release instruction is obtained, controlling the wake-up lock to maintain a standby state through the first interface and starting the first timer;
[0238] When the timing duration of the first timer reaches the first timeout duration, the wake-up lock is controlled through the first interface to maintain a sleep state.
[0239] In some feasible implementations, the processor 801 is further configured to:
[0240] When a wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration, the first timer is turned off and the wake-up lock is controlled to remain in a working state through the first interface based on the wake-up lock request instruction.
[0241] In some feasible implementations, the processor 801 is further configured to:
[0242] Obtain a resource request instruction, where the resource request instruction comes from one or more modules in the electronic system that request any resource; and control the electronic system to maintain a working state through the second interface based on the resource request instruction.
[0243] In some feasible implementations, the processor 801 is configured to control the electronic system to maintain a working state through the second interface based on the resource request instruction, including:
[0244] Based on the resource request instruction, controlling the electronic system to maintain a working state through the second interface;
[0245] The corresponding resource is obtained through the second interface.
[0246] In some feasible implementations, the processor 801 is further configured to:
[0247] Obtaining a resource release instruction, where the resource release instruction comes from one or more resource release modules in the electronic system;
[0248] Based on the resource release instruction, the electronic system is controlled to maintain a sleep state through the second interface.
[0249] In some feasible implementations, the processor 801 is configured to control the electronic system to maintain a sleep state through the second interface based on the resource release instruction, including:
[0250] When a resource release instruction is obtained, the electronic system is controlled to remain in a standby state and a second timer is started;
[0251] When the timing duration of the second timer reaches the second timeout duration, the electronic system is controlled to maintain a sleep state through the second interface.
[0252] In some feasible implementations, the processor 801 is further configured to:
[0253] When the resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration, the second timer is turned off and the electronic system is controlled to keep working through the second interface based on the resource request instruction.
[0254] In some feasible implementations, the processor 801 is further configured to:
[0255] When the electronic system in the sleep state obtains the resource request instruction, the electronic system is controlled to keep in the working state.
[0256] In an embodiment of the present application, the electronic system can obtain a wake-up lock request instruction from one or more modules in the electronic system that request a wake-up lock resource, and can control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules that request a wake-up lock resource hold the wake-up lock resource. It can be seen that the wake-up lock request instruction of one or more modules that request a wake-up lock resource is used to control a wake-up lock to obtain a wake-up lock resource, which can avoid an increase in the number of wake-up locks. In addition, different modules control the wake-up lock through the same first interface, which can avoid the complexity of the interface types of the wake-up lock.
[0257] An embodiment of the present application provides a chip, which can execute the relevant steps of the electronic system in the aforementioned method embodiment.
[0258] The chip is used for:
[0259] Obtaining a wake-up lock request instruction, where the wake-up lock request instruction comes from one or more modules of the chip that request a wake-up lock resource;
[0260] The wake-up lock is controlled through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0261] In some feasible implementations, the chip is used to control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource, including:
[0262] Based on the wake-up lock request instruction, controlling the wake-up lock to maintain a working state through the first interface;
[0263] The first function is called to obtain a wake-up lock resource from a wake-up lock in a working state through a first interface, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0264] In some feasible implementations, the chip is used to obtain a wake-up lock request instruction, including:
[0265] Obtain a wake-up lock request instruction from a first module requesting a wake-up lock resource, and / or obtain a wake-up lock request instruction from a second module requesting a wake-up lock resource.
[0266] In some feasible implementations, the chip is used to control the wake-up lock through the first interface based on the wake-up lock request instruction, including:
[0267] Obtaining a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module;
[0268] If the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module.
[0269] In some feasible implementations, the chip is also used for:
[0270] Obtain a wake-up lock release instruction, where the wake-up lock release instruction comes from one or more modules in the chip that release wake-up lock resources;
[0271] The wake-up lock is controlled through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources.
[0272] In some feasible implementations, the chip is used to control the wake-up lock through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resource release the wake-up lock resource, including:
[0273] Based on the wake-up lock release instruction, controlling the wake-up lock to maintain a sleep state through the first interface;
[0274] The second function is called to release the wake-up lock resource of the module holding the wake-up lock resource through the first interface.
[0275] In some feasible implementations, the chip is used to control the wake-up lock to maintain a sleep state through the first interface based on the wake-up lock release instruction, including:
[0276] When the wake-up lock release instruction is obtained, controlling the wake-up lock to maintain a standby state through the first interface and starting the first timer;
[0277] When the timing duration of the first timer reaches the first timeout duration, the wake-up lock is controlled through the first interface to maintain a sleep state.
[0278] In some feasible implementations, the chip is also used for:
[0279] When a wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration, the first timer is turned off and the wake-up lock is controlled to remain in a working state through the first interface based on the wake-up lock request instruction.
[0280] In some feasible implementations, the chip is also used for:
[0281] Obtain resource request instructions, the resource request instructions come from one or more modules in the chip that request any resource;
[0282] Based on the resource request instruction, the chip is controlled through the second interface to maintain a working state.
[0283] In some feasible implementations, the chip is used to control the chip to maintain a working state through the second interface based on the resource request instruction, including:
[0284] Based on the resource request instruction, controlling the chip to maintain a working state through the second interface;
[0285] The corresponding resource is obtained through the second interface.
[0286] In some feasible implementations, the chip is also used for:
[0287] Obtain resource release instructions, where the resource release instructions come from one or more resource release modules in the chip;
[0288] Based on the resource release instruction, the chip is controlled to maintain a sleep state through the second interface.
[0289] In some feasible implementations, the chip is used to control the chip to maintain a sleep state through the second interface based on the resource release instruction, including:
[0290] When the resource release instruction is obtained, the control chip remains in a standby state and starts a second timer;
[0291] When the timing duration of the second timer reaches the second timeout duration, the chip is controlled to remain in the sleep state through the second interface.
[0292] In some feasible implementations, the chip is also used for:
[0293] When the resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration, the second timer is turned off and the chip is controlled to maintain a working state through the second interface based on the resource request instruction.
[0294] In some feasible implementations, the chip is also used for:
[0295] When the chip in the sleep state obtains a resource request instruction, the control chip remains in the working state.
[0296] In an embodiment of the present application, the chip can obtain a wake-up lock request instruction from one or more modules in the chip that request a wake-up lock resource, and control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules that request a wake-up lock resource hold the wake-up lock resource. It can be seen that the wake-up lock request instruction of one or more modules that request a wake-up lock resource is used to control a wake-up lock to obtain a wake-up lock resource, which can avoid an increase in the number of wake-up locks. In addition, different modules control the wake-up lock through the same first interface, which can avoid the complexity of the interface types of the wake-up lock.
[0297] The embodiment of the present application further provides a module device, the module device includes a processor and a communication interface, the processor is connected to the communication interface, the communication interface is used to send and receive signals, and the processor is used to:
[0298] Obtaining a wake-up lock request instruction, where the wake-up lock request instruction comes from one or more modules of the module device that request a wake-up lock resource;
[0299] The wake-up lock is controlled through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0300] In some feasible implementations, the processor is configured to control the wake-up lock through the first interface based on the wake-up lock request instruction so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource, including:
[0301] Based on the wake-up lock request instruction, controlling the wake-up lock to maintain a working state through the first interface;
[0302] The first function is called to obtain a wake-up lock resource from a wake-up lock in a working state through a first interface, so that one or more modules requesting the wake-up lock resource hold the wake-up lock resource.
[0303] In some feasible implementations, the processor is used to obtain a wake-up lock request instruction, including:
[0304] Obtain a wake-up lock request instruction from a first module requesting a wake-up lock resource, and / or obtain a wake-up lock request instruction from a second module requesting a wake-up lock resource.
[0305] In some feasible implementations, the processor is configured to control the wakeup lock through the first interface based on the wakeup lock request instruction, including:
[0306] Obtaining a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module;
[0307] If the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module.
[0308] In some feasible implementations, the processor is further configured to:
[0309] Obtaining a wake-up lock release instruction, where the wake-up lock release instruction comes from one or more modules in the module device that release wake-up lock resources;
[0310] The wake-up lock is controlled through the first interface based on the wake-up lock release instruction, so that one or more modules holding the wake-up lock resources release the wake-up lock resources.
[0311] In some feasible implementations, the processor is configured to control the wake-up lock through the first interface based on the wake-up lock release instruction so that one or more modules holding the wake-up lock resource release the wake-up lock resource, including:
[0312] Based on the wake-up lock release instruction, controlling the wake-up lock to maintain a sleep state through the first interface;
[0313] The second function is called to release the wake-up lock resource of the module holding the wake-up lock resource through the first interface.
[0314] In some feasible implementations, the processor is configured to control the wakeup lock to maintain a sleep state through the first interface based on the wakeup lock release instruction, including:
[0315] When the wake-up lock release instruction is obtained, controlling the wake-up lock to maintain a standby state through the first interface and starting the first timer;
[0316] When the timing duration of the first timer reaches the first timeout duration, the wake-up lock is controlled through the first interface to maintain a sleep state.
[0317] In some feasible implementations, the processor is further configured to:
[0318] When a wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration, the first timer is turned off and the wake-up lock is controlled to remain in a working state through the first interface based on the wake-up lock request instruction.
[0319] In some feasible implementations, the processor is further configured to:
[0320] Obtain resource request instructions, where the resource request instructions come from one or more modules in the module device that request any resource; and control the module device to maintain a working state through the second interface based on the resource request instructions.
[0321] In some feasible implementations, the processor is used to control the module device to maintain a working state through the second interface based on the resource request instruction, including:
[0322] Based on the resource request instruction, control the module device through the second interface to keep the working state;
[0323] The corresponding resource is obtained through the second interface.
[0324] In some feasible implementations, the processor is further configured to:
[0325] Obtain resource release instructions, where the resource release instructions come from one or more modules for releasing resources in the module device;
[0326] Based on the resource release instruction, the module device is controlled to maintain a sleep state through the second interface.
[0327] In some feasible implementations, the processor is used to control the module device to maintain a sleep state through the second interface based on the resource release instruction, including:
[0328] When a resource release instruction is obtained, the control module device maintains a standby state and starts a second timer;
[0329] When the timing duration of the second timer reaches the second timeout duration, the module device is controlled to remain in the sleep state through the second interface.
[0330] In some feasible implementations, the processor is further configured to:
[0331] When a resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration, the second timer is turned off and the module device is controlled to maintain a working state through the second interface based on the resource request instruction.
[0332] In some feasible implementations, the processor is further configured to:
[0333] When the module device in the sleep state obtains a resource request instruction, the module device is controlled to maintain a working state.
[0334] In an embodiment of the present application, the processor in the module device can obtain a wake-up lock request instruction from one or more modules in the module device that request a wake-up lock resource, and control the wake-up lock through the first interface based on the wake-up lock request instruction, so that one or more modules requesting a wake-up lock resource hold the wake-up lock resource. It can be seen that the wake-up lock request instruction of one or more modules requesting a wake-up lock resource is used to control a wake-up lock to obtain a wake-up lock resource, which can avoid an increase in the number of wake-up locks. In addition, different modules control the wake-up lock through the same first interface, which can avoid the complexity of the interface types of the wake-up lock.
[0335] The embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to implement the electronic system control method described in the embodiment of the present application, which will not be described in detail here.
[0336] The computer-readable storage medium may be an internal storage unit of the electronic system of any of the aforementioned embodiments, such as a hard disk or memory of the device. The computer-readable storage medium may also be an external storage device of the electronic system, such as a plug-in hard disk equipped on the device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic system and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic system. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0337] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0338] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. An electronic system control method, characterized in that: The method comprises: Obtaining a wake-up lock request instruction, where the wake-up lock request instruction comes from a plurality of modules requesting wake-up lock resources in the electronic system; Controlling the wake-up lock through the first interface based on the wake-up lock request instruction so that the multiple modules requesting the wake-up lock resource hold the wake-up lock resource; The obtaining wake-up lock request instruction includes: Obtaining a wake-up lock request instruction from a first module requesting a wake-up lock resource, and obtaining a wake-up lock request instruction from a second module requesting a wake-up lock resource; The first module and the second module are a loader, an inter-process communication module and an IP accelerator module in a modem.
2. The method according to claim 1, characterized in that The controlling the wake-up lock through the first interface based on the wake-up lock request instruction so that the multiple modules requesting the wake-up lock resource hold the wake-up lock resource includes: Based on the wake-up lock request instruction, controlling the wake-up lock to keep in working state through the first interface; Calling a first function to obtain a wake-up lock resource from a wake-up lock in a working state through the first interface, so that the multiple modules requesting the wake-up lock resource hold the wake-up lock resource.
3. The method according to claim 1 or 2, characterized in that The controlling the wake-up lock through the first interface based on the wake-up lock request instruction includes: Obtaining a ranking index of the wake-up lock request instruction of the first module and a ranking index of the wake-up lock request instruction of the second module; If the sorting index of the wake-up lock request instruction of the first module is higher than the sorting index of the wake-up lock request instruction of the second module, the wake-up lock is first controlled through the first interface based on the wake-up lock request instruction of the first module, and then the wake-up lock is controlled through the first interface based on the wake-up lock request instruction of the second module.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: Acquire a wake-up lock release instruction, where the wake-up lock release instruction comes from a plurality of modules for releasing wake-up lock resources in the electronic system; The wake-up lock is controlled through the first interface based on the wake-up lock release instruction, so that multiple modules holding the wake-up lock resources release the wake-up lock resources.
5. The method according to claim 4, characterized in that The controlling the wake-up lock through the first interface based on the wake-up lock release instruction so that the multiple modules holding the wake-up lock resources release the wake-up lock resources includes: Based on the wake-up lock release instruction, controlling the wake-up lock to remain in a sleep state through the first interface; Calling a second function to release the wake-up lock resources of the module holding the wake-up lock resources through the first interface.
6. The method according to claim 5, characterized in that The controlling the wake-up lock to maintain a sleep state through the first interface based on the wake-up lock release instruction includes: When the wake-up lock release instruction is obtained, controlling the wake-up lock to remain in a standby state through the first interface and starting a first timer; When the timing duration of the first timer reaches a first timeout duration, the wake-up lock is controlled to remain in a sleep state through the first interface.
7. The method according to claim 6, characterized in that The method further comprises: When the wake-up lock request instruction is obtained when the timing duration of the first timer is less than the first timeout duration, the first timer is turned off and the wake-up lock is controlled to remain in a working state through the first interface based on the wake-up lock request instruction.
8. The method according to claim 1 or 2, characterized in that: The method comprises: Obtaining a resource request instruction, where the resource request instruction comes from a plurality of modules in the electronic system that request any resource; Based on the resource request instruction, the electronic system is controlled through the second interface to keep in working state.
9. The method according to claim 8, characterized in that The controlling the electronic system to maintain a working state through the second interface based on the resource request instruction includes: Based on the resource request instruction, controlling the electronic system to keep working through the second interface; The corresponding resource is obtained through the second interface.
10. The method according to claim 8, characterized in that The method further comprises: Acquire a resource release instruction, where the resource release instruction comes from a plurality of resource release modules in the electronic system; Based on the resource release instruction, the electronic system is controlled to maintain a sleep state through the second interface.
11. The method according to claim 10, characterized in that The controlling the electronic system to maintain a sleep state through the second interface based on the resource release instruction includes: When the resource release instruction is obtained, controlling the electronic system to maintain a standby state and starting a second timer; When the timing duration of the second timer reaches a second timeout duration, the electronic system is controlled to maintain a sleep state through the second interface.
12. The method according to claim 11, characterized in that The method further comprises: When the resource request instruction is obtained when the timing duration of the second timer is less than the second timeout duration, the second timer is turned off and the electronic system is controlled to keep working through the second interface based on the resource request instruction.
13. The method according to claim 11, characterized in that The method further comprises: When the electronic system in the sleep state obtains the resource request instruction, the electronic system is controlled to maintain the working state.
14. An electronic system control device, characterized in that: The device comprises: an acquisition unit, configured to acquire a wake-up lock request instruction, wherein the wake-up lock request instruction comes from a plurality of modules requesting wake-up lock resources in the electronic system control device; a control unit, configured to control the wake-up lock through the first interface based on the wake-up lock request instruction, so that the multiple modules requesting the wake-up lock resource hold the wake-up lock resource; The acquiring unit acquires the wake-up lock request instruction, including: Obtaining a wake-up lock request instruction from a first module requesting a wake-up lock resource, and obtaining a wake-up lock request instruction from a second module requesting a wake-up lock resource; The first module and the second module are a loader, an inter-process communication module and an IP accelerator module in a modem.
15. An electronic system, characterized in that: The electronic system includes a processor and a memory, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the electronic system control method as described in any one of claims 1 to 13.
16. A chip, characterized in that: The chip is used to obtain a wake-up lock request instruction, where the wake-up lock request instruction comes from a plurality of modules in the chip that request wake-up lock resources; Controlling the wake-up lock through the first interface based on the wake-up lock request instruction so that the multiple modules requesting the wake-up lock resource hold the wake-up lock resource; The chip is used to obtain a wake-up lock request instruction, including: Obtaining a wake-up lock request instruction from a first module requesting a wake-up lock resource, and obtaining a wake-up lock request instruction from a second module requesting a wake-up lock resource; The first module and the second module are a loader, an inter-process communication module and an IP accelerator module in a modem.
17. A module device, characterized in that: The module device includes a processor and a communication interface, the processor is connected to the communication interface, the communication interface is used to send and receive signals, and the processor is used to: Obtaining a wake-up lock request instruction, where the wake-up lock request instruction comes from a plurality of modules requesting wake-up lock resources in the module device; Controlling the wake-up lock through the first interface based on the wake-up lock request instruction so that the multiple modules requesting the wake-up lock resource hold the wake-up lock resource; The obtaining wake-up lock request instruction includes: Obtaining a wake-up lock request instruction from a first module requesting a wake-up lock resource, and obtaining a wake-up lock request instruction from a second module requesting a wake-up lock resource; The first module and the second module are a loader, an inter-process communication module and an IP accelerator module in a modem.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the control method of the electronic system according to any one of claims 1 to 13.
