Data storage method, device, electronic device and medium

By storing audited business data in matching storage categories based on their attributes, it solves the problems of wasted storage costs and mismatched reading and writing requirements caused by mixed storage of hot and cold data, achieves matching of data storage locations and requirements, and improves efficiency. Storage efficiency.

CN112947844BActive Publication Date: 2024-08-30BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201911265648.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-11
Publication Date
2024-08-30
Estimated Expiration
2039-12-11

AI Technical Summary

Technical Problem

In the existing technology, the mixed storage of cold-spot data and hot-spot data leads to problems such as waste of storage costs and mismatch in reading and writing requirements.

Method used

Based on the attributes of the audited business data, the business subject to which it belongs is determined and stored in the corresponding target memory category. Each memory category is determined based on its own addressing mode and storage medium to match the reading and writing requirements of the data.

Benefits of technology

It realizes the matching of data storage location and reading and writing requirements, improves storage efficiency and reduces storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112947844B
    Figure CN112947844B
Patent Text Reader

Abstract

The embodiments of the present application provide a data storage method, device, electronic device and medium, which relate to the field of computer technology, and can provide a data storage method that matches the storage location of data with the reading and writing requirements of the data. The embodiments of the present application include: obtaining multiple audit business data, and the audit business data includes data generated by auditing the object data uploaded by the user. Then, for each audit business data, according to the attributes of the audit business data, determine the business subject to which the audit business data belongs. Then, according to the preset correspondence between each business subject and the memory category, determine the target memory category corresponding to the business subject to which the audit business data belongs. Then store the audit business data in the memory of the target memory category, wherein the memory category to which each memory belongs is determined based on its own addressing method and storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data storage method, device, electronic equipment and medium. Background Art

[0002] With the rapid development of the Internet and information technology, there are a large number of media resources uploaded by users on the network. In order to maintain a green and healthy network environment, these media resources need to be reviewed before being released, and only media resources that have passed the review can be released. The review of media resources uploaded by users through the review service will generate a large amount of review service data, including whether the review of the media resources has passed. In order to analyze the review service data, it is necessary to pre-store these review service data. At present, the review service data is generally stored in a unified storage.

[0003] Audit business data can be divided into cold spot data and hot spot data. Cold spot data refers to data with a low probability of being accessed and a low requirement for computing delay, while hot spot data refers to data that needs to be accessed frequently and has a high requirement for computing delay. This method of mixed storage of cold spot data and hot spot data will waste storage costs if a memory with high read / write efficiency is used to store cold spot data with a low probability of being accessed and a low requirement for computing delay. For hot spot data with a high probability of being accessed and a high requirement for computing delay, if a memory with low read / write efficiency is used to store it, the read and write requirements of the hot spot data cannot be met. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a data storage method, device, electronic device and medium, so as to provide a data storage method that matches the storage location of data with the reading and writing requirements of data. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a data storage method, the method comprising:

[0006] Acquire multiple audit business data, wherein the audit business data includes data generated by auditing object data uploaded by a user;

[0007] For each piece of audit business data, determining the business subject to which the audit business data belongs according to the attributes of the audit business data;

[0008] Determine the target memory category corresponding to the business subject to which the audit business data belongs according to the preset correspondence between each business subject and the memory category;

[0009] The audit business data is stored in a memory of the target memory category, and the memory category to which each memory belongs is determined based on its own addressing mode and storage medium.

[0010] Optionally, before acquiring the plurality of pieces of business data, the method further includes:

[0011] Obtain each group of audit business data in the data source;

[0012] For each group of audit business data, according to the classification rules satisfied by the audit business data of the first preset dimension in the group of audit business data, determine the first category to which the group of audit business data belongs;

[0013] Determine, according to the classification rule satisfied by the audit business data of the second preset dimension in the group of audit business data, a second category under the first category to which the group of audit business data belongs;

[0014] Storing the group of audit business data in the storage location corresponding to the second category in the operational data storage ODS layer;

[0015] The obtaining of multiple audit business data includes:

[0016] Acquire multiple audit business data of a specified category from the ODS layer.

[0017] Optionally, the memory is used to store the audit business data in the data warehouse storage DWS layer, each memory stores a fact table and multiple dimension tables of the business subject corresponding to the memory category to which it belongs, the fact table includes dimension identifiers of the multiple dimension tables, and each dimension table is used to store the audit business data of its own dimension; the step of storing the audit business data in the memory of the target memory category includes:

[0018] According to the attribute of the audit business data, determining the dimension to which the attribute of the audit business data belongs;

[0019] The audit business data is stored in a dimension table of a dimension to which the attribute of the audit business data belongs.

[0020] Optionally, the audit business data belonging to the same group are associated in the DWS layer. After storing the audit business data in the memory of the target memory category, the method further includes:

[0021] From the dimension table of the specified dimension, select the audit business data that meets the preset aggregation conditions;

[0022] According to the association relationship between the audit business data that meets the preset aggregation conditions, the audit business data with the association relationship are aggregated and calculated to generate multiple summary data, and each summary data is stored in the data mart storage DMS layer in correspondence with its corresponding data identifier.

[0023] Optionally, the method further includes:

[0024] Receiving a read instruction sent by a terminal, wherein the read instruction includes a to-be-read data identifier of the to-be-read summary data and a user identifier of a logged-in user of the terminal;

[0025] If the user corresponding to the user identifier has the permission to read the summary data to be read, the summary data to be read corresponding to the data identifier to be read is obtained from the DMS layer, and the summary data to be read is sent to the terminal.

[0026] Optionally, the method further includes:

[0027] receiving a display instruction, wherein the display instruction includes a to-be-displayed data identifier of the to-be-displayed summary data;

[0028] Acquire the summary data to be displayed corresponding to the data identifier to be displayed, wherein the summary data to be displayed includes address information of object data corresponding to the summary data to be displayed;

[0029] Embedding the summary data to be displayed into a preset hypertext markup language HTML page;

[0030] The object data is obtained from the object storage server corresponding to the address information, and the HTML page is rendered.

[0031] In a second aspect, an embodiment of the present invention provides a data storage device, the device comprising:

[0032] An acquisition module, used to acquire multiple audit business data, wherein the audit business data includes data generated by auditing object data uploaded by users;

[0033] A determination module, configured to determine, for each piece of audit business data acquired by the acquisition module, the business subject to which the audit business data belongs according to the attributes of the audit business data;

[0034] The determination module is further used to determine the target memory category corresponding to the business subject to which the audit business data belongs according to the preset correspondence between each business subject and the memory category;

[0035] The storage module is used to store the audit business data in the storage of the target storage category determined by the determination module, and the storage category to which each storage belongs is determined based on its own addressing mode and storage medium.

[0036] Optionally, the acquisition module is further used to acquire each group of audit business data in the data source before acquiring the multiple business data;

[0037] The determination module is further configured to determine, for each group of audit business data acquired by the acquisition module, a first category to which the group of audit business data belongs according to a classification rule satisfied by the audit business data of a first preset dimension in the group of audit business data;

[0038] The determination module is further used to determine the second category under the first category to which the group of audit business data belongs according to the classification rules satisfied by the audit business data of the second preset dimension in the group of audit business data;

[0039] The storage module is further used to store the group of audit business data in a storage location corresponding to the second category in the operation data storage ODS layer;

[0040] The acquisition module is specifically used to acquire multiple audit business data of a specified category from the ODS layer.

[0041] Optionally, the memory is used to store the audit business data in the data warehouse storage DWS layer, each memory stores a fact table and multiple dimension tables of the business subject corresponding to the memory category to which it belongs, the fact table includes dimension identifiers of the multiple dimension tables, and each dimension table is used to store the audit business data of its own dimension; the storage module is specifically used to:

[0042] According to the attribute of the audit business data, determining the dimension to which the attribute of the audit business data belongs;

[0043] The audit business data is stored in a dimension table of a dimension to which the attribute of the audit business data belongs.

[0044] Optionally, the audit business data belonging to the same group have an associated relationship in the DWS layer, and the device further includes: a selection module and a generation module;

[0045] The selection module is used to select the audit business data that meets the preset aggregation condition from the dimension table of the specified dimension after storing the audit business data in the memory of the target memory category;

[0046] The generation module is used to perform aggregation calculation on the audit business data with association relationships according to the association relationships between the audit business data that meet the preset aggregation conditions, generate multiple summary data, and store each summary data in correspondence with its corresponding data identifier in the data mart storage DMS layer.

[0047] Optionally, the device further includes: a receiving module and a sending module;

[0048] The receiving module is used to receive a read instruction sent by a terminal, wherein the read instruction includes a to-be-read data identifier of the to-be-read summary data and a user identifier of a logged-in user of the terminal;

[0049] The sending module is configured to obtain the to-be-read summary data corresponding to the to-be-read data identifier from the DMS layer if the user corresponding to the user identifier has the read permission for the to-be-read summary data, and send the to-be-read summary data to the terminal.

[0050] Optionally, the device further includes: a receiving module, an embedding module and a rendering module;

[0051] The receiving module is used to receive a display instruction, wherein the display instruction includes a to-be-displayed data identifier of the to-be-displayed summary data;

[0052] The acquisition module is further used to acquire the summary data to be displayed corresponding to the data identifier to be displayed, wherein the summary data to be displayed includes address information of object data corresponding to the summary data to be displayed;

