Data processing method and electronic equipment

By setting a switching mechanism between a first processing mode and a second processing mode in electronic devices, input data processing tasks can be flexibly allocated between the processor and the input device processing unit, solving the problem of excessive processor resource utilization and improving the processing efficiency and user experience of the device.

CN121116640APending Publication Date: 2025-12-12LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511340545.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

When electronic devices run large applications or perform complex tasks, the processor's resource utilization increases significantly, leading to reduced input data processing efficiency and affecting device performance and user experience.

Method used

The system employs a flexible switching mechanism between a first processing mode and a second processing mode. When processor resources are scarce, the processing unit of the input device undertakes data processing tasks, reducing the processor's burden. When resources are plentiful, the processor handles the data, thus reducing the processor's resource utilization.

Benefits of technology

It effectively improves the processing efficiency of input data, enhances the overall performance of the device and the user experience, ensures that basic functions can be maintained when processor resources are limited, and provides high-precision processing results when resources are sufficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121116640A_ABST
    Figure CN121116640A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and electronic equipment, and relates to the technical field of electronic equipment. The data processing method comprises the steps that in response to a first processing mode, a processor processes input data acquired by an input device to obtain a target processing result; in response to the second processing mode, the processing unit of the input device processes input data acquired by the input device to obtain a target processing result; wherein the resource occupancy rate of the processor in the first processing mode is smaller than the resource occupancy rate of the processor in the second processing mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment technology, and in particular to a data processing method and an electronic device. Background Technology

[0002] In related technologies, electronic devices typically use processors to process input data collected by input devices to obtain processing results. However, when electronic devices run large applications or perform complex tasks, the processor's resource utilization rate will increase significantly, resulting in a decrease in the efficiency of input data processing and affecting the overall performance of the device and the user experience. Summary of the Invention

[0003] In view of this, this application provides a data processing method and an electronic device.

[0004] According to a first aspect of this application, a data processing method is provided, comprising: in response to being in a first processing mode, a processor processes input data acquired by an input device to obtain a target processing result; in response to being in a second processing mode, a processing unit of the input device processes input data acquired by the input device to obtain a target processing result; wherein, in the second processing mode, the resource utilization rate of the processor is less than that in the first processing mode.

[0005] According to an embodiment of this application, the method further includes: obtaining performance parameters; if the performance parameters do not meet the performance conditions, switching the processing mode from the first processing mode to the second processing mode; if the performance parameters meet the performance conditions, switching the processing mode from the second processing mode to the first processing mode.

[0006] According to an embodiment of this application, the input data is touch data. The accuracy of the target processing result obtained by processing the touch data through the processing unit is less than the accuracy of the target processing result obtained by processing the touch data through the processor.

[0007] According to an embodiment of this application, in response to being in a second processing mode, after the processing unit of the input device processes the input data collected by the input device to obtain a target processing result, it further includes: sending the target processing result to the processor.

[0008] According to an embodiment of this application, the method further includes: in response to the processing mode switching from the first processing mode to the second processing mode, determining the maximum sampling frequency at which the input device collects the touch data based on the resource utilization rate of the processor; generating a first control command based on the maximum sampling frequency, and sending the first control command to the input device.

[0009] According to an embodiment of this application, the method further includes: in response to the processing mode switching from the first processing mode to the second processing mode, determining the execution content of the target application currently running on the processor; determining a target sampling frequency adapted to the execution content of the target application, wherein the target sampling frequency is less than or equal to the maximum sampling frequency at which the input device collects the touch data; generating a second control instruction based on the target sampling frequency, and sending the second control instruction to the input device.

[0010] According to an embodiment of this application, the method further includes: in response to the processing mode switching from the first processing mode to the second processing mode, determining a scaling factor between the target sampling frequency and the maximum sampling frequency; and adjusting the resource occupancy threshold based on the scaling factor.

[0011] According to an embodiment of this application, the method further includes: in response to the processing mode switching from the first processing mode to the second processing mode, processing the input data in parallel using the first processing mode and the second processing mode within a target duration, and obtaining the first processing result and the second processing result; determining the difference between the first processing result and the second processing result; if the difference is less than or equal to a difference threshold, stopping the first processing mode and sending the second processing result to the processor; if the difference is greater than the difference threshold, extending the target duration and sending the first processing result to the processor.

[0012] According to an embodiment of this application, the performance parameter includes the remaining power of the electronic device, and the target condition corresponding to the remaining power is a power threshold. The method further includes: when the remaining power is less than the power threshold, switching the processing mode from the first processing mode to the second processing mode; if the accuracy of processing the input data by the processing unit in the input device is less than a preset accuracy threshold, and / or when the remaining power is greater than or equal to the power threshold, switching the processing mode from the second processing mode to the first processing mode.

[0013] A second aspect of this application provides an electronic device, comprising: an input device including a sensor and a processing unit; the sensor being used to acquire input data; a processor being used to process the input data acquired by the sensor to obtain a target processing result when the processing mode is a first processing mode; and the processing unit being used to process the input data acquired by the sensor to obtain the target processing result when the processing mode is a second processing mode; wherein, the resource utilization rate of the processor in the first processing mode is less than the resource utilization rate of the processor in the second processing mode.

[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0015] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0016] Figure 1 The flowchart illustrating a data processing method provided in an embodiment of this application is shown below;

[0017] Figure 2 A timing diagram illustrating a parallel processing verification mechanism provided in an embodiment of this application is shown schematically.

[0018] Figure 3 This is a schematic diagram of the architecture of a touch device provided in an embodiment of this application;

[0019] Figure 4 A block diagram of an electronic device provided in an embodiment of this application is shown schematically. Detailed Implementation

[0020] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0022] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0023] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0024] In the embodiments of this application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.

[0025] This application provides a data processing method and an electronic device.

[0026] The data processing method includes: in response to being in a first processing mode, the processor processes the input data collected by the input device to obtain a target processing result; in response to being in a second processing mode, the processing unit of the input device processes the input data collected by the input device to obtain a target processing result; wherein, in the first processing mode, the resource utilization rate of the processor is less than that in the second processing mode.

[0027] By adopting the technical solution of this application, two data processing modes are set up: a first processing mode and a second processing mode. The appropriate processing mode can be flexibly selected according to actual needs to process the input data collected by the input device and obtain the target processing result. When the second processing mode is used, the processing unit of the input device directly processes the input data collected by the input device, transferring the data processing tasks that originally needed to be handled by the processor to the processing unit of the input device, thereby effectively reducing the processor's resource utilization.

