Method for switching service data execution strategy, master chip, medium and product

CN122945896APending Publication Date: 2026-10-20MAXIO TECHNOLOGY (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611019590.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

但是这种方式在新用户大量增加时,会大大增加宏的看护成本,导致固件质量风险增加

Benefits of technology

[0011]在本申请实施例中,固态硬盘的主控芯通过基于预设的数据维度,确定目标固态硬盘的闪存块写入的业务数据的离散度,所述数据维度包括数据的空间分布、写入时间和页对齐写占比;基于所述离散度确定所述业务数据的数据特征;将所述数据特征与不同业务场景对应业务数据的数据特征进行比对,以确定匹配的业务场景;将所述目标固态硬盘的业务数据执行策略切换为所述匹配的业务场景对应的业务数据执行策略。由此,可以动态识别目标固态硬盘当前的数据业务的具体数据特征,精准识别不同用户的业务场景,从而实现动态切换或调整对应业务场景的业务数据执行策略,来控制固件自动切换到目标固态硬盘当前适配的业务数据执行策略相应的逻辑流程,通过主控芯片的固件算法自我判断实现算法最优化,避免新用户大量增加时增加宏的看护成本和导致固件质量风险增加。同时可以实现用户需求的积累,基于识别的新用户业务场景精准推送已经沉淀好的该业务场景对应的定制化解决方案,显著降低了固态硬盘针对不同级别用户对应业务场景,制定适配业务数据执行策略的成本,并提升了业务数据执行策略制定的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application discloses a method for switching business data execution strategies, a main control chip, a medium, and a product applied to the main control chip of a solid-state drive (SSD). The method includes: determining the dispersion of business data written to the flash memory blocks of a target SSD based on a preset data dimension, wherein the data dimension includes the spatial distribution of data, write time, and page-aligned write ratio; determining the data characteristics of the business data based on the dispersion; comparing the data characteristics with the data characteristics of business data corresponding to different business scenarios to determine the matching business scenario; and switching the business data execution strategy of the target SSD to the business data execution strategy corresponding to the matching business scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of solid-state drive technology, and in particular to a method for switching business data execution strategies, a controller chip, media, and a product. Background Technology

[0002] With the development of artificial intelligence, solid-state drives (SSDs) are receiving increasing attention from users at different levels. These users have varying business scenarios, data processing needs, and SSD solution requirements. For example, consumer users prioritize cost-effectiveness, and their business scenarios primarily involve write-heavy and read-heavy data processing. Industry users value quality and stability, and their business scenarios primarily involve write-heavy and read-light data processing, such as monitoring scenarios. Enterprise users, on the other hand, have high requirements for both quality and performance, and their business scenarios primarily involve write-light and read-light data processing.

[0003] When designing a solution for a solid-state drive (SSD) controller chip, the business data execution strategy needs to consider the coverage of various business scenarios in order to support users at all levels in smaller development tasks.

[0004] The current business data execution strategy is to customize solutions for other user levels based on existing user-level solutions, using macros to enable or disable features. However, this approach significantly increases the cost of macro management as new users increase, leading to increased firmware quality risks. Furthermore, user needs cannot be accumulated, and well-established customized solutions cannot be pushed out because the business needs of new users are unclear.

[0005] Therefore, formulating business data execution strategies for different user levels and corresponding business scenarios is costly and inefficient. Summary of the Invention

[0006] The purpose of this application is to provide a method for switching business data execution strategies, a main control chip, a medium, and a product to solve the problems existing in business data execution strategies in different business scenarios.

[0007] To solve the above-mentioned technical problems, this specification is implemented as follows: Firstly, a method for switching business data execution strategies is provided, applied to the main controller chip of a solid-state drive, the method comprising: Based on a preset data dimension, the dispersion of business data written to the flash blocks of the target solid-state drive is determined. The data dimension includes the spatial distribution of data, writing time, and page-aligned write ratio. The data characteristics of the business data are determined based on the dispersion. The data features are compared with the data features of business data corresponding to different business scenarios to determine the matching business scenario; Switch the business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the matching business scenario.

[0008] In a second aspect, a controller chip for a solid-state drive is provided, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0009] Thirdly, a readable storage medium is provided that stores a program or instructions which, when executed by a processor, implement the steps of the method described in the first aspect.