[0053] The embedding module is used to embed the summary data to be displayed acquired by the acquisition module into a preset hypertext markup language HTML page;

[0054] The rendering module is used to obtain the object data from the object storage server corresponding to the address information and render the HTML page.

[0055] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0056] Memory, used to store computer programs;

[0057] The processor is used to implement the steps of the data storage method described in the first aspect when executing the program stored in the memory.

[0058] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the data storage method described in the first aspect are implemented.

[0059] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the data storage method described in the first aspect above.

[0060] The technical solution of the embodiment of the present invention can at least bring the following beneficial effects: the embodiment of the present invention can store each business data in the memory corresponding to the business subject to which it belongs, and the memory category to which each memory belongs is determined based on its own addressing method and storage medium. Since the addressing method and storage medium of the memory determine the read and write efficiency of the memory, each business subject can be pre-set to correspond to the memory category that meets its own read and write requirements, so that each business data is stored in the memory that meets its own read and write requirements. Therefore, the data storage method provided by the embodiment of the present invention can match the storage location of the data with the read and write requirements of the data.

[0061] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0063] Figure 1 A flowchart of a data storage method provided by an embodiment of the present invention;

[0064] Figure 2 A flowchart of another data storage method provided by an embodiment of the present invention;

[0065] Figure 3 A flowchart of another data storage method provided by an embodiment of the present invention;

[0066] Figure 4 A schematic diagram of the structure of a data storage system provided by an embodiment of the present invention;

[0067] Figure 5 A schematic diagram of the structure of a data storage device provided by an embodiment of the present invention;

[0068] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0070] See also Figure 1 The data storage method provided in the embodiment of the present application can be applied to an electronic device, wherein the electronic device can be a server, and the method includes the following steps.

[0071] Step 101, obtaining multiple audit business data.

[0072] The audit business data includes data generated by auditing object data uploaded by users.

[0073] Optionally, the multiple pieces of audit business data obtained may include: whether the object data has been audited, the user ID of the auditor who audited the object data, the time when the object data audit was completed, the function called by the audit object data, etc. This embodiment of the application does not specifically limit this.

[0074] Object data can be images, videos, audio, etc.

[0075] In a possible implementation, multiple audit business data of multiple specified dimensions may be obtained from a data source. For example, audit business data of a time dimension, a customer identification dimension, and an object identification dimension of an audit object may be obtained from a data source.

[0076] It is understandable that the data source includes audit business data of various dimensions, including dimensions that contribute more to the analysis and audit business and dimensions that contribute less to the analysis and audit business (such as the time spent on auditing object data). The dimensions in the data source that contribute more to the analysis and audit business can be used as designated dimensions.

[0077] Step 102: for each piece of audit business data, determine the business subject to which the audit business data belongs according to the attribute of the audit business data.

[0078] Optionally, the business topics in the embodiments of the present application may include: customer topics, service topics, model topics, call detail topics, and order billing topics, etc.

[0079] For example, the user profile of the customer of the audit object data belongs to the audit business data of the customer topic. The service called by the audit object data belongs to the audit business data of the service topic. The model name used by the audit object data belongs to the audit business data of the model topic. The function called by the audit object data and the time of calling the function belong to the audit business data of the call detail topic. The cost data obtained by the audit object data belongs to the audit business data of the order billing topic.

[0080] For example, a user profile may include the user name, the company to which the user belongs, the categories that the user is good at reviewing, etc. The service called by the review object data may be a pornography review service, a violence review service, etc. The model used by the review object data may be an image recognition model for identifying pornographic images, an image recognition model for identifying violent images, etc.

[0081] Step 103 , determining a target storage category corresponding to the business subject to which the audit business data belongs according to a preset correspondence relationship between each business subject and a storage category.

[0082] It can be understood that each business subject can be mapped to a storage category that meets the reading and writing requirements of the audit business data included in the business subject.

[0083] For example, the audit business data included in the customer subject has high read and write requirements, so the customer subject can be mapped to a solid-state drive (memory category) with high storage efficiency. The audit business data included in the model subject has low read and write requirements, so the model subject can be mapped to a mechanical hard drive (memory category) with high storage efficiency.

[0084] Step 104: store the audit business data in a memory of the target memory category.

[0085] The memory category to which each memory belongs is determined based on its own addressing mode and storage medium.

[0086] For example, if the addressing method of the memory is that the magnetic head searches for the sector where the file is located on the rotating disk, and the storage medium is a magnetic disk, then the memory category to which the memory belongs is a mechanical hard disk.

[0087] The addressing method of the memory is that the control unit searches for files from the storage unit, and the storage medium is a semiconductor, so the memory category to which the memory belongs is a solid state drive.