[0028] Compared with related technologies, this application avoids the problem of excessive resource consumption in high-load scenarios when the processor processes input data alone. When processor resources are scarce, the second processing mode can reduce the processor burden, while the first processing mode can still be used when processor resources are sufficient. This flexible processing mode switching mechanism effectively improves the processing efficiency of input data and enhances the overall performance of the device and the user experience.

[0029] The electronic devices described in this application refer to devices with data acquisition and processing capabilities. These electronic devices include mobile terminals such as smartphones, tablets, laptops, smartwatches, smart bracelets, and game controllers, as well as interactive devices such as Augmented Reality (AR) / Virtual Reality (VR) devices, intelligent controllers, and data acquisition terminals. Furthermore, intelligent terminals supporting diverse data inputs, such as in-vehicle infotainment systems, Internet of Things (IoT) sensor nodes, industrial data acquisition equipment, and intelligent monitoring systems, as well as computing devices such as servers, personal computers (PCs), edge computing devices, and embedded systems, also fall within the scope of the electronic devices described in this application. Additionally, intelligent detection devices equipped with multiple sensors, control systems supporting real-time data processing, and network devices with distributed processing capabilities are also within the application scope of this application.

[0030] It should be noted that the embodiments of this application do not limit the specific type of electronic device. The examples above are merely illustrative descriptions. The technical solutions of this application can be applied to any electronic device that has an input device and that input device has a processing unit. This application is particularly applicable to various electronic devices that have high requirements for processing efficiency and resource utilization, such as high-concurrency data processing, strict real-time response requirements, and limited processor resources.

[0031] The data processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0032] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application is shown.

[0033] like Figure 1 As shown, the data processing method may specifically include the following operations.

[0034] In operation S101, in response to being in the first processing mode, the processor processes the input data acquired by the input device to obtain the target processing result;

[0035] In operation S102, in response to being in the second processing mode, the processing unit of the input device processes the input data acquired by the input device to obtain the target processing result; wherein, in the second processing mode, the resource utilization rate of the processor is less than that in the first processing mode.

[0036] In operation S101, the processor refers to the core computing unit in an electronic device that is responsible for executing instructions and performing data operations. In this embodiment, it can be understood as a main processing chip with strong computing power and abundant algorithm resources, used to perform complex algorithm processing and logical operations on input data.

[0037] For example, for smartphones, the processor can be an application processor (AP), responsible for running the operating system and various applications; for tablets, the processor can be a central processing unit (CPU), undertaking system-level data processing tasks; and for smartwatches, the processor can be a low-power architecture processor, balancing performance and power consumption requirements.

[0038] Similarly, an input device refers to a hardware component in an electronic device used to acquire external input signals and convert them into data that the electronic device can recognize. In the embodiments of this application, it can be understood as an input module with data acquisition function and built-in independent processing unit, used to acquire raw signals generated by user operation or environmental changes.

[0039] For example, for touch devices, the input device may be a touch screen, including a touch sensor and a touch control chip; for AR / VR devices, the input device may be a gesture recognition camera or a spatial positioning sensor; for smart speakers, the input device may be a microphone array with sound acquisition and preliminary processing capabilities.

[0040] Input data can be collected through the input device. Input data refers to the digital data formed by analog-to-digital conversion of the original signal collected by the input device. In this embodiment, it can be understood as a set of data to be processed that includes user operation information or environmental status information, which is used for subsequent algorithm analysis and result output.

[0041] For example, the input data includes, but is not limited to, the capacitance change value collected by the touch screen, the pressure value obtained by the pressure sensor, the motion parameters measured by the accelerometer, the audio signal collected by the microphone, the image data captured by the camera, the temperature reading detected by the temperature sensor, the light intensity sensed by the light sensor, and other raw data from various sensors.

[0042] Furthermore, electronic devices typically acquire and process input data in a first processing mode to obtain the target processing result. Here, the first processing mode refers to the working mode in which the processor of the electronic device undertakes the task of processing input data. In the embodiments of this application, it can be understood as the running state that uses the high-performance computing power of the processor and the software algorithm library to perform fine processing on the input data, so as to obtain high-precision and high-quality data processing results when processor resources are sufficient.

[0043] For example, the first processing mode includes, but is not limited to, data processing methods that rely on processor computing resources, such as the processor calling the Touch Handling Process (THP) algorithm library to process touch data, the processor running complex gesture recognition algorithms to analyze motion data, the processor executing high-precision speech recognition algorithms to process audio signals, and the processor using deep learning models to perform image recognition processing.

[0044] Similarly, the target processing result refers to the output information obtained after the input data has been processed by a specific algorithm and can be further used by the processor. In the embodiments of this application, it can be understood as the processed data that meets the functional requirements of the application and is in a standardized format, which is used to further drive the electronic device to perform corresponding response operations or state changes.

[0045] For example, the target processing results include, but are not limited to, structured data that can be directly called by upper-layer applications, such as touch coordinate information and gesture type obtained after touch data processing, device posture and motion trajectory obtained after motion data processing, voice commands and semantic content obtained after audio data processing, and object recognition results and spatial location information obtained after image data processing.

[0046] In one feasible implementation of operation S101, when the electronic device detects that it is currently in the first processing mode, the processor receives raw touch data from the touch screen. The raw touch data includes information on the change in capacitance value of the touch point and timestamp information. The processor calls a preset touch processing algorithm to filter, calculate coordinates and perform gesture recognition processing on the raw touch data, and generate a target processing result containing precise touch coordinates, touch pressure value and gesture type.

[0047] In another feasible implementation, when the electronic device confirms that it is currently running in the first processing mode, the processor acquires motion data from the accelerometer and gyroscope sensor. This motion data reflects the acceleration and angular velocity changes of the electronic device in three-dimensional space. The processor runs a complex motion algorithm to perform fusion calculation and trajectory analysis on the motion data to obtain the target processing results such as the device's real-time attitude information, motion direction, and movement distance.

[0048] In another feasible implementation, in the first processing mode activation state, the processor receives audio input data from the microphone array, which includes a mixed audio stream of user voice signal and ambient noise signal. The processor executes a speech recognition algorithm to perform noise reduction processing, feature extraction and semantic analysis on the audio input data, and outputs a target processing result including speech-to-text result, voice command type and confidence score.

[0049] It should be noted that the above embodiments are merely illustrative descriptions. The first processing mode in this application embodiment is not limited to specific types of input data processing. The processor can select appropriate processing algorithms and computing resources for data processing based on the type of input device and the nature of the collected input data. Furthermore, in the first processing mode, the processor typically employs high-precision processing algorithms to ensure the accuracy of the target processing result. This processing method is suitable for application scenarios with high data processing accuracy requirements and relatively sufficient processor resources.

