Data processing method and device, electronic equipment and computer program product

By acquiring data write request and process characteristic information, and combining wear prediction and scenario classification algorithms, the write speed of the embedded multimedia card is dynamically adjusted, solving the balance problem between storage unit lifespan and user experience, and achieving more efficient storage management.

CN120848792APending Publication Date: 2025-10-28HISENSE VISUAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510897425.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

In existing technologies, electronic devices cannot balance the lifespan of storage units with the speed of critical operations when controlling the write speed of embedded multimedia cards, resulting in a decline in user experience.

Method used

By acquiring the characteristic information of data write requests and target processes, and combining this with the process type, the write speed is dynamically adjusted. Wear-out prediction algorithms and scenario classification algorithms are used to assess risks and optimize storage strategies.

Benefits of technology

It extends the lifespan of storage units, reduces unreasonable speed limits, and improves the user experience, especially the speed of operation during system updates and initialization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848792A_ABST
    Figure CN120848792A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is suitable for the technical field of data storage, and provides a data processing method and device, electronic equipment and a computer program product. Obtaining first feature information corresponding to the data writing request, second feature information corresponding to the target process and a process type corresponding to the target process; the first feature information is used for representing features of to-be-written data corresponding to the data writing request; determining risk information corresponding to the data writing request according to the first feature information and the second feature information; according to the risk information and a process type corresponding to the target process, the writing speed of the to-be-written data is determined; and writing the to-be-written data into the storage unit according to the writing speed. According to the embodiment of the invention, the service life of the storage unit can be prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and in particular to a data processing method, apparatus, electronic device, and computer program product. Background Technology

[0002] An embedded multi-media card (EMMC) is a storage device that encapsulates flash memory, a controller, and a standard interface. It is widely used in electronic devices such as projectors, displays, and smartphones. Because the flash memory in an embedded multi-media card is subject to wear and tear, electronic devices typically need to control the write speed of the embedded multi-media card during practical use to reduce flash memory wear and extend the card's lifespan.

[0003] In existing technologies, electronic devices typically determine the write speed of an embedded multimedia card based on the amount of data to be written. That is, when the amount of data to be written exceeds a preset threshold, the electronic device reduces the write speed. However, existing write speed control methods reduce the speed of the electronic device when performing critical operations such as system updates, logging, and system initialization, thereby degrading the user experience. Summary of the Invention

[0004] In view of this, embodiments of this application provide a data processing method, apparatus, electronic device, and computer program product to enable data writing operations to be performed at an appropriate speed, thereby improving the availability of storage units and enhancing the user experience.

[0005] The first aspect of this application provides a data processing method, including:

[0006] In response to a data write request initiated by a target process, the system obtains first feature information corresponding to the data write request, second feature information corresponding to the target process, and process type corresponding to the target process; the first feature information is used to represent the characteristics of the data to be written corresponding to the data write request.

[0007] Based on the first feature information and the second feature information, the risk information corresponding to the data write request is determined;

[0008] Based on the risk information and the process type corresponding to the target process, the write speed of the data to be written is determined;

[0009] The data to be written is written to the storage unit according to the stated write speed.

[0010] In one possible implementation of the first aspect, the risk information includes a risk score;

[0011] After obtaining the first feature information corresponding to the data write request, the second feature information corresponding to the target process, and the process type corresponding to the target process, the method further includes:

[0012] If the process type corresponding to the target process is a first process type, then it is determined whether the risk score is greater than a first threshold; the first process type is used to indicate that the target process is a monitored process;

[0013] If the risk score is less than the first threshold, then the preset speed conversion table is queried according to the risk score to determine the writing speed of the data to be written.

[0014] If the risk score is greater than or equal to the first threshold, an alarm message is generated; the alarm message is used to indicate that the response to the write request initiated by the target process is stopped.

[0015] In one possible implementation of the first aspect, after obtaining the first feature information corresponding to the data write request, the second feature information corresponding to the target process, and the process type corresponding to the target process, the method further includes:

[0016] If the process type corresponding to the target process is the second process type, then the preset speed is determined as the writing speed corresponding to the data to be written; the second process type is used to indicate that the target process is a process that is allowed to run; the preset speed is the maximum speed at which the storage unit can perform data writing operations.

[0017] In one possible implementation of the first aspect, after determining the process type corresponding to the target process based on the process information, the method further includes:

[0018] If the process type corresponding to the target process is a third process type, an alarm message is generated; the third process type is used to indicate that the target process is a process with restricted operation; the alarm message is used to indicate that the response to write requests initiated by the target process is stopped.

[0019] In one possible implementation of the first aspect, the risk information includes a risk score;