[0088] The technical solution of the embodiment of the present invention can at least bring the following beneficial effects: the embodiment of the present invention can store each business data in the memory corresponding to the business subject to which it belongs, and the memory category to which each memory belongs is determined based on its own addressing method and storage medium. Since the addressing method and storage medium of the memory determine the read and write efficiency of the memory, each business subject can be pre-set to correspond to the memory category that meets its own read and write requirements, so that each business data is stored in the memory that meets its own read and write requirements. Therefore, the data storage method provided by the embodiment of the present invention can match the storage location of the data with the read and write requirements of the data.

[0089] Optionally, the multiple audit business data in the above step 101 can be obtained from the operational data storage (ODS) layer. Figure 2 Before obtaining multiple audit business data in step 101, the method of constructing the ODS layer includes the following steps.

[0090] Step 201, obtaining each group of audit business data in the data source.

[0091] Optionally, a full backup of the data in the data source can be performed so that the subsequent step 101 can obtain the audit business data from the ODS layer to reduce the input / output (I / O) pressure of the online data source.

[0092] Step 202: for each group of audit business data, determine the first category to which the group of audit business data belongs according to the classification rules satisfied by the audit business data of the first preset dimension in the group of audit business data.

[0093] Optionally, a set of audit business data may be data generated by an audit business, including: the time when the audit is completed, the user ID of the user who audits the object data, the data ID of the object data of the audit, the model called for auditing the object data, etc.

[0094] In one implementation, for each group of audit business data, the first category to which the group of audit business data belongs can be determined according to the time period to which the moment of audit completion included in the group of audit business data belongs.

[0095] Step 203: Determine the second category under the first category to which the group of audit business data belongs based on the classification rules satisfied by the audit business data of the second preset dimension in the group of audit business data.

[0096] In one implementation, for each group of audit business data, the second category under the first category to which the group of audit business data belongs can be determined according to the client to which the user identifier of the user of the audit object data included in the group of audit business data belongs.

[0097] Step 204: store the group of audit business data in a storage location corresponding to the second category in the operational data storage ODS layer.

[0098] For example, in combination with step 202 and step 203, the first category includes category 1 and category 2. Category 1 is used to store business data whose audit completion time is 10:00-10:59, and category 2 is used to store audit business data whose audit completion time is 11:00-11:59. Category 1 includes two second categories, namely category 3 and category 4. Category 3 is used to store audit business data whose audit object data belongs to customer A, and category 4 is used to store audit business data whose audit object data belongs to customer B.

[0099] Assume that the time of completion of the audit included in a group of audit business data is 10:10, and the time period to which 10:10 belongs is 10:00-10:59, and the first category to which the group of audit business data belongs is determined to be category 1. The user ID of the user of the audit object data included in the group of audit business is 1, and the customer to which the user ID belongs is customer A, and the second category to which the group of audit business data belongs is determined to be category 3.

[0100] Optionally, the method of obtaining multiple pieces of business data in the above step 101 may include: obtaining multiple pieces of audit business data of a specified category from the ODS layer.

[0101] Optionally, it is also possible to obtain audit business data of dimensions that contribute more to the analysis of the audit business from each group of audit business data included in the specified category.

[0102] The technical solutions included in the embodiments of the present application can also bring about the following beneficial effects: in the embodiments of the present application, the data in the ODS layer can be classified, so that when the subsequent step 101 obtains data from the ODS layer, audit business data of a specified category can be obtained, thereby reducing the time consumed in searching for audit business data that meets the conditions from various audit business data.

[0103] Optionally, in an embodiment of the present application, each memory is used to store audit business data in the data warehouse storage (Data WarehouseStore, DWS) layer, and each memory stores a fact table and multiple dimension tables of the business subject corresponding to the memory category to which it belongs, wherein the fact table includes dimension identifiers of multiple dimension tables, and each dimension table is used to store the audit business data of its own dimension.

[0104] For example, a fact table for the customer subject and multiple dimension tables such as Figure 3As shown, the fact table includes the dimension names of each dimension table (customer name, customer level and customer Internet Protocol (IP)), and each dimension table includes the audit business data belonging to its own dimension (for example, the dimension tables corresponding to the customer name include A, B, and C).

[0105] In this case, the method of storing the audit business data in the target storage category in step 101 may include the following two steps:

[0106] Step 1: Determine the dimension to which the attributes of the audited business data belong based on the attributes of the audited business data.

[0107] For example, if the attribute of the audit business data is the customer name, then the dimension to which the attribute of the business data belongs is the customer name dimension under the customer theme.

[0108] Step 2: Store the audit business data in the dimension table of the dimension to which the attributes of the audit business data belong.

[0109] Optionally, each business subject can share data stored in the dimension table. It is understandable that the data stored in the dimension table can be in the form of key-value pairs, where the key is the audit business data belonging to its own dimension and the value is the storage location of other business data in the group to which the audit business data belongs.