[0050] In operation S102, the processing unit of the input device refers to a dedicated computing component integrated inside the input device and having independent data processing capabilities. In this embodiment, it can be understood as an embedded processing chip or microcontroller that can independently execute specific algorithms and data operations without a processor, and is used to complete computational tasks such as preprocessing, format conversion and preliminary analysis of raw data locally on the input device.

[0051] For example, for touch devices, the processing unit of the input device can be a touch controller IC, which integrates touch signal processing algorithms and coordinate calculation functions; for microphone arrays, the processing unit of the input device can be an audio signal processor (ASP), which has noise reduction, echo cancellation and audio feature extraction capabilities; for AR / VR devices, the processing unit of the input device can be a dedicated sensor fusion chip, used to process raw data from IMU sensors, cameras and depth sensors; for smartwatches, the processing unit of the input device can be a low-power sensor hub, which integrates data acquisition and preliminary processing functions from multiple sensors.

[0052] Correspondingly, the second processing mode refers to the working mode in which the processing unit of the input device undertakes the task of processing input data. In the embodiments of this application, it can be understood as the operating state of using the dedicated processing capability built into the input device to perform localized processing of the original input data, which is used to reduce the processor burden and maintain basic data processing functions when processor resources are scarce or power consumption requirements are strict.

[0053] For example, the second processing mode includes, but is not limited to, data processing methods that rely on the local processing capabilities of the input device, such as the touch controller IC directly processing the capacitance change signal and outputting basic coordinate information, the audio signal processor performing noise reduction and feature extraction on the microphone array data and outputting a preprocessed audio stream, and the image signal processor performing noise reduction and color correction on the raw camera data and outputting a standard image format.

[0054] It should be noted that the processor's resource utilization rate is lower in the second processing mode than in the first processing mode, because the processing unit of the input device takes over the data processing tasks that were originally required to be performed by the processor, thereby significantly reducing the processor's CPU utilization, memory usage, and power consumption.

[0055] Specifically, in the second processing mode, the processor does not need to call complex algorithm libraries for in-depth processing of input data. It only needs to receive the preprocessing results from the input device processing unit and perform simple format conversion or directly pass them to the application. The above processing method greatly reduces the processor's computational load.

[0056] In contrast, in the first processing mode, the processor needs to receive raw data from the input device and call the corresponding software algorithm for comprehensive processing, including complex operations such as data filtering, feature extraction, pattern recognition, and coordinate calculation. These operations typically consume a large number of CPU cycles, memory bandwidth, and cache resources.

[0057] Therefore, by distributing the computational tasks to the processing units of the input device in the second processing mode, the processor resources can be effectively optimized, freeing up more computational resources for other high-priority tasks while ensuring basic functions.

[0058] In one feasible implementation of operation S102, when the electronic device detects that it is currently in the second processing mode, the touch controller built into the touch screen directly receives the raw capacitance change data collected by the touch sensor. The raw capacitance change data includes the capacitance value sequence of multiple touch nodes and sampling time information. The touch controller runs a preset coordinate calculation algorithm to perform noise filtering and coordinate calculation processing on the raw capacitance change data, and generates a target processing result containing basic touch coordinates and touch state information.

[0059] In another feasible implementation, when the electronic device detects that it is currently in the second processing mode, the sensor fusion chip in the electronic device simultaneously acquires raw motion data from the accelerometer, gyroscope, and magnetometer. The raw motion data reflects the acceleration components, angular velocity components, and magnetic field strength changes of the device in three-dimensional space. The sensor fusion chip executes the built-in attitude calculation algorithm to perform data fusion and attitude calculation on the raw motion data, and outputs the target processing result containing the device's attitude angle, motion state, and direction information.

[0060] In another feasible implementation, when the electronic device detects that it is currently in the second processing mode, the digital signal processor in the audio input module receives the raw audio signal from the microphone array. The raw audio signal contains a mixed audio stream of user voice and ambient noise. The digital signal processor performs noise suppression, echo cancellation and audio enhancement processing on the raw audio signal to generate a target processing result containing cleaned audio data and audio feature parameters.

[0061] Based on the above embodiments, as an optional embodiment, if the target processing result meets the target conditions, the processor triggers a target event.

[0062] In this context, the target event refers to a predetermined operation or state change performed by an electronic device in response to a target processing result. In the embodiments of this application, it can be understood as a functional response that is automatically activated based on a specific attribute or numerical range of the target processing result, used to realize specific actions of user interaction, function switching or system control.

[0063] For example, target events include, but are not limited to, interface response events, function switching events, state change events, and notification reminder events.

[0064] In conjunction with the foregoing embodiments, in the touch processing embodiment, when the touch coordinates in the target processing result generated by the touch controller are located in the preset button area and the touch state is a pressed state, the target processing result triggers a button click event, and the electronic device executes the corresponding button function.

[0065] In an embodiment of sensor fusion processing, when the device attitude angle in the target processing result output by the sensor fusion chip exceeds a preset tilt threshold, the target processing result triggers a screen rotation event, and the electronic device automatically adjusts the screen display orientation.

[0066] In an audio processing embodiment, when the audio feature parameters in the target processing result generated by the digital signal processor match a specific voice command pattern, the target processing result triggers a voice command execution event, and the electronic device performs the corresponding control operation.

[0067] It should be noted that the triggering of the target event compares the target processing result with preset conditions in real time, enabling electronic devices to automatically recognize user intent and perform corresponding operations, maintaining good interactive responsiveness in different processing modes.

[0068] By adopting the technical solution of this application, two data processing modes are set up: a first processing mode and a second processing mode. The appropriate processing mode can be flexibly selected according to actual needs to process the input data collected by the input device and obtain the target processing result. When the second processing mode is used, the processing unit of the input device directly processes the input data collected by the input device, transferring the data processing tasks that originally needed to be handled by the processor to the processing unit of the input device, thereby effectively reducing the processor's resource utilization.

[0069] Based on the above embodiments, as an optional embodiment, after the processing unit of the input device processes the input data acquired by the input device to obtain the target processing result in response to being in the second processing mode, the embodiment further includes: sending the target processing result to the processor.