[0020] The step of determining the risk information corresponding to the data write request based on the first feature information and the second feature information includes:

[0021] Feature extraction is performed on the first feature information and the second feature information to determine the fusion feature of the first feature information and the second feature information;

[0022] The fused features are processed by a wear prediction algorithm to determine the predicted wear amount of the storage cell;

[0023] The fused features are processed by a scene classification algorithm to determine the predicted scene type corresponding to the data write request;

[0024] Based on the predicted wear amount and the predicted scenario type, the risk score corresponding to the data write request is determined.

[0025] In one possible implementation of the first aspect, after writing the data to be written to the storage unit according to the write speed, the method further includes:

[0026] Obtain the actual wear and tear of the storage unit;

[0027] Calculate the error value based on the actual wear amount and the predicted wear amount;

[0028] The wear prediction algorithm is updated based on the error value and the fusion features.

[0029] In one possible implementation of the first aspect, the first feature information includes at least one of the entropy value, data volume, and storage address dispersion of the data to be written; the second feature information includes at least one of the digital signature of the target process, processor utilization, process tree, and sending frequency of the data write request.

[0030] A second aspect of this application provides a data processing apparatus, including:

[0031] The data acquisition module is used to respond to a data write request initiated by a target process by acquiring first feature information corresponding to the data write request, second feature information corresponding to the target process, and process type corresponding to the target process; the first feature information is used to represent the features of the data to be written corresponding to the data write request.

[0032] The risk information determination module is used to determine the risk information corresponding to the data write request based on the first feature information and the second feature information;

[0033] The speed determination module is used to determine the writing speed of the data to be written based on the risk information and the process type corresponding to the target process.

[0034] The write module is used to write the data to be written into the storage unit according to the write speed.

[0035] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data processing method described in the first aspect above.

[0036] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the data processing method described in the first aspect above.

[0037] A fifth aspect of this application provides a computer program product that, when run on a computer, causes the computer to perform the data processing method described in the first aspect.

[0038] Compared with the prior art, the embodiments of this application have the following advantages:

[0039] In this embodiment, the electronic device can determine the risk information corresponding to the data write request based on the first feature information corresponding to the data write request and the second feature information corresponding to the target process initiating the data write request. The first feature information can be used to represent the characteristics of the data to be written corresponding to the data write request. Then, the electronic device can determine the write speed of the data to be written based on the process type of the target process and the risk information. Through the method provided in this embodiment, the electronic device can adjust the speed at which the data to be written to the storage unit is written based on the risk information and the process type corresponding to the target process. Therefore, the method provided in this embodiment can reduce unreasonable speed limits caused by a single data volume factor, thereby enabling the electronic device to perform data write operations at an appropriate speed, improving the availability of the storage unit and enhancing the user experience. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a schematic diagram of a data processing method provided in an embodiment of this application;

[0042] Figure 2 This is a schematic diagram of another data processing method provided in an embodiment of this application;

[0043] Figure 3 This is an architecture diagram of a data processing system provided in an embodiment of this application;

[0044] Figure 4 This is a schematic diagram of a data processing flow provided in an embodiment of this application;

[0045] Figure 5 This is a schematic diagram of a data processing apparatus provided in an embodiment of this application;

[0046] Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0047] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0048] With the development of software development technology, the applications installed on electronic devices are becoming increasingly complex. Many different applications need to write data to embedded multimedia cards for storage, thus making the lifespan degradation of embedded multimedia cards more and more significant. Currently, four main schemes are used to control the write speed of embedded multimedia cards in order to extend their lifespan.

[0049] Option 1 involves reducing the write speed of all data when the amount of data to be written to the embedded multimedia card exceeds a fixed threshold. While this option significantly reduces wear and tear on the embedded multimedia card, it also reduces the write speed during critical operations such as system updates, log recording, and system initialization, resulting in a substantial decline in user experience (for example, causing abnormal lag during system upgrades).

[0050] Option two involves determining the write speed of the data to be written using a statistical prediction model. Specifically, the electronic device can continuously collect historical data from the embedded multimedia card during data write operations and calculate the average load of the embedded multimedia card during these operations based on the collected historical data. Then, the electronic device can predict the remaining lifespan of the embedded multimedia card based on the average load and the card's endurance parameters (e.g., the number of program / erase cycles of the flash memory). When the remaining lifespan of the embedded multimedia card is less than a lifespan threshold, the electronic device can reduce some unnecessary data write operations or slow down the write speed of all data to be written. However, this option will result in higher response latency, thus degrading the user experience.

