Sensor parameter setting method, apparatus, device, medium, and product
By acquiring and adjusting sensor parameter data, the problem of sensor incompatibility in dual-operating system smart terminals was solved, ensuring that sensor parameters meet the requirements of multiple operating systems and achieving functional compatibility and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TD TECH LTD
- Filing Date
- 2024-12-31
- Publication Date
- 2026-07-10
AI Technical Summary
In dual-operating system smart terminals, sensors are incompatible with the requirements of the two operating systems, resulting in incompatible sensor parameter settings and affecting function execution.
By acquiring the task and candidate parameter data of the first operating system, the set parameter data is determined, and the sensor parameters are adjusted to meet the needs of the first and second operating systems, thereby optimizing the sensor parameter settings.
The sensor parameters were optimized to simultaneously meet the task requirements of both the first and second operating systems, ensuring normal function execution.
Smart Images

Figure CN122363751A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart terminal technology, and in particular to a sensor parameter setting method, apparatus, device, medium and product. Background Technology
[0002] In related technologies, dual-operating system smart terminals can enable sensors to send data to multiple operating systems and manage the on / off state of sensors. However, neither operating system in a dual-operating system smart terminal can detect the existence of the other operating system, resulting in incompatibility issues between the two operating system requirements.
[0003] Therefore, the sensors in current dual-operating system smart terminals are incompatible with the requirements of the two operating systems, and the settings of sensor parameters need further optimization. Summary of the Invention
[0004] This application provides a sensor parameter setting method, apparatus, device, medium, and product for further optimizing the setting of sensor parameters.
[0005] The first aspect of this application provides a method for setting sensor parameters, including:
[0006] Obtain the first task of the first operating system and the first candidate parameter data corresponding to the first task; the first candidate parameter data is parameter data that can at least meet the requirements of the first task;
[0007] Based on the first task, obtain the parameter setting data of the corresponding target sensor;
[0008] Determine whether there is already set parameter data in the parameter setting data; the already set parameter data is related to the second task; the second task is related to the second operating system;
[0009] If it is determined that there is already set parameter data in the parameter setting data, then the parameter setting data of the target sensor is adjusted according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first task and the second task.
[0010] Further, in the method described above, adjusting the parameter setting data of the target sensor based on the first candidate parameter data and the already set parameter data includes:
[0011] The smallest value among the first candidate parameter data and the set parameter data is determined as the adjusted parameter data;
[0012] Adjust the parameter settings of the target sensor based on the adjusted parameter data.
[0013] Furthermore, in the method described above, the first task includes multiple subtasks;
[0014] Obtain the first candidate parameter data corresponding to the first task, including:
[0015] Determine the intermediate parameter data required for each of the subtasks;
[0016] The intermediate parameter data corresponding to the minimum value among all the intermediate parameter data is determined as the first candidate parameter data.
[0017] Further, in the method described above, determining the smallest data among the first candidate parameter data and the set parameter data as the adjusted parameter data includes:
[0018] Determine whether the first candidate parameter data is less than the set parameter data;
[0019] If it is determined that the first candidate parameter data is less than the set parameter data, then the first candidate parameter data is determined as the adjusted parameter data;
[0020] If it is determined that the first candidate parameter data is greater than or equal to the set parameter data, then the set parameter data is determined as the adjusted parameter data.
[0021] Further, as described above, obtaining the first candidate parameter data corresponding to the first task includes:
[0022] Obtain the current parameter data of the third task of the first operating system; the third task is the task that is using the target sensor; the current parameter data is the parameter data required by the third task.
[0023] Determine the current parameter data and the second candidate parameter data corresponding to the first task; the second candidate parameter data is the parameter data required by the first task.
[0024] The parameter data corresponding to the minimum value among the current parameter data and the second candidate parameter data is determined as the first candidate parameter data.
[0025] Furthermore, in the method described above, before acquiring the parameter setting data of the corresponding target sensor based on the first task, the method further includes:
[0026] Determine whether the target sensor is in the on state;
[0027] If it is determined that the target sensor is in the open state, then the step of obtaining the parameter setting data of the corresponding target sensor based on the first task is executed;
[0028] If the target sensor is determined to be in a closed state, then the target sensor is turned on and the parameter setting data of the target sensor is set to the first candidate parameter data.
[0029] A second aspect of this application provides a sensor parameter setting device, comprising:
[0030] The first acquisition module is used to acquire a first task of the first operating system and first candidate parameter data corresponding to the first task; the first candidate parameter data is parameter data that can at least meet the requirements of the first task.
[0031] The second acquisition module is used to acquire parameter setting data of the corresponding target sensor based on the first task;
[0032] The judgment module is used to determine whether there is already set parameter data in the parameter setting data; the already set parameter data is related to the second task; the second task is related to the second operating system;
[0033] An adjustment module is used to adjust the parameter setting data of the target sensor according to the first candidate parameter data and the already set parameter data if it is determined that there is already set parameter data in the parameter setting data, so that the adjusted setting data meets the requirements of the first task and the second task.
[0034] Furthermore, in the device described above, when the adjustment module adjusts the parameter setting data of the target sensor based on the first candidate parameter data and the set parameter data, it is specifically used for:
[0035] The smallest value among the first candidate parameter data and the set parameter data is determined as the adjusted parameter data; the parameter setting data of the target sensor is adjusted based on the adjusted parameter data.
[0036] Furthermore, in the apparatus described above, the first task includes multiple sub-tasks;
[0037] When the first acquisition module acquires the first candidate parameter data corresponding to the first task, it is specifically used for:
[0038] Determine the intermediate parameter data required for each of the sub-tasks; determine the intermediate parameter data corresponding to the minimum value among the intermediate parameter data as the first candidate parameter data.
[0039] Furthermore, in the apparatus described above, when the adjustment module determines the smallest data among the first candidate parameter data and the set parameter data as the adjusted parameter data, it is specifically used for:
[0040] Determine whether the first candidate parameter data is less than the set parameter data; if it is determined that the first candidate parameter data is less than the set parameter data, then the first candidate parameter data is determined as the adjusted parameter data; if it is determined that the first candidate parameter data is greater than or equal to the set parameter data, then the set parameter data is determined as the adjusted parameter data.
[0041] Furthermore, in the apparatus described above, when the first acquisition module acquires the first candidate parameter data corresponding to the first task, it is specifically used for:
[0042] Obtain the current parameter data of the third task of the first operating system; the third task is the task that is using the target sensor; the current parameter data is the parameter data required by the third task; determine the current parameter data and the second candidate parameter data corresponding to the first task; the second candidate parameter data is the parameter data required by the first task; determine the parameter data corresponding to the minimum value of the current parameter data and the second candidate parameter data as the first candidate parameter data.
[0043] Furthermore, the apparatus as described above further includes:
[0044] The state determination module is used to determine whether the target sensor is in an open state; if the target sensor is determined to be in an open state, the step of obtaining the parameter setting data of the corresponding target sensor based on the first task is executed; if the target sensor is determined to be in a closed state, the target sensor is turned on and the parameter setting data of the target sensor is set to the first candidate parameter data.
[0045] A third aspect of this application provides a smart terminal, including: a memory and a processor;
[0046] The memory stores computer-executed instructions;
[0047] The processor executes computer execution instructions stored in the memory to implement the sensor parameter setting method as described in any of the first aspects.
[0048] A fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the sensor parameter setting method described in any of the first aspects.
[0049] The fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the sensor parameter setting method described in any of the first aspects.
[0050] This application provides a sensor parameter setting method, apparatus, device, medium, and product. The method includes: acquiring a first task of a first operating system and first candidate parameter data corresponding to the first task; the first candidate parameter data being parameter data that at least meets the requirements of the first task; acquiring parameter setting data of a corresponding target sensor based on the first task; determining whether there is already set parameter data in the parameter setting data; the already set parameter data being related to a second task; the second task being related to a second operating system; if it is determined that there is already set parameter data in the parameter setting data, then adjusting the parameter setting data of the target sensor according to the first candidate parameter data and the already set parameter data, so that the adjusted setting data meets the requirements of the first task and the second task. The sensor parameter setting method of this application, when the first task of the first operating system requires the use of a target sensor, determines whether there is already set parameter data in the parameter setting data. If it is determined that there is already set parameter data in the parameter setting data, then adjusting the parameter setting data of the target sensor according to the first candidate parameter data and the already set parameter data, so that the adjusted setting data meets the requirements of the first task and the second task, thereby optimizing the sensor parameter settings accordingly, so that the sensor can simultaneously meet the requirements of both the first operating system and the second operating system. Attached Figure Description
[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0052] Figure 1 A schematic diagram illustrating a scenario for the sensor parameter setting method provided in this application;
[0053] Figure 2 Flowchart of the sensor parameter setting method provided in this application Figure 1 ;
[0054] Figure 3 Flowchart of the sensor parameter setting method provided in this application Figure 2 ;
[0055] Figure 4 Flowchart of the sensor parameter setting method provided in this application Figure 3 ;
[0056] Figure 5 A schematic diagram of the sensor parameter setting device provided in this application;
[0057] Figure 6 A schematic diagram of the structure of the smart terminal provided in this application.
[0058] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0059] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0060] The technical solutions of this application will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0061] To clearly understand the technical solution of this application, the conceptual process of the technical solution will first be described in detail. In a dual-operating system smart terminal, neither operating system can perceive the existence of the other. When setting sensor parameters, the parameter values set by the other operating system will be overwritten, causing the data acquired by the task in the other operating system from the sensor to fail to meet expectations, resulting in functional failure.
[0062] For example, task 'a' in operating system A needs to acquire data from the gyroscope, with a sampling period of 5ms, and sends this parameter to the gyroscope. The gyroscope then sends data to the operating system every 5ms. Meanwhile, task 'b' in operating system B also needs to acquire gyroscope data, with a sampling period of 200ms, and sends this parameter to the gyroscope. The gyroscope then sends data to the operating system every 200ms. However, this no longer meets the needs of task 'a' in operating system A, causing task 'a' to malfunction.
[0063] Therefore, the sensors in current dual-operating system smart terminals are incompatible with the requirements of the two operating systems, and the settings of sensor parameters need further optimization.
[0064] Therefore, in response to the problem that the settings of sensor parameters in the existing technology need further optimization, the inventors discovered in their research that the setting data in the sensor can be adjusted so that the parameter data in the sensor meets the task requirements of the dual operating system.
[0065] Specifically, the sensor parameter setting process is as follows:
[0066] Obtain the first task of the first operating system and the corresponding first candidate parameter data. The first candidate parameter data consists of parameter data that at least meets the requirements of the first task.
[0067] The first task is to acquire the parameter setting data of the corresponding target sensor.
[0068] Determine if any already set parameters exist in the parameter setting data. The already set parameters are related to the second task. The second task is related to the second operating system.
[0069] If it is determined that there is already set parameter data in the parameter setting data, then the parameter setting data of the target sensor is adjusted according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first task and the second task.
[0070] The sensor parameter setting method of this application determines whether there is already set parameter data in the parameter setting data when the first task of the first operating system requires the use of the target sensor. If it is determined that there is already set parameter data, the parameter setting data of the target sensor is adjusted according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first task and the second task. This optimizes the setting of the sensor parameters so that the sensor can simultaneously meet the needs of the first operating system and the second operating system.
[0071] Based on the above-mentioned inventive discovery, the inventor has proposed the technical solution of this application.
[0072] The following describes the application scenarios of the sensor parameter setting method provided in the embodiments of this application. For example... Figure 1 As shown in the figure, the first operating system, the second operating system, and the target sensor in the smart terminal are illustrated. The first and second operating systems can be hosted on hardware such as a motherboard.
[0073] For example, in this embodiment, the smart terminal performs the following processing flow:
[0074] ① Obtain the first task of the first operating system and the first candidate parameter data corresponding to the first task. The first candidate parameter data is parameter data that can at least meet the requirements of the first task.
[0075] ②Acquire the parameter setting data of the corresponding target sensor based on the first task.
[0076] ③ Determine if any parameter settings exist in the parameter setting data. The already set parameter data is related to the second task. The second task is related to the second operating system.
[0077] ④ If it is determined that there is already set parameter data in the parameter setting data, then adjust the parameter setting data of the target sensor according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first task and the second task.
[0078] After the adjustment is completed, the adjustment information can also be displayed on the preset display page, or the parameter data of this adjustment can be recorded. This embodiment does not limit this.
[0079] The embodiments of this application are described below with reference to the accompanying drawings.
[0080] Figure 2 Flowchart of the sensor parameter setting method provided in this application Figure 1 ,like Figure 2 As shown, the execution subject of this embodiment is a sensor parameter setting device, which can be integrated into a smart terminal. The sensor parameter setting method provided in this embodiment includes the following steps:
[0081] Step S101: Obtain the first task of the first operating system and the first candidate parameter data corresponding to the first task. The first candidate parameter data consists of parameter data that can at least meet the requirements of the first task.
[0082] In this embodiment, the specific systems used by the first operating system and the second operating system can be the same or different; for example, both can use the Android system. The first task is the task for which the first operating system needs to use the target sensor. The first candidate parameter data is parameter data that at least meets the requirements of the first task, that is, it must at least meet the requirements of the first task, but it can also meet the requirements of other tasks simultaneously.
[0083] For example, if the target sensor is a gyroscope, the first task requires a sampling period of 200ms (milliseconds) for the gyroscope, thereby enabling subsequent judgments and executions based on the gyroscope data. The first candidate parameter data must at least meet the requirements of the first task, therefore the first candidate parameter data must be less than or equal to 200ms. If the first operating system also has other tasks requiring a sampling period of 100ms, then the first candidate parameter data can be 100ms.
[0084] Step S102: Obtain parameter setting data of the corresponding target sensor based on the first task.
[0085] In this embodiment, the parameter setting data for the target sensor varies depending on the sensor. There may be pre-set parameter data, or there may be no pre-set parameter data. If no pre-set parameter data exists, the parameter setting data can be represented as empty.
[0086] Step S103: Determine if any set parameter data exists in the parameter setting data. Set parameter data is related to the second task. The second task is related to the second operating system.
[0087] In this embodiment, the set parameter data is related to a second task of the second operating system, which is a task that requires the use of the target sensor. The set parameter data can also be related to other tasks in the history of the first operating system, for example, the set parameter data is the optimal parameter data required by both other tasks and the second task.
[0088] Step S104: If it is determined that there is already set parameter data in the parameter setting data, then adjust the parameter setting data of the target sensor according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first task and the second task.
[0089] In this embodiment, the adjustment strategy can be to select the smaller parameter data between the first candidate parameter data and the set parameter data as the adjusted parameter data, or to select the parameter data smaller than both the first candidate parameter data and the set parameter data as the adjusted parameter data, as long as the adjusted setting data meets the requirements of the first task and the second task. This embodiment does not limit this.
[0090] Furthermore, for different sensors, some tasks may require larger parameter data. In such cases, the parameter data that is larger between the first candidate parameter data and the already set parameter data can be selected as the adjusted parameter data. Alternatively, a parameter data that is larger than both the first candidate parameter data and the already set parameter data can be selected as the adjusted parameter data, as long as the adjusted setting data meets the requirements of the first and second tasks. This embodiment does not limit this.
[0091] This application provides a sensor parameter setting method, which includes: acquiring a first task of a first operating system and first candidate parameter data corresponding to the first task. The first candidate parameter data consists of parameter data that at least meets the requirements of the first task. Based on the first task, parameter setting data for a corresponding target sensor is acquired. It is determined whether there is already set parameter data in the parameter setting data. The already set parameter data is related to a second task. The second task is related to a second operating system. If it is determined that there is already set parameter data in the parameter setting data, the parameter setting data of the target sensor is adjusted according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first and second tasks.
[0092] The sensor parameter setting method of this application determines whether there is already set parameter data in the parameter setting data when the first task of the first operating system requires the use of the target sensor. If it is determined that there is already set parameter data, the parameter setting data of the target sensor is adjusted according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first task and the second task. This optimizes the setting of the sensor parameters so that the sensor can simultaneously meet the needs of the first operating system and the second operating system.
[0093] Figure 3 Flowchart of the sensor parameter setting method provided in this application Figure 2 ,like Figure 3 As shown, the sensor parameter setting method provided in this embodiment is a further refinement of the sensor parameter setting method provided in the previous embodiment of this application. The sensor parameter setting method provided in this embodiment includes the following steps.
[0094] Step S201: Obtain the first task of the first operating system and the first candidate parameter data corresponding to the first task.
[0095] In this embodiment, there are multiple ways to obtain the first candidate parameter data corresponding to the first task. Optionally, the following two methods can be used:
[0096] Optionally, the first approach is as follows: when the parameter data is compatible with both operating systems and the smaller parameter data is compatible with the larger parameter data, the first task includes multiple subtasks.
[0097] The process for obtaining the first candidate parameter data corresponding to the first task includes:
[0098] Determine the intermediate parameter data required for each subtask.
[0099] The intermediate parameter data corresponding to the minimum value among all intermediate parameter data is determined as the first candidate parameter data.
[0100] In this embodiment, only for the needs of each subtask corresponding to the first task, the first candidate parameter data that can meet the needs of each subtask is determined. The first candidate parameter data can be the intermediate parameter data corresponding to the minimum value among the intermediate parameter data.
[0101] Alternatively, the first candidate parameter data can also be parameter data that is smaller than all intermediate parameter data. The first candidate parameter data only needs to meet the requirements of all subtasks.
[0102] Optionally, in this embodiment, obtaining the first candidate parameter data corresponding to the first task includes:
[0103] Obtain the current parameter data of the third task in the first operating system. The third task is the one using the target sensor. The current parameter data is the parameter data required by the third task.
[0104] Determine the current parameter data and the second candidate parameter data corresponding to the first task. The second candidate parameter data is the parameter data required by the first task.
[0105] The parameter data corresponding to the minimum value among the current parameter data and the second candidate parameter data is determined as the first candidate parameter data.
[0106] In this embodiment, when determining the first candidate parameter data corresponding to the first task, the current parameter data of the third task of the same operating system, i.e. the first operating system, can be referenced so that the first candidate parameter data can simultaneously meet the requirements of the first task and the third task, thereby providing a basis for determining the final adjusted parameter data in the future.
[0107] Optionally, in this embodiment, before S202, it can be further determined whether the target sensor is in the open state, as follows:
[0108] Determine whether the target sensor is in the on state.
[0109] If the target sensor is determined to be in the open state, then execute S202.
[0110] If the target sensor is determined to be in a closed state, then turn on the target sensor and set the target sensor's parameter settings data to the first candidate parameter data.
[0111] In this embodiment, if the target sensor is in a closed state, then the target sensor will not have any parameter data set by other operating systems. Therefore, the parameter setting data of the target sensor can be directly set as the first candidate parameter data.
[0112] Step S202: Obtain parameter setting data of the corresponding target sensor based on the first task.
[0113] In this embodiment, the implementation of S202 is similar to that of S102, and will not be described again here.
[0114] Step S203: Determine whether there is already set parameter data in the parameter setting data.
[0115] In this embodiment, the implementation of S203 is similar to that of S103, and will not be described again here.
[0116] Step S204: If it is determined that there is already set parameter data in the parameter setting data, then the smallest data among the first candidate parameter data and the already set parameter data is determined as the adjusted parameter data.
[0117] In this embodiment, the smallest value among the first candidate parameter data and the set parameter data is determined as the adjusted parameter data, so that the adjusted parameter data can simultaneously meet the requirements of the first task and the second task.
[0118] Optionally, in this embodiment, S204 is specifically as follows:
[0119] Determine whether the first candidate parameter data is less than the set parameter data.
[0120] If it is determined that the first candidate parameter data is less than the set parameter data, then the first candidate parameter data is determined as the adjusted parameter data.
[0121] If the first candidate parameter data is determined to be greater than or equal to the set parameter data, then the set parameter data is determined as the adjusted parameter data.
[0122] In this embodiment, it is determined whether the first candidate parameter data is less than the set parameter data. If the first candidate parameter data is smaller, then the first candidate parameter data is determined as the adjusted parameter data. If the set parameter data is smaller, then the original set parameter data is maintained unchanged.
[0123] Step S205: Adjust the parameter setting data of the target sensor based on the adjusted parameter data so that the adjusted setting data meets the requirements of the first task and the second task.
[0124] To further explain the sensor parameter setting method of this embodiment in detail, the following will be combined with... Figure 4 Further explanation is needed.
[0125] The sensor parameter setting process in this embodiment is as follows:
[0126] Step 1: The system service issues a command to set a parameter of a certain sensor and the parameter value value1.
[0127] Step 2: After receiving the command and value, the sensor will compare the value with the parameters required by the task currently using the sensor that is recorded in the operating system (multiple tasks in an operating system may use the same sensor, and the optimal value of the parameter requirement of the operating system needs to be determined first) to obtain the optimal value value2.
[0128] Step 3: Determine if the sensor is actually turned on (this can be done by reading the sensor register). If not, proceed to Step 6.
[0129] Step 4: Read the working parameter value from the sensor as value3 (value3 is a historically globally optimal parameter that contains the decision results for task requirements in all operating systems).
[0130] Step 5: Determine if value2 is less than value3 (if the newly set value is smaller than the historical best, then set the latest value value2 to the sensor; value2 currently contains the decision results for task requirements in all operating systems), otherwise proceed to Step 7.
[0131] Step 6: Set the sensor parameter to value2, then skip to step 8.
[0132] Step 7: Set the sensor parameter to value3.
[0133] Step 8: Setup complete - End.
[0134] In this embodiment, further explanation can be provided in conjunction with specific application examples. Vp1 (first operating system, running Android) and Vp2 (second operating system, running Android) run the sensor service on HAL (Hardware Abstraction). In the hardware abstraction layer (HAL), when the VP2 sensor service receives a new command to set sensor parameters and the parameter value period3, the sensor service retrieves the parameter requirement value of the task running on VP2 (in the example, the value of Client1 is period1, and so on), and decides the optimal value together with the new target value (Min(period1, period2, period3) = period1, the optimal value is the minimum value required by the current system, which is not necessarily the target value, but it will definitely meet the requirements of the target task). Next, the sensor service queries the actual working status of the sensor. If the sensor is off, the parameter is set to period1 (at this time, no other tasks are using the sensor, so setting it directly can meet the requirements). If the sensor is on, the working sensor parameter value workperiod is read first and compared with period1 to make a decision (Param = min(period1, workperiod)). Finally, param is sent to the kernel, and the sensorhub (a kind of intelligent sensor hub) completes the parameter setting.
[0135] The sensor parameter setting method in this embodiment ensures that the sensor parameters in a dual-operating system smart terminal are always kept at the globally optimal value, and can simultaneously meet the needs of multiple operating systems.
[0136] Figure 5A schematic diagram of the sensor parameter setting device provided in this application is shown below. Figure 5 As shown, in this embodiment, the sensor parameter setting device 300 can be installed in a smart terminal, and the sensor parameter setting device 300 includes:
[0137] The first acquisition module 301 is used to acquire the first task of the first operating system and the first candidate parameter data corresponding to the first task. The first candidate parameter data is parameter data that can at least meet the requirements of the first task.
[0138] The second acquisition module 302 is used to acquire parameter setting data of the corresponding target sensor based on the first task.
[0139] The judgment module 303 is used to determine whether there is already set parameter data in the parameter setting data. The already set parameter data is related to the second task. The second task is related to the second operating system.
[0140] The adjustment module 304 is used to adjust the parameter setting data of the target sensor according to the first candidate parameter data and the already set parameter data if it is determined that there is already set parameter data in the parameter setting data, so that the adjusted setting data meets the requirements of the first task and the second task.
[0141] The sensor parameter setting device provided in this embodiment can perform... Figure 2 The technical solution of the method embodiment shown has the same implementation principle and technical effect as... Figure 2 The methods and embodiments shown are similar and will not be described in detail here.
[0142] The sensor parameter setting device provided in this application is a further refinement of the sensor parameter setting device provided in the previous embodiment. The sensor parameter setting device 300 includes:
[0143] Optionally, in this embodiment, when the adjustment module adjusts the parameter setting data of the target sensor based on the first candidate parameter data and the already set parameter data, it is specifically used for:
[0144] The minimum value between the first candidate parameter data and the already set parameter data is determined as the adjusted parameter data. The parameter settings of the target sensor are then adjusted based on the adjusted parameter data.
[0145] Optionally, in this embodiment, the first task includes multiple sub-tasks.
[0146] When the first acquisition module acquires the first candidate parameter data corresponding to the first task, it is specifically used for:
[0147] Determine the intermediate parameter data required for each subtask. Select the intermediate parameter data corresponding to the minimum value among all intermediate parameter data as the first candidate parameter data.
[0148] Optionally, in this embodiment, when the adjustment module determines the smallest data among the first candidate parameter data and the set parameter data as the adjusted parameter data, it is specifically used for:
[0149] Determine if the first candidate parameter data is less than the set parameter data. If the first candidate parameter data is less than the set parameter data, then the first candidate parameter data is determined as the adjusted parameter data. If the first candidate parameter data is greater than or equal to the set parameter data, then the set parameter data is determined as the adjusted parameter data.
[0150] Optionally, in this embodiment, when the first acquisition module acquires the first candidate parameter data corresponding to the first task, it is specifically used for:
[0151] Obtain the current parameter data of the third task of the first operating system. The third task is the task that is using the target sensor. The current parameter data is the parameter data required by the third task. Determine the current parameter data and the second candidate parameter data corresponding to the first task. The second candidate parameter data is the parameter data required by the first task. Determine the parameter data corresponding to the minimum value among the current parameter data and the second candidate parameter data as the first candidate parameter data.
[0152] Optionally, in this embodiment, the device further includes:
[0153] The status determination module is used to determine whether the target sensor is in an "on" state. If the target sensor is determined to be in an "on" state, the step of obtaining the corresponding target sensor parameter setting data based on the first task is executed. If the target sensor is determined to be in a "off" state, the target sensor is turned on and the target sensor parameter setting data is set to the first candidate parameter data.
[0154] The sensor parameter setting device provided in this embodiment can perform... Figures 2-4 The technical solution of the method embodiment shown has the same implementation principle and technical effect as... Figures 2-4 The methods and embodiments shown are similar and will not be described in detail here.
[0155] According to embodiments of this application, this application also provides a smart terminal, a computer-readable storage medium, and a computer program product.
[0156] like Figure 6 As shown, Figure 6This is a schematic diagram of the structure of the smart terminal provided in this application. The smart terminal is intended for various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, in-vehicle terminals, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0157] like Figure 6 As shown, the smart terminal includes a processor 401 and a memory 402. The various components are interconnected via different buses and can be installed on a common motherboard or, as needed, in other ways. The processor can process instructions executed within the smart terminal.
[0158] The memory 402 is the non-transitory computer-readable storage medium provided in this application. The memory stores instructions executable by at least one processor to cause at least one processor to perform the sensor parameter setting method provided in this application. The non-transitory computer-readable storage medium of this application stores computer instructions for causing a computer to perform the sensor parameter setting method provided in this application.
[0159] Memory 402, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the sensor parameter setting method in the embodiments of this application (e.g., attached...). Figure 5 The first acquisition module 301, the second acquisition module 302, the judgment module 303, and the adjustment module 304 are shown. The processor 401 executes various functional applications and data processing of the smart terminal by running non-transient software programs, instructions, and modules stored in the memory 402, thereby realizing the sensor parameter setting method in the above method embodiment.
[0160] Meanwhile, a computer-readable storage medium is provided, which stores computer-executable instructions that, when executed by a processor, are used to implement the sensor parameter setting method of the above embodiments.
[0161] This embodiment also provides a computer product that, when the instructions in the computer product are executed by the processor of a smart terminal, enables the smart terminal to execute the sensor parameter setting method of the above embodiment.
[0162] Other embodiments of the present application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the embodiments of this application that follow the general principles of the embodiments of this application and include common knowledge or customary techniques in the art not disclosed in the embodiments of this application.
[0163] It should be understood that the embodiments of this application are not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from their scope. The scope of the embodiments of this application is limited only by the appended claims.
Claims
1. A method for setting sensor parameters, characterized in that, include: Obtain the first task of the first operating system and the first candidate parameter data corresponding to the first task; The first candidate parameter data is parameter data that can at least meet the requirements of the first task; Based on the first task, obtain the parameter setting data of the corresponding target sensor; Determine whether there is already set parameter data in the parameter setting data; the already set parameter data is related to the second task; the second task is related to the second operating system; If it is determined that there is already set parameter data in the parameter setting data, then the parameter setting data of the target sensor is adjusted according to the first candidate parameter data and the already set parameter data so that the adjusted setting data meets the requirements of the first task and the second task.
2. The method according to claim 1, characterized in that, The step of adjusting the parameter setting data of the target sensor according to the first candidate parameter data and the set parameter data includes: The smallest value among the first candidate parameter data and the set parameter data is determined as the adjusted parameter data; Adjust the parameter settings of the target sensor based on the adjusted parameter data.
3. The method according to claim 2, characterized in that, The first task includes multiple sub-tasks; Obtain the first candidate parameter data corresponding to the first task, including: Determine the intermediate parameter data required for each of the subtasks; The intermediate parameter data corresponding to the minimum value among all the intermediate parameter data is determined as the first candidate parameter data.
4. The method according to claim 2, characterized in that, The step of determining the smallest data among the first candidate parameter data and the already set parameter data as the adjusted parameter data includes: Determine whether the first candidate parameter data is less than the set parameter data; If it is determined that the first candidate parameter data is less than the set parameter data, then the first candidate parameter data is determined as the adjusted parameter data; If it is determined that the first candidate parameter data is greater than or equal to the set parameter data, then the set parameter data is determined as the adjusted parameter data.
5. The method according to claim 2, characterized in that, Obtain the first candidate parameter data corresponding to the first task, including: Obtain the current parameter data of the third task of the first operating system; the third task is the task that is using the target sensor; the current parameter data is the parameter data required by the third task. Determine the current parameter data and the second candidate parameter data corresponding to the first task; the second candidate parameter data is the parameter data required by the first task. The parameter data corresponding to the minimum value among the current parameter data and the second candidate parameter data is determined as the first candidate parameter data.
6. The method according to claim 5, characterized in that, Before acquiring the parameter setting data of the corresponding target sensor based on the first task, the method further includes: Determine whether the target sensor is in the on state; If it is determined that the target sensor is in the open state, then the step of obtaining the parameter setting data of the corresponding target sensor based on the first task is executed; If the target sensor is determined to be in a closed state, then the target sensor is turned on and the parameter setting data of the target sensor is set to the first candidate parameter data.
7. A sensor parameter setting device, characterized in that, include: The first acquisition module is used to acquire the first task of the first operating system and the first candidate parameter data corresponding to the first task. The first candidate parameter data is parameter data that can at least meet the requirements of the first task; The second acquisition module is used to acquire parameter setting data of the corresponding target sensor based on the first task; The judgment module is used to determine whether there is already set parameter data in the parameter setting data; the already set parameter data is related to the second task; The second task is related to the second operating system; An adjustment module is used to adjust the parameter setting data of the target sensor according to the first candidate parameter data and the already set parameter data if it is determined that there is already set parameter data in the parameter setting data, so that the adjusted setting data meets the requirements of the first task and the second task.
8. A smart terminal, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the sensor parameter setting method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the sensor parameter setting method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the sensor parameter setting method as described in any one of claims 1 to 6.