[0070] In one feasible implementation, after the touch controller completes the calculation of touch coordinates and touch state information, the target processing result containing coordinate data, timestamps and touch type identifiers is encapsulated according to a preset data frame format. The encapsulated target processing result is sent to the processor via an interrupt through a serial communication interface. After receiving the interrupt signal, the processor reads the target processing result and forwards it to the currently active application, thereby realizing rapid response and processing of touch events.

[0071] Furthermore, the transmission of the target processing results can employ direct memory access technology. The processing unit of the input device directly writes the target processing results into the memory area designated by the processor, reducing data copy operations and lowering CPU utilization. Simultaneously, a data buffering mechanism can be implemented. When the generation rate of the target processing results exceeds the transmission bandwidth, the processing unit buffers and batches multiple target processing results to ensure the continuity and reliability of data transmission.

[0072] By adopting the technical solution of this application, the processing unit of the input device can efficiently transmit the target processing results, which have been processed locally, to the processor. Simultaneously, since the target processing results have already been preprocessed by the input device processing unit, the processor can directly use the target processing results without performing complex raw data parsing and calculations, effectively improving the overall processing efficiency and response speed of the system. Furthermore, the hierarchical processing architecture gives the system better modularity and scalability, facilitating the integration and functional expansion of different types of input devices.

[0073] Based on the above embodiments, as an optional embodiment, the above data processing method further includes the following operations:

[0074] Operate S201 to obtain performance parameters;

[0075] If the performance parameters do not meet the performance conditions, the processing mode will be switched from the first processing mode to the second processing mode.

[0076] Operation S203: If the performance parameters meet the performance conditions, switch the processing mode from the second processing mode to the first processing mode.

[0077] Among them, performance parameters refer to quantitative indicators that reflect the current operating status and hardware resource usage of electronic devices. In the embodiments of this application, they can be understood as numerical parameters that can measure the system load level and operating efficiency, and are used to evaluate whether electronic devices have sufficient computing resources to support the normal operation of different processing modes.

[0078] For example, performance parameters include, but are not limited to, various performance indicators reflecting the status of hardware resources, such as CPU utilization, system memory usage, real-time temperature of electronic devices, remaining battery percentage, processor operating frequency, memory bandwidth utilization, cache hit rate, system load balancing index, GPU utilization, read / write latency of storage devices, network bandwidth usage, and power consumption monitoring values.

[0079] In one feasible implementation, the system monitoring module of the electronic device can periodically read the processor status register to obtain CPU utilization information, access the memory management unit to obtain the current memory allocation and available memory capacity, and collect processor chip temperature data in real time through a temperature sensor. The collected CPU utilization, memory utilization, and device temperature are then managed and stored as performance parameters in a unified manner.

[0080] In another feasible implementation, multiple hardware metrics can be periodically collected during the operation of the electronic device through a performance monitoring daemon. These metrics include instruction execution efficiency obtained through the processor performance counter, memory access latency obtained through the memory controller, storage device response time obtained through the storage controller, and data transmission rate obtained through the network interface. The above multi-dimensional hardware performance data are weighted and calculated to obtain a comprehensive performance score as a unified performance parameter.

[0081] It should be noted that performance parameters can be acquired through various methods such as timed sampling, event triggering, or continuous monitoring. The specific sampling frequency and monitoring accuracy can be flexibly adjusted according to the hardware configuration of the electronic equipment and the application scenario requirements, so as to reduce the additional consumption of system resources by performance monitoring itself while ensuring the accuracy of monitoring.

[0082] Furthermore, by comparing the acquired performance parameters with preset performance conditions in real time, the electronic device can automatically determine whether it has the hardware conditions to support high-precision data processing, and then intelligently switch between the first processing mode and the second processing mode to achieve optimized allocation of computing resources and dynamic balance of system performance.

[0083] By adopting the technical solution of this application, electronic devices can dynamically adjust data processing strategies according to real-time performance parameters, and achieve intelligent allocation and optimized utilization of computing resources while ensuring the normal operation of basic functions, thereby effectively improving the adaptability and robustness of the system.

[0084] Based on the above embodiments, as an optional embodiment, the above data processing method further includes the following operations:

[0085] Operation S301, in response to the processing mode switching from the first processing mode to the second processing mode, processes the input data in parallel with the first processing mode and the second processing mode within the target duration, and obtains the first processing result and the second processing result.

[0086] Operation S302: Determine the degree of difference between the first processing result and the second processing result;

[0087] Operation S303: If the difference is less than or equal to the difference threshold, stop the first processing mode and send the second processing result to the processor.

[0088] Operation S304 extends the target duration if the difference exceeds the difference threshold, and sends the first processing result to the processor.

[0089] The target duration refers to a preset time interval for parallel processing. In this embodiment, it can be understood as a time window used to verify the consistency of output results between two processing modes, ensuring a smooth transition in data processing during mode switching. The value of the target duration is typically set based on the sampling frequency and processing complexity of the input data.

[0090] Similarly, the degree of difference refers to the degree of deviation between the first processing result and the second processing result. In this embodiment, it can be understood as a numerical index that quantifies the difference between the outputs of the two processing modes, used to evaluate whether the second processing mode can meet the accuracy requirements of the current application scenario. The degree of difference can be calculated using Euclidean distance, cosine similarity, root mean square error, or a custom similarity evaluation function.

[0091] Correspondingly, the difference threshold refers to the critical value for determining whether two processing results are acceptable. In this application embodiment, it can be understood as a criterion for distinguishing whether the difference between processing results is within the tolerance range, and is used to determine whether the mode switch can be safely completed without affecting the user experience.

[0092] In one feasible implementation, when the electronic device detects the need to switch from a first processing mode to a second processing mode, a target duration can be set as a parallel processing period. During this period, the processor continues to call the touch processing algorithm to perform precise coordinate calculation and gesture recognition on the input touch data. At the same time, the touch controller executes its built-in coordinate calculation algorithm in parallel to process the same touch data, obtaining a first processing result containing high-precision coordinate information and a second processing result containing basic coordinate information. The Euclidean distance between the two sets of coordinate data is calculated as the difference. When the difference is less than a preset difference threshold, the processor's touch processing flow is stopped and the touch controller's processing result is used. When the difference exceeds the threshold, the parallel processing duration is extended and the processor's high-precision processing result continues to be used.

[0093] Please refer to Figure 2 , Figure 2 A timing diagram of a parallel processing verification mechanism provided in an embodiment of this application is illustrated schematically.

[0094] like Figure 2 As shown, this parallel processing timing diagram specifically illustrates the timing relationship and state changes of the first processing mode, the second processing mode, and the parallel processing mode (the first processing mode and the second processing mode run simultaneously) from time t0 to t6.