[0051] Option three involves integrating a wear leveling algorithm into the flash memory of the embedded multimedia card. This algorithm evenly distributes the data to be written across different flash memory blocks, thereby extending the lifespan of the embedded multimedia card. However, this option requires customized operation of the flash memory, significantly increasing the manufacturing cost of the embedded multimedia card.

[0052] In summary, existing data processing solutions all have various drawbacks. Therefore, this application provides a data processing method. Using the method provided in this embodiment, an electronic device can determine the write speed of the data to be written by combining the risk information of the data write request and the process type of the target process initiating the data write request. Therefore, the method provided in this application can reduce unreasonable speed limiting caused by a single factor, thereby extending the lifespan of the embedded multimedia card while ensuring the write speed of critical data. Furthermore, this application embodiment results in minimal response latency and does not require additional manufacturing costs for the embedded multimedia card.

[0053] The technical solution of this application will be described below through specific embodiments.

[0054] Reference Figure 1 This diagram illustrates a data processing method provided in an embodiment of this application. This method can be applied to any electronic device equipped with an embedded multimedia card, such as a projection device, display device, smartphone, or tablet computer. The data processing method specifically includes the following steps:

[0055] S101. In response to a data write request initiated by the target process, obtain the first characteristic information corresponding to the data write request, the second characteristic information corresponding to the target process, and the process type corresponding to the target process.

[0056] In this embodiment, during user operation of the electronic device, the device can continuously receive data write requests initiated by various processes on the device. For example, the electronic device can be a smartphone running an Android system. When a user launches a camera application on the smartphone to take a picture, the camera application's process can initiate a data write request to the smartphone's main control chip to write the captured photo to the embedded multimedia card. Similarly, when an application process on the smartphone generates a log, it can initiate a data write request to the smartphone's main control chip to write the generated log to the embedded multimedia card. Furthermore, when the electronic device needs a system upgrade, the system process on the electronic device can initiate a data write request to the main control chip to write the new system files to the embedded multimedia card.

[0057] The electronic device can respond to a data write request initiated by a target process by calling a preset probe function to obtain the first characteristic information corresponding to the data write request, the second characteristic information corresponding to the target process, and the process type corresponding to the target process. The target process can be any process on the electronic device that initiates the data write request. The target process can be any type of process, such as a system process, application process, or security & monitoring process; this embodiment is not intended to specifically limit the target process. For example, the electronic device can intercept mmc_blk_issue_rq requests initiated by various processes through a hook, and collect the first characteristic information corresponding to the data write request and the second characteristic information corresponding to the target process through the probe function.

[0058] In one possible implementation, the first feature information acquired by the electronic device can be used to represent the characteristics of the data to be written corresponding to the data write request. Specifically, the first feature information may include at least one of the following: entropy value, data volume, storage address, and storage address dispersion of the data to be written. The second feature information acquired by the electronic device can be used to represent the characteristics of the target process. Specifically, the second feature information may include at least one of the following: digital signature of the target process, processor utilization, process tree, call chain hash value, data write request sending frequency, and target process priority.

[0059] In one possible implementation, after obtaining the process type corresponding to the target process, the electronic device can first determine whether it needs to perform a data write operation on the data to be written corresponding to the data write request based on the process type of the target process. The electronic device can store whitelists, graylists, and blacklists. Each of the whitelist, graylist, and blacklist can store the digital signatures of multiple processes. Specifically, the whitelist can store the digital signatures of multiple processes that are allowed to run without limiting the data write speed; the graylist can store the digital signatures of multiple processes that need to be monitored and whose data write speed needs to be limited; and the blacklist can store the digital signatures of multiple processes whose operation is restricted. After obtaining the digital signature of the target process, the electronic device can query the whitelist, graylist, and blacklist based on the digital signature of the target process to determine the process type corresponding to the target process.

[0060] Specifically, for any target process that initiates a data write request, if the electronic device determines that the gray list contains the digital signature corresponding to the target process, the electronic device can determine that the process type of the target process is the first process type. The first process type indicates that the target process is a monitored process. At this time, the electronic device can execute S102 to S104 to determine the write speed of the data to be written corresponding to the target process, and write the data to be written to the storage unit according to the write speed.

[0061] If the electronic device determines that the whitelist contains the digital signature corresponding to the target process, it can determine the second process type of the target process. The second process type indicates that the target process is allowed to run. At this point, the electronic device can determine a preset speed as the write speed of the data to be written in the data write request, and write the data to be written to the storage unit according to the preset speed. The preset speed can be the maximum speed at which the storage unit can perform data write operations.

[0062] If the electronic device determines that the blacklist contains the digital signature corresponding to the target process, it can determine the target process's process type (third process type). The second process type indicates that the target process is a restricted process. In this case, the electronic device may not perform a data write operation and will generate an alarm message. This alarm message can be used to indicate that the electronic device will stop responding to write requests initiated by the target process.