[0010] Fourthly, a computer program product is provided, comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform the steps of the method described in the first aspect.

[0011] In this embodiment, the SSD controller determines the dispersion of business data written to the flash memory blocks of the target SSD based on a preset data dimension, including the spatial distribution of data, write time, and page-aligned write ratio. Based on the dispersion, the controller determines the data characteristics of the business data. These data characteristics are then compared with the data characteristics of business data corresponding to different business scenarios to determine the matching business scenario. Finally, the controller switches the business data execution strategy of the target SSD to the business data execution strategy corresponding to the matching business scenario. This allows for dynamic identification of the specific data characteristics of the target SSD's current data services, accurately identifying the business scenarios of different users, and dynamically switching or adjusting the business data execution strategy for the corresponding business scenario. This controls the firmware to automatically switch to the logic flow corresponding to the business data execution strategy currently adapted to the target SSD. The controller chip's firmware algorithm self-determines and optimizes the algorithm, avoiding increased macro monitoring costs and firmware quality risks when a large number of new users are added. Simultaneously, it allows for the accumulation of user needs, accurately pushing pre-defined customized solutions corresponding to the identified new user business scenarios. This significantly reduces the cost of developing adapted business data execution strategies for different user levels and improves the efficiency of business data execution strategy development. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating the method for switching business data execution strategies according to an embodiment of this application.

[0013] Figure 2 This is a feature table that includes data features of business data in an embodiment of this application.

[0014] Figure 3 This is a schematic diagram of the overall process of the business data execution strategy switching method in an embodiment of this application.

[0015] Figure 4 This is a block diagram of the structure of the controller chip of the solid-state drive in an embodiment of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. The drawing numbers in this application are only used to distinguish the various steps in the solution and are not used to limit the execution order of the various steps. The specific execution order is subject to the description in the specification.

[0017] To address the problems existing in the prior art, embodiments of this application provide a method for switching business data execution strategies, applied to the main controller chip of a solid-state drive, such as... Figure 1 As shown, the process includes steps 102 to 108.

[0018] Step 102: Based on a preset data dimension, determine the dispersion of the business data written to the flash memory blocks of the target solid-state drive. The data dimension includes the spatial distribution of the data, the writing time, and the page alignment write ratio.

[0019] In this embodiment, based on historical business data written to the flash memory blocks of the solid-state drive (SSD), the characteristics of the business data of users using the SSD and the corresponding business scenarios are analyzed. Here, the flash memory block can refer to the flash memory block where the most recently written business data is stored. Specifically, the dispersion of the business data written to the flash memory blocks of the SSD is analyzed from three dimensions: spatial distribution of business data, write time, and page-aligned write ratio. Dispersion refers to the degree of difference between the various values ​​of the business data written to the flash memory block; it is a statistical indicator used to measure the degree to which the data distribution deviates from the central value and the magnitude of risk. Its core significance includes assessing the representativeness of the central value and characterizing the numerical dispersion state through the data distribution pattern.

[0020] Based on the solution provided in the above embodiments, optionally, in step 102 above, determining the dispersion of the business data written to the flash memory blocks of the target solid-state drive based on a preset data dimension includes: dividing the business data written to the flash memory blocks into multiple data units according to a preset storage granularity and data writing order; statistically analyzing the spatial distribution, writing time, and page-aligned write ratio of the business data in each data unit; determining the spatial coefficient corresponding to the spatial distribution and the time coefficient corresponding to the writing time based on the current erase / write count and the maximum erase / write count of the target solid-state drive; and weighting the spatial distribution, writing time, and page-aligned write ratio of the business data in each data unit, as well as the corresponding spatial coefficient and time coefficient, to obtain the dispersion of the business data corresponding to each data unit.

[0021] In this embodiment, the flash memory blocks for writing business data to the target solid-state drive are investigated according to a preset storage granularity, such as X megabytes (MB) storage granularity and data writing order. The business data written to the flash memory blocks is divided into multiple data units, and the spatial distribution of data in each data unit, the data writing time, and the page alignment write ratio are monitored to perform discreteness FI statistics.