[0095] When the system detects that the performance parameters do not meet the performance conditions at time t1, it triggers a processing mode switching process and enters the parallel processing verification phase from t1 to t2. During this period, the first processing mode and the second processing mode run simultaneously. The processor continues to execute the original high-precision processing algorithm to generate the first processing result, while the processing unit of the input device is activated and executes the built-in processing algorithm in parallel to process the same input data to generate the second processing result.

[0096] In one feasible implementation, during the period from t1 to t2, the touch controller of the touch screen receives the same raw touch data as the processor. The processor calls the THP algorithm library to perform precise coordinate calculation and gesture recognition, generating a first processing result containing high-precision coordinate information. Simultaneously, the touch controller executes its built-in coordinate calculation algorithm in parallel, generating a second processing result containing basic coordinate information. The system calculates the difference between the two sets of processing results, using the Euclidean distance formula to evaluate the coordinate difference. When the difference is less than or equal to a preset difference threshold, it is confirmed that the second processing mode meets the accuracy requirements.

[0097] At time t2, based on the difference evaluation results during parallel processing, the electronic device completes the processing mode switch. The first processing mode stops running, and the system fully switches to the second processing mode. Thereafter, the input device's processing unit independently undertakes data processing tasks, and the processor no longer participates in complex calculations of the input data, thereby reducing the processor's resource utilization. The input device's processing unit sends the generated target processing result to the processor through a preset data transmission path. After receiving the result, the processor directly forwards it to the application program or triggers the corresponding target event.

[0098] It should be noted that while the above parallel processing method provides a smooth switching experience, it will temporarily increase the consumption of system resources. Therefore, the target duration needs to be balanced between switching smoothness and resource efficiency. By reasonably configuring the difference threshold and parallel processing duration, the additional resource overhead can be minimized while ensuring the continuity of user experience.

[0099] By adopting the technical solution of this application, electronic devices can ensure the continuity and consistency of data processing through parallel processing and result verification mechanisms during the processing mode switching process, effectively avoiding sudden changes in processing results or interruption of user interaction caused by mode switching, and improving the stability of the system and the quality of user experience under different load conditions.

[0100] Based on the above embodiments, as an optional embodiment, the performance parameters include the remaining power of the electronic device, and the target condition corresponding to the remaining power is a power threshold. The above data processing method may further include the following operations:

[0101] Operation S401: When the remaining battery power is less than the battery power threshold, switch the processing mode from the first processing mode to the second processing mode.

[0102] In operation S402, if the accuracy of processing the input data by the processing unit in the input device is less than a preset accuracy threshold, and / or if the remaining power is greater than or equal to the power threshold, the processing mode is switched from the second processing mode to the first processing mode.

[0103] The power threshold refers to the remaining power threshold that triggers the power optimization processing mode. In this embodiment, it can be understood as the power boundary point that balances the device's battery life requirements and functional integrity, and is used to guide electronic devices to select appropriate processing strategies under different power states.

[0104] For example, the battery threshold is usually set according to the device type and usage scenario. For small devices such as smartwatches, it can be set to 20% to 30%, and for medium-sized devices such as smartphones, it can be set to 15% to 25%.

[0105] Similarly, the preset accuracy threshold refers to the standard value used to determine whether the output result of the input device processing unit meets the accuracy requirements of the current application. In this embodiment, it can be understood as a quality benchmark that distinguishes the applicability of low-precision processing and high-precision processing, and is used to make dynamic trade-offs between power consumption control and functional assurance.

[0106] Optionally, the setting of the preset accuracy threshold needs to be combined with the specific input data type and target application requirements, such as touch accuracy, speech recognition accuracy, motion detection sensitivity, etc.

[0107] In one feasible implementation, a remaining battery level of 25% can be set as a battery threshold in the smartwatch device. When the battery management system detects that the remaining battery level has dropped below 25%, it automatically switches the data processing mode of the touch screen from the first processing mode to the second processing mode. The touch controller then takes over the task of calculating the basic coordinates of the touch data, reducing the computational load and power consumption of the application processor and extending the device's battery life. When the user launches applications that require high touch accuracy, such as fitness tracking or heart rate monitoring, the system detects that the coordinate accuracy of the touch controller is lower than the preset pixel accuracy threshold and automatically switches back to the first processing mode to ensure the normal operation of the application. When the application is exited, it returns to the second processing mode to maintain a low-power state.

[0108] It should be noted that the above power-based processing mode switching strategy is particularly suitable for small electronic devices that are sensitive to battery life, such as smartwatches, smart earphones, and smart glasses. It avoids complete interruption of functions due to battery depletion by prioritizing the basic availability of the device.

[0109] Meanwhile, through a dynamic determination mechanism of accuracy threshold, it ensures that the necessary high-precision processing support can still be provided for critical applications under power-constrained conditions, thus achieving an organic combination of power consumption control and functional protection.

[0110] In addition, the specific values ​​of the power threshold and accuracy threshold can be adjusted according to factors such as device hardware characteristics, battery capacity, and user habits to achieve the best balance between battery life and user experience.

[0111] By adopting the technical solution of this application, electronic devices can intelligently select appropriate data processing strategies based on real-time power status and application accuracy requirements, providing users with differentiated functional experiences while ensuring continuous device availability, and improving the practicality of portable electronic devices in different usage scenarios.

[0112] The above embodiments provide a general overview of the data processing method provided in this application. The following section uses touch devices as a specific application object to elaborate on the specific implementation and technical effects of the data processing method in different application scenarios.

[0113] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the architecture of a touch device provided in an embodiment of this application.

[0114] like Figure 3 As shown, the touch device 300 includes a processor 301 and an input device 320. The input device 320 includes a processing unit 321 and a sensor 322. The input data collected by the sensor 322 is touch data.

[0115] In this embodiment, the processor 301 and the input device 320 exchange data and control signals via a communication bus, which can employ standard communication protocols such as a high-speed serial interface. The sensor 322 inside the input device 320 is connected to the processing unit 321 via analog signal lines and digital control lines. The sensor 322 transmits the acquired raw touch signals to the processing unit 321 for preliminary processing.

[0116] Specifically, sensor 322 includes a touch-sensing electrode array for detecting the contact position and pressure changes of a finger or stylus on the touch surface. The raw touch data collected by sensor 322 includes physical parameters such as capacitance changes, resistance changes, or optical reflection intensity. Processing unit 321 receives analog signals from sensor 322 through a built-in analog-to-digital converter and performs basic signal filtering, coordinate calculation, and touch event recognition algorithms to generate preliminary processing results containing information such as touch position coordinates, touch area, and touch pressure.