[0063] The method provided in this embodiment allows the electronic device to determine whether to execute the corresponding data write operation based on the process type of the target process after receiving a data write request. Therefore, this method effectively intercepts covert attacks disguised as legitimate requests, reducing the probability of writing useless data (such as fragmented data from malware development kits) into the storage unit. This, in turn, reduces abnormal write behavior in the storage unit, improves the data security of the electronic device, and extends the lifespan of the storage unit.

[0064] S102. Determine the risk information corresponding to the data write request based on the first feature information and the second feature information.

[0065] In this embodiment, after determining the first feature information and the second feature information, the electronic device can perform data processing on the first feature information and the second feature information to determine the risk information corresponding to the data write request. The risk information can be used to indicate the degree of wear and tear on the storage unit after the data to be written corresponding to the data write request is written to the storage unit.

[0066] In one possible implementation, the operating temperature of the storage unit also affects its lifespan. Specifically, when the operating temperature of the storage unit is too high, an overheat protection mechanism may be triggered, leading to a significant decrease in the storage unit's lifespan. Therefore, in response to a data write request initiated by the target process, the electronic device can also acquire the operating temperature of the storage unit and determine the risk information of the data write request based on the operating temperature, the first characteristic information, and the second characteristic information.

[0067] In one possible implementation, the risk information corresponding to the data write request may include the risk level of the data write request. After obtaining the first feature information and the second feature information, the electronic device can query the risk rule base based on the first feature information and the second feature information to determine the risk level of the data write request. For example, when the first feature information includes the entropy value of the data to be written and the second feature information includes the processor utilization rate, the electronic device can query the judgment conditions regarding entropy value and processor utilization rate in the risk rule base and determine the risk level of the data write request based on the queried judgment conditions. Specifically, the judgment conditions regarding entropy value and processor utilization rate in the risk rule base may be: if the entropy value of the data to be written is greater than 7.5 and the CPU utilization rate is greater than 80%, then the risk level can be "high risk"; if the entropy value of the data to be written is less than or equal to 7.5, and / or the CPU utilization rate is less than or equal to 80%, then the risk level can be "low risk".

[0068] S103. Determine the write speed of the data to be written based on the risk information and the process type corresponding to the target process.

[0069] In this embodiment, after determining the risk information of the data write request, the electronic device can determine the write speed of the data to be written based on the risk information and the process type corresponding to the target process.

[0070] In one possible implementation, the risk information of the data to be written may include a risk score. For any target process, after the electronic device obtains the risk information of the data write request and the process type corresponding to the target process, if the electronic device determines that the process type corresponding to the target process is a first process type, then the electronic device can determine whether the risk score corresponding to the data write request is greater than a first threshold preset by the developers. If the electronic device determines that the risk score corresponding to the data write request is less than the first threshold, then the electronic device can query a speed conversion table preset by the developers based on the risk score to determine the write speed of the data to be written. The speed conversion table may contain multiple different score ranges and the write speeds corresponding to each score range. For example, when the risk score is less than or equal to 10, the electronic device can determine that the write speed of the data to be written is 50 megabytes per second; when the risk score is greater than 10 and less than or equal to 30, the electronic device can determine that the write speed of the data to be written is 20 megabytes per second; when the risk score is greater than 30 and less than or equal to 60, the electronic device can determine that the write speed of the data to be written is 5 megabytes per second.

[0071] S104. Write the data to be written to the storage unit according to the writing speed.

[0072] In this embodiment, after determining the writing speed of the data to be written, the electronic device can write the data to be written into the storage unit according to the writing speed.

[0073] The method provided in this embodiment allows the electronic device to determine the write speed of the data to be written based on two main factors: the risk information of the data write request and the process type of the target process. Therefore, this method can extend the lifespan of the storage unit while reducing unreasonable speed limits caused by a single factor. Furthermore, determining the write speed based on the process type of the target process can reduce unreasonable speed limits during critical operations such as system updates and system initialization, thereby improving the user experience.

[0074] In one possible implementation, the storage unit can be an embedded multimedia card on an electronic device. After determining the write speed of the data to be written, the electronic device can invoke a preset input / output scheduler to determine the write order of the data write requests. The input / output scheduler can sort multiple data write requests received by the electronic device to determine the write order corresponding to each data write request. Specifically, exemplaryly, the input / output scheduler in the electronic device can be any input / output scheduler known to those skilled in the art, such as a Completely Fair Queueing scheduler or a Deadline Scheduler. After determining the write speed and write order corresponding to the data write requests, the electronic device can write the data to be written to the storage unit according to the write speed and write order.