[0110] The technical solution of the embodiment of the present application can also bring the following beneficial effects: since the data in the DWS layer is stored in the form of fact tables and dimension tables, and each business subject can share the dimension table, the business data of the same group of data has an association relationship in the DWS layer, which can reduce the amount of data repeatedly stored in the DWS layer.

[0111] From the above discussion, it can be seen that the audit business data belonging to the same group have an association relationship in the DWS layer. After the audit business data is stored in the memory of the target memory category in the above step 104, the embodiment of the present application can also construct a data mart storage (Data Mart Store, DMS) layer. The method of constructing the DMS layer includes the following steps.

[0112] Step 1. From the dimension table of the specified dimension, select the audit business data that meets the preset summary conditions.

[0113] For example, Figure 3 As shown, from the two dimension tables of customer name and customer grade, select A from the customer name dimension table, and select the grade that is associated with customer name A from the customer grade dimension table.

[0114] Step 2: Based on the association relationship between each audit business data that meets the preset aggregation conditions, aggregate calculation is performed on the audit business data with an association relationship to generate multiple summary data, and each summary data is stored in the data mart storage DMS layer in correspondence with its corresponding data identifier.

[0115] In one implementation, each audit business data having an associated relationship may be taken as a piece of summary data.

[0116] Optionally, the data identifier corresponding to the summarized data may be a piece of audit business data included in the summary data.

[0117] The technical solution of the embodiment of the present application can also bring the following beneficial effects: the embodiment of the present application can aggregate audit business data with associated relationships to facilitate data analysis of the audit business data.

[0118] Optionally, in an embodiment of the present application, the terminal may also request the electronic device to read the summary data of the DMS layer, including the following steps.

[0119] Step 1: The electronic device receives a read instruction sent by the terminal.

[0120] The read instruction includes the to-be-read data identifier of the to-be-read summary data and the user identifier of the logged-in user of the terminal.

[0121] Step 2: If the user corresponding to the user identifier has the permission to read the summary data to be read, the electronic device can obtain the summary data to be read corresponding to the data identifier to be read from the DMS layer, and send the summary data to be read to the terminal.

[0122] Optionally, there may be a preset correspondence between each user identifier and the summary data. When a read instruction is received, it can be determined whether there is a correspondence between the user identifier and the data to be summarized. If there is a correspondence, it is determined that the user has the read permission for the summary data to be read.

[0123] Optionally, if the user corresponding to the user identification does not have the permission to read the aggregated data to be read, the electronic device may send information indicating that the user does not have the permission to read the aggregated data to be read to the terminal.

[0124] The technical solution of the embodiment of the present application can also bring the following beneficial effects: the electronic device can verify the user identification before sending the summary data to be read to the terminal, thereby improving the privacy and security of the business data.

[0125] Optionally, the embodiment of the present application may also construct a data application storage (DAS) layer, including the following steps:

[0126] Step 1: Receive display instructions.

[0127] The display instruction includes a to-be-displayed data identifier of the to-be-displayed summary data.

[0128] Optionally, the display instruction may be an instruction sent by the terminal to the electronic device. The logged-in user of the terminal may select the summary data to be displayed in the display interface of the terminal, and the electronic device may receive the display instruction sent by the terminal carrying the identifier of the data to be displayed.

[0129] Step 2: Obtain the summary data to be displayed corresponding to the data identifier to be displayed.

[0130] The summary data to be displayed includes address information of object data corresponding to the summary data to be displayed.

[0131] For example, the address information of the object data may be a Uniform Resource Locator (URL) of the object data.

[0132] The data to be aggregated may also include model detection results, such as whether the object data detected by the model is a pornographic image.

[0133] Step 3: Embed the summary data to be displayed into a preset hypertext markup language HTML page.

[0134] Optionally, elements and tags of a blank HTML page may be designed in advance, and the data to be summarized may be embedded in the elements of the HTML page.

[0135] It can be understood that the HTML elements can be the content in the HTML page, and the HTML tags can indicate the display mode of the elements (for example, the size of the elements, the display position, etc.).

[0136] Step 4: Get the object data from the object storage server corresponding to the address information and render the HTML page.

[0137] In one implementation, the object data obtained from the object storage server and the data to be summarized may be displayed at designated locations on an HTML page, respectively.

[0138] Optionally, the rendered HTML page can be stored in the DAS layer.

[0139] In the related art, when performing data analysis, data can only be displayed in text form, such as displaying data reports, etc. In the embodiment of the present application, not only the summary data can be displayed, but also the object data corresponding to the summary data can be displayed. Therefore, the embodiment of the present application can display not only text content but also multimedia content, so that the technical solution provided by the present application can better meet the data analysis needs in the content review scenario.