[0117] Furthermore, the processor 301 receives touch data from the input device 320 via a communication interface. This touch data can be raw data directly collected by the sensor 322, or intermediate data that has undergone preliminary processing by the processing unit 321. The processor 301 runs complex touch processing algorithms, including functional modules such as high-precision coordinate calibration, multi-touch recognition, gesture trajectory analysis, accidental touch detection, and precise measurement of touch pressure, to generate the target processing result.

[0118] It should be noted that the accuracy of the target processing result obtained by processing the touch data through the processing unit 321 is less than the accuracy of the target processing result obtained by processing the same touch data through the processor 301.

[0119] The aforementioned difference in accuracy primarily stems from the differences in computing power, algorithm complexity, and processing resources between the processing unit 321 and the processor 301. The processing unit 321 typically employs a low-power embedded microcontroller or dedicated signal processing chip, executing a relatively simplified coordinate calculation algorithm. While this meets basic touch positioning requirements, it has limitations in terms of accuracy and stability. In contrast, the processor 301 possesses stronger computing power and larger storage space, enabling it to run complex touch optimization algorithms, achieving sub-pixel-level coordinate accuracy, more accurate multi-point recognition, and more reliable gesture determination.

[0120] In one specific implementation, the touch device 300 can be a smartphone or tablet computer, the sensor 322 is a capacitive touch sensor array, the processing unit 321 is a touch controller chip, and the processor 301 is an application processor. In normal operation mode, the touch signal detected by the sensor 322 is first transmitted to the processing unit 321 for basic capacitance conversion and coordinate calculation, generating touch coordinate data with a resolution equal to the physical resolution of the touchscreen. This touch coordinate data is then sent to the processor 301 via a bus. Upon receiving the touch data, the processor 301 runs a high-precision touch algorithm for coordinate optimization, noise suppression, and gesture recognition, generating a touch result, which is then provided to the operating system and applications.

[0121] In another implementation, when the touch device 300 enters a low-power mode, the processor 301 can be configured to enter a sleep state, and the processing unit 321 can independently process the touch data and directly output the touch results. In this mode, the touch signals collected by the sensor 322 complete all processing steps within the processing unit 321, including signal filtering, coordinate calculation, and simple touch event determination, generating touch coordinates and event information that meet basic interaction requirements. Although the touch accuracy is relatively low in this mode, it can significantly reduce system power consumption and extend device battery life.

[0122] Through the above technical solutions, touch devices can flexibly choose to have the processing unit or processor process touch data according to different application requirements and system status, achieving an optimized balance between power consumption and performance while ensuring the normal operation of touch functions.

[0123] Based on the above embodiments, as an optional embodiment, the above data processing method may further include the following operations:

[0124] Operation S501, in response to the switching of the processing mode from the first processing mode to the second processing mode, determines the maximum sampling frequency for the input device to collect touch data based on the processor's resource utilization rate;

[0125] Operation S502 generates a first control command based on the maximum sampling frequency and sends the first control command to the input device.

[0126] The maximum sampling frequency refers to the upper limit of the touch data acquisition frequency that the input device can achieve under the current hardware conditions and processor resource status. In this embodiment, it can be understood as the highest data sampling rate that the input device can achieve without affecting system stability. It is used to compensate for the decrease in processing accuracy by increasing the data acquisition density in the second processing mode.

[0127] Similarly, the first control instruction refers to the control signal used to adjust the sampling parameters of the input device. In this embodiment, it can be understood as an instruction data packet containing the sampling frequency setting value and related configuration parameters, used to guide the input device to perform touch data acquisition operation according to the specified sampling frequency.

[0128] In one feasible implementation, when the electronic device detects that the processor's CPU utilization has reached a threshold and needs to switch from a first processing mode to a second processing mode, the maximum sampling frequency of the input device is calculated based on the current CPU utilization and remaining processing capacity. The system generates a first control command containing a sampling frequency setting value of the maximum sampling frequency and a sampling mode identifier. This control command is sent to the controller chip of the touch screen via a bus. After receiving the command, the controller chip adjusts its internal clock divider and sampling timing to increase the original sampling frequency to the maximum sampling frequency, thereby improving the smoothness and positioning accuracy of the touch trajectory.

[0129] In another feasible implementation, when the smartwatch device switches modes, the maximum sampling frequency can be determined by comprehensively considering the processor's memory usage and temperature parameters. When the memory usage is 75% and the device temperature is 40 degrees Celsius, the maximum tolerable sampling frequency of the input device under this resource state is determined by querying a preset sampling frequency mapping table. A first control command containing a sampling frequency of 100Hz, data buffer size, and transmission priority is generated. This control command is sent to the processing unit of the touch panel through the interface. The processing unit adjusts the scanning cycle and signal acquisition window of the touch sensor according to the command, increasing the sampling frequency from the original 80Hz to 100Hz, ensuring that good touch response performance can still be maintained in the second processing mode.

[0130] It should be noted that when switching from the first processing mode to the second processing mode, the accuracy of the touch data processing results will inevitably decrease to some extent because the processing task is transferred from the processor with powerful computing capabilities to the input device processing unit with relatively limited computing resources.

[0131] To mitigate the impact of this accuracy loss on user experience, this application increases the sampling frequency of the input device to increase the density of raw data acquisition, so that even under relatively simplified processing algorithm conditions, relatively accurate touch trajectory and position information can be obtained through richer data points.

[0132] By adopting the technical solution of this application, the above-mentioned sampling frequency compensation mechanism has the advantages of simple implementation, low resource consumption, and fast response speed. Compared with the solution of upgrading hardware processing capabilities or complicating algorithms, the sampling frequency adjustment only requires modifying the configuration parameters of the input device, without additional hardware costs and software development investment. It is a lightweight and cost-effective performance optimization method that can effectively improve the data processing quality in the second processing mode while maintaining the control of system resource utilization, and achieves a balance between processing accuracy and resource utilization efficiency.

[0133] Based on the above embodiments, as an optional embodiment, the above data processing method may further include the following operations:

[0134] Operation S601, in response to the switching of the processing mode from the first processing mode to the second processing mode, determines the execution content of the target application currently running on the processor;

[0135] Operation S602: Determine the target sampling frequency for the execution content of the target application. The target sampling frequency is less than or equal to the maximum sampling frequency of the input device for collecting touch data.