[0075] Figure 2 A flowchart illustrating a specific implementation of a data processing method S102 provided in the second embodiment of this application is shown. See also Figure 2 Compared to Figure 1 In the embodiment provided in this embodiment, S102 includes: S1021 to S1024, which are described in detail below:

[0076] S1021. Extract features from the first feature information and the second feature information to determine the fusion feature of the first feature information and the second feature information.

[0077] In this embodiment, the risk information determined based on the first feature information and the second feature information may include a risk score corresponding to the data write request. After obtaining the first feature information and the second feature information, the electronic device can perform feature extraction on the first feature information and the second feature information to obtain the first feature corresponding to the first feature information and the second feature corresponding to the second feature information. Then, the electronic device can perform feature fusion on the first feature and the second feature through a preset feature fusion algorithm to determine the fused feature. For example, the fused feature can be specifically represented as: fused feature = [call chain hash value, entropy value of the data to be written, dispersion of storage address, priority of target process].

[0078] In one possible implementation, when the first feature information and / or the second feature information contains graphical data (such as a process tree), the electronic device can extract features from the graphical data in the first feature information and / or the second feature information using a graph feature extraction algorithm, and perform graph embedding encoding on the extracted graphical features, other first features, and other second features to generate fused features.

[0079] S1022. The fusion features are processed by a wear prediction algorithm to determine the predicted wear amount of the storage cell.

[0080] In this embodiment, after acquiring the fused features, the electronic device can process the fused features using a wear prediction algorithm to determine the predicted wear amount of the storage unit. Specifically, the wear prediction algorithm can be any algorithm known to those skilled in the art, such as MobileNetV3 or XGBoost. This embodiment is not intended to specifically limit the wear prediction algorithm. The predicted wear amount can be used to represent the degree of performance degradation of the storage unit after the data to be written corresponding to the data write request is written to the storage unit.

[0081] S1023. Process the fused features using a scene classification algorithm to determine the predicted scene type corresponding to the data write request.

[0082] In this embodiment, after acquiring the fused features, the electronic device can further process the fused features using a scene classification algorithm to determine the predicted scene type corresponding to the data write request. Specifically, the scene classification algorithm can be any algorithm known to those skilled in the art, such as the Prophet time series model or LSTM. This embodiment is not intended to specifically limit the scene classification algorithm. The predicted scene type can be used to represent the scene in which the target process initiates the data write request.

[0083] S1024. Determine the risk score corresponding to the data write request based on the predicted wear amount and the predicted scenario type.

[0084] In this embodiment, after determining the predicted wear amount and the predicted scenario type, the electronic device can calculate the risk score corresponding to the data to be written based on the predicted wear amount and the predicted scenario type. Specifically, after determining the predicted scenario type, the electronic device can query a preset coefficient conversion table to determine the scenario coefficient corresponding to the predicted scenario type. After determining the scenario coefficient, the electronic device can input the predicted wear amount and the scenario coefficient into a preset scoring function to determine the risk score corresponding to the data writing request through the scoring function.

[0085] The method provided in this embodiment enables electronic devices to determine the predicted wear amount and predicted scenario type through wear prediction algorithms and scenario classification algorithms, and derive a risk score accordingly. Therefore, the method provided in this embodiment allows electronic devices to accurately assess storage risks, dynamically optimize storage strategies, thereby extending the lifespan of storage units, and is suitable for storage system management in multiple scenarios.

[0086] In one possible implementation, the predicted scenario type corresponding to the data write request can include a normal type and an abnormal type. Specifically, for any data write request, if the electronic device determines that the predicted scenario type corresponding to the data write request is a normal type, then the electronic device can determine that the scenario coefficient is 0; if the electronic device determines that the predicted scenario type corresponding to the data write request is an abnormal type, then the electronic device can determine that the scenario coefficient is 1.

[0087] In one possible implementation, the predicted scenario type corresponding to the data write request can also include multiple types such as photo write type, background log write type, user file write type, and application data persistence type. The coefficient conversion table can contain the scenario coefficients corresponding to each type. The electronic device can query the coefficient conversion table to determine the scenario coefficient corresponding to the predicted scenario type. For example, the scenario coefficient corresponding to the background log write type can be 0.5, and the scenario coefficient corresponding to the user file write type can be 0.2.

[0088] In one possible implementation, the score function can be specifically as follows.

[0089] S=a1β+a2δ

[0090] Where S can represent the risk score corresponding to the data write request. a1 can represent the first preset coefficient, for example, a1 can be 0.7; β can represent the scenario coefficient corresponding to the predicted scenario type; a2 can represent the second preset coefficient, for example, a2 can be 0.3; δ can represent the predicted wear amount.