[0140] Figure 4 The system shown includes a data storage architecture provided by an embodiment of the present invention, and the data storage architecture includes: an ODS layer 402 , a DWS layer 403 , a DMS layer 404 and a DAS layer 405 .

[0141] Combination Figure 4 The following describes the data storage method provided by the embodiment of the present invention from an overall perspective, including the following steps:

[0142] Step 1: Acquire multiple groups of audit business data from multiple databases (DataBase, DB) 401 and object storage server 406, and store them in the ODS layer.

[0143] The audit business data obtained from DB401 includes: whether the audit of the object data is passed, the time of auditing the object data, the user ID of the auditing object data, etc.

[0144] The audit business data obtained from the object storage server 406 includes: the URL of the object data, the model recognition result of the object data, etc.

[0145] Optionally, the audit business data in the ODS layer can be stored in a mechanical hard disk or a solid-state hard disk.

[0146] Step 2: Get multiple audit business data of specified categories from the ODS layer and store them in the DWS layer.

[0147] Among them, the audit business data in the DWS layer is divided into multiple business topics, and the audit business data included in each business topic is stored in the form of fact tables and dimension tables. The audit business data included in each business topic is stored in a solid-state drive or a mechanical hard drive.

[0148] Step 3: Obtain the audit business data of the specified dimension from the DWS layer for aggregation calculation, generate summary data, and store it in the DMS layer.

[0149] Optionally, the audit business data in the DMS layer can be stored in a mechanical hard disk or a solid-state drive.

[0150] Step 4: Obtain the summary data to be displayed from the DMS layer, and embed the summary data to be displayed into a preset HTML page. According to the URL of the object data included in the HTML page after the summary data to be displayed is embedded, obtain the object data corresponding to the URL from the object storage server, render the HTML page, and store the rendered HTML page in the DAS layer.

[0151] The technical solution provided by the embodiment of the present invention can also bring the following beneficial effects: since the audit business data in the DWS layer can be heterogeneously stored based on solid-state drives and mechanical hard drives, cold spot data can be stored in mechanical hard drives, and hot spot data can be stored in solid-state drives, the embodiment of the present invention takes into account query performance, storage efficiency and hardware cost, and alleviates the reading and writing bottleneck of DWS layer data.

[0152] Corresponding to the above method embodiment, the embodiment of the present invention provides a data storage device, see Figure 5 , the device includes: an acquisition module 501, a determination module 502 and a storage module 503;

[0153] The acquisition module 501 is used to acquire multiple audit business data, where the audit business data includes data generated by auditing the object data uploaded by the user;

[0154] The determination module 502 is used to determine the business subject to which the audit business data belongs according to the attributes of the audit business data for each audit business data obtained by the acquisition module 501;

[0155] The determination module 502 is further used to determine the target memory category corresponding to the business subject to which the audit business data belongs according to the preset correspondence between each business subject and the memory category;

[0156] The storage module 503 is used to store the audit business data in a memory of the target memory category determined by the determination module 502. The memory category to which each memory belongs is determined based on its own addressing mode and storage medium.

[0157] Optionally, the acquisition module 501 is further used to acquire each group of audit business data in the data source before acquiring the multiple audit business data;

[0158] The determination module 502 is further configured to determine, for each group of audit business data acquired by the acquisition module, a first category to which the group of audit business data belongs according to a classification rule satisfied by the audit business data of a first preset dimension in the group of audit business data;

[0159] The determination module 502 is further used to determine the second category under the first category to which the group of audit business data belongs according to the classification rule satisfied by the audit business data of the second preset dimension in the group of audit business data;

[0160] The storage module 503 is further used to store the group of audit business data in a storage location corresponding to the second category in the operation data storage ODS layer;

[0161] The acquisition module 501 may be specifically used to acquire multiple audit business data of a specified category from the ODS layer.

[0162] Optionally, the memory is used to store the audit business data in the data warehouse storage DWS layer, each memory stores a fact table and multiple dimension tables of the business subject corresponding to the memory category to which it belongs, the fact table includes dimension identifiers of multiple dimension tables, and each dimension table is used to store the audit business data of its own dimension; the storage module 503 can be specifically used to:

[0163] According to the attributes of the audited business data, determine the dimension to which the attributes of the audited business data belong;

[0164] The audit business data is stored in the dimension table of the dimension to which the attributes of the audit business data belong.

[0165] Optionally, the audit business data belonging to the same group have an associated relationship in the DWS layer, and the device further includes: a selection module and a generation module;

[0166] A selection module is used to select the audit business data that meets the preset aggregation condition from the dimension table of the specified dimension after storing the audit business data in the memory of the target memory category;

