Image report presentation method, apparatus, device, and medium
By distributing user profile data across different storage engines using distributed storage technology, the problem of data storage for multi-dimensional user profile systems that cannot be met by a single data source is solved, thereby improving query performance and data management efficiency.
Patent Information
- Application Number
- CN202310108267.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-30
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-01-30
AI Technical Summary
Existing technologies, such as relational databases or NoSQL databases with a single data source, cannot meet the data storage needs of multi-dimensional user profiling systems, resulting in a decline in data query performance.
By generating data bucket identifiers, distributed storage technology is used to distribute profile data across different storage engines, such as MySQL databases and OLAP query engines, enabling multi-data source connections, index optimization, and table partitioning to achieve distributed data storage proxy.
In multi-dimensional user profiling scenarios, it improves query performance, effectively manages various heterogeneous data sources, and ensures efficient data querying and visualization.
Smart Images

Figure CN116069819B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data storage, in particular to a portrait report presentation method, a portrait report presentation device, a portrait report presentation equipment and a computer readable storage medium. BACKGROUND
[0002] At present, most user portrait systems mainly display single-dimensional data label distribution, so in the data storage technology, a single data source relational database or other non-relational NoSQL (Not Only SQL, non-relational database) database is generally used to store portrait result data. When the portrait dimension is too large, due to the expansion of data volume, a single relational database or NoSQL database cannot meet the data storage needs; after the portrait data accumulates for months, the portrait data query performance will decrease very much. Therefore, the existing storage scheme is not suitable for complex user portrait systems that need to face multi-dimensional data query or even multi-dimensional interactive real-time query. SUMMARY
[0003] The main purpose of the present application is to provide a portrait report presentation method, a portrait report presentation chip and a computer readable storage medium, which aims to solve the technical problem that a single data source cannot meet the data storage needs and there is a storage bottleneck in the prior art.
[0004] To achieve the above purpose, the present application provides a portrait report presentation method, which comprises:
[0005] Obtaining condition information corresponding to a portrait query request, and generating a portrait item based on the condition information;
[0006] Generating a database query statement according to the portrait item, and obtaining item metadata and an item result set of the portrait item using the database query statement; wherein the item metadata is an identifier of the condition information;
[0007] Generating a data bucket identifier corresponding to the item result set based on the item metadata according to a preset data bucket identifier generation rule, performing distributed data storage proxy on the item result set according to the data bucket identifier, and generating and presenting a portrait report based on the distributed stored item result set.
[0008] Illustratively, the step of generating a data bucket identifier corresponding to the item result set based on the item metadata according to a preset data bucket identifier generation rule comprises:
[0009] Combining the item metadata to generate a data bucket identifier corresponding to the item result set;
[0010] The dimension identifier and / or the index identifier in the data bucket identifier are selected according to whether the item result set can be uniquely matched.
[0011] The step of distributing and storing the item result set according to the data bucket identifier includes:
[0012] The item result set is scattered and stored into different storage engines according to the data bucket identifier.
[0013] The item result set is indexed and stored in tables according to the data bucket identifier.
[0014] The step of connecting multiple data sources according to the data bucket identifier and scattering and storing the item result set into different storage engines includes:
[0015] The dimension number and the dimension base number of the item result set are obtained, and the item result set is stored into a data storage engine corresponding to the dimension number and the dimension base number.
[0016] The step of indexing the item result set according to the data bucket identifier includes:
[0017] The table data volume of the item result set is obtained, and the index of the item result set is optimized to a target index corresponding to the table data volume, wherein the target index includes the data bucket identifier, a dimension identifier, and a joint index of the dimension identifier.
[0018] The step of storing the item result set in tables according to the data bucket identifier includes:
[0019] A table structure is generated according to the number of dimensions included in the item result set, wherein the table structure includes the data bucket identifier, a date, and a dimension identifier.
[0020] After the number of entries of the item result set is greater than a preset number, a new table is generated based on a fixed date and a serial number to store a new item result set.
[0021] The step of generating and presenting a portrait report based on the item result set stored in a distributed manner includes:
[0022] Data associated with the portrait report is queried from different data storage engines storing the item result set, and a visual portrait report is generated and presented.
[0023] The application further provides a portrait report presentation device, which includes:
[0024] The acquisition generation module is configured to acquire condition information corresponding to the portrait query request, and generate a portrait item based on the condition information;
[0025] The data query module is configured to generate a database query statement based on the portrait item, and acquire item metadata and an item result set of the portrait item using the database query statement; wherein the item metadata is an identifier of the condition information;
[0026] The portrait presentation module is configured to generate a data bucket identifier corresponding to the item result set based on the item metadata according to a preset data bucket identifier generation rule, perform distributed data storage proxy on the item result set according to the data bucket identifier, and generate and present a portrait report based on the distributed storage item result set.
[0027] The present application also provides a portrait report presentation device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the portrait report presentation method.
[0028] The present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the portrait report presentation method.
[0029] The present application discloses a portrait report presentation method, a portrait report presentation device, a portrait report presentation equipment and a computer readable storage medium, which acquires condition information corresponding to a portrait query request, and generates a portrait item based on the condition information; generates a database query statement based on the portrait item, and acquires item metadata and an item result set of the portrait item using the database query statement; wherein the item metadata is an identifier of the condition information; generates a data bucket identifier corresponding to the item result set based on the item metadata according to a preset data bucket identifier generation rule, performs distributed data storage proxy on the item result set according to the data bucket identifier, and generates and presents a portrait report based on the distributed storage item result set.
[0030] In the present application, the portrait item is generated according to the condition information corresponding to the portrait query request, the project metadata and the project result set of the portrait item are obtained by using the database query statement generated by the portrait item, the data bucket identifier corresponding to the project result set is generated based on the project metadata according to the preset data bucket identifier generation rule, the distributed data storage agent is performed on the project result set according to the data bucket identifier, and the portrait report is generated and presented based on the distributed storage of the project result set. For the current complex user portrait system which needs to realize multi-dimensional aggregation, the portrait data aggregated in different dimensions is automatically stored in different data storage engines, such as MySQL database for storing some single-dimensional data and Kylin OLAP query engine for storing high-dimensional or multi-dimensional combined data. Thus, in the multi-dimensional and high-dimensional user portrait scene, the query performance can be effectively guaranteed in the application of multi-dimensional portrait query. In addition, the connection of various heterogeneous data sources can be effectively managed, and the dimensions of the data set output by the portrait system are automatically distinguished, and then the data is transferred to different abnormal data storage engines. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a structural schematic diagram of a running device of a hardware running environment related to an embodiment scheme of the present application;
[0032] Figure 2 is a flowchart of a portrait report presentation method according to an embodiment of the present application;
[0033] Figure 3 is an application schematic diagram of a portrait report presentation method according to an embodiment of the present application;
[0034] Figure 4 is a flowchart of a portrait report presentation method according to another embodiment of the present application;
[0035] Figure 5 is a device schematic diagram of a portrait report presentation device according to an embodiment of the present application.
[0036] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0037] It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0038] Reference Figure 1 , Figure 1 is a structural schematic diagram of a running device of a hardware running environment related to an embodiment scheme of the present application.
[0039] AsFigure 1 As shown in the figure, the running device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 can be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.
[0040] Those skilled in the art can understand that Figure 1 The structure shown in the figure does not constitute a limitation on the running device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.
[0041] As Figure 1 As shown, the memory 1005 as a storage medium can include an operating system, a data storage module, a network communication module, a user interface module, and a computer program.
[0042] In Figure 1 In the running device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the running device of the present application can be arranged in the running device, and the running device calls the computer program stored in the memory 1005 through the processor 1001 and performs the following operations:
[0043] Obtain condition information corresponding to the portrait query request, and generate a portrait item based on the condition information;
[0044] Generate a database query statement according to the portrait item, and obtain item metadata and an item result set of the portrait item using the database query statement; wherein the item metadata is an identifier of the condition information;
[0045] The project result set is stored in a distributed manner according to the data bucket identifier, and a portrait report is generated and presented based on the distributed project result set.
[0046] The processor 1001 can call the computer program stored in the memory 1005, and further perform the following operations:
[0047] The step of generating the data bucket identifier corresponding to the project result set based on the project metadata according to the preset data bucket identifier generation rule comprises:
[0048] The project metadata is combined to generate the data bucket identifier corresponding to the project result set.
[0049] The dimension identifier and / or the index identifier in the data bucket identifier are selected according to whether the project result set can be uniquely matched.
[0050] The processor 1001 can call the computer program stored in the memory 1005, and further perform the following operations:
[0051] The step of storing the project result set in a distributed manner according to the data bucket identifier comprises:
[0052] According to the data bucket identifier, multiple data sources are connected, and the project result set is scattered and stored to different storage engines.
[0053] The project result set is indexed and stored according to the data bucket identifier.
[0054] The processor 1001 can call the computer program stored in the memory 1005, and further perform the following operations:
[0055] The step of connecting multiple data sources according to the data bucket identifier and scattering and storing the project result set to different storage engines comprises:
[0056] The dimension number and the dimension base number of the project result set are obtained, and the project result set is stored in the data storage engine corresponding to the dimension number and the dimension base number.
[0057] The processor 1001 can call the computer program stored in the memory 1005, and further perform the following operations:
[0058] The step of indexing and storing the project result set according to the data bucket identifier comprises:
[0059] Obtaining a table data amount of the item result set, and optimizing an index of the item result set as a target index corresponding to the table data amount, wherein the target index comprises the data bucket identifier, the dimension identifier, and a joint index of the data bucket identifier and the dimension identifier.
[0060] The processor 1001 can call a computer program stored in the memory 1005 and further perform the following operations.
[0061] The step of storing the item result set according to the data bucket identifier comprises:
[0062] Generating a table structure according to a number of dimensions included in the item result set, wherein the table structure comprises the data bucket identifier, a date, and a dimension identifier.
[0063] After the number of item result set entries is greater than a preset number, generating a new table based on a fixed date and a serial number to store a new item result set.
[0064] The processor 1001 can call a computer program stored in the memory 1005 and further perform the following operations.
[0065] The step of generating and presenting a portrait report based on the distributed storage of the item result set comprises:
[0066] Querying data associated with the portrait report from different data storage engines storing the item result set, and generating a visual portrait report for presentation.
[0067] Embodiments of the present application provide a portrait report presentation method, referring to Figure 2 In an embodiment of the portrait report presentation method, the method comprises:
[0068] Step S10: obtaining condition information corresponding to a portrait query request, and generating a portrait item based on the condition information.
[0069] Referring to Figure 3 In the first stage (S1-portrait item management), the user creates a portrait item step by step. The user selects a target customer group (customer group) through conditions, then selects corresponding data labels (dimensions and indicators), and finally combines these conditions to submit a portrait query request; then the system automatically generates a portrait item based on the input information of the user corresponding to the portrait query request, such as the item, the customer group, the dimensions, and the indicators. The portrait item includes condition information such as item information, customer group information, dimension information, and indicator information.
[0070] Step S20, generating a database query statement according to the portrait item, and obtaining item metadata and an item result set of the portrait item by using the database query statement; wherein the item metadata is an identifier of the condition information;
[0071] Referring to Figure 3 In the second stage (S2-portrait query engine), the portrait item generated by the system is automatically submitted to the portrait query engine. The portrait query engine automatically assembles and generates an SQL (Structured Query Language) query language according to the metadata information defined by the portrait item, and submits the SQL query language to the connected big data analysis platform. After the task is executed, the portrait item "metadata" and the portrait item "result set" are output to the next link for use. The metadata mainly includes the identification of the condition information such as the project ID (identifier), the customer group ID, and the associated dimension ID, and the indicator ID. The result set (data set) is the data result generated by the portrait system.
[0072] Step S30, generating a data bucket identifier corresponding to the item result set based on the item metadata according to a preset data bucket identifier generation rule, performing distributed data storage proxy on the item result set according to the data bucket identifier, and generating and presenting a portrait report based on the distributed storage of the item result set.
[0073] Referring to Figure 3 In the third stage (S3-data bucket distributor), the system collects the item metadata and the item result set output in the second stage into the data bucket distributor. The data bucket distributor generates a globally unique data bucket ID for each output item result set according to the preset data bucket identifier generation rule based on the item metadata. In the fourth stage (S4-distributed data storage proxy), the system uses a distributed data storage proxy to manage different data storage engine connections, performs distributed data storage proxy on the item result set according to the data bucket identifier, and finally generates and presents a portrait report based on the distributed storage of the item result set. The data storage engine includes but is not limited to traditional RDBMS (MySQL), or NoSQL database (Mongodb), columnar storage database (Clickhouse), pre-computation engine (Kylin), and the like.
[0074] For example, the step of generating and presenting a portrait report based on the distributed storage of the item result set includes:
[0075] Querying the data associated with the portrait report from different data storage engines storing the item result set, and generating a visual portrait report for presentation.
[0076] Referring to Figure 3In the fifth stage (S5-Image Presentation), when the user opens an image report, the result set needs to be organized in some structure to be presented in the image report. At this time, the query request is transmitted to the image presentation module. The module automatically queries the data associated with the image report from different data storage engines based on the metadata corresponding to the relevant item context information, and generates a visual report to present to the user. In actual application scenarios, the technical solution of the present application runs through the two application links of user query request and image report presentation of the user image system.
[0077] In the embodiment, the image item is generated according to the condition information corresponding to the image query request, the database query statement generated by using the image item is used to obtain the item metadata and the item result set of the image item, the data bucket identifier corresponding to the item result set is generated based on the item metadata according to a preset data bucket identifier generation rule, the distributed data storage agent is performed on the item result set according to the data bucket identifier, and the image report is generated and presented based on the distributed storage of the item result set. For the current complex user image system which needs to realize multi-dimensional aggregation, the image data aggregated in different dimensions is automatically stored in different data storage engines, such as MySQL database for storing some single-dimensional data and Kylin OLAP query engine for storing high-dimensional or multi-dimensional combined data. Thus, in the multi-dimensional and high-dimensional user image scenario, the query performance can be effectively guaranteed in the application of multi-dimensional image query. In addition, the connection of various heterogeneous data sources can be effectively managed, and the dimensions of the data set output by the image system are automatically distinguished, and then the data is transferred to different abnormal data storage engines.
[0078] In another embodiment of the image report presentation method of the present application, the step of generating the data bucket identifier corresponding to the item result set based on the item metadata according to a preset data bucket identifier generation rule comprises:
[0079] combining the item metadata to generate the data bucket identifier corresponding to the item result set;
[0080] In the embodiment, the dimensions and / or indicators in the data bucket identifier are selected according to whether the item result set can be uniquely matched.
[0081] In the embodiment, a method for generating a data bucket identifier corresponding to an item result set is provided.
[0082] The global unique data bucket ID generator generates a global unique data bucket ID through a fixed algorithm rule. The data bucket ID will be used in subsequent data set storage, data index optimization and image data query scenarios. One of the data bucket identifier generation rules is to combine the identifiers of the condition information corresponding to the item result set, and the generated data bucket identifier is:
[0083]
[0084] wherein the task ID is Figure 3 the identification of the repeatable computing task between S2-S3 in the middle, the bracket is an optional option, the dimension ID and / or the index ID will be generated as needed according to the output data result set, and the data bucket ID at least needs to contain a data label ID (dimension ID or index ID). In the portrait project, the metadata information includes the dimension ID or the index ID, so that when the data bucket identification is generated, these IDs are combined together to identify and generate a unique portrait data, prevent duplication and cannot be uniquely matched, and facilitate differentiation and retrieval.
[0085] Referring to Figure 4 In another embodiment of the portrait report presentation method of the present application, the step of distributing the project result set according to the data bucket identification includes:
[0086] Step S30A, according to the data bucket identification, multi-data source connection, and the project result set is scattered and stored to different storage engines;
[0087] Step S30B, according to the data bucket identification, index optimization and table storage of the project result set.
[0088] In this embodiment, a distributed data storage proxy method is proposed. During the data set storage process, the data can be automatically indexed and optimized, and the data query performance can be improved.
[0089] The distributed data storage proxy mainly performs:
[0090] 1. Multi-data source connection: based on the result set dimension data output by the upstream, the dimension base is different, and the result set is automatically scattered and stored to different storage engines;
[0091] 2. Automatic index optimization: the system will automatically index and optimize the data set obtained by querying and storing using the data bucket ID generated in the third stage to improve the data query performance;
[0092] 3. Automatic table storage: for traditional RDBMS (Relational Database Management System, relational database management system) storage engines, the system will automatically store the portrait data set based on the storage space and query performance consideration.
[0093] Furthermore, current application systems primarily consider the storage of profile datasets from a static perspective. However, as more and more users frequently utilize the profile system and view profile reports based on existing profile result sets, the system needs to consider caching data results from a dynamic perspective. This necessitates further expansion of the application system. In this embodiment, a cache management module can be adaptively added, integrating with cache management middleware (Redis, Memcache).
[0094] For example, step S30A: the step of performing multi-data source connections based on the data bucket identifier and distributing the project result set to different storage engines includes:
[0095] Obtain the number of dimensions and cardinality of the project result set, and store the project result set in the data storage engine corresponding to the number of dimensions and cardinality.
[0096] The system classifies the datasets generated during the profile query process and, according to rules, transfers different datasets to different data storage engines. For example, the specific transfer rules are shown in the table below:
[0097] Hit rule Storage engine Number of dimensions <= N1 RDMBS (MySQL) dimension count >= N2 and dimension count < N3 and dimension base count < C1 RDMBS (MySQL) dimension number >= N2 and dimension number < N3 and dimension base number >= C1 OLAP (Clickhouse, Kylin) Dimension number >= N3 OLAP (Clickhouse, Kylin)
[0098] Wherein, the cardinality of a dimension is the number of specific dimension values under a certain dimension. OLAP (On-Line Analytical Processing) uses preset values for N1, N2, N3, and C1. <N2<N3。
[0099] For example, step S30B: Optimize the index of the project result set according to the data bucket identifier, including:
[0100] Obtain the table data volume of the project result set, and optimize the index of the project result set to the target index corresponding to the table data volume. The target index includes the data bucket identifier, the data bucket identifier and the dimension identifier, and the composite index of the dimension identifier.
[0101] After the user profile system data is stored in the database, users may frequently query the profile chart data through the profile presentation module. Therefore, to improve data query performance, the system will automatically optimize the index for each profile data table. For example, the specific index optimization rules are shown in the table below:
[0102]
[0103]
[0104] Where BucketID is the data bucket identifier, BucketID_Index is the data bucket identifier index, Dim is the dimension identifier, and Dim_1_index is the dimension identifier index.
[0105] For example, step S30B: the step of storing the project result set in separate tables according to the data bucket identifier includes:
[0106] A table structure is generated based on the number of dimensions contained in the project result set, wherein the table structure includes the data bucket identifier, date, and dimension identifier;
[0107] After the number of items in the project result set exceeds a preset number, a new table is generated based on a fixed date and sequence number to store the new project result set.
[0108] The database sharding and table partitioning in the user profiling system is primarily based on two reasons. First, the user profiling system processes user-generated datasets with varying dimensions. Directly storing these datasets in a single wide table wastes storage space, reduces query performance, and hinders further index optimization. Second, over time, the user profiling system accumulates a large number of user-generated user profile datasets. Without sharding and table partitioning, the table space will grow increasingly large, leading to slower query efficiency.
[0109] Therefore, in this embodiment, the system uses the following two rules to partition and store the portrait dataset. This significantly improves the query performance of the portrait data, while also optimizing the caching of frequently accessed data blocks. This solves the data query performance problems existing in the prior art.
[0110] Rule 1: Partition tables based on the number of data dimensions. Data sets with different numbers of dimensions will have different table structures, with different table structures generated based on the number of dimensions contained in the dataset.
[0111] The generated table structure is roughly as follows:
[0112]
[0113] Where BucketID is the data bucket identifier, D_DATE is the date, DIM_n is the dimension identifier, and IND_value is an optional option: metric value.
[0114] Rule 2: Table partitioning is performed when the number of dataset entries is greater than or equal to N. When the number of dataset entries in a table exceeds a certain number (N), the application system will automatically store the newly output dataset in a new table. The table will be named according to a fixed date format with serial numbers, and the date will be added to the table structure.
[0115] Reference Figure 5Furthermore, embodiments of this application also provide a portrait report presentation device, the portrait report presentation device comprising:
[0116] The generation module M1 is used to obtain the condition information corresponding to the portrait query request and generate portrait items based on the condition information.
[0117] The data query module M2 is used to generate a database query statement based on the profile item, and use the database query statement to obtain the item metadata and item result set of the profile item; wherein, the item metadata is the identifier of the condition information;
[0118] The profile presentation module M3 is used to generate a data bucket identifier corresponding to the project result set based on the project metadata according to a preset data bucket identifier generation rule, perform distributed data storage proxy on the project result set according to the data bucket identifier, and generate and present a profile report based on the distributed storage of the project result set.
[0119] For example, the portrait presentation module is also used for:
[0120] Combine the project metadata to generate the data bucket identifier corresponding to the project result set;
[0121] The dimension identifier and / or indicator identifier in the data bucket identifier are selected based on whether the project result set can be uniquely matched.
[0122] For example, the portrait presentation module is also used for:
[0123] Based on the data bucket identifier, multiple data source connections are made, and the project result set is distributed and dumped to different storage engines;
[0124] The project result set is indexed, optimized, and stored in separate tables based on the data bucket identifier.
[0125] For example, the portrait presentation module is also used for:
[0126] Obtain the number of dimensions and cardinality of the project result set, and store the project result set in the data storage engine corresponding to the number of dimensions and cardinality.
[0127] For example, the portrait presentation module is also used for:
[0128] Obtain the table data volume of the project result set, and optimize the index of the project result set to the target index corresponding to the table data volume. The target index includes the data bucket identifier, the data bucket identifier and the dimension identifier, and the composite index of the dimension identifier.
[0129] For example, the portrait presentation module is also used for:
[0130] A table structure is generated based on the number of dimensions contained in the project result set, wherein the table structure includes the data bucket identifier, date, and dimension identifier;
[0131] After the number of items in the project result set exceeds a preset number, a new table is generated based on a fixed date and sequence number to store the new project result set.
[0132] For example, the portrait presentation module is also used for:
[0133] Data associated with the profile report is retrieved from different data storage engines that store the project result sets, and a visual profile report is generated and presented.
[0134] The portrait report presentation device provided in this application adopts the portrait report presentation method in the above embodiments, solving the technical problem that a single data source cannot meet data storage needs and that there is a storage bottleneck in the prior art. Compared with the prior art, the beneficial effects of the portrait report presentation device provided in this application are the same as the beneficial effects of the portrait report presentation method provided in the above embodiments, and other technical features in the portrait report presentation device are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0135] Furthermore, this application embodiment also provides a portrait report presentation chip, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the above-described portrait report presentation method.
[0136] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described portrait report presentation method.
[0137] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0139] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for presenting a portrait report, characterized in that, The method includes: Obtain the condition information corresponding to the portrait query request, and generate a portrait item based on the condition information; A database query statement is generated based on the portrait project, and the project metadata and project result set of the portrait project are obtained using the database query statement; wherein, the project metadata is the identifier of the condition information; Based on the project metadata, a data bucket identifier corresponding to the project result set is generated according to a preset data bucket identifier generation rule. Multiple data source connections are made based on the data bucket identifier, and the project result set is distributed and dumped to different storage engines. The project result set is indexed, optimized, and stored in tables according to the data bucket identifier. A profile report is generated and presented based on the distributed storage of the project result set.
2. The portrait report presentation method as described in claim 1, characterized in that, The step of generating the data bucket identifier corresponding to the project result set based on the project metadata according to the preset data bucket identifier generation rules includes: Combine the project metadata to generate the data bucket identifier corresponding to the project result set; The dimension identifier and / or indicator identifier in the data bucket identifier are selected based on whether the project result set can be uniquely matched.
3. The portrait report presentation method as described in claim 1, characterized in that, The step of performing multi-data source connections based on the data bucket identifier and distributing and dumping the project result set to different storage engines includes: Obtain the number of dimensions and cardinality of the project result set, and store the project result set in the data storage engine corresponding to the number of dimensions and cardinality.
4. The portrait report presentation method as described in claim 1, characterized in that, The step of optimizing the index of the project result set based on the data bucket identifier includes: Obtain the table data volume of the project result set, and optimize the index of the project result set to the target index corresponding to the table data volume. The target index includes the data bucket identifier, the data bucket identifier and the dimension identifier, and the composite index of the dimension identifier.
5. The portrait report presentation method as described in claim 1, characterized in that, The step of partitioning and storing the project result set according to the data bucket identifier includes: A table structure is generated based on the number of dimensions contained in the project result set, wherein the table structure includes the data bucket identifier, date, and dimension identifier; After the number of items in the project result set exceeds a preset number, a new table is generated based on a fixed date and sequence number to store the new project result set.
6. The portrait report presentation method as described in claim 1, characterized in that, The steps for generating and presenting a profile report based on the project result set using distributed storage include: Data associated with the profile report is retrieved from different data storage engines that store the project result sets, and a visual profile report is generated and presented.
7. A portrait report presentation device, characterized in that, The portrait report presentation device includes: The acquisition and generation module is used to acquire the condition information corresponding to the portrait query request and generate portrait items based on the condition information; The data query module is used to generate a database query statement based on the profile item, and use the database query statement to obtain the item metadata and item result set of the profile item; wherein, the item metadata is the identifier of the condition information; The profile presentation module is used to generate a data bucket identifier corresponding to the project result set based on the project metadata according to a preset data bucket identifier generation rule, connect to multiple data sources according to the data bucket identifier, and distribute and dump the project result set to different storage engines; perform index optimization and table partitioning storage on the project result set according to the data bucket identifier, and generate and present a profile report based on the distributed storage of the project result set.
8. A portrait report presentation device, characterized in that, The portrait report presentation device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the portrait report presentation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the portrait report presentation method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Label data processing method, device and equipment and storage medium
CN112015775A
Data processing method, device and equipment and readable storage medium
CN112487039A
Distributed database application load portraying method and system
CN115495245A