[0091] In one possible implementation, after the electronic device writes the data to be written to the storage unit at the write speed, it can obtain the actual wear and tear of the storage unit. Specifically, after completing the data write operation, the electronic device can count the actual number of erase / write operations on the storage unit within a preset time period, and calculate the actual wear and tear of the storage unit based on the actual number of erase / write operations and the theoretical maximum number of erase / write operations corresponding to the storage unit. After determining the actual wear and tear of the storage unit, the electronic device can calculate the error value between the actual wear and tear and the predicted wear and tear using a preset loss function. Then, the electronic device can update the wear prediction algorithm based on the error value and the fused features, correcting the various parameters in the wear prediction algorithm. The loss function used by the electronic device to calculate the error value can be any loss function known to those skilled in the art, such as the mechanical gradient descent function or the minimization loss function.

[0092] In one possible implementation, after the electronic device writes the data to be written to the storage unit according to the write speed, it can also obtain the target process's processor utilization, memory utilization, and other operational information, and determine the actual scene type corresponding to the data write request based on the operational information. The electronic device can calculate the error value between the actual scene type and the predicted scene type using a preset loss function. Then, the electronic device can update the scene classification algorithm based on the error value and fused features, correcting the various parameters in the scene classification algorithm.

[0093] The method provided in this embodiment can improve the accuracy of the wear prediction algorithm and the scene classification algorithm by continuously optimizing and updating the wear prediction algorithm and the scene classification algorithm during the user's use, thereby improving the accuracy of the risk score.

[0094] Figure 3 This is an architecture diagram of a data processing system provided in an embodiment of this application. Figure 3 As shown, the data processing system can include a data acquisition layer, a decision-making layer, an execution layer, and an optimization layer. When any target process on the electronic device initiates a data write request, the electronic device can collect information such as the call chain hash value of the target process, the storage address of the data to be written, the dispersion of the storage address, the entropy value of the data to be written, and the operating temperature of the storage unit through the probe function in the data acquisition layer. Then, the data acquisition layer can send all the collected data to the decision-making layer. The decision-making layer can include a wear prediction algorithm and a scene classification algorithm. The decision-making layer can calculate the predicted wear amount using the wear prediction algorithm and determine the predicted scene type using the scene classification algorithm.

[0095] Then, the electronic device can send the predicted wear amount and predicted scenario type to the execution layer. The execution layer can calculate the risk score corresponding to the write request based on the predicted wear amount and predicted scenario type. The execution layer can also determine the write speed of the data to be written based on the risk score corresponding to the write request and the process type of the target process. After determining the write speed, the execution layer can call a preset input / output scheduler to write the data to be written to the storage unit according to the write speed. After the electronic device completes the data write operation, the optimization layer can determine the actual wear amount of the storage unit based on the actual number of erase / write operations, and determine the actual scenario type based on the processor utilization, memory utilization, and other running information of the target process. Then, the optimization layer can update the wear prediction algorithm based on the actual wear amount and update the scenario classification algorithm based on the actual scenario type. The optimization layer can transmit the updated wear prediction algorithm and scenario classification algorithm to the decision layer, so that the decision layer can determine the predicted wear amount and predicted scenario type using the updated wear prediction algorithm and scenario classification algorithm.

[0096] Figure 4 This is a schematic diagram of a data processing flow provided in an embodiment of this application. For example... Figure 4 As shown, when any target process on the electronic device initiates a data write request, the electronic device can intercept the data write request and obtain information such as the number of processes, the processor utilization rate, the digital signature, the amount of data to be written, the entropy value, and the storage address of the data to be written through a preset probe function or the data acquisition function built into the embedded multimedia card. Then, the electronic device can perform feature extraction and feature fusion on all the collected information to generate fused features. Based on the fused features, the electronic device can determine the predicted wear of the storage unit and the predicted scenario type of the write request, and determine a risk score based on the predicted wear and the predicted scenario type.

[0097] After determining the risk score, the electronic device can identify the process type of the target process based on its digital signature. Specifically, if the target process's digital signature is included in the preset whitelist, the electronic device can determine that the target process is of type two. For data write requests initiated by type two target processes, the electronic device can write the data to be written to the storage unit at the maximum speed that the storage unit can perform data write operations. If the target process's digital signature is included in the preset graylist, the electronic device can determine that the target process is of type one. For data write requests initiated by type one target processes, the electronic device can determine the write speed of the data to be written based on the risk score to dynamically limit the write speed, and write the data to be written to the storage unit according to the write speed. If the target process's digital signature is included in the preset blacklist, the electronic device can determine that the target process is of type three. For data write requests initiated by type three target processes, the electronic device can discard the data write request and generate an alarm message. After completing the data write operation, the electronic device can optimize and update the wear prediction algorithm and the scenario classification algorithm based on the actual wear of the storage unit and the actual scenario type of the data write request.