[0167] The generation module is used to perform aggregation calculations on the audit business data with associations according to the associations between the audit business data that meet the preset aggregation conditions, generate multiple summary data, and store each summary data in correspondence with its corresponding data identifier in the data mart storage DMS layer.

[0168] Optionally, the device may further include: a receiving module and a sending module;

[0169] A receiving module, used for receiving a read instruction sent by a terminal, wherein the read instruction includes a to-be-read data identifier of the to-be-read summary data and a user identifier of a logged-in user of the terminal;

[0170] The sending module is used to obtain the to-be-read summary data corresponding to the to-be-read data identifier from the DMS layer if the user corresponding to the user identifier has the read permission for the to-be-read summary data, and send the to-be-read summary data to the terminal.

[0171] Optionally, the device may further include: a receiving module, an embedding module and a rendering module;

[0172] A receiving module, used for receiving a display instruction, wherein the display instruction includes a to-be-displayed data identifier of the to-be-displayed summary data;

[0173] The acquisition module 501 is further used to acquire the summary data to be displayed corresponding to the data identifier to be displayed, and the summary data to be displayed includes address information of object data corresponding to the summary data to be displayed;

[0174] An embedding module, used for embedding the summary data to be displayed acquired by the acquisition module into a preset hypertext markup language HTML page;

[0175] The rendering module is used to obtain object data from the object storage server corresponding to the address information and render the HTML page.

[0176] The embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0177] Memory 603, used for storing computer programs;

[0178] The processor 601 is used to implement the steps performed by the electronic device in the above method embodiment when executing the program stored in the memory 603.

[0179] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0180] The communication interface is used for communication between the above electronic device and other devices.

[0181] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0182] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0183] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above data storage methods are implemented.

[0184] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any of the data storage methods in the above embodiments.

[0185] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0186] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0187] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0188] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A data storage method, It is characterized in that Applied to a server, the method comprises: Acquire multiple audit business data, each audit business data includes data of one dimension generated by auditing the object data uploaded by the user; For each piece of audit business data, determining the business subject to which the audit business data belongs according to the attributes of the audit business data; According to the preset correspondence between each business subject and the memory category, determine the target memory category corresponding to the business subject to which the audit business data belongs; wherein the memory category corresponding to the business subject with high read and write requirements is a solid state drive, and the memory category corresponding to the business subject with low read and write requirements is a mechanical hard drive; Storing the audit business data in a memory of the target memory category, where the memory category to which each memory belongs is determined based on its own addressing mode and storage medium; The memory is used to store the audit business data in the data warehouse storage DWS layer. Each memory stores a fact table and multiple dimension tables of the business subject corresponding to the memory category to which it belongs. Each business subject shares the data stored in the dimension table. The fact table includes the dimension identifiers of the multiple dimension tables. Each dimension table is used to store the audit business data of its own dimension. The data stored in the dimension table is in the form of key-value pairs, wherein the key is the audit business data belonging to its own dimension, and the value is the storage location of other audit business data in the group to which the audit business data belongs. A group of audit business data is data of multiple dimensions generated by one audit business. The step of storing the audit business data in a memory of the target memory category includes: According to the attribute of the audit business data, determining the dimension to which the attribute of the audit business data belongs; The audit business data is stored in a dimension table of a dimension to which the attribute of the audit business data belongs.

2. The method according to claim 1, It is characterized in that Before obtaining the plurality of audit business data, the method further includes: Obtain each group of audit business data in the data source; For each group of audit business data, according to the classification rules satisfied by the audit business data of the first preset dimension in the group of audit business data, determine the first category to which the group of audit business data belongs; Determine, according to the classification rule satisfied by the audit business data of the second preset dimension in the group of audit business data, a second category under the first category to which the group of audit business data belongs; Storing the group of audit business data in the storage location corresponding to the second category in the operational data storage ODS layer; The obtaining of multiple audit business data includes: Acquire multiple audit business data of a specified category from the ODS layer.

3. The method according to claim 1, It is characterized in that The audit business data belonging to the same group have an association relationship in the DWS layer. After storing the audit business data in the memory of the target memory category, the method further includes: From the dimension table of the specified dimension, select the audit business data that meets the preset aggregation conditions; According to the association relationship between the audit business data that meets the preset aggregation conditions, the audit business data with the association relationship are aggregated and calculated to generate multiple summary data, and each summary data is stored in the data mart storage DMS layer in correspondence with its corresponding data identifier.

4. The method according to claim 3, It is characterized in that The method further comprises: Receiving a read instruction sent by a terminal, wherein the read instruction includes a to-be-read data identifier of the to-be-read summary data and a user identifier of a logged-in user of the terminal; If the user corresponding to the user identifier has the permission to read the summary data to be read, the summary data to be read corresponding to the data identifier to be read is obtained from the DMS layer, and the summary data to be read is sent to the terminal.