[0022] The size of the storage granularity corresponding to X MB can be determined based on the capacity of the solid-state drive and the size of the flash memory block. Typically, a flash memory block is divided into multiple storage granularities, and a storage granularity includes multiple flash memory pages.

[0023] Specifically, the spatial distribution, write time, and page-aligned write ratio of business data in each data unit are statistically analyzed, including: calculating the ratio of the maximum length of continuous business data in the target data unit to the sum of the lengths of all continuous business data, to obtain the spatial distribution of business data in the target data unit; calculating the time interval between the data write end time of the target data unit and the data write end time of the adjacent previous data unit, to obtain the write time of business data in the target data unit; and calculating the ratio of the number of aligned write pages of business data in the target data unit to the total number of all write pages, to obtain the page-aligned write ratio of business data in the target data unit.

[0024] Taking a data unit as an example, the logical address arrays corresponding to the business data included are: LAA0, LAA1, LAA2; LAA5, LAA6; LAA8, LAA9; LAA11, LAA12, LAA13, LAA14. These include four consecutive logical address arrays, with corresponding lengths of 3, 2, 2, and 4 for the consecutive business data, respectively. The maximum length is 4. Therefore, the sum of the lengths of all consecutive business data is 11. Calculating the ratio of 4 to 11, we can obtain that the spatial distribution of business data in this data unit is 4 / 11.

[0025] The data write end time of a data unit is the time it takes for all business data in a data unit to be written to the corresponding flash memory block. The write time of business data in a data unit is the difference between the data write end time of this data unit and the data write end time of the adjacent previous data unit, i.e., the time interval.

[0026] The number of aligned write pages for business data within a data unit is the number of pages whose business data is sequentially written to fill a page within that data unit. Pages that are not sequentially filled are considered unaligned write pages. If all business data in a data unit is written to 10 flash pages, with 9 pages being aligned write pages and 1 page being an unaligned write page, then calculating the ratio of 9 to 10 gives the page alignment write ratio for business data in that data unit as 9 / 10.

[0027] In this embodiment, the dispersion of business data is a comprehensive weighted sum of the spatial distribution of business data, the proportion of write time and page-aligned writes, and the corresponding spatial coefficient and time coefficient. The spatial coefficient serves as the weight of the spatial distribution, and the time coefficient serves as the weight of the write time.

[0028] The formula for calculating the dispersion is as follows:

[0029]

[0030]

[0031] Where n represents the number of business data in the target data unit, and max Ci represents the maximum length of continuous business data. This represents the length of a continuous set of business data, i.e. Spatial coefficients representing the units of the target data; This indicates the write time of the target data unit. This indicates the percentage of page alignment for the target data unit.

[0032] It is a spatial coefficient. It is a time coefficient. It is a coefficient for the percentage of pages aligned to the page, P This indicates the current number of erase / write cycles for the target solid-state drive. Indicates the maximum number of erase / write cycles for the target solid-state drive; where It changes as the number of write cycles of the solid-state drive increases; the former increases, and the latter decreases. These values ​​are obtained from training the business data model or are empirical values, and are fixed values.

[0033] After obtaining the spatial distribution, write time, and page-aligned write ratio of business data in each data unit, as well as the corresponding spatial coefficient, time coefficient, and page-aligned write ratio coefficients, a weighted summation is performed according to the above formula to obtain the dispersion of the business data corresponding to each data unit.

[0034] Step 104: Determine the data characteristics of the business data based on the dispersion.

[0035] The dispersion FI represents the attribute result of the service data in the corresponding flash memory block. The smaller the value of FI, the more special the service data is (discrete, cold data, unaligned).

[0036] Based on the solution provided in the above embodiments, optionally, in step 104 above, determining the data features of the business data based on the dispersion includes: comparing the dispersion of the business data corresponding to each data unit with a preset dispersion threshold; determining that the comparison result with a dispersion greater than the dispersion threshold is 1, and the comparison result with a dispersion not greater than the dispersion threshold is 0; and determining a feature table including the data features of the business data based on the comparison result corresponding to each data unit.