[0098] It should be noted that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0099] Reference Figure 5 The diagram illustrates a data processing apparatus according to an embodiment of this application, which may specifically include a data acquisition module 501, a risk information determination module 502, a speed determination module 503, and a writing module 504, wherein:

[0100] Data acquisition module 501 is used to respond to a data write request initiated by a target process and acquire first feature information corresponding to the data write request, second feature information corresponding to the target process, and process type corresponding to the target process; the first feature information is used to represent the features of the data to be written corresponding to the data write request.

[0101] The risk information determination module 502 is used to determine the risk information corresponding to the data writing request based on the first feature information and the second feature information;

[0102] The speed determination module 503 is used to determine the writing speed of the data to be written based on the risk information and the process type corresponding to the target process.

[0103] The writing module 504 is used to write the data to be written into the storage unit according to the writing speed.

[0104] The speed determination module 503 can also be used to determine whether the risk score is greater than a first threshold if the process type corresponding to the target process is a first process type; the first process type is used to indicate that the target process is a monitored process; if the risk score is less than the first threshold, a preset speed conversion table is queried according to the risk score to determine the writing speed of the data to be written; if the risk score is greater than or equal to the first threshold, an alarm message is generated; the alarm message is used to indicate that the write request initiated by the target process is stopped.

[0105] The speed determination module 503 can also be used to determine the preset speed as the write speed of the data to be written if the process type corresponding to the target process is a second process type; the second process type is used to indicate that the target process is a process that is allowed to run; the preset speed is the maximum speed at which the storage unit can perform data write operations.

[0106] The speed determination module 503 can also be used to generate alarm information if the process type corresponding to the target process is a third process type; the third process type is used to indicate that the target process is a process with restricted operation; the alarm information is used to indicate that the response to the write request initiated by the target process is stopped.

[0107] The risk information determination module 502 can also be used to extract features from the first feature information and the second feature information to determine the fusion feature of the first feature information and the second feature information; process the fusion feature through a wear prediction algorithm to determine the predicted wear amount of the storage unit; process the fusion feature through a scene classification algorithm to determine the predicted scene type corresponding to the data write request; and determine the risk score corresponding to the data write request based on the predicted wear amount and the predicted scene type.

[0108] The risk information determination module 502 can also be used to obtain the actual wear amount of the storage unit; calculate the error value based on the actual wear amount and the predicted wear amount; and update the wear prediction algorithm based on the error value and the fusion feature.

[0109] In the data acquisition module 501, the first feature information includes at least one of the entropy value, data volume, and storage address dispersion of the data to be written; the second feature information includes at least one of the digital signature of the target process, processor utilization, process tree, and sending frequency of the data write request.

[0110] As the apparatus embodiments are basically similar to the method embodiments, they are described in a relatively simple manner. For relevant details, please refer to the description in the method embodiment section.

[0111] Reference Figure 6 The diagram illustrates an electronic device according to an embodiment of this application. Figure 6 As shown, the electronic device 600 in this embodiment includes: a processor 610, a memory 620, and a computer program 621 stored in the memory 620 and executable on the processor 610. When the processor 610 executes the computer program 621, it implements the steps in the various embodiments of the data processing method described above, for example... Figure 1 Steps S101 to S104 are shown. Alternatively, when the processor 610 executes the computer program 621, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 5 The functions of modules 501 to 504 are shown.

[0112] For example, the computer program 621 can be divided into one or more modules / units, which are stored in the memory 620 and executed by the processor 610 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which can be used to describe the execution process of the computer program 621 in the electronic device 600. For example, the computer program 621 can be divided into a data acquisition module, a risk information determination module, a speed determination module, and a writing module, with the specific functions of each module as follows:

[0113] The data acquisition module is used to respond to a data write request initiated by a target process by acquiring first feature information corresponding to the data write request, second feature information corresponding to the target process, and process type corresponding to the target process; the first feature information is used to represent the features of the data to be written corresponding to the data write request.

[0114] The risk information determination module is used to determine the risk information corresponding to the data write request based on the first feature information and the second feature information;

[0115] The speed determination module is used to determine the writing speed of the data to be written based on the risk information and the process type corresponding to the target process.

[0116] The write module is used to write the data to be written into the storage unit according to the write speed.