[0136] Operation S603 generates a second control command based on the target sampling frequency and sends the second control command to the input device.

[0137] The execution content of the target application refers to the specific functional operations or business logic performed by the application currently running on the electronic device. In this application embodiment, it can be understood as an application function module that can affect the touch accuracy requirements and interaction methods, used to determine the differentiated requirements for touch data processing accuracy under different application scenarios.

[0138] Different types of applications have different requirements for touch sampling frequency. For example, drawing applications and electronic signature applications need to capture fine handwriting trajectories and pressure changes, requiring extremely high sampling frequency; game applications, especially action and competitive games, require high touch response speed and operation accuracy; browser applications and e-reader applications mainly involve page scrolling and zooming operations, needing to maintain smooth scrolling, and have medium-level sampling frequency requirements; input method applications and form filling applications, because their interaction is mainly based on click operations, have relatively low sampling frequency requirements.

[0139] Similarly, the target sampling frequency refers to the most suitable touch data acquisition frequency determined for the specific content executed by the application. In the embodiments of this application, it can be understood as a sampling frequency setting value that optimizes resource consumption while meeting the application's functional requirements, and is used to provide differentiated touch data acquisition for different types of applications in the second processing mode.

[0140] Specifically, for drawing and signature applications, the target sampling frequency is typically set in the range of 150Hz to 240Hz to ensure smooth lines and a natural writing experience; for game applications, the target sampling frequency is typically set in the range of 120Hz to 180Hz to ensure smooth operation and accuracy; for browser and reader applications, the target sampling frequency is typically set in the range of 80Hz to 120Hz to maintain smooth swiping operations; and for input method and form filling applications, the target sampling frequency is typically set in the range of 60Hz to 90Hz to meet basic click detection requirements.

[0141] Correspondingly, the second control instruction refers to the control signal generated based on the target sampling frequency for adjusting the sampling parameters of the input device. In this embodiment, it can be understood as an instruction data packet containing the sampling frequency setting value adapted to the application and related optimization parameters, which is used to guide the input device to perform touch data acquisition operations according to the specific needs of the application.

[0142] In one feasible implementation, when the electronic device detects that a drawing application is currently running and the user is performing a drawing operation, the system identifies the target application as a high-precision drawing application. Based on the high requirements of the drawing application for the continuity of touch trajectory and coordinate accuracy, the system determines the target sampling frequency adapted to the drawing function as 200Hz from a preset application sampling frequency mapping table, and generates a second control command containing a sampling frequency of 200Hz, a high-precision mode identifier, and a continuous sampling configuration. The control command is sent to the processing unit of the touch screen through an interface. The processing unit adjusts the scanning cycle of the touch sensor to a 5-millisecond interval according to the command to increase the acquisition density of touch data to compensate for the accuracy loss in the second processing mode.

[0143] It should be noted that by determining differentiated target sampling frequencies based on the functional characteristics and interaction requirements of different applications, the system can provide accurately adapted touch data acquisition strategies for various applications in the second processing mode, avoiding resource waste or performance issues that may result from using a uniform sampling frequency. Furthermore, setting the target sampling frequency without exceeding the maximum sampling frequency ensures the stability and reliability of the system under different resource conditions.

[0144] By adopting the technical solution of this application, electronic devices can intelligently determine the most suitable touch data sampling frequency according to the specific execution content of the target application currently running, thereby achieving a balance between touch performance and system resource consumption.

[0145] In scenarios where system resource utilization is unstable, if a fixed resource utilization threshold is used to determine the processing mode switching, the system may frequently switch between the first and second processing modes due to slight fluctuations in resource utilization around the threshold. Such frequent switching can cause problems such as discontinuity of touch trajectory, loss of touch events, and delays and jitters in system response.

[0146] To address the aforementioned problems, as an optional embodiment based on the above embodiments, the data processing method may further include the following operations:

[0147] Operation S701, in response to the processing mode switching from the first processing mode to the second processing mode, determines the scaling factor between the target sampling frequency and the maximum sampling frequency;

[0148] Operate S702 to adjust the resource utilization threshold based on the proportional coefficient.

[0149] The scaling factor refers to the normalized ratio between the target sampling frequency and the maximum sampling frequency of the input device. In this embodiment, it can be understood as a quantitative indicator reflecting the current application's requirement for touch accuracy.

[0150] For example, the formula for calculating the proportionality coefficient is: ;

[0151] In the formula, β represents the proportionality coefficient, and f target f represents the target sampling frequency. max This represents the maximum sampling frequency. When β=1, it indicates that the application has a high sampling frequency requirement and extremely high requirements for touch accuracy; the smaller the β, the lower the application's requirement for a low sampling frequency.

[0152] Correspondingly, the resource utilization threshold refers to the critical value of system resource utilization that triggers the switching of processing modes. In this embodiment, it can be understood as a dynamic judgment standard for determining whether to switch between the first processing mode and the second processing mode, in order to avoid the problem of frequent mode switching caused by fluctuations in resource utilization around a fixed threshold.

[0153] For example, the adjusted resource utilization threshold calculation formula is as follows:

[0154] ;

[0155] In the formula, T2 represents the adjusted resource occupancy rate threshold, T1 represents the preset initial resource occupancy rate threshold, α represents the adjustment coefficient, and β represents the proportional coefficient.

[0156] The adjustment coefficient α controls the magnitude of the resource utilization threshold adjustment. A larger α value indicates that the system is more sensitive to changes in the application's precision requirements, and the threshold adjustment magnitude is larger. The proportional coefficient β quantifies the current application's demand for touch precision. A β close to 1 indicates that the application has a strong demand for high-precision touch data, while a smaller β indicates that the application has a higher tolerance for touch precision.

[0157] In one feasible implementation, when the electronic device is currently running a drawing application, since the drawing application usually has a high target sampling frequency and a scaling factor close to 1, indicating that the drawing application has extremely high requirements for touch accuracy, the system calculates the adjusted resource occupancy threshold based on this high scaling factor. At this time, the (1-β) term is close to 0, and the adjusted threshold T2 is lower than the initial threshold T1. This allows the system to prioritize maintaining the first processing mode under a low resource occupancy, avoiding the impact on the continuity and accuracy of the drawing trajectory due to the delay in switching to the high-precision processing path, and ensuring that the drawing application can obtain high-precision touch data for most of the running time.