[0037] In this embodiment, a dispersion threshold K is provided. The dispersion FI determined in step 102 is compared with the dispersion threshold K to quantify the dispersion result of the currently sampled business data, where K is an empirical parameter. Based on the comparison between the dispersion FI and the dispersion threshold K, values ​​greater than K are assigned as 1, and values ​​less than K are assigned as 0. After all business data has been investigated, a feature table is output, which includes the data features of the business data represented by values ​​of 0 and 1.

[0038] Figure 2 An example of a feature table for business data written to flash memory blocks is shown, where each element represents a 0 / 1 quantization value corresponding to business data with an X MB storage granularity. This feature table provides data support for subsequent business scenario judgment of business data.

[0039] Step 106: Compare the data features with the data features of business data corresponding to different business scenarios to determine the matching business scenario.

[0040] Different business scenarios correspond to different data characteristics. Statistical analysis can be performed in advance using the methods described above to obtain the corresponding feature tables. For the target SSD to be judged regarding its business scenario, by comparing the elements in the target SSD's corresponding feature table with the elements in the feature tables corresponding to each business scenario, it is possible to determine the business scenario matched by the business data written to the target SSD's flash blocks.

[0041] To improve the speed and accuracy of the comparison, based on the solution provided in the above embodiments, optionally, in step 104, comparing the data features with the data features of business data corresponding to different business scenarios to determine the matching business scenario includes: based on a biometric fingerprint recognition algorithm, statistically analyzing the biometric fingerprint information in the feature table, the biometric fingerprint information including the position of endpoints and the position of bifurcation points, as well as the position and length of ridges; constructing a target data feature template based on the statistically analyzed biometric fingerprint information; using the position and length of ridges in the target data feature template to retrieve a preset data feature template library, the data feature template library including multiple data feature templates corresponding to business data of different business scenarios; if at least one first data feature template is matched, then the position of endpoints and the position of bifurcation points in the target data feature template are compared with the at least one first data feature template; if a second data feature template is matched, then the business scenario corresponding to the second data feature template is determined as the matching business scenario.

[0042] In this embodiment, the biometric fingerprint recognition algorithm is applied to the business scenario judgment of the business data of the target solid-state drive. Biometric fingerprint information statistics are performed on the feature table, including the statistics of endpoints, bifurcation points and ridges, and the judgment logic of bifurcation points and endpoints is given. At the same time, the length of the ridge is judged to provide anchor points for subsequent feature table comparison, and data feature templates are constructed, which can quickly complete the alignment of data feature templates and comparison interfaces.

[0043] The specific implementation steps are as follows: Step 1: Statistical analysis of endpoint information in the feature table: Among the 8 nodes surrounding the current node (element), there is exactly one "1". This node is the endpoint. Record the position information (X, Y, T) of this node, where X is the horizontal coordinate, Y is the vertical coordinate, and T is the angle information. Step 2: Statistically record the length and position information of the ridge in the feature table: The ridge is the number of ordinary nodes between two endpoints. Ordinary nodes are nodes that have no other nodes besides the incoming and outgoing nodes among the surrounding 8 nodes. Record the position information of the ridge (X, Y, T, C), where C is the confidence level or curvature. Step 3: Count the branching point information: A branching point is a node located at a position where there are 8 or more surrounding nodes (1). When counting branching points, be careful not to include all of them. The positions of branching points should be found according to the following rules: (1) The bifurcation point must appear on a position where the ridge length is greater than a preset value (e.g., 5), otherwise the judgment is invalid; (2) The ridge length of the branch must also be greater than the preset value, such as 3, otherwise the data is invalid; (3) There are many cases where the ridges are connected, so there is no need to count the bifurcation points.

[0044] The node results are counted, and then the node is counted to find the branch points (X, Y, A, B, type). A is the current ridge direction, B is the angle between the branch and the ridge, and type is the number of branch points at the current node position.

[0045] Based on the statistical positions of endpoints and bifurcation points, as well as the position and length of ridges, a target data feature template is constructed.

