Data storage method, device, equipment, storage medium and program product
By predicting the popularity level of target data before data storage and saving it to the corresponding medium, the problem of wasted storage resources in existing technologies is solved, intelligent archiving and resource optimization are realized, and the accuracy and relevance of data storage are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIBABA CLOUD COMPUTING CO LTD
- Filing Date
- 2024-12-05
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, the lack of intelligent partitioning strategies during data storage leads to a waste of hot storage media resources. This is especially true in big data and artificial intelligence scenarios, where it is difficult for users to accurately specify partitioning strategies, resulting in a waste of high-performance storage resources.
By receiving users' storage requests, the system uses predictive models to predict the popularity level of target data based on data and user information, and saves it to the corresponding storage medium. This includes popularity level prediction and intelligent archiving, thereby optimizing storage resource allocation.
It enables intelligent data archiving and optimized allocation of storage resources, improving the accuracy of prediction results and the relevance of data storage, while avoiding waste of storage resources.
Smart Images

Figure CN122152207A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a data storage method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the rapid development of technologies such as big data and artificial intelligence, the amount of data requiring storage is exploding. To optimize storage resources, data is typically divided into hot data and cold data based on its access frequency. Hot data is accessed frequently, while cold data is accessed infrequently. Hot data is stored on higher-performance hot storage media, and cold data is stored on lower-performance cold storage media. Currently, when storing data, all data is usually first stored on hot storage media. Then, according to a user-specified partitioning strategy, the corresponding data in the hot storage media is partitioned into hot and cold storage to achieve partitioned storage. However, before the user specifies a partitioning strategy, all data is stored on hot storage media, resulting in wasted resources. Furthermore, if the user does not specify a partitioning strategy, all data will continue to be stored on hot storage media, leading to a continuous waste of storage resources. Summary of the Invention
[0003] This application addresses the technical problems in the aforementioned related technologies by providing a data storage method, apparatus, device, storage medium, and program product.
[0004] A first aspect of this application provides a data storage method, the method comprising:
[0005] Receive a user's storage request for target data. The storage request includes the first data information of the target data and the user's user information.
[0006] Based on the first data information and user information, predict the popularity level of the target data. The popularity level represents the frequency of access to the target data within a preset time period in the future.
[0007] Save the target data to the first storage medium corresponding to the heat level.
[0008] A second aspect of this application provides a data storage device, the device comprising:
[0009] The receiving module is used to receive a user's storage request for target data. The storage request includes the first data information of the target data and the user's user information.
[0010] The prediction module is used to predict the popularity level of the target data based on the first data information and user information. The popularity level represents the frequency of access to the target data within a preset time period in the future.
[0011] The storage module is used to save the target data to the first storage medium corresponding to the heat level.
[0012] 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, the processor executing the program to implement the method described in the first aspect above.
[0013] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the method described in the first aspect above.
[0014] The fifth aspect of this application provides a computer program product including a computer program that is executed by a processor to implement the method described in the first aspect above.
[0015] This application has at least the following beneficial effects or advantages:
[0016] In this embodiment, upon receiving a user's storage request for target data, the popularity level of the target data is predicted based on the first data information and user information included in the storage request, and the target data is saved to the first storage medium corresponding to the popularity level. Therefore, by predicting the popularity level before saving the data and saving it to the corresponding storage medium based on the popularity level, not only is intelligent data archiving achieved, storage resource allocation optimized, and storage resource waste avoided, but also, because the popularity level of the target data is predicted based on the first data information and user information, both data characteristics and individual user differences are considered, making it more targeted and improving the accuracy of the prediction results, thereby improving the accuracy of data storage.
[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0018] 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:
[0019] Figure 1 This is a schematic diagram illustrating a first application scenario of a data storage method provided in an embodiment of this application;
[0020] Figure 2 This is a first flowchart of a data storage method provided in an embodiment of this application;
[0021] Figure 3 This is a schematic diagram illustrating a second application scenario of a data storage method provided in an embodiment of this application.
[0022] Figure 4 A second flowchart of a data storage method provided in an embodiment of this application;
[0023] Figure 5 A third flowchart of a data storage method provided in an embodiment of this application;
[0024] Figure 6 A fourth flowchart of a data storage method provided in an embodiment of this application;
[0025] Figure 7 A fourth flowchart of a data storage method provided in an embodiment of this application;
[0026] Figure 8 A schematic diagram illustrating a data storage method provided in an embodiment of this application;
[0027] Figure 9 This is a schematic diagram of the structure of a data storage device provided in an embodiment of this application;
[0028] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0029] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the concept or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0030] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.
[0031] The following terms will be used in the following text:
[0032] Hot data refers to frequently accessed or recently generated data, such as real-time generated service records and data required for instant analysis. It typically requires fast and efficient access and processing, therefore it needs to be stored on high-performance, low-latency storage devices.
[0033] Cold data refers to data that is accessed infrequently and is from a long period of time, such as archived files and historical transaction records. It typically needs to be stored long-term but does not require frequent access and processing, therefore it can be stored on lower-cost, higher-capacity storage devices.
[0034] Cold and hot data stratification: This refers to dividing data into cold data and hot data based on different access frequencies and storing them on different storage media.
[0035] Object Storage Service (OSS): An object-based storage service that encapsulates data into objects for storage, enabling unified management and access to massive amounts of data.
[0036] Traditional hot and cold data tiering relies on user instructions. One approach is to initially store all data in high-performance storage media corresponding to the hot data, and then partition the data in the high-performance storage media according to the user-specified partitioning strategy to achieve partitioned storage. However, before the user specifies the partitioning strategy, all data is stored in the high-performance storage media, resulting in a waste of high-performance storage resources. Furthermore, if the user does not specify a partitioning strategy, all data will continue to be stored in the high-performance storage media, leading to continuous waste of high-performance storage resources. Another approach is for users to specify the hot and cold attributes of the current batch of data when uploading, and then save the current batch of data to the corresponding storage media according to the user-specified hot and cold attributes. However, for big data, artificial intelligence, and other scenarios, the scale of data uploaded by users is often very large, making it difficult to accurately specify the hot and cold attributes of each data point. Therefore, the phenomenon of cold data being stored in high-performance storage media still exists, resulting in a waste of high-performance storage resources.
[0037] Based on this, embodiments of this application provide a data storage method. Figure 1 This is a schematic diagram illustrating an application scenario of a data storage method provided in an embodiment of this application. For example... Figure 1 As shown, this scenario includes the user's client, data storage devices, and multiple storage media.
[0038] The client can be a terminal device or a server. Terminal devices can be mobile phones, tablets, desktop computers, laptops, home appliances, car terminals, etc. Servers can be physical servers, cloud servers, etc. Data storage applications can be installed and run on the client. Data storage applications can be standalone applications (Apps), mini-programs embedded in other applications, or web applications, etc.
[0039] The client integrates a display screen configured to display the client's user interface (UI) and provide an interface for interaction and information exchange between the client and the user. The UI involved in this application embodiment can be configured as a medium interface for user operation and interaction with the data storage application. As an interaction interface with the user, the UI can convert the computer language of the data storage application into a form that the user can accept and recognize, including displayed images, text, buttons, etc. A common form of UI is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the client's screen. Controls can include visual interface elements such as icons, buttons, menus, tabs, and text boxes. The control can implement a visual functional interface for the data storage application. When the control receives a corresponding trigger operation from the user, the corresponding functional interface of the data storage application receives the corresponding processing instruction, thereby enabling the data storage application to respond to the processing instruction and perform functional processing. For example, each user action (such as clicking, double-clicking, editing, etc.) inputs corresponding instructions to the data storage application through the corresponding GUI controls, thereby triggering the data storage application to perform relevant processing and update the GUI based on the processing results.
[0040] Data storage devices can be terminal devices or servers. Terminal devices can be mobile phones, tablets, desktop computers, laptops, home appliances, automotive terminals, etc. Servers can be physical servers, cloud servers, etc. Data storage devices maintain predictive and storage strategies. The predictive strategy instructs, upon receiving a user's storage request for target data, to predict the popularity level of the target data based on the first data information and user information in the storage request. The popularity level characterizes the frequency with which the target data will be accessed within a preset future timeframe. The storage strategy instructs that the target data be saved to the first storage medium corresponding to the popularity level.
[0041] The client and data storage device can interact via a network, which can be a wired or wireless network. Please refer to the relevant description below for the data interaction process between the client and the server.
[0042] Figure 1 The example shown uses a desktop computer as the client and a server as the data storage device. It should be understood that... Figure 1 The illustrations are merely illustrative representations of application scenarios for the data storage method involved in this application and do not constitute a limitation on the technical solutions of this application. In other embodiments, the application scenarios for the data storage method involved in this application may include more or fewer components.
[0043] It should be noted that the application scenarios or examples provided in the embodiments of this application are for ease of understanding, and the embodiments of this application do not specifically limit the application of the technical solutions. In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0044] The technical solution of this application and how it solves the aforementioned technical problems are described in detail below with specific embodiments. The listed specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0045] Figure 2 A flowchart illustrating the data storage method provided in this application embodiment. Figure 2 The method shown can be used by Figure 1 The data storage device in the process is executed. For example... Figure 2 As shown, the method includes the following steps 101-103.
[0046] Step 101: Receive a storage request from the user for the target data. The storage request includes the first data information of the target data and the user's user information.
[0047] Step 102: Based on the first data information and user information, predict the popularity level of the target data. The popularity level represents the frequency of access to the target data within a preset time period in the future.
[0048] Step 103: Save the target data to the first storage medium corresponding to the heat level.
[0049] In some implementations, the data storage application in the user client may include a data upload interface, which may include an upload control and a confirm control. When a user wants to store target data, they can operate the upload control of the data storage application in their client to upload the target data to be stored, and after the target data is uploaded, operate the confirm control. In response to the user's operation on the confirm control, the client sends a storage request to the data storage device based on the acquired target data, the first data information of the confirmed target data, and the user's user information. Upon receiving the data storage request, the data storage device predicts the popularity level of the target data based on the first data information and user information in the data storage request; and saves the target data to the first storage medium corresponding to the popularity level.
[0050] The first data information may include the target data's data identifier and attribute information. The target data's attribute information may include its size and upload time, with the upload time considered as the storage time. In other words, the first data information is the original information of the target data before it is stored. User information may include user identifiers and account information. Based on the frequency of data access, from highest to lowest, the popularity levels may include hot data, warm data, cold data, and extremely cold data, and may also include levels one, two, three, and four. The specific classification of popularity levels can be set as needed in practical applications.
[0051] In some implementations, such as Figure 3 As shown, the data storage device can invoke a prediction model to predict the popularity level of target data based on the first data information and user information. The prediction model can be pre-trained using data information from multiple saved historical datasets, user information of the users to whom the historical data belongs, and historical access records of the historical data. That is, for any historical data, the popularity level of the historical data can be determined based on its historical access records and upload time. The data information of the historical data and the user information of the users to whom the historical data belongs are used as training samples, and the determined popularity level is used as the label of the training samples. The network to be trained is iteratively trained using multiple labeled training samples to obtain the prediction model. For the specific training process of the prediction model, please refer to relevant technologies; it will not be detailed in this application.
[0052] Taking the popularity ranking system, which includes hot data and cold data, as an example, the determination of the popularity ranking of historical data based on its historical access records and upload times can include: for any historical access record, determining the interval between the access time in the historical access record and the upload time of the corresponding historical data; if the interval is less than a preset interval, the historical access record is identified as a target historical access record. Also, for any historical data, determining the total number of target historical access records corresponding to the historical data; if the total number is greater than a preset number, the corresponding historical data is identified as hot data; otherwise, the corresponding historical data is identified as cold data. It should be noted that the specific method for determining the popularity ranking of historical data based on its historical access records and upload times can be set as needed in practical applications, and this application does not impose specific limitations on this.
[0053] It should be noted that using a predictive model to predict the popularity level is only one way to predict the popularity level. In other implementations, the data information of multiple historical data, the user information of the users to which the historical data belongs, and the historical access records of the historical data can be analyzed in advance to obtain the target information required to predict the popularity level. Based on the target information, the first data information of the target data, and the user information of the users to which the target data belongs, the popularity level is predicted.
[0054] In the data storage method provided in this application embodiment, upon receiving a user's storage request for target data, the popularity level of the target data is predicted based on the first data information and user information included in the storage request, and the target data is saved to the first storage medium corresponding to the popularity level. Therefore, by predicting the popularity level before saving the data and saving it to the corresponding storage medium based on the popularity level, not only is intelligent data archiving achieved, storage resource allocation optimized, and storage resource waste avoided, but also, because the popularity level of the target data is predicted based on the first data information and user information, both data characteristics and individual user differences are considered, making it more targeted and improving the accuracy of the prediction results, thereby improving the accuracy of data storage.
[0055] To ensure the accuracy of the popularity ranking, some implementations use popularity rankings from multiple sources to maintain and predict target data. Specifically, for example... Figure 4 As shown, step 102 may include steps 1021 to 1023:
[0056] Step 1021: Based on the first data information, determine the first access feature of the target data in the first prediction dimension. The first prediction dimension is the access dimension corresponding to the data.
[0057] In some implementations, such as Figure 5As shown, step 1021 may include steps 1021-1 to 1021-3:
[0058] Step 1021-1: For any reference data in the preset reference database, determine the similarity between the second data information and the first data information of the reference data.
[0059] Specifically, when using a predictive model to predict popularity levels, the model can learn multiple reference data points during training and save these reference data points to a reference database. When not using a predictive model to predict popularity levels, multiple reference data points can be obtained by pre-analyzing the data information of multiple saved historical data points, the user information of the users to whom the historical data belongs, and the historical access records of the historical data. The second data information of any reference data point can include the data identifier, size, and upload time of the reference data.
[0060] In some implementations, determining the similarity between the second data information and the first data information may include: concatenating the information in the first data information to obtain first concatenated data; concatenating the information in the second data information to obtain second concatenated data; and calculating the similarity between the first concatenated data and the second concatenated data. Calculating the similarity between the first concatenated data and the second concatenated data may involve calculating the Euclidean distance, Hamming distance, etc., between them, and this application does not specifically limit this method.
[0061] Step 1021-2: Determine the parameter data corresponding to the maximum similarity as the target reference data.
[0062] Step 1021-3: Determine the first access feature based on the reference features of the target reference data contained in the reference database.
[0063] In some implementations, the first prediction dimension includes a data attribute dimension and a data access dimension. The data attribute dimension refers to the inherent characteristics of the data, such as its name, size, and upload time. The data access dimension refers to the access characteristics of the data, such as access time and number of accesses. When using a prediction model to predict popularity levels, the model can learn reference features for each reference data point during training. These reference features can be stored in a reference database, corresponding to the reference data. Reference features include the first probability of the data attribute dimension and access information for the data access dimension. Access information can include historical access counts and the temporal distribution information of historical accesses. The temporal distribution information of historical accesses can be the number of times the data is accessed within each preset time period (e.g., one day). When not using a prediction model to predict popularity levels, reference features for each reference data point can be obtained by analyzing the data information of multiple saved historical data points, the user information of the users to whom the historical data belongs, and the historical access records of the historical data. Since different access information represents different access frequencies, a correspondence between access information and a second probability can also be established. This correspondence can be stored in the reference database or other databases. The first and second probabilities are used to characterize the frequency of data access in different dimensions. The higher the first and second probabilities, the more frequent the data access. Therefore, by fully combining the characteristics of the data in multiple aspects in the first prediction dimension to determine the first access feature, the accuracy of the first access feature can be improved, thereby improving the accuracy of the prediction results.
[0064] Accordingly, step 1021-3 may include: determining the first probability corresponding to the target reference data as the first probability corresponding to the target data, where the first probability is the probability that the target data will be accessed within a preset time period in the data attribute dimension; obtaining the target access information corresponding to the target reference data from the correspondence between reference data and access information, where the access information is determined based on the target historical access records, which are the historical access records of multiple historical data corresponding to the reference data; determining the second probability corresponding to the target access information as the second probability corresponding to the target data, where the second probability is the probability that the target data will be accessed within a preset time period in the data access dimension; and determining the first probability and the second probability as the first access feature.
[0065] Since different data are accessed at different frequencies, by pre-determining multiple reference data, and using the access characteristics of the reference data in the data attribute dimension (first probability) and the access characteristics in the data access dimension (second probability) as the basis for prediction, the access characteristics of the target data in the corresponding dimension can be predicted, which helps to improve the accuracy of access characteristics.
[0066] Step 1022: Based on the first data information and user information, determine the second access feature of the target data in the second prediction dimension. The second prediction dimension is the access dimension corresponding to the user.
[0067] In some implementations, such as Figure 5 As shown, step 1022 may include steps 1022-1 to 1022-3:
[0068] Step 1022-1: Determine the target hierarchical structure corresponding to the type identifier in the first data information in at least one hierarchical structure. The at least one hierarchical structure corresponds one-to-one with at least one storage space pre-created by the user. Each hierarchical structure represents the type hierarchy of the data stored in the corresponding storage space. The type of any data is determined according to the data type identifier.
[0069] Specifically, each user can pre-create at least one storage space using their data storage application and save the data to be stored to that storage space. Correspondingly, during the training of the prediction model, the model can construct a hierarchical structure for each storage space based on the type of data stored there, and establish a correspondence between user information and the hierarchical structure. Alternatively, during the analysis of historical access records of multiple historical data sets, a corresponding hierarchical structure can be constructed for each storage space, and a correspondence between user information and the hierarchical structure can be established. In some implementations, the hierarchical structure can be a tree structure, meaning it can include multiple branches.
[0070] The data storage method provided in this application can be applied to object storage (OSS) scenarios. Correspondingly, the user-pre-created storage space can be a bucket, and the first data information can include a data identifier for the target data, which can also be called a key or file name. In traditional data storage methods, there is an actual hierarchical division, meaning each piece of data has an actual storage path, such as a subfile 2 within file 1 on drive D. Unlike traditional data storage methods, object storage uses a flat namespace. Each object (i.e., data) is an independent entity, without the actual hierarchical division found in traditional file storage. Instead, the data identifier includes a prefix and a suffix. The prefix can be considered a virtual folder, and the suffix is the name. For example, a data identifier might be bucket1 / text / user / list2.txt, where bucket1 / text / user / is the prefix, bucket1 / is the first-level prefix, text / is the second-level prefix, user / is the third-level prefix, and list2.txt is the suffix. Each level of prefix and suffix can also be considered a component of the data identifier. Since the data type can be determined based on the data identifier—for example, in bucket1 / test / user / list2.txt, the prefix bucket1 / text / indicates it's a text file—the data identifier includes the data type identifier. Furthermore, the levels in the hierarchical structure correspond one-to-one with the components of the data identifier. For instance, in the data identifier bucket1 / text / user / list2.txt, bucket1 corresponds to the first level, text to the second level, user to the third level, and list2.txt to the fourth level. Accordingly, in step 1022-1, at least one hierarchical structure corresponding to the user can be obtained based on the user information. The data identifier is then matched level by level with the user's corresponding hierarchical structure, and the hierarchical structure containing the type identifier and all components preceding it is determined as the target hierarchical structure.
[0071] Specifically, at least one hierarchical structure can be obtained from the correspondence between user information and hierarchical structures based on user information. For any hierarchical structure, following the order of data identifiers from front to back, it is determined whether each component of the data identifier matches the corresponding level in the hierarchical structure. If the determination result for each component of the data identifier is yes, then the hierarchical structure is determined to include the data identifier, and this hierarchical structure is identified as the target hierarchical structure. It can be understood that step-by-step matching means that if the first level matches successfully, the second level matches successfully, and so on. When a level match fails, the matching ends, meaning that the next level of matching is not performed. Therefore, when the hierarchical structure includes a type identifier, it also includes all components of the data identifier that precede the type identifier.
[0072] For example, the data is identified as bucket1 / text / user / list2.txt, and the type is identified as text / . Based on the user information, two hierarchical structures are obtained. Hierarchical structure 1 has a branch containing bucket1 / text / user / , while hierarchical structure 2 has only one branch, which is bucket1 / picture / user / 1.jpg. Since hierarchical structure 1 contains bucket1 / text / , it is determined that hierarchical structure 1 is the target hierarchical structure. Hierarchical structure 2 does not contain bucket1 / text / , therefore it is determined that hierarchical structure 2 is not the target hierarchical structure.
[0073] It should be noted that object storage is only one of the application scenarios of this application. For other application scenarios, the specific content of data identifiers and type identifiers can be set as needed in actual applications.
[0074] Step 1022-2: Obtain the user profile based on the user information.
[0075] Specifically, based on the user identifier in the user information, the associated user profile is obtained from the correspondence between user identifier and user profile, and the obtained user profile is identified as the user's user profile. The user profile may include information such as the user's preferred data types, preferred access times, and network types used.
[0076] Understandably, when using a predictive model to predict popularity levels, the model can learn user profiles from the training data during its training process. By analyzing the data information of multiple saved historical datasets, the user information of the users to whom the historical data belongs, and the historical access records of the historical data, user profiles for each user can be derived.
[0077] Step 1022-3: Determine the second access feature based on the type identifier, target hierarchy structure, and user profile in the first data information.
[0078] In some implementations, the second prediction dimension includes a data type dimension and a user access dimension, and the user profile includes the user's preferred data type. Accordingly, step 1022-3 may include: determining a third probability corresponding to the target data based on the level of the type identifier in the target hierarchical structure in the first data information; the third probability being the probability that the target data will be accessed within a preset time period based on the data type dimension; determining the data type corresponding to the level of the type identifier in the target hierarchical structure as the data type of the target data; determining a fourth probability based on the relationship between the data type and the preferred data type; the fourth probability being the probability that the target data will be accessed within a preset time period based on the user access dimension; and determining the third and fourth probabilities as the second access feature. The larger the third and fourth probabilities, the higher the frequency of access to the target data within the preset time period in the corresponding dimension.
[0079] Specifically, the third probability corresponding to each level in the hierarchical structure can be predetermined, and a correspondence between levels and third probabilities can be established. Correspondingly, based on the type identifier in the first data information and its level in the target hierarchical structure, the corresponding third probability can be obtained from the correspondence between levels and third probabilities, and this obtained third probability can be determined as the third probability corresponding to the target data. The correspondence between levels and third probabilities can be learned by the prediction model during training, or it can be determined by pre-analyzing the user's historical data and historical access records.
[0080] Continuing with the example above, in the data identifier bucket1 / text / user / list2.txt, the type identifier text / has a level of two in the target hierarchy. Therefore, the third probability corresponding to the second level is determined as the third probability corresponding to the target data.
[0081] By pre-constructing a hierarchical structure corresponding to users, the hierarchical structure can be used to characterize the type of data stored in the corresponding storage space. The third probability corresponding to each level in the hierarchical structure can be pre-determined. When a storage request for target data is received, the hierarchical structure can be used to quickly determine the level of the target data's data type. This allows for the rapid acquisition of the target data's access characteristics in the data type dimension, i.e., the third probability, thereby improving the prediction efficiency of popularity levels.
[0082] Furthermore, determining the fourth probability based on the relationship between the data type and the preferred data type can include: determining the target similarity between the data type and the preferred data type, and obtaining the corresponding fourth probability from the correspondence between similarity and fourth probability based on the target similarity. The correspondence between similarity and fourth probability can be learned by the prediction model during training, or it can be obtained by pre-analyzing historical data and access records of historical data.
[0083] Considering that in practical applications, different users access data at different frequencies and prefer different types of data, predicting the second access feature at the user level and then determining the popularity level based on the second access feature is beneficial to improving the accuracy of the popularity level.
[0084] Step 1023: Determine the popularity level of the target data based on the first access feature and the second access feature.
[0085] In some implementations, each hierarchical structure may also correspond to four weights, which are the weights corresponding to the aforementioned data attribute dimension, data access dimension, data type dimension, and user access dimension, respectively. Correspondingly, such as... Figure 5 As shown, step 1023 may include the following steps 1023-1 and 1023-2:
[0086] Step 1023-1: Weight the first access feature and the second access feature according to the weights corresponding to the target hierarchical structure.
[0087] Specifically, when using a prediction model to predict popularity levels, the weights corresponding to each hierarchical structure in the aforementioned data attribute dimension, data access dimension, data type dimension, and user access dimension can be learned during the training process of the prediction model. When not using a prediction model to predict popularity levels, the weights corresponding to each hierarchical structure can be obtained by analyzing the data information of multiple saved historical data, the user information of the users to whom the historical data belongs, and the historical access records of the historical data. For example, for each hierarchical structure, based on the access records of the data stored in the storage space corresponding to that hierarchical structure, the weights corresponding to the corresponding hierarchical structure in the data attribute dimension, data access dimension, data type dimension, and user access dimension can be evaluated based on a preset evaluation algorithm. The specific method for determining the weights is not specifically limited in this application, and can be set as needed in actual applications. Accordingly, in step 1023-1, the first probability, the second probability, the third probability, and the fourth probability are weighted according to the four weights corresponding to the target hierarchical structure to obtain the target probability.
[0088] Step 1023-2: Determine the popularity level corresponding to the weighted result as the popularity level of the target data.
[0089] The weighted result is the target probability. In some implementations, different probability intervals and their corresponding popularity levels can be preset. Accordingly, the target probability interval to which the target probability belongs among the preset probability intervals is determined, and the popularity level corresponding to the target probability interval is determined as the popularity level of the target data.
[0090] For example, the popularity level includes hot data, warm data, and cold data. The probability range for hot data is (70%-100%), the probability range for warm data is (40%-70%), and the probability range for cold data is (0-40%). If the target probability is 80%, then the popularity level of the target data is determined to be hot data.
[0091] Therefore, by predicting the access characteristics of target data from different dimensions and determining the popularity level of target data based on each access characteristic, the accuracy of the popularity level is ensured, thereby ensuring that the target data can be stored in a suitable storage medium and avoiding the waste of storage resources caused by storing all data in the storage medium corresponding to hot data.
[0092] Considering that in practical applications, users often access data after it is stored, and once data is accessed, it is likely to be accessed again in the future. Therefore, in some implementations, such as... Figure 6 As shown, step 103 may be followed by steps 104 and 105:
[0093] Step 104: If a user's access request for target data is received, and it is determined that the heat level indicates that the target data is not hot data, then the target data in the first storage medium is sent to the user, and the target data is stored from the first storage medium to the second storage medium, which is the storage medium corresponding to the hot data.
[0094] Considering that in practical applications, data accessed once is often highly likely to be accessed again within a certain period, after receiving an access request for target data, if the storage device determines that the target data is not hot data based on its popularity level, it retrieves the target data from the first storage medium and sends it to the user, copies the target data from the first storage medium to the second storage medium, and deletes the target data from the first storage medium. The first storage medium is, for example, a hard disk drive (HDD), and the second storage medium is, for example, a solid-state drive (SSD). It is understood that the "first" and "second" in the first and second storage media are only used to distinguish that the two storage media are different. When the popularity level in step 102 indicates that the target data is not hot data, the first storage medium is used to store non-hot data, and the second storage medium is used to store hot data.
[0095] In some implementations, to quickly determine the first storage medium where the data to be accessed is located when a data access request is received, an association relationship between the data identifier and the storage medium identifier can be established. Accordingly, when the data storage device receives an access request for target data, it can obtain the associated storage medium identifier from the association relationship between the data identifier and the storage medium identifier based on the data identifier in the access request, and determine whether the target data is hot data based on the popularity level corresponding to the storage medium identifier.
[0096] Step 105: If the interval between the storage request and the access request does not exceed the preset time, generate and save the access record based on the first data information, user information and target popularity level. The target popularity level is used to indicate hot data.
[0097] To facilitate the tracking of data access, in one or more embodiments of this application, an access record is generated after a user accesses the data. To ensure the accuracy of the popularity level prediction strategy, the access record also includes the actual popularity level of the data, allowing for subsequent adjustments to the popularity level prediction strategy based on the access record.
[0098] It is understandable that when the predicted popularity level of the target data indicates that the target data is not hot data, but the interval between the storage request for the target data and the first access request does not exceed the preset time, it indicates that the true popularity level of the target data is hot data. Therefore, based on the first data information, user information and the target popularity level indicating hot data, an access record is generated and the access record is saved to the specified storage area.
[0099] Therefore, after storing the target data, if an access request for the target data is received, and the target data is stored in the first storage medium corresponding to the non-hot data, the target data is transferred from the first storage medium to the second storage medium corresponding to the hot data, enabling convenient and efficient access to the target data subsequently. By generating access records, not only can the data access situation be traced, but also effective data basis can be provided for adjusting the prediction strategy of the heat level.
[0100] In some implementations, to improve the prediction strategy for popularity levels, as described above, prediction models can be used to predict popularity levels. Accordingly, such as... Figure 7 As shown, step 102 may include the following steps 1021-4:
[0101] Step 1021-4: Call the prediction model to predict the popularity level of the target data based on the first data information and user information. The popularity level represents the frequency of access to the target data within a preset time period in the future.
[0102] The specific process by which the prediction model predicts the popularity level of the target data based on the first data information and user information can be found in the relevant description above, and will not be repeated here.
[0103] To ensure the accuracy of the prediction model, in some implementation methods, such as Figure 3 As shown, the saved access records can also be used periodically to optimize and train the prediction model. Specifically, such as... Figure 7 As shown, step 105 may be followed by steps 106 to 109:
[0104] Step 106: If it is determined that the model optimization conditions are met, then obtain multiple access records within the preset historical time period.
[0105] In some implementations, a model optimization time can be preset. When the model optimization time is reached, it is determined that the model optimization conditions are met, and multiple access records within a preset historical period are retrieved from the saved access records. The preset historical period can be a preset duration with the model optimization time as the end time, such as 5 days with the model optimization time as the end time.
[0106] Step 107: Denoise multiple access records based on the number of user accesses to obtain candidate access records.
[0107] In some implementations, multiple access records can be divided into multiple first access record sets, each corresponding to a user. For any first access record set, based on the access time included in each record, the average number of accesses for the user corresponding to that set within a first duration and the total number of accesses within a second duration are determined, where the first duration is greater than the second duration. If the total number of accesses is greater than the average number of accesses, the access records corresponding to the total number of accesses are deleted, resulting in the remaining access records corresponding to the first access record set. The remaining access records corresponding to each first access record set are then identified as candidate access records. The preset historical duration can be an integer multiple of the first duration; for example, a preset historical duration of 5 days (120 hours) could be used, the first duration could be 1 hour, and the second duration could be 10 minutes.
[0108] Specifically, considering that in practical applications, when a user's data access frequency fluctuates significantly within a certain time period, there may be risks of account theft or malicious access, access records corresponding to significantly fluctuating access frequencies are deleted to ensure the accuracy of the model. That is, the data storage device divides the acquired access records into multiple first access record sets from the user perspective. Each first access record set includes multiple access records for one user. For any first access record set, based on the access time included in each access record within the first access record set, the total number of accesses within each first time period and the total number of accesses within each second time period are calculated. Then, based on the number of first time periods included in a preset historical time period (e.g., if the preset historical time period is 120 hours, and the first time period is 1 hour, then the number is 120) and the total number of accesses within each first time period, the average number of accesses within each first time period is calculated. For the total number of accesses within each second time period, it is determined whether the total number of accesses is greater than the average number of accesses. If so, the access records corresponding to the total number of accesses are deleted, resulting in the remaining access records corresponding to the first access record set. And when the remaining access records corresponding to each first access record set are obtained, each remaining access record is determined as a candidate access record.
[0109] By denoising the multiple access records obtained, the adverse effects of malicious access and other factors on the frequency of data access are avoided, thus ensuring the accuracy of the candidate access records.
[0110] Step 108: Aggregate the candidate access records according to the access time of the data to obtain the target access record.
[0111] In some implementations, candidate access records can be divided into multiple sets of second access records, each set corresponding to a single set of stored data. For any set of second access records, the access record set can be divided into multiple subsets, each subset corresponding to a single access time period. For any subset, the access times in each candidate access record within the subset can be aggregated into a single candidate access record, and this single candidate access record can be identified as the target access record.
[0112] Specifically, considering that in practical applications, the same data may be accessed multiple times within a certain access period, to facilitate model training, the data storage device divides each candidate access record into multiple second access record sets from a data perspective. Each second access record set includes multiple candidate access records for the corresponding data. From a time perspective, for each second access record set, based on the access time contained in each candidate access record within the second access record set, the candidate access records in the second access record set are divided into multiple subsets. For any subset, the access times of each candidate access record in the subset are aggregated into one candidate access record, and this candidate access record is determined as the target access record. It can be understood that for any subset, the candidate access records in the subset contain the same data information and user information, but the access times differ. Therefore, the access times of each candidate access record in the subset are aggregated into any one candidate access record in that subset to obtain the target access record corresponding to that subset.
[0113] As an example, a subset includes candidate access record 1, candidate access record 2, and candidate access record 3. Candidate access record 1 includes data information 1, user information 1, and access time 1. Candidate access record 2 includes data information 1, user information 1, and access time 2. Candidate access record 3 includes data information 1, user information 1, and access time 3. Then the aggregated target access record includes data information 1, user information 1, access time 1, access time 2, and access time 3.
[0114] By aggregating the candidate access records, we can not only reduce the amount of training data, but also make it easier for the model to learn and improve training speed and efficiency.
[0115] Step 109: Train the prediction model using the target access records.
[0116] It is understood that during training, after the target access record is input into the prediction model, the model can parse the target access record to obtain data information, at least one access time, and user information, and then predict the popularity level based on the obtained data information, at least one access time, and user information, outputting the predicted level; and determine the loss based on the predicted level and the actual popularity level in the target access record, and adjust the model parameters based on the loss. The process of training the prediction model using the target access record can refer to the model training process in related technologies, and is not specifically limited in this application.
[0117] Therefore, when the model optimization conditions are met, the target access record is obtained by preprocessing the multiple access records. The prediction model is then trained using the target access record, which allows the prediction strategy of the prediction model to change with the changes in user access habits, thus improving the accuracy of the prediction model.
[0118] This explanation uses the example of using a predictive model to predict the popularity level of target data, where popularity level includes hot data and cold data. Illustrations of the aforementioned processes can be found in [link to relevant documentation]. Figure 8 .exist Figure 8 In this model, the training layer represents training the prediction model using target access records to optimize it. The decision layer represents, upon receiving a user write request (i.e., a storage request for target data), using the current prediction model to predict the popularity level of the target data for hot / cold data splitting. Specifically, if the popularity level indicates the target data is hot data, it is saved to the storage medium corresponding to hot data; otherwise, it is saved to the storage medium corresponding to cold data. After the target data is saved, upon receiving a user read request (i.e., an access request for the target data), if the target data is stored in the storage medium corresponding to hot data, the data is read from that medium. An access record is generated and saved based on the first data information of the target data, user information, and the popularity level indicating hot data, serving as positive feedback that the popularity level predicted by the prediction model is correct. Upon receiving a user read request, if the target data is stored in the storage medium corresponding to cold data, the data is read from the cold data storage medium, and the cold data is automatically converted to hot data, i.e., the target data is saved to the storage medium corresponding to hot data. Additionally, access records are generated and saved based on the first data information of the target data, user information, and the indicated popularity level of the hot data, serving as negative feedback, indicating that the popularity level predicted by the prediction model is incorrect. If the model optimization conditions are met, multiple access records within a preset historical time period are obtained, and after denoising and aggregation of these multiple access records, target training samples are obtained. These target access records are then used to train and optimize the prediction model.
[0119] Corresponding to the embodiments of the aforementioned data storage method, this application also provides embodiments of a data storage device. Figure 9 This is a schematic diagram illustrating the structure of a data storage device according to an exemplary embodiment, which can be configured in... Figure 1 The data storage device shown is used to execute the data storage method provided in any of the above embodiments, such as... Figure 9 As shown, the data storage device includes:
[0120] The receiving module 201 is used to receive a user's storage request for target data. The storage request includes the first data information of the target data and the user's user information.
[0121] The prediction module 202 is used to predict the popularity level of the target data based on the first data information and user information. The popularity level represents the frequency of access to the target data within a preset time period in the future.
[0122] The storage module 203 is used to save the target data to the first storage medium corresponding to the heat level.
[0123] The data storage device provided in this application, upon receiving a user's storage request for target data, predicts the popularity level of the target data based on the first data information and user information included in the storage request, and saves the target data to the first storage medium corresponding to the popularity level. Therefore, by predicting the popularity level before saving the data and saving it to the corresponding storage medium based on the popularity level, not only is intelligent data archiving achieved, storage resource allocation optimized, and storage resource waste avoided, but also, because the popularity level of the target data is predicted based on the first data information and user information, both data characteristics and individual user differences are considered, making it more targeted and improving the accuracy of the prediction results, thereby improving the accuracy of data storage.
[0124] In some implementations, the prediction module 202 is specifically used for:
[0125] Based on the first data information, the first access feature of the target data in the first prediction dimension is determined, where the first prediction dimension is the access dimension corresponding to the data.
[0126] Based on the first data information and user information, the second access feature of the target data in the second prediction dimension is determined. The second prediction dimension is the access dimension corresponding to the user.
[0127] The popularity level of the target data is determined based on the first and second access characteristics.
[0128] In some implementations, the prediction module 202 is further specifically used for:
[0129] For any reference data in a preset reference database, determine the similarity between the second data information and the first data information of the reference data.
[0130] The parameter data corresponding to the maximum similarity is determined as the target reference data.
[0131] The first access feature is determined based on the reference features of the target reference data contained in the reference database.
[0132] In some implementations, the first prediction dimension includes a data attribute dimension and a data access dimension, and the reference feature includes a first probability corresponding to the target reference data in the data attribute dimension. Accordingly, the prediction module 202 is further specifically used for:
[0133] The first probability corresponding to the target reference data is determined as the first probability corresponding to the target data. The first probability is the probability that the target data will be accessed within the preset future time period based on the data attribute dimension.
[0134] From the correspondence between reference data and access information, the target access information corresponding to the target reference data is obtained. The access information is determined based on the target historical access records, which are the historical access records of multiple historical data corresponding to the reference data.
[0135] The second probability corresponding to the target access information is determined as the second probability corresponding to the target data. The second probability is the probability that the target data will be accessed within a preset time period in the future, based on the data access dimension.
[0136] The first probability and the second probability are determined as the first access feature.
[0137] In some implementations, the first data information includes a type identifier for the target data, and the prediction module 202 is further specifically used for:
[0138] Determine the target hierarchical structure corresponding to the type identifier in at least one hierarchical structure. The at least one hierarchical structure corresponds one-to-one with at least one storage space pre-created by the user. Each hierarchical structure represents the type hierarchy of the data stored in the corresponding storage space. The type of any data is determined according to the data's type identifier.
[0139] Based on user information, obtain user profiles.
[0140] The second access feature is determined based on the type identifier, target hierarchy, and user profile.
[0141] In some implementations, the second prediction dimension includes a data type dimension and a user access dimension, and the user profile includes preferred data types. Accordingly, the prediction module 202 is further specifically used for:
[0142] Based on the level of the type identifier in the target hierarchy, determine the third probability corresponding to the target data. The third probability is the probability that the target data will be accessed within a preset time period in the future, based on the data type dimension.
[0143] Based on the relationship between the data type corresponding to the type identifier and the preferred data type, a fourth probability is determined. The fourth probability is based on the user access dimension and is the probability that the target data will be accessed within a preset time period in the future.
[0144] The third and fourth probabilities are determined as the second access features.
[0145] In some implementations, the prediction module 202 is further specifically used for:
[0146] The first and second access features are weighted according to the weights corresponding to the target hierarchical structure.
[0147] The popularity level corresponding to the weighted result is determined as the popularity level of the target data.
[0148] In some embodiments, the apparatus further includes a sending module and a generating module.
[0149] The sending module is used to send the target data in the first storage medium corresponding to the heat level after the saving module 203 saves the target data to the first storage medium. If it receives a user's access request for the target data and determines that the heat level indicates that the target data is not hot data, it sends the target data in the first storage medium to the user.
[0150] The storage module 203 is also used to store the target data from the first storage medium to the second storage medium, which is the storage medium corresponding to the hot data.
[0151] The generation module is used to generate and save access records based on the first data information, user information, and target heat level indicator heat data, provided that the interval between the storage request and the access request does not exceed a preset time. The target heat level is used to indicate the heat data.
[0152] In some implementations, the access record includes the access time, and the prediction module 202 predicts the popularity level through a prediction model; the device also includes an acquisition module, a denoising module, an aggregation module, and a training module.
[0153] The acquisition module is used to acquire multiple access records within a preset historical time period if it is determined that the model optimization conditions are met.
[0154] The noise reduction module is used to denoise multiple access records based on the number of user accesses, and obtain candidate access records.
[0155] The aggregation module is used to aggregate candidate access records based on the access time of the data to obtain the target access record.
[0156] The training module is used to train the prediction model using the target access records.
[0157] In some implementations, the noise reduction module is specifically used for:
[0158] Multiple access records are divided into multiple sets of first access records, and each set of first access records corresponds to a user.
[0159] For any first access record set, based on the access time included in each access record in the first access record set, determine the average number of accesses by the user corresponding to the access record set within a first duration and the total number of accesses within a second duration, wherein the first duration is longer than the second duration.
[0160] If the total number of visits is greater than the average number of visits, then delete the visit records corresponding to the total number of visits, and obtain the remaining visit records corresponding to the first set of visit records.
[0161] The remaining access records corresponding to each first access record set are determined as candidate access records.
[0162] In some implementations, the aggregation module is specifically used for:
[0163] The candidate access records are divided into multiple sets of second access records, and each set of second access records corresponds one-to-one with multiple saved data.
[0164] For any second set of access records, the set of access records is divided into multiple subsets, and each subset corresponds to a different access time period.
[0165] For any subset, aggregate the access times in each candidate access record in the subset into a single candidate access record, and then identify that single candidate access record as the target access record.
[0166] The data storage device and the data storage method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0167] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0168] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components illustrated as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0169] It is understandable that the above division of modules is only a logical functional division. In actual implementation, the functions of the above modules can be integrated into hardware entities. For example, the function of receiving module 201 can be integrated into transceiver, and the functions of prediction module 202 and storage module 203 can be integrated into processor, etc.
[0170] Some embodiments of this application also provide an electronic device corresponding to the data storage method provided in the foregoing embodiments, the electronic device being configured to be... Figure 1 The data storage device shown is used to execute the data storage method described above. Figure 10 This is a block diagram of an electronic device used to implement embodiments of this application. For example... Figure 10 As shown, the electronic device includes a memory 301 and a processor 302. The memory 301 stores a computer program that can run on the processor 302. When the processor 302 executes the computer program, it implements the method described in the above embodiments. The number of memories 301 and processors 302 can be one or more. In a specific implementation, the electronic device may also include a communication interface 303 for communicating with external devices and performing data exchange and transmission.
[0171] In practical implementation, if the memory 301, processor 302, and communication interface 303 are implemented independently, they can be interconnected via a bus to complete communication. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0172] Optionally, in a specific implementation, if the memory 301, processor 302 and communication interface 303 are integrated on a single chip, the memory 301, processor 302 and communication interface 303 can communicate with each other through an internal interface.
[0173] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this application.
[0174] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method provided in this application.
[0175] This application also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device with the chip installed to perform the method provided in this application.
[0176] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.
[0177] It should be understood that the aforementioned processor 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. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0178] Further, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0179] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0180] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0181] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0182] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.
[0183] The logic and / or steps described in the flowchart or otherwise herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0184] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
[0185] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0186] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope described in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data storage method, characterized in that, The method includes: Receive a user's storage request for target data, the storage request including first data information of the target data and user information of the user; Based on the first data information and the user information, the popularity level of the target data is predicted, and the popularity level represents the frequency with which the target data is accessed within a preset time period in the future; The target data is saved to the first storage medium corresponding to the heat level.
2. The method according to claim 1, characterized in that, The step of predicting the popularity level of the target data based on the first data information and the user information includes: Based on the first data information, the first access feature of the target data in the first prediction dimension is determined, where the first prediction dimension is the access dimension corresponding to the data. Based on the first data information and the user information, the second access feature of the target data in the second prediction dimension is determined, where the second prediction dimension is the access dimension corresponding to the user. The popularity level of the target data is determined based on the first access feature and the second access feature.
3. The method according to claim 2, characterized in that, The step of determining the first access feature of the target data in the first prediction dimension based on the first data information includes: For any reference data in a preset reference database, determine the similarity between the second data information of the reference data and the first data information; The reference data corresponding to the maximum similarity is determined as the target reference data; The first access feature is determined based on the reference features of the target reference data contained in the reference database.
4. The method according to claim 3, characterized in that, The first prediction dimension includes a data attribute dimension and a data access dimension. The reference feature includes a first probability corresponding to the target reference data in the data attribute dimension. Determining the first access feature based on the reference feature of the target reference data includes: The first probability corresponding to the target reference data is determined as the first probability corresponding to the target data. The first probability is the probability that the target data will be accessed within the future preset time period in the data attribute dimension. From the correspondence between reference data and access information, the target access information corresponding to the target reference data is obtained. The access information is determined based on the target historical access records, which are the historical access records of multiple historical data corresponding to the reference data. The second probability corresponding to the target access information is determined as the second probability corresponding to the target data. The second probability is the probability that the target data will be accessed within the future preset time period in the data access dimension. The first probability and the second probability are determined as the first access feature.
5. The method according to claim 2, characterized in that, The first data information includes a type identifier for the target data. The step of determining the second access feature of the target data in the second prediction dimension based on the first data information and the user information includes: Determine the target hierarchical structure corresponding to the type identifier in at least one hierarchical structure, wherein the at least one hierarchical structure corresponds one-to-one with at least one storage space pre-created by the user, wherein any hierarchical structure represents the type hierarchy of the data stored in the corresponding storage space, and the type of any data is determined according to the type identifier of the data; Based on the user information, obtain the user profile of the user; The second access feature is determined based on the type identifier, the target hierarchy, and the user profile.
6. The method according to claim 5, characterized in that, The second prediction dimension includes a data type dimension and a user access dimension, and the user profile includes preferred data types; determining the second access feature based on the type identifier, the target hierarchy structure, and the user profile includes: Based on the level of the type identifier in the target hierarchy, a third probability is determined for the target data. The third probability is the probability that the target data will be accessed within a preset future time period in the data type dimension. Based on the relationship between the data type corresponding to the type identifier and the preferred data type, a fourth probability is determined. The fourth probability is the probability that the target data will be accessed within the preset future time period in the user access dimension. The third probability and the fourth probability are determined as the second access feature.
7. The method according to claim 5, characterized in that, Determining the popularity level of the target data based on the first access feature and the second access feature includes: The first access feature and the second access feature are weighted according to the weights corresponding to the target hierarchical structure. The popularity level corresponding to the weighted result is determined as the popularity level of the target data.
8. The method according to any one of claims 1-7, characterized in that, After saving the target data to the first storage medium corresponding to the heat level, the method further includes: If an access request for the target data is received from the user, and it is determined that the popularity level indicates that the target data is not hot data, then the target data in the first storage medium is sent to the user, and the target data is stored from the first storage medium to the second storage medium, which is the storage medium corresponding to the hot data; If the interval between the storage request and the access request does not exceed the preset time, an access record is generated and saved based on the first data information, the user information, and the target popularity level, wherein the target popularity level is used to indicate hot data.
9. The method according to claim 8, characterized in that, The method further includes predicting the popularity level using a prediction model, wherein the access records include access time. If the model optimization conditions are met, then multiple access records within the saved preset historical time period are retrieved. Denoising is performed on the multiple access records based on the number of user accesses to obtain candidate access records; The candidate access records are aggregated based on the access time of the data to obtain the target access records; The prediction model is trained using the target access records.
10. The method according to claim 9, characterized in that, The step of denoising the multiple access records based on the number of user accesses to obtain candidate access records includes: The multiple access records are divided into multiple first access record sets, and each of the multiple first access record sets corresponds to a user; For any first access record set, based on the access time included in each access record in the first access record set, determine the average number of accesses by the user corresponding to the access record set within a first duration and the total number of accesses within a second duration, wherein the first duration is longer than the second duration; If the total number of visits is greater than the average number of visits, then delete the visit records corresponding to the total number of visits to obtain the remaining visit records corresponding to the first set of visit records; The remaining access records corresponding to each first access record set are determined as the candidate access records.
11. The method according to claim 9 or 10, characterized in that, The step of aggregating the candidate access records based on the access time of the data to obtain the target access record includes: The candidate access records are divided into multiple sets of second access records, and each set of second access records corresponds one-to-one with multiple stored data. For any second set of access records, the set of access records is divided into multiple subsets, and the multiple subsets correspond one-to-one with multiple access time periods; For any subset, the access times in each candidate access record in the subset are aggregated into a single candidate access record, and the single candidate access record is determined as the target access record.
12. A data storage device, characterized in that, The device includes: The receiving module is used to receive a user's storage request for target data, the storage request including first data information of the target data and user information of the user; The prediction module is used to predict the popularity level of the target data based on the first data information and the user information, wherein the popularity level represents the frequency of access to the target data within a preset time period in the future. A storage module is used to save the target data to a first storage medium corresponding to the heat level.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the program to implement the method as described in any one of claims 1-11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-11.
15. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method of any one of claims 1-11.