[0158] In another feasible implementation, when the electronic device is currently running an input method application, since the input method application usually has a low target sampling frequency and a scaling factor of less than 1, indicating that the input method application has a high tolerance for touch accuracy, the system calculates the adjusted resource utilization threshold based on this low scaling factor. At this time, the value of (1-β) is large, and the adjusted threshold T2 is higher than the initial threshold T1. This allows the system to maintain the second processing mode under a high resource utilization rate, avoiding unnecessary resource waste, device overheating, and power consumption caused by switching to the first processing mode too early. This ensures that the input method application maximizes system resource conservation while maintaining basic click response.

[0159] By adopting the technical solution of this application, electronic devices can adjust the resource utilization threshold for processing mode switching according to the touch accuracy requirements of the current application, effectively solving the problem of frequent mode switching that is easily caused by fixed threshold strategies in scenarios with fluctuating resource utilization. Through dynamic threshold adjustment driven by a proportional coefficient, more stable high-precision processing is provided for applications with high precision requirements, and a more persistent low-power operation mode is provided for applications with low precision tolerance, improving the continuity and stability of touch interaction, while optimizing the utilization efficiency of system resources.

[0160] This application also discloses an electronic device, including:

[0161] Input device, including sensors and processing unit;

[0162] Sensors are used to collect input data;

[0163] The processor is used to process the input data acquired by the sensor in the first processing mode to obtain the target processing result.

[0164] The processing unit is used to process the input data acquired by the sensor in the second processing mode to obtain the target processing result.

[0165] In the first processing mode, the processor's resource utilization rate is lower than that in the second processing mode.

[0166] Figure 4 A block diagram of an electronic device provided in an embodiment of this application is shown schematically. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0167] like Figure 4 As shown, the electronic device according to an embodiment of this application includes a first control information acquisition sensor, a second control information acquisition sensor (not shown), and a processor 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a memory 408 into a random access memory (RAM) 403. The processor 401 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 401 may also include onboard memory for caching purposes. The processor 401 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.

[0168] RAM 403 stores various programs and data required for the operation of the electronic device. Processor 401, ROM 402, and RAM 403 are interconnected via bus 404. Processor 401 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 402 and / or RAM 403. It should be noted that the programs may also be stored in one or more memories other than ROM 402 and RAM 403. Processor 401 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.

[0169] According to embodiments of this application, the electronic device may further include an input / output (I / O) interface 404, which is also connected to a bus 404. The system 400 may also include one or more of the following components connected to the input / output (I / O) interface 404: an input device 406 including a keyboard, mouse, etc.; an output device 407 including a cathode ray tube (CRT), liquid crystal display (LCD), display screen, etc., and a speaker, etc.; a memory 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the input / output (I / O) interface 404 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 410 as needed so that computer programs read from it can be installed into the memory 408 as needed.

[0170] According to embodiments of this application, the method flow according to embodiments of this application can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by processor 401, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0171] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0172] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0173] For example, according to embodiments of this application, a computer-readable storage medium may include the ROM 402 and / or RAM 403 described above and / or one or more memories other than ROM 402 and RAM 403.

[0174] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this application. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the methods provided in the embodiments of this application.

[0175] When the computer program is executed by the processor 401, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0176] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via communication section 409, and / or installed from removable medium 411. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0177] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not expressly stated in this application. In particular, the various embodiments and / or features described in the claims of this application may be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

[0178] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this application is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this application, and all such substitutions and modifications should fall within the scope of this application.

Claims

1.A data processing method, comprising: in response to being in a first processing mode, processing, by a processor, input data collected by an input device to obtain a target processing result; in response to being in a second processing mode, processing, by a processing unit of the input device, the input data collected by the input device to obtain the target processing result; wherein a resource occupation rate of the processor in the second processing mode is less than a resource occupation rate of the processor in the first processing mode. 2.The method of claim 1, further comprising: obtaining a performance parameter; if the performance parameter does not satisfy a performance condition, switching the processing mode from the first processing mode to the second processing mode; if the performance parameter satisfies the performance condition, switching the processing mode from the second processing mode to the first processing mode. 3.The method of claim 1, wherein the input data is touch data, and an accuracy of the target processing result obtained by processing the touch data by the processing unit is less than an accuracy of the target processing result obtained by processing the touch data by the processor. 4.The method of claim 1, after the processing unit of the input device processes the input data collected by the input device to obtain the target processing result in response to being in the second processing mode, further comprising: sending the target processing result to the processor. 5.The method of claim 3, further comprising: in response to the processing mode being switched from the first processing mode to the second processing mode, determining a maximum sampling frequency of collecting the touch data by the input device according to the resource occupation rate of the processor; generating a first control instruction based on the maximum sampling frequency, and sending the first control instruction to the input device. 6.The method of claim 3, further comprising: in response to the processing mode being switched from the first processing mode to the second processing mode, determining an execution content of a target application program currently running by the processor; determining a target sampling frequency adapted to the execution content of the target application program, the target sampling frequency being less than or equal to a maximum sampling frequency of collecting the touch data by the input device; generating a second control instruction based on the target sampling frequency, and sending the second control instruction to the input device. 7.The method of claim 6, further comprising: in response to the processing mode being switched from the first processing mode to the second processing mode, determining a proportional coefficient between the target sampling frequency and the maximum sampling frequency; adjusting the resource occupation rate threshold based on the proportional coefficient. 8.The method of claim 2, further comprising: in response to the processing mode being switched from the first processing mode to the second processing mode, processing the input data in the first processing mode and the second processing mode in parallel within a target time length, and obtaining the first processing result and the second processing result; determining a difference degree of the first processing result and the second processing result. stop the first processing mode and send the second processing result to the processor when the difference is less than or equal to a difference threshold; extend the target time length and send the first processing result to the processor when the difference is greater than the difference threshold. 9.The method of claim 2, wherein the performance parameter comprises a remaining power of the electronic device, and the target condition corresponding to the remaining power is a power threshold, and the method further comprises: switching the processing mode from the first processing mode to a second processing mode when the remaining power is less than the power threshold; and switching the processing mode from the second processing mode to the first processing mode if an accuracy of processing the input data by a processing unit in the input device is less than a preset accuracy threshold, and / or when the remaining power is greater than or equal to the power threshold. 10.An electronic device, comprising: an input device comprising a sensor and a processing unit; the sensor configured to collect input data; a processor configured to process the input data collected by the sensor to obtain a target processing result when a processing mode is a first processing mode; the processing unit configured to process the input data collected by the sensor to obtain a target processing result when the processing mode is a second processing mode; and wherein a resource occupancy rate of the processor in the first processing mode is less than a resource occupancy rate of the processor in the second processing mode. ​ ​ ​ ​ ​ ​ ​