[0046] Step 4: Before matching the target data feature template with the data feature templates in the preset data feature template library (which can be called "data task templates"), initialize the identifier (ID) of the data task template to, for example, 0xFF; Step 5: Compare the target data feature template and the data task template: Search the data feature template library by ridge position and length to quickly match the data position and find at least one first data feature template that is hit / matched. Step 6: Compare the target data feature template with the first data feature template: By comparing the positions of the endpoints and the bifurcation points, find the matching second data feature template. For example, if the comparison shows a P% or higher consistency, it proves that the target data feature template and the corresponding data task template are the same. The data task template is then determined to be the matching second data feature template, its ID is recorded, and step 8 is executed; otherwise, step 7 is executed. Step 7: Determine whether all data task templates in the data feature template library have been queried. If not, obtain the next data task template and execute Step 4. Otherwise, it means that the data feature template library does not provide support for the business data corresponding to the target data feature template in advance. Modify the ID of the current data task template to 0xFF and execute Step 8. Step 8: Return the data task template ID of the search results to the firmware (FW) of the main control chip, and then execute step 9; Step 9: The business scenario investigation based on the biometric fingerprint recognition algorithm is completed, and the business scenario corresponding to the second data feature template is determined as the business scenario that matches the target data feature template.

[0047] Step 108: Switch the business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the matching business scenario.

[0048] The business data execution strategy before the target SSD is switched is the business data execution strategy executed by the current SSD's controller chip. The business data execution strategy after the target SSD is switched is the business data execution strategy corresponding to the business scenario matched by the business data. The business data execution strategies before and after the switch may be the same or different.

[0049] Based on the solution provided in the above embodiments, optionally, in step 108, switching the business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the matched business scenario includes: updating the first identifier of the second data feature template to the first global variable corresponding to the identifier of the data feature template, so as to replace the second identifier of the previously hit data feature template corresponding to the first global variable, wherein the second data feature template corresponds to the business data currently written to the first flash block of the target solid-state drive, and the previously hit data feature template corresponds to the business data historically written to the second flash block of the target solid-state drive, and the first flash block is different from the second flash block; if the first identifier and the second identifier are the same, then the statistics are... The system determines the number of consecutive hits of the first identifier; if the number of consecutive hits is greater than a preset threshold, it determines whether the first identifier is the same as the second global variable corresponding to the state of the data feature template, where the state of the data feature template represents the identifier of the data feature template for the business scenario corresponding to the current business data execution strategy of the target solid-state drive; if the first identifier is different from the second global variable corresponding to the state of the data feature template, the first identifier is updated in the second global variable to replace the identifier of the data feature template corresponding to the current business data execution strategy; and the current business data execution strategy of the target solid-state drive is switched to the business data execution strategy corresponding to the business scenario matched by the second data feature template of the first identifier.

[0050] In the above embodiments, by combining the ID of the data feature template of the business scenario corresponding to the business data currently being analyzed by the target solid-state drive, the status of the data feature template currently used by the target solid-state drive, and the current value of the global variable corresponding to the ID, it is determined whether it is necessary to switch the business data execution strategy currently adopted by the target solid-state drive, or to determine the business data execution strategy of the target solid-state drive for the first time.

[0051] If the business data used to determine the matching business scenario is the business data written to the flash block of the target solid-state drive in the first statistical analysis, then the business data execution strategy corresponding to the business scenario determined in step 106 will be used to determine the business data execution strategy of the target solid-state drive.

[0052] If the business data used to determine the matching business scenario is business data written after the initial statistical data of the target solid-state drive, then determine whether to switch the business data execution strategy corresponding to the business scenario determined in step 106 to the business data execution strategy corresponding to the latest business data written thereafter.

[0053] When determining or switching the business data execution strategy corresponding to the business scenario matched by the target solid-state drive, the ID can be used to determine whether the currently hit second data feature template is the same as the previously hit data feature template. The currently hit second data feature template corresponds to the business data historically written to the first flash block of the target solid-state drive, and the previously hit data feature template corresponds to the business data historically written to the second flash block of the target solid-state drive. The business data written in the second flash block is earlier than the business data written in the first flash block.