5. The method according to claim 3, It is characterized in that The method further comprises: receiving a display instruction, wherein the display instruction includes a to-be-displayed data identifier of the to-be-displayed summary data; Acquire the summary data to be displayed corresponding to the data identifier to be displayed, wherein the summary data to be displayed includes address information of object data corresponding to the summary data to be displayed; Embedding the summary data to be displayed into a preset hypertext markup language HTML page; The object data is obtained from the object storage server corresponding to the address information, and the HTML page is rendered.

6. A data storage device, It is characterized in that Applied to a server, the device comprises: An acquisition module is used to acquire multiple audit business data, each audit business data includes data of one dimension generated by auditing the object data uploaded by the user; A determination module, configured to determine, for each piece of audit business data acquired by the acquisition module, the business subject to which the audit business data belongs according to the attributes of the audit business data; The determination module is further used to determine the target memory category corresponding to the business subject to which the audit business data belongs according to the preset correspondence between each business subject and the memory category; wherein the memory category corresponding to the business subject with high read and write requirements is a solid state hard disk, and the memory category corresponding to the business subject with low read and write requirements is a mechanical hard disk; A storage module, used for storing the audit business data in a memory of the target memory category determined by the determination module, wherein the memory category to which each memory belongs is determined based on its own addressing mode and storage medium; The memory is used to store the audit business data in the data warehouse storage DWS layer. Each memory stores a fact table and multiple dimension tables of the business subject corresponding to the memory category to which it belongs. Each business subject shares the data stored in the dimension table. The fact table includes the dimension identifiers of the multiple dimension tables. Each dimension table is used to store the audit business data of its own dimension. The data stored in the dimension table is in the form of key-value pairs, wherein the key is the audit business data belonging to its own dimension, and the value is the storage location of other audit business data in the group to which the audit business data belongs. A group of audit business data is data of multiple dimensions generated by one audit business. The storage module is specifically used for: According to the attribute of the audit business data, determining the dimension to which the attribute of the audit business data belongs; The audit business data is stored in a dimension table of a dimension to which the attribute of the audit business data belongs.

7. The device according to claim 6, It is characterized in that The acquisition module is further used to acquire each group of audit business data in the data source before acquiring the multiple audit business data; The determination module is further configured to determine, for each group of audit business data acquired by the acquisition module, a first category to which the group of audit business data belongs according to a classification rule satisfied by the audit business data of a first preset dimension in the group of audit business data; The determination module is further used to determine the second category under the first category to which the group of audit business data belongs according to the classification rules satisfied by the audit business data of the second preset dimension in the group of audit business data; The storage module is further used to store the group of audit business data in a storage location corresponding to the second category in the operation data storage ODS layer; The acquisition module is specifically used to acquire multiple audit business data of a specified category from the ODS layer.

8. The device according to claim 6, It is characterized in that The audit business data belonging to the same group have an associated relationship in the DWS layer, and the device further includes: a selection module and a generation module; The selection module is used to select the audit business data that meets the preset aggregation condition from the dimension table of the specified dimension after storing the audit business data in the memory of the target memory category; The generation module is used to perform aggregation calculation on the audit business data with association relationships according to the association relationships between the audit business data that meet the preset aggregation conditions, generate multiple summary data, and store each summary data in correspondence with its corresponding data identifier in the data mart storage DMS layer.

9. The device according to claim 8, It is characterized in that The device also includes: a receiving module and a sending module; The receiving module is used to receive a read instruction sent by a terminal, wherein the read instruction includes a to-be-read data identifier of the to-be-read summary data and a user identifier of a logged-in user of the terminal; The sending module is configured to obtain the to-be-read summary data corresponding to the to-be-read data identifier from the DMS layer if the user corresponding to the user identifier has the read permission for the to-be-read summary data, and send the to-be-read summary data to the terminal.

10. The device according to claim 8, It is characterized in that The device also includes: a receiving module, an embedding module and a rendering module; The receiving module is used to receive a display instruction, wherein the display instruction includes a to-be-displayed data identifier of the to-be-displayed summary data; The acquisition module is further used to acquire the summary data to be displayed corresponding to the data identifier to be displayed, wherein the summary data to be displayed includes address information of object data corresponding to the summary data to be displayed; The embedding module is used to embed the summary data to be displayed acquired by the acquisition module into a preset hypertext markup language HTML page; The rendering module is used to obtain the object data from the object storage server corresponding to the address information and render the HTML page.

11. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.

12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Distributed Internet transaction information storage and processing method

    CN104933112A

  • Data storage method and device, and computer storage medium

    CN108710474A

  • Method and system for associatively storing data files in big data storage system

    CN110515895A