[0117] The electronic device 600 can be any device equipped with an embedded multimedia card, such as a projection device, display device, smartphone, or tablet computer. The electronic device 600 may include, but is not limited to, a processor 610 and a memory 620. Those skilled in the art will understand that... Figure 6 This is merely one example of electronic device 600 and does not constitute a limitation on electronic device 600. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 600 may also include input / output devices, network access devices, buses, etc.

[0118] The processor 610 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0119] The memory 620 can be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. The memory 620 can also be an external storage device of the electronic device 600, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 600. Furthermore, the memory 620 can include both internal and external storage units of the electronic device 600. The memory 620 is used to store the computer program 621 and other programs and data required by the electronic device 600. The memory 620 can also be used to temporarily store data that has been output or will be output.

[0120] This application also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the data processing method as described in the foregoing embodiments.

[0121] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the data processing methods described in the foregoing embodiments.

[0122] This application also discloses a computer program product that, when run on a computer, causes the computer to execute the data processing methods described in the foregoing embodiments.

[0123] The embodiments described above are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A data processing method, characterized in that, include: In response to a data write request initiated by a target process, the system obtains first feature information corresponding to the data write request, second feature information corresponding to the target process, and process type corresponding to the target process; the first feature information is used to represent the characteristics of the data to be written corresponding to the data write request. Based on the first feature information and the second feature information, the risk information corresponding to the data write request is determined; Based on the risk information and the process type corresponding to the target process, the write speed of the data to be written is determined; The data to be written is written to the storage unit according to the stated write speed.

2. The method according to claim 1, characterized in that, The risk information includes a risk score; After obtaining the first feature information corresponding to the data write request, the second feature information corresponding to the target process, and the process type corresponding to the target process, the method further includes: If the process type corresponding to the target process is a first process type, then it is determined whether the risk score is greater than a first threshold; the first process type is used to indicate that the target process is a monitored process; If the risk score is less than the first threshold, then the preset speed conversion table is queried according to the risk score to determine the writing speed of the data to be written. If the risk score is greater than or equal to the first threshold, an alarm message is generated; the alarm message is used to indicate that the response to the write request initiated by the target process is stopped.

3. The method according to claim 1, characterized in that, After obtaining the first feature information corresponding to the data write request, the second feature information corresponding to the target process, and the process type corresponding to the target process, the method further includes: If the process type corresponding to the target process is the second process type, then the preset speed is determined as the write speed corresponding to the data to be written; the second process type is used to indicate that the target process is a process that is allowed to run; the preset speed is the maximum speed at which the storage unit can perform data write operations.

4. The method according to claim 1, characterized in that, The step of determining the write speed of the data to be written based on the risk information and the process type corresponding to the target process includes: If the process type corresponding to the target process is a third process type, an alarm message is generated; the third process type is used to indicate that the target process is a process with restricted operation; the alarm message is used to indicate that the response to write requests initiated by the target process is stopped.

5. The method according to claim 1, characterized in that, The risk information includes a risk score; The step of determining the risk information corresponding to the data write request based on the first feature information and the second feature information includes: Feature extraction is performed on the first feature information and the second feature information to determine the fusion feature of the first feature information and the second feature information; The fused features are processed by a wear prediction algorithm to determine the predicted wear amount of the storage cell; The fused features are processed by a scene classification algorithm to determine the predicted scene type corresponding to the data write request; Based on the predicted wear amount and the predicted scenario type, the risk score corresponding to the data write request is determined.

6. The method according to claim 5, characterized in that, After writing the data to be written to the storage unit according to the write speed, the method further includes: Obtain the actual wear and tear of the storage unit; Calculate the error value based on the actual wear amount and the predicted wear amount; The wear prediction algorithm is updated based on the error value and the fusion features.

7. The method according to any one of claims 1-6, characterized in that, The first feature information includes at least one of the entropy value, data volume, and storage address dispersion of the data to be written; the second feature information includes at least one of the digital signature of the target process, processor utilization, process tree, and sending frequency of the data write request.

8. A data processing apparatus, characterized in that, include: The data acquisition module is used to respond to a data write request initiated by a target process by acquiring first feature information corresponding to the data write request, second feature information corresponding to the target process, and process type corresponding to the target process; the first feature information is used to represent the features of the data to be written corresponding to the data write request. The risk information determination module is used to determine the risk information corresponding to the data write request based on the first feature information and the second feature information; The speed determination module is used to determine the writing speed of the data to be written based on the risk information and the process type corresponding to the target process. The write module is used to write the data to be written into the storage unit according to the write speed.

9. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, the electronic device causes the electronic device to implement the data processing method as described in any one of claims 1-7.

10. A computer program product, characterized in that, It includes a computer program, which, when run, causes the data processing method as described in any one of claims 1-7 to be performed.