[0054] By determining whether the currently matched second data feature template is the same as the previously matched data feature template, it is determined whether the previously matched second data feature template has been matched multiple times consecutively. The business data execution strategy switch is only initiated when the number of consecutive matches exceeds a preset threshold, ensuring the accuracy of the matched data feature template. After the switch is initiated, the current business data execution strategy of the target SSD is further determined based on the current data feature template status to ensure it matches the business scenario matched by the matched second data feature template. If they do not match, the current business data execution strategy of the target SSD is switched to the business data execution strategy matching the business scenario matched by the second data feature template.

[0055] Furthermore, switching the business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the matched business scenario also includes at least one of the following: if the first identifier and the second identifier are different, then the consecutive hit count of the first identifier is cleared to zero and the current business data execution strategy of the target solid-state drive is maintained; if the consecutive hit count is not greater than the preset count threshold, then the current business data execution strategy of the target solid-state drive is maintained; if it is determined that the first identifier is the same as the second global variable corresponding to the state of the data feature template, then the current business data execution strategy of the target solid-state drive is maintained.

[0056] In this embodiment, if the ID indicates that the currently matched second data feature template has not been continuously matched, or the number of consecutive matches is not greater than a preset threshold, then the business data execution strategy switch will not be initiated, and the original business data execution strategy will be maintained. After the business data execution strategy switch is initiated, if the current state of the data feature template indicates that the business data execution strategy currently used by the target solid-state drive is the same as the business data execution strategy corresponding to the business scenario matched by the matched second data feature template, then the original business data execution strategy will also be maintained.

[0057] In this way, the specific data characteristics of the target solid-state drive's current data services can be dynamically identified, and the business scenarios of different users can be accurately identified. This enables dynamic switching or adjustment of the business data execution strategy for the corresponding business scenario, thereby controlling the firmware to automatically switch to the corresponding logical flow of the business data execution strategy currently adapted to the target solid-state drive.

[0058] For example, in a monitoring scenario where the business data involves industry-level user data, the current data types in the monitoring field include system data, video data, and special artificial intelligence (AI) related data. If all business data is stored on the same solid-state drive (SSD), determining the business data type of the SSD firmware becomes a challenge. Therefore, for such a scenario where multiple types of business data are stored uniformly, the logical flow of the corresponding business data execution strategy is as follows: after judging the effective data ratio, the system adds judgments on data write time and read / write counts to accurately locate the desired data, reduce write amplification, ensure disk performance stability, and improve product quality.

[0059] For example, in a scenario where the business data is primarily consumer-level user data, most of this data is currently cold data, and there are requirements for the speed of instantaneous data writes. Ensuring the reliability of already written data and providing sufficient bandwidth for upcoming data writes are key design considerations for firmware scheduling algorithms in this scenario. Therefore, for this business scenario, the firmware's business data execution strategy logic needs to schedule cold data to ensure reliability, while dynamically allocating write channels to ensure sufficient bandwidth resources for bursty data. This two-way adjustment mechanism not only avoids performance fluctuations caused by mixed writing of hot and cold data but also effectively extends disk lifespan. While ensuring the integrity of critical cold data, the firmware maximizes the use of remaining I / O capacity to handle high-speed incoming hot data, thus achieving the optimal balance between reliability and high performance with limited hardware resources, meeting the dual expectations of consumer users for rapid response and data security.

[0060] Below, in conjunction with Figure 3 This application provides an overall description of the method for switching business data execution strategies according to embodiments of the present application. For example... Figure 3 As shown, when determining whether to switch the business data execution strategy of the target solid-state drive, the second global variable (e.g., task status flag gtype) corresponding to the status of the data feature template, the first global variable (e.g., task variable task_id) corresponding to the identifier of the currently hit data feature template, and the identifier of the data feature template of the business scenario corresponding to the current business data execution strategy of the target solid-state drive (e.g., pre_task_id) can be initialized to 0xFF, and the variable Cnt that counts the number of consecutive hits of the task variable task_id can be cleared (step 202).

[0061] Then, the business data, namely the business data written to the flash memory block of the target solid-state drive in sampling step 102 (step 204), is received and detected.

