Module state control method and electronic equipment
By determining the target service sleep lock module based on the data to be run in a low-power device and controlling the module status, the module sleep error problem caused by the low power consumption threshold in the prior art is solved, and the module status control is improved Accuracy and business operation stability.
Patent Information
- Application Number
- CN202411307354.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-19
AI Technical Summary
In existing low-power devices, when the module state is controlled based on the relationship between real-time power consumption and power consumption threshold, when the actual operating power consumption is less than the threshold, the module is prone to sleep incorrectly, resulting in the inability to operate the service and low accuracy.
The target service sleep lock module is determined through the data to be run in the service operation instructions, and the state of the to-process module in the low-power consumption device is controlled according to its module status, so as to avoid abnormal module sleep due to the actual power consumption being less than the threshold.
Improve the accuracy of module status control, ensure the normal operation of services in low-power devices, and avoid module sleep errors caused by low power consumption threshold.
Smart Images

Figure CN118819656B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of low-power device module control, and in particular to a module state control method and electronic device. Background Art
[0002] In the context of advocating energy conservation and emission reduction, low-power devices have become a hot topic in the industry, and more and more companies are choosing low-power devices. For example, in industries such as electricity, energy, and water conservancy, due to the working environment and power supply of the equipment, the wireless module of the equipment is often required to have low power consumption characteristics. The low-power characteristics reduce the overall dynamic and static power consumption of the wireless data transmission module or integrated circuit module to minimize the power loss of all devices, thereby reducing the overall power consumption and increasing the service life of the equipment. Among them, in order to ensure the characteristics of low-power devices without affecting the business operation of the equipment, the module status should be accurately controlled.
[0003] At present, the module state is usually controlled according to the size relationship between the real-time power consumption and the power consumption threshold in the low-power device, so as to maintain the characteristics of the low-power device. However, if the actual running power consumption of the service is less than the power consumption threshold, the module will mistakenly enter sleep mode, resulting in the inability to run the service whose actual running power consumption is less than the power consumption threshold. As a result, in actual applications, this method of controlling the module state according to the size relationship between the real-time power consumption and the power consumption threshold in the low-power device is not very accurate.
[0004] Therefore, a module state control method with higher accuracy is urgently needed. Summary of the invention
[0005] The present application at least provides a module state control method and electronic device, which can improve the accuracy of module state control.
[0006] The first aspect of the present application provides a module status control method, which is applied to a low-power device, wherein the low-power device includes a business sleep lock module and a module to be processed. The method includes: in response to receiving a business operation instruction, obtaining the data to be run in the business operation instruction; determining a target business sleep lock module according to the data type of the data to be run; and controlling the module status of each module to be processed in the low-power device according to the module status of the target business sleep lock module.
[0007] In one embodiment, the data type of the data to be run includes a first data type, and the step of determining the target business dormant lock module based on the data type of the data to be run includes: in response to the data type of the data to be run being the first data type, creating a business dormant lock module corresponding to the data to be run in the low-power device; and using the created business dormant lock module as the target business dormant lock module.
[0008] In one embodiment, the data type of the data to be run includes a second data type, and the step of determining the target business dormant lock module based on the data type of the data to be run includes: in response to the data type of the data to be run being the second data type, matching the data to be run with the business dormant lock module in the low-power device to obtain a matching result; in response to the matching result indicating that there is a matching business dormant lock module in the low-power device, using the matching business dormant lock module as the target business dormant lock module.
[0009] In one embodiment, the method further includes: in response to the matching result indicating that there is no matching business dormant lock module in the low-power device, creating a business dormant lock module corresponding to the data to be run in the low-power device; and using the created business dormant lock module as the target business dormant lock module.
[0010] In one embodiment, the module state includes an off state and an on state, and the step of controlling the module state of each module to be processed in the low-power device according to the module state of the target business sleep lock module includes: in response to the module state of the target business sleep lock module being in the on state, controlling the corresponding target module sleep lock in the low-power device to be turned on; controlling the module state of the module to be processed corresponding to the target module sleep lock to be in an active state and controlling other modules to be processed in the low-power device except the module to be processed corresponding to the target module sleep lock to remain in sleep state.
[0011] In one embodiment, the method also includes: in response to receiving a business operation end instruction, obtaining the data information to be processed in the business operation end instruction; the data information to be processed includes identification information of the business dormancy lock module to be processed; according to the identification information of the business dormancy lock module to be processed, determining the business dormancy lock module corresponding to the identification information from the business dormancy lock modules of the low-power device; and performing end-of-operation processing on the business dormancy lock module corresponding to the identification information.
[0012] In one embodiment, the method also includes: in response to detecting that a module state of a business dormant lock module exists in the low-power device and is in an on state, controlling the corresponding module dormant lock to be turned on and controlling the corresponding module to be processed to be in an active state; in response to detecting that a module state of a business dormant lock module does not exist in the low-power device and is in an on state, controlling the corresponding module dormant lock to be turned off and controlling the corresponding module to be processed to be in a dormant state.
[0013] In one embodiment, the step of terminating the operation of the business dormancy lock module corresponding to the identification information includes: obtaining historical operation data of the business dormancy lock module corresponding to the identification information; in response to the data type of the historical operation data being a first data type, releasing the business dormancy lock module corresponding to the identification information in the low-power device; in response to the data type of the historical operation data being a second data type, closing the business dormancy lock module corresponding to the identification information in the low-power device.
[0014] In one embodiment, the low-power device includes an observer interface, and also includes: in response to detecting an abnormality in the business dormancy lock module, obtaining module status information, identification information, lock type and business description information of the business dormancy lock module; and displaying the module status information, identification information, lock type and business description information of the business dormancy lock module through the observer interface.
[0015] A second aspect of the present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-mentioned module state control method.
[0016] The above scheme, in response to receiving a business operation instruction, obtains the data to be run in the business operation instruction; then determines the target business dormant lock module according to the data type of the data to be run; and then controls the module state of each module to be processed in the low-power device according to the module state of the target business dormant lock module. The corresponding target business dormant lock module is determined by the data to be run in the business operation instruction, and then the module state of each module to be processed is controlled according to the module state of the target business dormant lock module, so as to realize the control of the module state through the data to be run, avoid the abnormal dormancy of the module to be processed that should be active when running the data to be run because the actual power consumption of the low-power device is less than the power consumption threshold, and improve the control accuracy of the module state.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0019] Figure 1 is a structural schematic diagram of a low-power consumption device shown in an exemplary embodiment of the present application;
[0020] Figure 2 is a flowchart of a module state control method according to an exemplary embodiment of the present application;
[0021] Figure 3 yes Figure 2 A flow chart of an exemplary embodiment of step S120 in the module state control method is shown;
[0022] Figure 4 is a schematic diagram showing module information of a service dormant lock module according to an exemplary embodiment of the present application;
[0023] Figure 5 yes Figure 2 A flowchart of another exemplary embodiment of step S120 in the module state control method is shown;
[0024] Figure 6 yes Figure 2 A flow chart of an exemplary embodiment of step S130 in the module state control method is shown;
[0025] Figure 7 is a schematic diagram of a module state control process when the waiting-to-run data is running, shown in an exemplary embodiment of the present application;
[0026] Figure 8 is a flowchart of another exemplary embodiment of the present application showing a method for controlling a module state;
[0027] Fig. 9 is a flowchart of a module state control method according to another exemplary embodiment of the present application;
[0028] Fig.10 yes Figure 8 A flowchart of an exemplary embodiment of step S830 in the module state control method is shown;
[0029] Fig.11 is a schematic diagram of a module state control process for finishing the operation of data information to be processed according to an exemplary embodiment of the present application;
[0030] Fig.12 is a simplified structural diagram of a low-power consumption device shown in another exemplary embodiment of the present application;
[0031] Fig.13 is a schematic diagram of a flow chart of displaying detection results on an observer interface according to an exemplary embodiment of the present application;
[0032] Fig.14 is a block diagram of a module state control device shown in an exemplary embodiment of the present application;
[0033] Fig.15 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0034] Fig.16It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0035] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0036] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0037] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, and can mean including any one or more elements selected from the set consisting of A, B, and C.
[0038] First of all, it should be noted that in the context of advocating energy conservation and emission reduction, low-power devices have become a hot topic in the industry, and more and more companies are choosing low-power devices. For example, in industries such as electricity, energy, and water conservancy, due to the working environment and power supply of the equipment, the wireless module of the equipment is often required to have low power consumption characteristics. The low-power characteristics reduce the overall dynamic and static power consumption of the wireless data transmission module or integrated circuit module to minimize the power loss of all devices, thereby reducing the overall power consumption and increasing the service life of the equipment. Among them, in order to ensure the characteristics of low-power devices without affecting the business operation of the equipment, the module status should be accurately controlled.
[0039] At present, the module state is usually controlled according to the size relationship between the real-time power consumption and the power consumption threshold in the low-power device, so as to maintain the characteristics of the low-power device. However, if the actual running power consumption of the service is less than the power consumption threshold, the module will mistakenly enter sleep mode, resulting in the inability to run the service whose actual running power consumption is less than the power consumption threshold. Therefore, it can be seen that the method of controlling the module state according to the size relationship between the real-time power consumption and the power consumption threshold in the low-power device is not very accurate.
[0040] Based on this, in order to improve the accuracy of module state control, the present application proposes a module state control method and electronic device. The present application determines the corresponding target business dormant lock module through the to-be-run data in the business operation instruction, and then controls the module state of each to-be-processed module according to the module state of the target business dormant lock module, thereby realizing the control of the module state through the to-be-run data, avoiding the abnormal dormancy of the module due to the actual power consumption of the low-power device being less than the power consumption threshold when the to-be-run data is run, and improving the control accuracy of the module state.
[0041] The module state control method provided in this application is applied to low-power devices. For example, the low-power devices can be Bluetooth headsets, smart watches, Bluetooth speakers, mobile phones, computers, etc. For details, please refer to Figure 1 , Figure 1 Schematic diagram of the simplified structure of the low power consumption device in the embodiment of the present application. Figure 1 As shown, the low-power device includes multiple business sleep lock modules and multiple module sleep locks, such as Figure 1 The business dormant lock module 1, business dormant lock module 2, business dormant lock module N, module dormant lock 1, module dormant lock 2, and module dormant lock M are shown in . Among them, each business dormant lock module includes a closing operation and an opening operation. The business dormant lock module is used to control the dormancy and activity of the business. When the business dormant lock module is closed, the business does not run. When the business dormant lock module is opened, the business runs. The business dormant lock module can be a switch, a lock, etc. The state of the module dormant lock is determined based on the module state of the business dormant lock module. Each module dormant lock includes a closing operation and an opening operation, which are used to open and close the module dormant lock respectively. When the module dormant lock is opened, the module is in an active state, and when the module dormant lock is closed, the module is in a dormant state.
[0042] It should be further explained that the low-power device may also include a module to be processed that supports business operation. The module to be processed is a module that supports business operation, which can be controlled according to the state of the module sleep lock. For example, the module to be processed may be a fill light module, a sensor module, an audio module, a wireless module, an intelligent module, a thermal imaging module, etc.
[0043] In one embodiment, the service is audio data to be played, the service dormant lock module may be a switch for controlling the audio data playback, and the corresponding module to be processed may be an audio module supporting audio data playback, such as a player and a database for storing audio data.
[0044] Specifically, if Figure 2 As shown, the module state control method of this embodiment includes the following steps:
[0045] Step S110, in response to receiving the service operation instruction, obtaining the to-be-operated data in the service operation instruction.
[0046] Business operation instructions can be generated based on human operations. Exemplarily, a user clicks on the music play button of a low-power device, and the low-power device receives the user's click operation and generates a music play instruction, which is a business operation instruction. It should be further explained that the business operation instruction can also be automatically generated. Exemplarily, it can be generated by the operating layer of the low-power device, or it can be generated by the application layer of the low-power device. Exemplarily, a user clicks on the music play button of a low-power device, and the operating layer of the low-power device receives the user's click operation and generates a music play instruction, which is a business operation instruction.
[0047] The data to be run can be independent running data or continuous running data. The service of independent running data is run only once, while the service of continuous running data is run more than once. Independent running data can be birthday reminder service, etc. Continuous running data can be temperature regular collection service, music loop playback service, etc.
[0048] The data to be run can also be asynchronous running data or synchronous running data. Synchronous running data can be data that waits for feedback from the other end after the service on one end starts the data running. Exemplarily, the synchronous running data can be a noun query service. For example, the client sends a noun query request to the server. The server accepts the noun query request, and performs noun query processing based on the noun query request to obtain the noun query result, and then sends the noun query result to the client. The client receives the noun query result and displays the noun query result. Asynchronous running data is data processed on a single end. Exemplarily, the asynchronous running data can be a memo filling service.
[0049] In one embodiment, in response to a service operation instruction issued by a user, the low power consumption device receives the service operation instruction.
[0050] Step S120: determining a target service dormant lock module according to the data type of the data to be executed.
[0051] The data type of the data to be run includes a first data type and a second data type. The first data type is used to represent a single run of a service, such as independent run data and asynchronous run data. The second data type is used to represent multiple runs of a service, such as continuous run data and synchronous run data.
[0052] The target service dormant lock module may be a service dormant lock module determined from service dormant lock modules of low-power devices, or may be a newly created service dormant lock module.
[0053] The low-power device determines the target business dormant lock module according to the data type of the data to be run. In one embodiment, the business dormant lock module corresponding to the data type of the data to be run can be found from the preset mapping table, and the preset business dormant lock module found is determined as the target business dormant lock module. Among them, the preset mapping table includes the correspondence between the data type of the preset running data and the preset business dormant lock module. In another embodiment, the target business dormant lock module can also be created according to the data type of the data to be run.
[0054] Step S130 , controlling the module status of each to-be-processed module in the low-power device according to the module status of the target service dormant lock module.
[0055] The module status includes a closed state and an open state. In actual applications, when the data to be run is running, the corresponding target business dormant lock module is in an open state; when the data to be run is not running, the corresponding target business dormant lock module is in a closed state.
[0056] The module status includes the dormant status and the active status. When the module to be processed is in the dormant status, the module to be processed does not work, and the services supported by the module to be processed cannot be run. When the module to be processed is in the active status, the services supported by the module to be processed can be run.
[0057] The low-power device controls the module state of each module to be processed in the low-power device according to the module state of the target business dormant lock module. Exemplarily, when the module state of the target business dormant lock module is on, the business demand representing the data to be run is running, and the module state of the module to be processed in the low-power device is controlled to be active.
[0058] The low-power device includes at least one module to be processed. Exemplarily, when there is only one module to be processed in the low-power device, the module state of the module to be processed is directly controlled according to the module state of the target sleep lock module. In another exemplary embodiment, when there are at least two modules to be processed in the low-power device, the module state of a module to be processed corresponding to the target business sleep lock module can be controlled according to the module state of the target business sleep lock module, and the module states of multiple modules to be processed corresponding to the target business sleep lock module can also be controlled according to the module state of the target business sleep lock module.
[0059] It can be seen that the module state control method of the embodiment of the present application determines the corresponding target business dormant lock module through the data to be run in the business operation instruction, and then controls the module state of each module to be processed according to the module state of the target business dormant lock module, thereby realizing the control of the module state through the data to be run, avoiding the abnormal dormancy of the module to be processed that should be active when running the data to be run because the actual power consumption of the low-power device is less than the power consumption threshold, thereby improving the control accuracy of the module state.
[0060] Based on the above examples, please continue to refer to Figure 3 , Figure 3 1 is a flowchart of an exemplary embodiment of step S120 in the module state control method of the present application. Specifically, the process of step S120 determining the target service dormant lock module according to the data type of the data to be run includes the following steps:
[0061] Step S310 , in response to the data type of the to-be-executed data being the first data type, a service dormant lock module corresponding to the to-be-executed data is created in the low-power consumption device.
[0062] The low-power device determines that the data type of the data to be run is the first data type, and then creates a service dormant lock module corresponding to the data to be run in the low-power device. Further, the low-power device obtains module information of the created service dormant lock module. For details, please refer to Figure 4 , Figure 4 The module information of the created business dormant lock module is shown in FIG. The module information may include identification information, lock type, state information, business description information, and operation information. The operation information includes a closing operation and an opening operation.
[0063] The identification information is used to represent the identity of the business dormant lock module, such as an identification ID (Identification, identity proof), a QR code, etc.
[0064] The lock type includes a first lock type and a second lock type. Among them, the lock type of the business dormant lock module corresponding to the to-be-run data of the first data type is the first lock type. The business dormant lock module of the first lock type is used to perform an opening operation when the business is running; and to perform a release operation at the end of the business operation. The released business dormant lock module cannot be used anymore. The lock type of the business dormant lock module corresponding to the to-be-run data of the second data type is the second lock type. The business dormant lock module of the second lock type is used to perform an opening operation when the business is running; and to perform a closing operation at the end of the business operation. The business dormant lock module of the second lock type can be reused continuously.
[0065] The status information is the module status of the service dormant lock module, and the status information may be a closed state or an open state.
[0066] The business description information includes the abnormal situation of the business and the corresponding processing method of the abnormal situation of the business. For example, the business description information includes the abnormal information of the business operation time and the abnormal information of the business operation frequency. The abnormal information of the business operation time includes the abnormal range of the operation time. The abnormal information of the business operation frequency includes the abnormal range of the operation frequency. The corresponding processing method of the abnormal situation of the business can be to force the business to sleep when the business operation time is abnormal; or to send a business abnormal message to the preset client when the business operation frequency is abnormal.
[0067] Step S320: Use the created business dormant lock module as the target business dormant lock module.
[0068] The low-power device uses the created service dormant lock module as the target service dormant lock module.
[0069] It can be seen that the module state control method of the embodiment of the present application creates a business dormant lock module corresponding to the data to be run in the low-power device in response to the data type of the data to be run being the first data type; and uses the created business dormant lock module as the target business dormant lock module. Thus, the corresponding target business dormant lock module is determined by the data to be run in the business operation instruction, and then the module state of each module to be processed is controlled according to the module state of the target business dormant lock module, so as to realize the precise control of the module state through the data to be run.
[0070] Based on the above examples, please continue to refer to Figure 5 , Figure 5 1 is a flow chart of another exemplary embodiment of step S120 in the module state control method of the present application. Specifically, the process of step S120 determining the target service dormant lock module according to the data type of the data to be run includes the following steps:
[0071] Step S510 , in response to the data type of the to-be-executed data being the second data type, matching the to-be-executed data with the service dormant lock module in the low-power consumption device to obtain a matching result.
[0072] The matching result includes that the service dormant lock module matching the data to be run does not exist in the low-power device and that the service dormant lock module matching the data to be run exists in the low-power device.
[0073] The low-power device determines that the data type of the data to be run is the second data type, and then matches the data to be run with the service dormancy lock module in the low-power device to obtain a matching result. In response to the matching result indicating that there is a matching service dormancy lock module in the low-power device, step S520 is executed; in response to the matching result indicating that there is no matching service dormancy lock module in the low-power device, step S530 is executed.
[0074] For the matching method, the low-power device can determine the matching result based on the data similarity between the data to be run and the historical running data. Specifically, the low-power device calculates the data similarity between the data to be run and the historical data, and determines the historical target data when the data similarity is greater than the similarity threshold; the matching result is determined according to the business dormant lock module that has run the historical target running data. The low-power device can also match the identification ID in the data to be run with the identification ID of the business dormant lock module in the low-power device to determine the matching result. Specifically, the low-power device searches for the identification ID of the business dormant lock module in the low-power device according to the identification ID in the data to be run. If the identification ID of the business dormant lock module that is consistent with the identification ID of the data to be run is found, the business dormant lock module corresponding to the found identification ID is determined as the matching result.
[0075] Step S520 : In response to the matching result indicating that there is a matching service dormant lock module in the low-power device, the matching service dormant lock module is used as a target service dormant lock module.
[0076] When the matching result is that there is a matching business dormant lock module in the low-power device, it means that the data to be run has created a business dormant lock module, and the matched business dormant lock module can be used as the target dormant lock module corresponding to the data to be run.
[0077] Step S530 , in response to the matching result indicating that there is no matching service dormant lock module in the low-power device, a service dormant lock module corresponding to the data to be run is created in the low-power device.
[0078] When the matching result is that there is no matching service dormant lock module in the low-power device, it means that the data to be run has no corresponding service dormant lock module, and then a service dormant lock module corresponding to the data to be run is created in the low-power device.
[0079] Step S540: Use the created service dormant lock module as the target service dormant lock module.
[0080] It can be seen that the module state control method of the embodiment of the present application adopts a processing method of directly matching the data to be run with the business dormant lock module to determine the target business dormant lock module for the data type of the data to be run that is the second data type. On the one hand, for the data to be run for which a business dormant lock module has been created, the matched business dormant lock module is used as the target business dormant lock module corresponding to the data to be run, which not only saves the step of recreating the business dormant lock module, but also avoids the error situation where one data to be run corresponds to multiple business dormant lock modules. On the other hand, for the case where the data to be run has not been run and the corresponding business dormant lock module has not been created, and the matching result is that there is no matching business dormant lock module in the low-power device, then the target business dormant lock module is created in the low-power device to ensure that the data to be run has a corresponding business dormant lock module, so that the data to be run can control the module state of the module to be processed through the business dormant lock module.
[0081] Based on the above embodiment, the embodiment of the present application elaborates in detail how to control the module status of each module to be processed in the low-power device in step S130, such as Figure 6 As shown, the process of controlling the module state of each to-be-processed module in the low-power device according to the module state of the target service dormant lock module in step S130 includes the following steps:
[0082] Step S610 , in response to the module state of the target service sleep lock module being in the open state, controlling the corresponding target module sleep lock in the low power consumption device to perform an open process.
[0083] When the low-power device determines that the module state of the target business sleep lock module is in the open state, the low-power device controls the corresponding target module sleep lock in the low-power device to perform an open process. Exemplarily, when the low-power device determines that the module state of the target business sleep lock module is in the open state, it sends an open instruction Lock to the target module sleep lock. The target module sleep lock performs an open operation based on the received open instruction.
[0084] Step S620 , controlling the module state of the to-be-processed module corresponding to the target module sleep lock to be in an active state and controlling other to-be-processed modules in the low-power device except the to-be-processed module corresponding to the target module sleep lock to remain in sleep state.
[0085] Other modules to be processed refer to modules to be processed in the low-power device other than the modules to be processed corresponding to the sleep lock of the target module. When the low-power device determines that the module state of the sleep lock module of the target business is in the on state, the module state of the module to be processed corresponding to the sleep lock of the target module is controlled to be in the active state and other modules to be processed are controlled to remain in the sleep state. Exemplarily, when the low-power device determines that the module state of the sleep lock module of the target business is in the on state, it sends an on instruction Lock to the sleep lock of the target module, and the low-power device sends a off instruction Unlock to the sleep lock of other modules. The sleep lock of the target module performs an on operation based on the received on instruction, thereby controlling the module state of the module to be processed corresponding to the sleep lock of the target module to be in the active state. The sleep lock of other modules performs a off operation based on the received off instruction, thereby controlling the module state of the module to be processed corresponding to the sleep lock of other modules to be in the sleep state.
[0086] It can be seen that the module state control method of the embodiment of the present application controls the corresponding target module sleep lock in the low-power device to start processing in response to the module state of the target business sleep lock module being in the open state; controls the module state of the to-be-processed module corresponding to the target module sleep lock to be in the active state and controls other to-be-processed modules in the low-power device except the to-be-processed module corresponding to the target module sleep lock to remain in sleep. Thus, when the target business sleep lock module corresponding to the to-be-run data is in the open state, except for the target to-be-processed module corresponding to the target business sleep lock module being in the active state, other to-be-processed modules in the low-power device remain in sleep, which is beneficial to reducing the power consumption of the low-power device.
[0087] As an example, in order to explain the module state control method of the present application in detail, please refer to Figure 7 . Figure 7 The figure shows the module status control process when the waiting data is running. Figure 7As shown, the low-power device includes an application layer, a business dormant lock module management unit, and a module dormant lock. The application layer is used for business operation, that is, the operation of the data to be run, and the business dormant lock module management unit includes multiple business dormant lock modules. When the application layer business of the low-power device is running, the application layer determines whether the data to be run is an independent event. If so, the application layer sends an invalid identification ID to the business dormant lock module management unit. After receiving the invalid identification ID, the business dormant lock module management unit creates a business dormant lock module, controls the business dormant lock module to perform an opening operation, and sets the identification ID of the business dormant lock module, and feeds back the identification ID of the created business dormant lock module to the application layer. If not, the application layer sends the information that the data to be run is not an independent event to the business dormant lock module management unit. After receiving the information that the data to be run is not an independent event, the business dormant lock module management unit determines whether there is a corresponding business dormant lock module for the data to be run. If so, the business dormant lock module corresponding to the data to be run is controlled to perform an opening operation. If not, the business dormant lock module management unit creates a business dormant lock module and controls the business dormant lock module to perform an opening operation. The business dormant lock module management unit records the module information of the created business dormant lock module. After the low-power device determines the business dormant lock module corresponding to the data to be run in the above manner, the business dormant lock module management unit in the low-power device determines whether the module dormant lock is in the on state; if so, the program is terminated; otherwise, the business dormant lock module management unit controls the module dormant lock to be turned on to ensure that the module to be processed is in an active state.
[0088] It can be seen that the module state control method of the embodiment of the present application runs the data to be run at the application layer, and the business dormant lock module management unit determines the business dormant lock module corresponding to the data to be run, and controls the business dormant lock module to open the operation, and controls the module dormant lock to be in the open state to ensure that the module to be processed is in an active state, so that the data to be run will not be unable to run due to the error of the module to be processed. The accuracy of the module state control is improved. At the same time, it also allows the upper-layer application of the low-power device to focus on its own business and reduce the dependence on the module characteristics.
[0089] Based on the above examples, please continue to refer to Figure 8 , Figure 8 is a flow chart of another exemplary embodiment of the module state control method of the present application. Specifically, the module state control method of the embodiment of the present application further includes the following steps:
[0090] Step S810, in response to receiving the service operation end instruction, obtaining the to-be-processed data information in the service operation end instruction; the to-be-processed data information includes the identification information of the to-be-processed service dormant lock module.
[0091] The service operation end instruction can be generated according to human operation. Exemplarily, the user clicks on the low-power device to end the service, and the low-power device receives the user's click operation and generates a service operation end instruction. The service operation end instruction can also be automatically generated. Exemplarily, when the data information to be processed ends the operation of the application layer of the low-power device, the application layer is triggered to automatically generate the service operation end instruction, and the application layer sends the service operation end instruction to the service dormancy lock module management unit of the device.
[0092] The pending data information may include pending operation data and identification information of a pending service dormant lock module corresponding to the pending operation data. The pending service dormant lock module is used to control the dormancy and activity of the pending operation data. Exemplarily, the pending operation data may be an audio playback end service, an information retrieval end service, etc.
[0093] Step S820 : determining, according to the identification information of the service dormant lock module to be processed, from the service dormant lock modules of the low-power consumption device a service dormant lock module corresponding to the identification information.
[0094] The low-power device matches the identification information of the business dormant lock module to be processed with the identification information of the business dormant lock module in the low-power device, and obtains a business dormant lock module in the low-power device that matches the business dormant lock module to be processed. Exemplarily, the low-power device can calculate the identification similarity between the identification information of the business dormant lock module to be processed and the identification information of each business dormant lock module in the low-power device, and determine the business dormant lock module with an identification similarity greater than a preset similarity threshold as a matching business dormant lock module.
[0095] Step S830: End the operation of the service dormant lock module corresponding to the identification information.
[0096] The low-power device terminates the operation of the business dormant lock module in the low-power device that matches the identification information of the business dormant lock module to be processed. As for the method of terminating the operation, exemplarily, the low-power device may send a shutdown instruction Unlock to the business dormant lock module corresponding to the identification information, and the business dormant lock module to be processed performs a shutdown operation based on the received shutdown instruction. In another embodiment, the low-power device may send a shutdown instruction to the startup power supply of the business dormant lock module to be processed, and the startup power supply of the business dormant lock module to be processed performs a power supply operation on the business dormant lock module to be processed based on the received shutdown instruction, thereby realizing the shutdown of the business dormant lock module to be processed. It should be noted that when the business dormant lock module to be processed is closed, the operation of the data information to be processed is terminated, that is, the business dormant lock module is terminated.
[0097] It can be seen that the module state control method of the embodiment of the present application obtains the data information to be processed in the business operation end instruction in response to receiving the business operation end instruction; the data information to be processed includes the identification information of the business dormant lock module to be processed; the business dormant lock module corresponding to the identification information is determined from the business dormant lock module of the low-power device according to the identification information of the business dormant lock module to be processed; and the business dormant lock module corresponding to the identification information is terminated. In this way, when the business operation ends, the business dormant lock module corresponding to the data information to be processed in the low-power device can be accurately found, so as to terminate the operation of the business dormant lock module in time, and realize accurate control of the business dormant lock module according to the data information to be processed.
[0098] Based on the above examples, please continue to refer to Fig. 9 , Fig. 9 1 is a flowchart of another exemplary embodiment of the module state control method of the present application. Specifically, after step S830 terminates the operation of the service dormant lock module corresponding to the identification information, the module state control method of the embodiment of the present application further includes the following steps:
[0099] Step S910 , in response to detecting that a module state of a service dormant lock module in the low-power device is in an open state, the corresponding module dormant lock is controlled to be opened and the corresponding to-be-processed module is controlled to be in an active state.
[0100] After the business dormant lock module corresponding to the identification information of the business dormant lock module to be processed finishes running processing, the low-power device further detects the module status of the business dormant lock module in the low-power device, and in response to detecting that the module status of a business dormant lock module in the low-power device is in the open state, the corresponding module dormant lock is controlled to be opened and the corresponding module to be processed is controlled to be in the active state. It should be noted that in other embodiments, if it is detected that the module status of multiple business dormant lock modules in the low-power device is in the open state, the corresponding module dormant lock is controlled to be opened and the corresponding module to be processed is controlled to be in the active state.
[0101] Step S920 , in response to detecting that there is no service dormant lock module in the low-power device and the module state is in the open state, the corresponding module dormant lock is controlled to be closed and the corresponding to-be-processed module is controlled to be in the dormant state.
[0102] After the business dormant lock module corresponding to the identification information of the business dormant lock module to be processed finishes running processing, the low-power device further detects the module status of the business dormant lock module in the low-power device. In response to detecting that there is no module status of a business dormant lock module in the low-power device that is in the on state, that is, detecting that the module status of each business dormant lock module in the low-power device is in the off state, the corresponding module dormant lock is controlled to be closed and the corresponding module to be processed is controlled to be in the dormant state.
[0103] It can be seen that the module state control method of the embodiment of the present application controls the module sleep lock and the module to be processed according to the module state of the detected business sleep lock module in the low-power device. Specifically, in response to detecting that the module state of a business sleep lock module in the low-power device is turned on, the corresponding module sleep lock is controlled to be turned on and the corresponding module to be processed is controlled to be in an active state; in response to detecting that the module state of a business sleep lock module does not exist in the low-power device is turned on, the corresponding module sleep lock is controlled to be turned off and the corresponding module to be processed is controlled to be in a dormant state. In this way, when the business operation is terminated, that is, when the data information to be processed is terminated, the module can be controlled to sleep in time, which is beneficial to reduce the power consumption of the low-power device.
[0104] Based on the above examples, please continue to refer to Fig.10 , Fig.10 yes Figure 8 The flowchart of an exemplary embodiment of step S830 in the module state control method is shown. Specifically, the process of step S830 terminating the operation of the service dormant lock module corresponding to the identification information further includes the following steps:
[0105] Step S1010, obtaining historical operation data of the service dormant lock module corresponding to the identification information.
[0106] The historical operation data is the operation data stored in the low-power device. It should be noted that there is a service dormant lock module corresponding to the historical operation data in the low-power device.
[0107] The low-power consumption device may match the historical operation data corresponding to the data information to be processed from the low-power consumption device according to the identification information of the data information to be processed.
[0108] Step S1020: in response to the data type of the historical operation data being the first data type, releasing the service dormant lock module corresponding to the identification information in the low-power device.
[0109] The low-power device obtains the data type of the historical operation data, and if the data type of the historical operation data is the first data type, the business dormancy lock module corresponding to the identification information in the low-power device is released. It should be noted that the correspondence between the released business dormancy lock module and the historical operation data should be released. Exemplarily, if the data type of the historical operation data is independent operation data, the business dormancy lock module corresponding to the identification information in the low-power device is deleted. In another exemplary manner, if the data type of the historical operation data is independent operation data, the business dormancy lock module corresponding to the identification information in the low-power device is removed.
[0110] Step S1030: in response to the data type of the historical operation data being the second data type, the service dormant lock module corresponding to the identification information in the low-power device is closed.
[0111] The low-power device obtains the data type of the historical operation data, and if the data type of the historical operation data is the second data type, the service dormant lock module corresponding to the identification information in the low-power device is closed.
[0112] It can be seen that the module status control method of the embodiment of the present application obtains the historical operation data of the business dormancy lock module corresponding to the identification information; in response to the data type of the historical operation data being the first data type, the business dormancy lock module corresponding to the identification information in the low-power device is released; in response to the data type of the historical operation data being the second data type, the business dormancy lock module corresponding to the identification information in the low-power device is closed. On the one hand, when the historical operation data ends running, the business dormancy lock module corresponding to the historical operation data of the first data type is released to save space resources. On the other hand, the business dormancy lock module corresponding to the historical operation data of the second data type is closed so that the historical operation data is reversely controlled by the business dormancy lock module to no longer run, and the business dormancy lock module can be reused.
[0113] As an example, to explain the module state control method of the present application in detail, please refer to Fig.11 . Fig.11 The schematic diagram shows the module state control process when the data information to be processed ends running. Fig.11As shown, the business operation of the application layer of the low-power device is completed, that is, the operation of the data information to be processed is completed. The application layer sends the identification ID of the business dormant lock module to be processed in the data information to be processed to the business dormant lock module management unit. After receiving the identification ID, the business dormant lock module management unit determines whether the business corresponding to the identification ID is an independent event. If so, the business dormant lock module corresponding to the identification ID is released. If not, the business dormant lock module corresponding to the identification ID is controlled to perform a closing operation. After the business dormant lock module management unit completes the operation on the business dormant lock module corresponding to the identification ID, it determines whether all business dormant lock modules in the low-power device are in a closed state. If so, the module dormant lock is controlled to perform a closing operation to achieve the dormancy of the module to be processed; if not, the program ends.
[0114] It can be seen that in the module state control method of the embodiment of the present application, when the business operation of the application layer ends, the business dormant lock module management unit releases the business dormant lock module corresponding to the independent event and closes the business dormant lock module corresponding to the non-independent event. Then, when all business dormant lock modules in the low-power device are in the closed state, the module dormant lock is controlled to be turned on, so that when the business ends, the module state of the business dormant lock module is promptly controlled to be in the closed state, and then when all business dormant lock modules are in the closed state, the dormancy of the business dormant lock module to be processed can be promptly controlled.
[0115] As an example, in order to elaborate on the structure of the low power consumption device, please refer to Fig.12 , Fig.12 A simplified schematic diagram of the structure of a low-power device is shown in FIG. Fig.12 As shown, the low-power device may include an information management unit of a business dormant lock module, an observer operation unit, a management unit of the business dormant lock module, a closing operation unit, and an opening operation unit. Among them, the information management unit of the business dormant lock module is used to manage the identification information, status information, business description information, and lock type of the business dormant lock module. The observer operation unit is used to call the observer interface and view the information of the business dormant lock module through the operator interface. The business dormant lock module management unit is used to manage multiple business dormant lock modules. The closing operation unit is used to execute the closing operation of the business dormant lock module and the module dormant lock module, and the opening operation unit executes the opening operation of the business dormant lock module and the module dormant lock module.
[0116] On the basis of the above embodiments, it is considered that there may be abnormal situations during the operation of the data to be run. Based on this, the module state control method of the embodiment of the present application can perform early warning processing on abnormal operation. Specifically, the low-power device can continuously detect and process the business dormant lock module to obtain a detection result; in response to the detection result indicating a detection abnormality, an early warning process is performed. Among them, the detection result includes the module state information of the business dormant lock module; the module state information includes the duration of the module state and the state switching frequency. For example, the duration and the closing frequency of the closed state. Another example is the duration and the opening frequency of the open state. Detection anomalies include running time anomalies, non-running time anomalies, and running frequency anomalies.
[0117] As for the detection method, the low-power device can perform detection based on the business description information of the business dormancy lock module. The business description information includes the abnormal situation of the business and the method for handling the abnormal situation of the business. The method for handling the abnormal situation of the business includes forced dormancy, forced operation and sending an early warning to the preset client.
[0118] As for the early warning method, the low-power device can perform an abnormality analysis based on the detection results, and perform an early warning if the analysis result is abnormal; or the low-power device can display the detection results, and then determine whether to issue an early warning based on the user's feedback on the displayed detection results.
[0119] The low-power device performs an abnormality analysis based on the detection result to obtain an analysis result. In one embodiment, the low-power device compares the duration of the closed state in the detection result with the abnormal range of non-operating time. When the duration of the closed state is within the abnormal range of non-operating time, the analysis result is determined to be that the business dormancy lock module is operating abnormally, otherwise the analysis result is determined to be that the business dormancy lock module is operating normally. In another embodiment, the low-power device compares the duration of the open state in the detection result with the abnormal range of operating time. When the duration of the open state is within the abnormal range of operating time, the analysis result is determined to be that the business dormancy lock module is operating abnormally, otherwise the analysis result is determined to be that the business dormancy lock module is operating normally.
[0120] The low-power device displays and processes the detection results through the observer interface. The application layer in the low-power device is provided with an observer interface, and the application layer observer interface is used to view the module status information, identification information, lock type and business description information of the business dormant lock module.
[0121] Furthermore, the low-power device includes an observer interface. In response to detecting that the service dormancy lock module is abnormal, the low-power device obtains module status information, identification information, lock type, and service description information of the service dormancy lock module; and displays the module status information, identification information, lock type, and service description information of the service dormancy lock module through the observer interface. In order to explain in detail the process of displaying and processing the detection results by the low-power device through the observer interface, please refer to Fig.13 . Combined Fig.13 As shown, the low-power device periodically detects the business dormancy lock module, and determines whether the business dormancy lock module is abnormal based on the detection result. If not, the program ends. If so, the module status information, identification information, lock type and business description information of the business dormancy lock module are copied and sent to the application layer observer interface. The application layer observer interface receives and displays the module status information, identification information, lock type and business description information of the business dormancy lock module, thereby realizing the viewing of the module status information, identification information, lock type and business description information of the business dormancy lock module through the application layer observer interface.
[0122] It can be seen that the low-power device regularly detects whether there is an abnormality in the business dormant lock module, and when an abnormality occurs in the business dormant lock module, the module status information, identification information, lock type and business description information of the business dormant lock module are displayed through the application layer observer interface, so as to accurately determine the abnormally running business.
[0123] See also Fig.14 , Fig.14 is a block diagram of a module state control device according to an exemplary embodiment of the present application. The module state control device is applied to a low-power device, and the low-power device includes a service dormant lock module and a module to be processed. Fig.14 As shown, the exemplary module state control device includes a to-be-run data acquisition module 1410, a determination module 1420 and a module state control module 1430. The to-be-run data acquisition module 1410 is used to respond to receiving a business operation instruction and acquire the to-be-run data in the business operation instruction; the determination module 1420 is used to determine the target business dormant lock module according to the data type of the to-be-run data; and the module state control module 1430 is used to control the module state of each to-be-processed module in the low-power device according to the module state of the target business dormant lock module.
[0124] It can be seen that the module state control device of the embodiment of the present application responds to receiving the business operation instruction, obtains the data to be run in the business operation instruction; then determines the target business dormant lock module according to the data type of the data to be run; and then controls the module state of each module to be processed in the low-power device according to the module state of the target business dormant lock module. The corresponding target business dormant lock module is determined by the data to be run in the business operation instruction, and then the module state of each module to be processed is controlled according to the module state of the target business dormant lock module, so as to realize the control of the module state through the data to be run, avoid the abnormal dormancy of the module to be processed that should be active when running the data to be run because the actual power consumption of the low-power device is less than the power consumption threshold, and improve the control accuracy of the module state.
[0125] Among them, the functions of each module can be found in the module state control method embodiment, and will not be repeated here.
[0126] See also Fig.15 , Fig.15 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 1500 includes a memory 1510 and a processor 1520, and the processor 1520 is used to execute program instructions stored in the memory 1510 to implement the steps in any of the above-mentioned module state control method embodiments. In a specific implementation scenario, the electronic device 1500 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 1500 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0127] Specifically, the processor 1520 is used to control itself and the memory 1510 to implement the steps in any of the above-mentioned student network model training methods and / or target detection method embodiments. The processor 1520 can also be referred to as a CPU (Central Processing Unit). The processor 1520 may be an integrated circuit chip with signal processing capabilities. The processor 1520 may also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 1520 may be implemented by an integrated circuit chip.
[0128] See also Fig.16 , Fig.16 The computer-readable storage medium 1600 stores program data 1610 that can be executed by a processor, and the program data 1610 is used to implement the steps in any of the above-mentioned module state control method embodiments.
[0129] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0130] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0131] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic, such as the division of modules or units, which is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0132] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
Claims
1. A module state control method, characterized in that: The method is applied to a low-power consumption device, wherein the low-power consumption device includes a service dormant lock module and a to-be-processed module, and the method includes: In response to receiving a service operation instruction, obtaining the to-be-operated data in the service operation instruction; Determine the target service dormant lock module according to the data type of the data to be run; Controlling the module state of each to-be-processed module in the low-power device according to the module state of the target service dormant lock module; The data type of the data to be run includes a first data type, and the step of determining the target business dormant lock module according to the data type of the data to be run includes: in response to the data type of the data to be run being the first data type, creating a business dormant lock module corresponding to the data to be run in the low-power device; and using the created business dormant lock module as the target business dormant lock module; Alternatively, the data type of the data to be run includes a second data type, and the step of determining the target business dormant lock module according to the data type of the data to be run includes: in response to the data type of the data to be run being the second data type, matching the data to be run with the business dormant lock module in the low-power device to obtain a matching result; in response to the matching result indicating that there is a matching business dormant lock module in the low-power device, using the matching business dormant lock module as the target business dormant lock module; Alternatively, the step of determining the target business dormant lock module according to the data type of the data to be run includes: searching for the business dormant lock module corresponding to the data type of the data to be run from a preset mapping table, and determining the found business dormant lock module as the target business dormant lock module, wherein the preset mapping table includes a correspondence between the data type of the preset data to be run and the preset business dormant lock module; The module state includes an off state and an on state, and the step of controlling the module state of each to-be-processed module in the low-power device according to the module state of the target business sleep lock module includes: in response to the module state of the target business sleep lock module being in the on state, controlling the corresponding target module sleep lock in the low-power device to be turned on; controlling the module state of the to-be-processed module corresponding to the target module sleep lock to be in an active state; and controlling other to-be-processed modules in the low-power device except the to-be-processed module corresponding to the target module sleep lock to remain in sleep state.
2. The module state control method according to claim 1, characterized in that: The method further comprises: In response to the matching result indicating that there is no matching service dormant lock module in the low-power device, creating a service dormant lock module corresponding to the to-be-run data in the low-power device; The created business dormant lock module is used as the target business dormant lock module.
3. The module state control method according to claim 1, characterized in that: The method further comprises: In response to receiving a service operation end instruction, obtaining data information to be processed in the service operation end instruction; the data information to be processed includes identification information of a service dormant lock module to be processed; Determine, according to the identification information of the service dormant lock module to be processed, from the service dormant lock modules of the low-power device a service dormant lock module corresponding to the identification information; The business dormancy lock module corresponding to the identification information is terminated.
4. The module state control method according to claim 3, characterized in that: The method further comprises: In response to detecting that a module state of a service dormant lock module in the low-power device is in an open state, controlling the corresponding module dormant lock to be opened and controlling the corresponding to-be-processed module to be in an active state; In response to detecting that there is no service dormant lock module in the low-power device and the module state is in the open state, the corresponding module dormant lock is controlled to be closed and the corresponding to-be-processed module is controlled to be in the dormant state.
5. The module state control method according to claim 3, characterized in that: The step of terminating the operation of the service dormant lock module corresponding to the identification information includes: Acquire historical operation data of the service dormant lock module corresponding to the identification information; In response to the data type of the historical operation data being the first data type, releasing the service dormant lock module corresponding to the identification information in the low-power consumption device; In response to the data type of the historical operation data being the second data type, the service dormancy lock module corresponding to the identification information in the low-power consumption device is closed.
6. The module state control method according to claim 1, characterized in that: The low power consumption device includes an observer interface, and the method further includes: In response to detecting that an abnormality exists in the service dormant lock module, obtaining module status information, identification information, lock type, and service description information of the service dormant lock module; The module status information, identification information, lock type and business description information of the business dormant lock module are displayed through the observer interface.
7. An electronic device, characterized in that: It comprises a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the module state control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
RISC-V architecture-based sleep mode switching improvement system and method
CN111459562A
PSM dormancy method and related device
CN116669158A