[0062] In step 206, a corresponding data feature template is constructed based on the service data written to the currently sampled flash memory block. The constructed data feature template is then compared with the existing data task templates in the data feature template library to determine whether they are the same, thereby determining whether the ID of an existing data task template is matched. If they are the same, step 208 is executed. Otherwise, it is proven that there is no data task template in the data feature template library that is the same as the currently constructed data feature template, and step 210 is executed. In step 208, the task_id is updated in pre_task_id, and the template of the currently hit data task is updated in task_id, and step 210 is executed; Step 210: Determine whether the task_id of the currently hit data task template is the same as the pre_task_id of the previously hit data task template. If yes, proceed to step 212; otherwise, proceed to step 214. Step 212: Calculate the cumulative count of the number of consecutive hits of the same task_id using the variable Cnt++, and then execute step 216. Step 214: Clear the variable Cnt++, which counts the number of consecutive hits with the same task_id, and execute step 204 to continue the detection, while maintaining the current business data execution strategy of the target solid-state drive. Step 216: Determine whether the cumulative number of consecutive hits variable Cnt exceeds the preset number threshold N, where the value of N can be obtained statistically from actual testing; if yes, proceed to step 218; otherwise, proceed to step 204 to continue testing, while maintaining the current business data execution strategy of the target solid-state drive. Step 218: Determine whether the ID of the data task template recorded in the flag bit gtype of the current data feature template is the same as the task_id that appears repeatedly in the above consecutive hits. If so, no operation is required, and step 204 is executed to continue the detection, while maintaining the current business data execution strategy of the target solid-state drive; otherwise, step 220 is executed. Step 220: Update the tag_id of the current consecutive hits to the gtype flag of the data feature template status, and then execute step 222. Step 222: Change the current business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the business scenario matched by the data feature template of task_id through the firmware FW of the main control chip, and then execute step 214.

[0063] In this embodiment, the SSD controller determines the dispersion of business data written to the flash memory blocks of the target SSD based on a preset data dimension, including the spatial distribution of data, write time, and page-aligned write ratio. Based on the dispersion, the controller determines the data characteristics of the business data. These data characteristics are then compared with the data characteristics of business data corresponding to different business scenarios to determine the matching business scenario. Finally, the controller switches the business data execution strategy of the target SSD to the business data execution strategy corresponding to the matching business scenario. This allows for dynamic identification of the specific data characteristics of the target SSD's current data services, accurately identifying the business scenarios of different users, and dynamically switching or adjusting the business data execution strategy for the corresponding business scenario. This controls the firmware to automatically switch to the logic flow corresponding to the business data execution strategy currently adapted to the target SSD. The controller chip's firmware algorithm self-determines and optimizes the algorithm, avoiding increased macro monitoring costs and firmware quality risks when a large number of new users are added. Simultaneously, it allows for the accumulation of user needs, accurately pushing pre-defined customized solutions corresponding to the identified new user business scenarios. This significantly reduces the cost of developing adapted business data execution strategies for different user levels and improves the efficiency of business data execution strategy development.

[0064] Optionally, such as Figure 4 As shown, this application embodiment also provides a solid-state drive controller chip 2000, including a processor 2400 and a memory 2200. The memory 2200 stores a program or instructions that can run on the processor 2400. When the program or instructions are executed by the processor 2400, they implement the various steps of the above-mentioned business data execution strategy switching method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0065] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of any of the above-described business data execution strategy switching method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here. The readable storage medium includes computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0066] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to enable a computer to implement the various processes of any of the above-described business data execution strategy switching method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0067] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0069] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for switching business data execution strategies, characterized in that, The method, applied to a controller chip for solid-state drives, includes: Based on a preset data dimension, the dispersion of business data written to the flash blocks of the target solid-state drive is determined. The data dimension includes the spatial distribution of data, writing time, and page-aligned write ratio. The data characteristics of the business data are determined based on the dispersion. The data features are compared with the data features of business data corresponding to different business scenarios to determine the matching business scenario; Switch the business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the matching business scenario.

2. The method according to claim 1, characterized in that, Based on preset data dimensions, determine the dispersion of business data written to the flash blocks of the target solid-state drive, including: According to the preset storage granularity and data writing order, the business data written to the flash memory block is divided into multiple data units; Statistics on the spatial distribution, write time, and page-aligned write ratio of business data in each data unit; Based on the current and maximum number of erase / write cycles of the target solid-state drive, determine the spatial coefficient corresponding to the spatial distribution and the time coefficient corresponding to the write time; The dispersion of business data in each data unit is obtained by weighting the spatial distribution, write time, page alignment write ratio, and corresponding spatial and temporal coefficients of the business data in each data unit.

3. The method according to claim 2, characterized in that, The spatial distribution, write time, and page-aligned write ratio of business data in each data unit are statistically analyzed, including: Calculate the ratio of the maximum length of continuous business data in the target data unit to the sum of the lengths of all continuous business data, so as to obtain the spatial distribution of business data in the target data unit; Calculate the time interval between the data write end time of the target data unit and the data write end time of the adjacent previous data unit to obtain the write time of the business data in the target data unit; Calculate the ratio of the number of aligned write pages of business data in the target data unit to the total number of all write pages to obtain the page-aligned write ratio of business data in the target data unit.

4. The method according to claim 2, characterized in that, Determining the data characteristics of the business data based on the dispersion includes: The dispersion of the business data corresponding to each data unit is compared with the preset dispersion threshold. The comparison result is determined to be 1 if the dispersion is greater than the dispersion threshold, and 0 if the dispersion is not greater than the dispersion threshold. Based on the comparison results corresponding to each data unit, a feature table including the data characteristics of the business data is determined.

5. The method according to claim 4, characterized in that, The data features are compared with the data features of business data corresponding to different business scenarios to determine the matching business scenario, including: Based on the biometric fingerprint recognition algorithm, the biometric fingerprint information in the feature table is statistically analyzed. The biometric fingerprint information includes the position of the endpoints and the position of the bifurcation points, as well as the position and length of the ridges. Target data feature templates are constructed based on statistical biometric fingerprint information; The location and length of the ridge in the target data feature template are used to retrieve a preset data feature template library, which includes multiple data feature templates corresponding to business data in different business scenarios. If at least one first data feature template is matched, the positions of the endpoints and the positions of the bifurcation points in the target data feature template are compared with the at least one first data feature template. If a matching second data feature template is found, the business scenario corresponding to the second data feature template is determined as the matched business scenario.

6. The method according to claim 5, characterized in that, Switching the business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the matching business scenario includes: The first identifier of the second data feature template is updated to the first global variable corresponding to the identifier of the data feature template, so as to replace the second identifier of the data feature template that was previously hit in the first global variable. The second data feature template corresponds to the business data currently written to the first flash block of the target solid-state drive, and the previously hit data feature template corresponds to the business data historically written to the second flash block of the target solid-state drive. The first flash block and the second flash block are different. If the first identifier and the second identifier are the same, then count the number of consecutive hits for the first identifier; If the number of consecutive hits is greater than a preset threshold, it is determined whether the second global variable corresponding to the state of the first identifier and the data feature template is the same. The state of the data feature template is used to represent the identifier of the data feature template of the business scenario corresponding to the current business data execution strategy of the target solid-state drive. If it is determined that the first identifier is different from the second global variable corresponding to the state of the data feature template, then the first identifier is updated to the second global variable to replace the identifier of the data feature template corresponding to the current business data execution strategy. The current business data execution strategy of the target solid-state drive is switched to the business data execution strategy corresponding to the business scenario matched by the second data feature template of the first identifier.

7. The method according to claim 6, characterized in that, Switching the business data execution strategy of the target solid-state drive to the business data execution strategy corresponding to the matching business scenario also includes at least one of the following: If the first identifier and the second identifier are different, the consecutive hit count of the first identifier is cleared to zero and the current business data execution strategy of the target solid-state drive is maintained; If the number of consecutive hits is not greater than the preset threshold, then the current business data execution strategy of the target solid-state drive is maintained; If it is determined that the second global variable corresponding to the state of the first identifier and the data feature template is the same, then the current business data execution strategy of the target solid-state drive is maintained.

8. A controller chip for a solid-state drive, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1-7.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform the steps of the method as described in any one of claims 1-7.