CN115794903A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115794903A
CN115794903A CN202211514092.6A CN202211514092A CN115794903A CN 115794903 A CN115794903 A CN 115794903A CN 202211514092 A CN202211514092 A CN 202211514092A CN 115794903 A CN115794903 A CN 115794903A
Authority
CN
China
Prior art keywords
dimension
query
query result
added
query instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211514092.6A
Other languages
Chinese (zh)
Inventor
唐小辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202211514092.6A priority Critical patent/CN115794903A/en
Publication of CN115794903A publication Critical patent/CN115794903A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a data processing method, a data processing device, an electronic device and a storage medium. The data processing method comprises the following steps: acquiring an original query instruction and a dimension scroll configuration parameter, wherein the dimension scroll configuration parameter is used for limiting a dimension scroll mode; generating a new query instruction based on the original query instruction and the dimension scrolling configuration parameters, and executing the new query instruction on a target data table to obtain a first query result and a second query result; generating a target query result based on the first query result and the second query result, wherein the first query result is: carrying out statistics on related data of the target object in the target data table to obtain a query result; the second query result is: and counting related data of the scroll dimension in the target data table to obtain a query result, wherein the scroll dimension is obtained by scrolling the dimension of the target object according to the dimension scroll mode.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates generally to the field of data processing technology, and more particularly, to a data processing method, apparatus, electronic device, and storage medium.
Background
In the data report analysis requirement, the requirement of statistical comparison of volume data on the dimension is frequently met. For example, when viewing data of a current enterprise, it is necessary to view average data of all enterprises in the same industry as the current enterprise at the same time, and analyze how the data quality of the current enterprise is by data comparison, that is, the statistical requirement of the volume data on the dimension (also referred to as the statistical requirement of the dimension reduction data). When meeting the requirement of the complex report statistical analysis, the customized development is usually carried out in a Case By Case development (namely, one-By-one concrete development) mode so as to meet the specific requirement for a specific scene. Because the customized development needs to be carried out according to specific requirements, the resource investment is large.
Disclosure of Invention
Exemplary embodiments of the present disclosure provide a data processing method, an apparatus, an electronic device, and a storage medium, which can implement a dimension data statistics function based on configuration parameters conveniently and quickly without customized development of codes.
According to a first aspect of the embodiments of the present disclosure, there is provided a data processing method, including: acquiring an original query instruction and a dimension scroll configuration parameter, wherein the dimension scroll configuration parameter is used for limiting a dimension scroll mode; generating a new query instruction based on the original query instruction and the dimension scrolling configuration parameters, and executing the new query instruction on a target data table to obtain a first query result and a second query result; generating a target query result based on the first query result and the second query result, wherein the first query result is: carrying out statistics on related data of a target object in the target data table to obtain a query result; the second query result is: and counting related data of the scroll dimension in the target data table to obtain a query result, wherein the scroll dimension is obtained by scrolling the dimension of the target object according to the dimension scroll mode.
Optionally, the dimensional volume configuration parameters include: the dimension of the target object, which needs to be deleted for scrolling, and the dimension of the target object, which needs to be added for scrolling, are determined; generating a new query instruction based on the original query instruction and the dimensional scrolling configuration parameters, and executing the new query instruction on the target data table to obtain the first query result and the second query result, wherein the step of obtaining the first query result and the second query result comprises: generating a first query instruction based on the original query instruction and the dimension to be increased, and executing the first query instruction on the target data table to obtain a first query result and a value range of the dimension to be increased; generating a second query instruction based on the original query instruction, the dimension to be deleted, the dimension to be added and the value range of the dimension to be added, and executing the second query instruction on the target data table to obtain a second query result, wherein the value in the dimension to be added corresponding to the target object in the target data table constitutes the value range of the dimension to be added.
Optionally, the first query result is: and obtaining a query result by counting the data in the data rows meeting the query conditions in the target data table, wherein the query conditions at least comprise: the data line where the target object is located, wherein the step of generating the first query instruction based on the original query instruction and the dimension required to be added comprises: and adding a computer program segment for limiting and outputting the value of the dimension required to be added in the data row meeting the query condition in the target data table in the statement of the original query instruction for limiting the query output field to obtain the first query instruction.
Optionally, the step of generating a second query instruction based on the original query instruction, the dimension to be deleted, the dimension to be added, and the value range of the dimension to be added includes: determining the value of a specific dimension in the first query result as a value range of the specific dimension, wherein the specific dimension is a dimension in the first query result except the dimension required to be deleted; and modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range of the dimension to be added, and the specific dimension and the value range of the specific dimension to obtain the second query instruction.
Optionally, the modifying the original query instruction based on the dimension to be deleted, the dimension to be added, the value range of the dimension to be added, and the value range of the specific dimension and the specific dimension includes: a computer program segment for deleting the dimension in which the required deletion occurs from the statements of the original query instruction for defining the query output field, the statements for defining the query condition, the statements for defining the aggregation condition and the statements for defining the ordering condition; and adding, in a statement of the original query instruction for defining a query condition: a computer program segment for defining the query range of the required added dimension as the value range of the required added dimension, and a computer program segment for defining the query range of the specific dimension as the value range of the specific dimension.
Optionally, the dimension volume configuration parameters further include: the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added, the value range of the dimension to be added, and the value range of the specific dimension and the specific dimension, further includes: and modifying the index type output field name in the original query instruction into an index type output field name corresponding to the scrolling dimension.
Optionally, the dimension volume configuration parameters further include: an aggregation operation manner corresponding to the scroll dimension, wherein the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range of the dimension to be added, and the specific dimension and the value range of the specific dimension further includes: and modifying the aggregation operation mode for obtaining the index type output field in the original query instruction into the aggregation operation mode corresponding to the scrolling dimension.
Optionally, the step of generating a target query result based on the first query result and the second query result includes: determining an association field, wherein the association field is a same dimensional field in the first query result and the second query result; for each data row in the first query result, splicing one data row in the second query result, which has the same field value of the associated field as the each data row, to the each data row; and taking the splicing result of the first query result and the second query result as the target query result.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing apparatus including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire an original query instruction and a configuration parameter of a volume in dimension, and the configuration parameter of the volume in dimension is used for limiting a volume in dimension mode; the query result acquisition unit is configured to generate a new query instruction based on the original query instruction and the dimension scrolling configuration parameters, and execute the new query instruction on a target data table to obtain a first query result and a second query result; a target result generation unit configured to generate a target query result based on the first query result and the second query result, wherein the first query result is: carrying out statistics on related data of the target object in the target data table to obtain a query result; the second query result is: and counting related data of the scroll dimension in the target data table to obtain a query result, wherein the scroll dimension is obtained by scrolling the dimension of the target object according to the dimension scroll mode.
Optionally, the dimensional volume configuration parameters include: the dimension of the target object is subjected to scrolling and deletion, and the dimension of the target object is subjected to scrolling and addition; wherein, the query result acquisition unit includes: a first query result obtaining unit, configured to generate a first query instruction based on the original query instruction and the dimension to be added, and execute the first query instruction on the target data table to obtain a value range of the first query result and the dimension to be added; a second query result obtaining unit, configured to generate a second query instruction based on the original query instruction, the dimension to be deleted, the dimension to be added, and the value range of the dimension to be added, and execute the second query instruction on the target data table to obtain the second query result, where a value in the dimension to be added corresponding to the target object in the target data table constitutes the value range of the dimension to be added.
Optionally, the first query result is: and obtaining a query result by counting the data in the data rows meeting the query conditions in the target data table, wherein the query conditions at least comprise: the data line where the target object is located, wherein the first query result obtaining unit is configured to: and adding a computer program segment for limiting and outputting the value of the dimension required to be added in the data row meeting the query condition in the target data table in the statement of the original query instruction for limiting the query output field to obtain the first query instruction.
Optionally, the second query result obtaining unit is configured to: determining the value of a specific dimension in the first query result as a value range of the specific dimension, wherein the specific dimension is a dimension in the first query result except the dimension required to be deleted; and modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range of the dimension to be added, and the specific dimension and the value range of the specific dimension to obtain the second query instruction.
Optionally, the second query result obtaining unit is configured to: a computer program segment for deleting the dimension in which the required deletion occurs from the statements of the original query instruction for defining the query output field, the statements for defining the query condition, the statements for defining the aggregation condition and the statements for defining the ordering condition; and adding, in a statement of the original query instruction for defining a query condition: a computer program segment for defining the query range of the required added dimension as the value range of the required added dimension, and a computer program segment for defining the query range of the specific dimension as the value range of the specific dimension.
Optionally, the volume-in-dimension configuration parameters further include: an index-type output field name corresponding to the scroll dimension, wherein the second query result acquisition unit is further configured to: and modifying the index type output field name in the original query instruction into an index type output field name corresponding to the scrolling dimension.
Optionally, the dimension volume configuration parameters further include: an aggregation operation manner corresponding to the volume-up dimension, wherein the second query result obtaining unit is further configured to: and modifying the aggregation operation mode for obtaining the index type output field in the original query instruction into the aggregation operation mode corresponding to the scrolling dimension.
Optionally, the target result generation unit is configured to: determining an association field, wherein the association field is a same dimension type field in the first query result and the second query result; for each data row in the first query result, splicing one data row in the second query result, which has the same field value of the associated field as the each data row, to the each data row; and taking the splicing result of the first query result and the second query result as the target query result.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: at least one processor; at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform a data processing method as described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by at least one processor, cause the at least one processor to perform the data processing method as described above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by at least one processor, implement the data processing method as described above.
According to the data processing method, the data processing device, the electronic equipment and the storage medium, a data processing process which is higher in efficiency, more diversified in applicable scenes and more flexible is provided, and a user can automatically and quickly complete the dimensional scroll data statistics only by configuring the dimensional scroll configuration parameters according to needs. The method has the advantages that the code is not required to be developed in a customized mode according to each application scene, the dimensional scrolling data statistics requirement can be met conveniently and quickly at the development cost of 0 code, the labor input is reduced, and the development time is shortened.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 illustrates a flow chart of a data processing method according to an exemplary embodiment of the present disclosure;
FIG. 2 illustrates a flowchart of a method of obtaining a first query result and a second query result according to an example embodiment of the present disclosure;
FIG. 3 shows a flowchart of a method of generating a target query result based on a first query result and a second query result, according to an example embodiment of the present disclosure;
fig. 4 shows a block diagram of a data processing apparatus according to an exemplary embodiment of the present disclosure;
fig. 5 illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In this case, the expression "at least one of the items" in the present disclosure means a case where three types of parallel expressions "any one of the items", "a combination of any plural ones of the items", and "the entirety of the items" are included. For example, "include at least one of a and B" includes the following three cases in parallel: (1) comprises A; (2) comprises B; and (3) comprises A and B. For another example, "at least one of step one and step two is performed", which means the following three parallel cases: (1) executing the step one; (2) executing the step two; and (3) executing the step one and the step two.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
In the data sheet analysis requirement, data of an object (for example, a business) is often compared with an average value of all objects in the same industry (or in a same dimension) to analyze the data level of the object. From the technical point of view, it is practical to perform data statistics by rolling up statistics of multiple dimensions (including two dimensions of enterprise and industry in the above example) by one dimension (also called dimension reduction) (the enterprise dimension is removed in the above example, and statistics are performed only according to the industry dimension).
One row of the data table is a data row, and one column of the data table corresponds to one field. In other words, each data row in the data table has a field value of the respective field. By way of example, one field in a data table may be used to describe information for one aspect (e.g., delivery system, date, industry, cost, etc.), at least one data row in a data table may be used to describe information for multiple aspects of one object, e.g., multiple data rows in a data table may be used to describe the same object. A field is a dimensional field if it is used to characterize (i.e., corresponds to) a dimension, and an indicator field if it is used to characterize (i.e., corresponds to) an indicator.
Fig. 1 illustrates a flowchart of a data processing method according to an exemplary embodiment of the present disclosure.
Referring to fig. 1, in step S101, an original query instruction and a volume-in-dimension configuration parameter are acquired.
The dimension scroll configuration parameter is used for limiting a dimension scroll mode.
The original query instruction is only used for counting the related data of the target object in the target data table to obtain a first query result. Specifically, the original query instruction is configured to count field values of fields to be counted in a data row satisfying a first query condition in the target data table to obtain a first query result, where the first query condition at least includes: and the data line of the target object. The relevant data of the target object may include: and the field value of the field to be counted in the data row meeting the query condition in the target data table.
For example, the statistical method for performing statistics on the field value of the field to be counted may be: and carrying out aggregation operation on the field value of the field to be counted according to the aggregation condition. For example, the manner of aggregation operation may include, but is not limited to, at least one of: summation (SUM), averaging (AVG), maximum (MAX), minimum (MIN), and COUNT (COUNT).
For example, for an application scenario of advertisement delivery effect, the original query instruction is used to query the total consumption of a certain enterprise in each advertisement delivery system, that is, the target objects are: in the enterprise, in the target data table, the fields for representing the enterprise are as follows: the registration _ name field and the field representing the delivery system are as follows: a source _ system _ type field and a field for representing consumption are as follows: an ad _ dsp _ cost field. The fields to be counted may be: the ad _ dsp _ cost field, the statistical method for counting the field values of the field to be counted may be: and aggregating according to the delivery systems, and summing the consumption of the enterprise in each delivery system.
As an example, the original query command may be a query SQL (structured query language) command, which is described by SQLSstatement object, and the attributes include information such as select, from, where, groupBy, orderBy, limit, offset, etc.
In step S102, a new query instruction is generated based on the original query instruction and the dimension scrolling configuration parameter, and the new query instruction is executed on the target data table to obtain the first query result and the second query result.
The first query result is: and carrying out statistics on related data of the target object in the target data table to obtain a query result. By way of example, the first query result may be: obtaining a query result by performing statistics on data in a data row satisfying a query condition in the target data table, where the query condition may at least include: and the data line of the target object.
The second query result is: and counting related data of the scroll dimension in the target data table to obtain a query result, wherein the scroll dimension is obtained by scrolling the dimension of the target object according to the dimension scroll mode. The related data for the roll-up dimension may include: a field value of the field to be counted in a data row satisfying a second query condition among the target data table, where the second query condition at least includes: the field value of the field characterizing the dimension of the scroll belongs to a data row of a certain value range.
By way of example, a graphical interface for setting up the volume-in-dimension configuration parameters may be provided to the user so that the user sets up the desired volume-in-dimension configuration parameters for the original query instructions via the graphical interface. According to the exemplary embodiment of the present disclosure, the user's threshold is lowered by converting a programming language into an interactive interface that is easy for the user to understand and operate to set by the user as desired.
By way of example, the dimensional volume configuration parameters may include: and the dimension of the target object is subjected to scrolling and deletion, and the dimension of the target object is subjected to scrolling and addition. It should be understood that the dimension of deletion required may be one or more and the dimension of addition required may be one or more. For example, when the dimension in which the target object is located is a company dimension, the dimension in which the target object is located needs to be deleted for scrolling is a company dimension, and the dimension in which the target object is located needs to be added for scrolling is an industry dimension, the scrolling dimension obtained by scrolling the target object according to the dimensional scrolling configuration parameters may be: the industry dimension.
By way of example, the dimensional volume configuration parameters may include: a reduced dimension field set including field names of fields in the target data table that characterize the dimensions that are required to be deleted, and a rolled dimension field set including field names of fields in the target data table that characterize the dimensions that are required to be added. For example, for an application scenario of ad placement effectiveness, the set of dimension reduction fields may include: field names of fields that characterize the enterprise dimension: corporation _ name; the set of rollup dimension fields may include: field names of fields that characterize industry dimensions: first _ index _ name.
In step S103, a target query result is generated based on the first query result and the second query result.
As an example, the first query result and the second query result may be merged together as a target query result.
According to the exemplary embodiment of the disclosure, corresponding data of a target object can be counted to obtain a first query result, and corresponding dimension volume data can be counted to obtain a second query result, so as to compare the data. For example, for an application scenario of advertisement delivery effect, the total consumption of a current enterprise in each advertisement delivery system may be queried, and the total consumption average value of all companies belonging to the same industry as the current enterprise in each advertisement delivery system, that is, the total consumption average value of the same industry may also be queried.
An exemplary embodiment of step S102 will be described below in conjunction with fig. 2, and an exemplary embodiment of step S103 will be described below in conjunction with fig. 3.
FIG. 2 shows a flowchart of a method of obtaining a first query result and a second query result, according to an example embodiment of the present disclosure. Step S102 may include step S201 and step S202.
Referring to fig. 2, in step S201, a first query instruction is generated based on the original query instruction and the dimension to be added, and the first query instruction is executed on the target data table, so as to obtain a first query result and a value range of the dimension to be added.
And the value in the dimension required to be added corresponding to the target object in the target data table constitutes the value range of the dimension required to be added. For example, when the dimension to be added is an industry dimension, the values in the industry dimension corresponding to the target object in the target data table are: in the makeup industry and the mother-infant industry, the value range of the industry dimension is as follows: beauty and make-up industry and mother and infant industry; the values in the industry dimension corresponding to the target object in the target data table are only: in the game industry, the value range of the industry dimension is as follows: the gaming industry.
As an example, a computer program segment (e.g., a code segment) for defining a value at which the required added dimension appears in a data row satisfying the first query condition among the target data table is output may be added in a statement of the original query instruction for defining a query output field, resulting in the first query instruction.
Aiming at the application scene of the advertisement putting effect, a code segment for acquiring the industry value of the target object can be added in the original query instruction to obtain a first query instruction, the code segment for acquiring the industry value of the target object is a value which is likely to appear in the collection scroll dimension, all the industry values in the data lines meeting the first query condition (namely meeting the where statement) can be acquired and deduplicated and then connected into a character string by commas (,) to be returned, and through the SQL code segment, one additional query for acquiring the industry value of the target object can be avoided.
In step S202, a second query instruction is generated based on the original query instruction, the dimension to be deleted, the dimension to be added, and the value range thereof (i.e., the value range of the dimension to be added), and the second query instruction is executed on the target data table to obtain the second query result.
As an example, a value appearing in a specific dimension in the first query result may be determined as a value range of the specific dimension, and then the original query instruction is modified based on the dimension to be deleted, the dimension to be added and a value range thereof (i.e., the value range of the dimension to be added), and the specific dimension and a value range thereof (i.e., the value range of the specific dimension), so as to obtain the second query instruction.
The specific dimension is a dimension of the first query result except the dimension required to be deleted, for example, an application scenario for an advertisement delivery effect, and the specific dimension may be a delivery system dimension.
As an example, the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range thereof, and the specific dimension and the value range thereof may include: (a) A computer program segment for deleting the dimension in which the required deletion occurs from a statement for defining a query output field (select statement), a statement for defining a query condition (where statement), a statement for defining an aggregation condition (group by statement), and a statement for defining an ordering condition (order by statement) of the original query instruction; (b) Adding, in a statement of the original query instruction for defining a query condition: a computer program segment for limiting the query range of the dimension to be increased to a value range thereof, and a computer program segment for limiting the query range of the specific dimension to a value range thereof, so as to use the original query instruction obtained after the steps (a) and (b) are executed for the original query instruction as a second query instruction.
For the step (a), for the application scenario of the advertisement delivery effect, for example, the code segment of the current enterprise ID that appears when the business mean is queried needs to be deleted in the original query instruction, so that only the data of the current enterprise is not searched.
For step (b), for the application scenario of the advertisement placement effect, for example, a code segment regarding the first condition and a code segment regarding the second condition need to be added to the original query instruction after step (a) is executed. The first condition, first _ index _ name, sets a same industry value, and the query range of the first condition is derived from the output of the previous first _ index _ name _ match _ concat _ alias; the second condition source _ system _ type defines the output delivery system, and by setting the first condition and the second condition, the paging problem can be solved, because if the current enterprise has only three delivery systems, only the industry mean data of the three delivery systems needs to be checked, and the industry mean data of other delivery systems cannot be used even if queried.
As an example, the dimension volume configuration parameters may further include: an index type output field name corresponding to the scrolling dimension, wherein the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range thereof, and the specific dimension and the value range thereof may further include: and modifying the index type output field name in the original query instruction into an index type output field name corresponding to the scrolling dimension. For example, for an application scenario of an advertisement placement effect, the output field name may be modified from cost _ total to cost _ total _ index.
As an example, the dimension volume configuration parameters may further include: the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range thereof, and the specific dimension and the value range thereof may further include: modifying the aggregation operation mode for obtaining the index type output field in the original query instruction into the following steps: and an aggregation operation mode corresponding to the volume-up dimension.
Considering that some aggregation operation manners need to be adjusted correspondingly during the volume-up statistics, for example, for an application scenario of advertisement placement effect, the aggregation manner of the cost sum needs to be modified into the cost sum/number of enterprises in the industry, and therefore, sum ('ad _ dsp _ cost') needs to be modified into sum ('ad _ dsp _ cost')/count (diagnosis 'collaboration _ name').
According to the exemplary embodiments of the present disclosure, automatic rewriting and execution of code can be realized according to configuration parameters.
FIG. 3 shows a flowchart of a method of generating a target query result based on a first query result and a second query result, according to an example embodiment of the present disclosure. Step S103 may include step S301, step S302, and step S303.
Referring to fig. 3, in step S301, an association field is determined, where the association field is the same dimensional field in the first query result and the second query result, in other words, the association field appears in both the first query result and the second query result. It should be understood that the number of associated fields may be plural.
In step S302, for each data row in the first query result, one data row in the second query result, which has the same field value of the associated field as the data row, is spliced to the data row.
For example, when the related fields are field a and field B, if the field value of field a of a certain data row in the first query result is a1 and the field value of field B is B1, the data row in the second query result, where the field value of field a is a1 and the field value of field B is B1, is spliced to the certain data row in the first query result.
It should be appreciated that only the unassociated field portions of the data lines in the second query result may be spliced into the data lines of the first query result, i.e., the associated field portions that are duplicate with the first query result, and may not be spliced, so as to avoid duplication.
In step S303, the splicing result of the first query result and the second query result is used as the target query result.
Fig. 4 shows a block diagram of a data processing apparatus according to an exemplary embodiment of the present disclosure.
Referring to fig. 4, the data processing apparatus 10 includes: an acquisition unit 101, a query result acquisition unit 102, and a target result generation unit 103.
Specifically, the obtaining unit 101 is configured to obtain an original query instruction and a configuration parameter of a volume in dimension, where the configuration parameter of the volume in dimension is used to define a volume in dimension manner.
The query result obtaining unit 102 is configured to generate a new query instruction based on the original query instruction and the dimension scrolling configuration parameter, and execute the new query instruction on the target data table to obtain the first query result and the second query result.
Wherein the first query result is: carrying out statistics on related data of the target object in the target data table to obtain a query result; the second query result is: and counting related data of a scroll dimension in the target data table to obtain a query result, wherein the scroll dimension is obtained by scrolling a dimension of the target object according to the dimension scroll mode.
The target result generation unit 103 is configured to generate a target query result based on the first query result and the second query result.
By way of example, the dimensional volume configuration parameters may include: the dimension of the target object, which needs to be deleted for scrolling, and the dimension of the target object, which needs to be added for scrolling, are determined.
As an example, the query result obtaining unit 102 may include: a first query result acquisition unit (not shown) and a second query result acquisition unit (not shown). The first query result obtaining unit is configured to generate a first query instruction based on the original query instruction and the dimension required to be increased, and execute the first query instruction on the target data table to obtain the first query result and a value range of the dimension required to be increased. The second query result obtaining unit is configured to generate a second query instruction based on the original query instruction, the dimension to be deleted, the dimension to be added, and the value range of the dimension to be added, and execute the second query instruction on the target data table to obtain the second query result, where a value in the dimension to be added corresponding to the target object in the target data table constitutes the value range of the dimension to be added.
By way of example, the first query result is: and obtaining a query result by counting the data in the data rows meeting the query conditions in the target data table, wherein the query conditions at least comprise: the data line where the target object is located, wherein the first query result obtaining unit may be configured to: and adding a computer program segment for limiting and outputting the value of the dimension required to be added in the data row meeting the query condition in the target data table in the statement of the original query instruction for limiting the query output field to obtain the first query instruction.
As an example, the second query result obtaining unit may be configured to: determining the value of a specific dimensionality in the first query result as a value range of the specific dimensionality, wherein the specific dimensionality is a dimensionality except the dimensionality required to be deleted in the first query result; and modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range of the dimension to be added, and the specific dimension and the value range of the specific dimension to obtain the second query instruction.
As an example, the second query result obtaining unit may be configured to: a computer program segment for deleting the dimension in which the required deletion occurs from the statements of the original query instruction for defining the query output field, the statements for defining the query condition, the statements for defining the aggregation condition and the statements for defining the ordering condition; and adding, in a statement of the original query instruction for defining a query condition: a computer program segment for defining the query range of the required added dimension as the value range of the required added dimension, and a computer program segment for defining the query range of the specific dimension as the value range of the specific dimension.
As an example, the dimension volume configuration parameters may further include: an index-type output field name corresponding to the scroll dimension, wherein the second query result acquisition unit is further configured to: and modifying the index type output field name in the original query instruction into an index type output field name corresponding to the scrolling dimension.
As an example, the dimension volume configuration parameters may further include: the second query result obtaining unit may be further configured to: and modifying the aggregation operation mode for obtaining the index type output field in the original query instruction into the aggregation operation mode corresponding to the scrolling dimension.
As an example, the target result generation unit 103 may be configured to: determining an association field, wherein the association field is a same dimensional field in the first query result and the second query result; for each data row in the first query result, splicing one data row in the second query result, which has the same field value of the associated field as the each data row, to the each data row; and taking the splicing result of the first query result and the second query result as the target query result.
With regard to the data processing apparatus 10 in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Further, it should be understood that each unit in the data processing apparatus 10 according to the exemplary embodiment of the present disclosure may be implemented as a hardware component and/or a software component. The individual units may be implemented, for example, using Field Programmable Gate Arrays (FPGAs) or Application Specific Integrated Circuits (ASICs), depending on the processing performed by the individual units as defined by the skilled person.
Fig. 5 illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. Referring to fig. 5, the electronic device 20 includes: at least one memory 201 and at least one processor 202, said at least one memory 201 having stored therein a set of computer-executable instructions that, when executed by the at least one processor 202, perform the data processing method as described in the above exemplary embodiments.
By way of example, the electronic device 20 may be a PC computer, tablet device, personal digital assistant, smart phone, or other device capable of executing the set of instructions described above. The electronic device 20 need not be a single electronic device, but can be any collection of devices or circuits that can execute the above instructions (or sets of instructions) individually or in combination. The electronic device 20 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces with local or remote (e.g., via wireless transmission).
In the electronic device 20, the processor 202 may include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example, and not limitation, processor 202 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, or the like.
The processor 202 may execute instructions or code stored in the memory 201, wherein the memory 201 may also store data. The instructions and data may also be transmitted or received over a network via a network interface device, which may employ any known transmission protocol.
Memory 201 may be integrated with processor 202, for example, by having RAM or flash memory disposed within an integrated circuit microprocessor or the like. Further, memory 201 may comprise a stand-alone device, such as an external disk drive, storage array, or any other storage device usable by a database system. The memory 301 and the processor 202 may be operatively coupled or may communicate with each other, such as through an I/O port, a network connection, etc., so that the processor 202 can read files stored in the memory.
In addition, the electronic device 20 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the electronic device 20 may be connected to each other via a bus and/or a network.
According to an exemplary embodiment of the present disclosure, there may also be provided a computer-readable storage medium storing instructions that, when executed by at least one processor, cause the at least one processor to perform the data processing method as described in the above exemplary embodiment. Examples of the computer-readable storage medium herein include: read-only memory (ROM), random-access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random-access memory (RAM), dynamic random-access memory (DRAM), static random-access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD + R, CD-RW, CD + RW, DVD-ROM, DVD-R, DVD + R, DVD-RW, DVD + RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, blu-ray or optical disk memory, hard Disk Drives (HDDs), solid-state hard disks (SSDs), card-type memory (such as a multimedia card, a Secure Digital (SD) card, or an extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage, hard disk, solid-state disk, and any other device configured to store and to enable a computer program and any associated data file, data processing structure and to be executed by a computer. The computer program in the computer-readable storage medium described above can be run in an environment deployed in a computer apparatus, such as a client, a host, a proxy device, a server, and the like, and further, in one example, the computer program and any associated data, data files, and data structures are distributed across a networked computer system such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed fashion by one or more processors or computers.
According to an exemplary embodiment of the present disclosure, there may also be provided a computer program product in which instructions are executable by at least one processor to perform the data processing method as described in the above exemplary embodiment.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method of data processing, comprising:
acquiring an original query instruction and a dimension scroll configuration parameter, wherein the dimension scroll configuration parameter is used for limiting a dimension scroll mode;
generating a new query instruction based on the original query instruction and the dimension scrolling configuration parameters, and executing the new query instruction on a target data table to obtain a first query result and a second query result;
generating a target query result based on the first query result and the second query result,
wherein the first query result is: carrying out statistics on related data of a target object in the target data table to obtain a query result;
the second query result is: and counting related data of the scroll dimension in the target data table to obtain a query result, wherein the scroll dimension is obtained by scrolling the dimension of the target object according to the dimension scroll mode.
2. The data processing method of claim 1, wherein the dimensional volume configuration parameters comprise: the dimension of the target object is subjected to scrolling and deletion, and the dimension of the target object is subjected to scrolling and addition;
generating a new query instruction based on the original query instruction and the dimension scroll configuration parameters, and executing the new query instruction on the target data table to obtain the first query result and the second query result, where the step of obtaining the first query result and the second query result includes:
generating a first query instruction based on the original query instruction and the dimension to be increased, and executing the first query instruction on the target data table to obtain a first query result and a value range of the dimension to be increased;
generating a second query instruction based on the original query instruction, the dimension to be deleted, the dimension to be added and the value range of the dimension to be added, executing the second query instruction on the target data table to obtain a second query result,
and the value in the dimension required to be added corresponding to the target object in the target data table constitutes the value range of the dimension required to be added.
3. The data processing method of claim 2, wherein the first query result is: and obtaining a query result by counting the data in the data rows meeting the query conditions in the target data table, wherein the query conditions at least comprise: the line of data in which the target object is located,
wherein the step of generating a first query instruction based on the original query instruction and the required added dimension comprises:
and adding a computer program segment for limiting and outputting the value of the dimension required to be added in the data row meeting the query condition in the target data table in the statement of the original query instruction for limiting the query output field to obtain the first query instruction.
4. The data processing method according to claim 2, wherein the step of generating a second query instruction based on the original query instruction, the dimension to be deleted, the dimension to be added, and the value range of the dimension to be added comprises:
determining the value of a specific dimensionality in the first query result as a value range of the specific dimensionality, wherein the specific dimensionality is a dimensionality except the dimensionality required to be deleted in the first query result;
and modifying the original query instruction based on the dimension to be deleted, the dimension to be added and the value range of the dimension to be added, and the specific dimension and the value range of the specific dimension to obtain the second query instruction.
5. The data processing method according to claim 4, wherein the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added, the range of the dimension to be added, and the range of the specific dimension and the specific dimension comprises:
computer program segments for deleting dimensions in which the required deletion occurs from statements defining query output fields, statements defining query conditions, statements defining aggregation conditions, statements defining ordering conditions, and the like, of the original query instruction;
and adding, in a statement of the original query instruction for defining a query condition: a computer program segment for defining the query range of the required added dimension as the value range of the required added dimension, and a computer program segment for defining the query range of the specific dimension as the value range of the specific dimension.
6. The data processing method of claim 5, wherein the dimensional volume configuration parameters further comprise: an index-type output field name corresponding to the scroll dimension,
the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added, the value range of the dimension to be added, and the value range of the specific dimension and the specific dimension further includes:
and modifying the index type output field name in the original query instruction into an index type output field name corresponding to the scrolling dimension.
7. The data processing method of claim 5, wherein the dimensionally configured volume parameters further comprise: an aggregation operation mode corresponding to the volume-up dimension,
wherein the step of modifying the original query instruction based on the dimension to be deleted, the dimension to be added, the value range of the dimension to be added, and the value range of the specific dimension and the specific dimension further includes:
and modifying the aggregation operation mode for obtaining the index type output field in the original query instruction into the aggregation operation mode corresponding to the scrolling dimension.
8. The data processing method of claim 1, wherein the step of generating a target query result based on the first query result and the second query result comprises:
determining an association field, wherein the association field is a same dimensional field in the first query result and the second query result;
for each data row in the first query result, splicing one data row in the second query result, which has the same field value of the associated field as the each data row, to the each data row;
and taking the splicing result of the first query result and the second query result as the target query result.
9. A data processing apparatus, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire an original query instruction and a configuration parameter of a volume in dimension, and the configuration parameter of the volume in dimension is used for limiting a volume in dimension mode;
the query result acquisition unit is configured to generate a new query instruction based on the original query instruction and the dimension scrolling configuration parameters, and execute the new query instruction on a target data table to obtain a first query result and a second query result;
a target result generation unit configured to generate a target query result based on the first query result and the second query result,
wherein the first query result is: carrying out statistics on related data of the target object in the target data table to obtain a query result;
the second query result is: and counting related data of the scroll dimension in the target data table to obtain a query result, wherein the scroll dimension is obtained by scrolling the dimension of the target object according to the dimension scroll mode.
10. An electronic device, comprising:
at least one processor;
at least one memory storing computer-executable instructions,
wherein the computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform the data processing method of any one of claims 1 to 8.
11. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by at least one processor, cause the at least one processor to perform a data processing method according to any one of claims 1 to 8.
CN202211514092.6A 2022-11-29 2022-11-29 Data processing method and device, electronic equipment and storage medium Pending CN115794903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211514092.6A CN115794903A (en) 2022-11-29 2022-11-29 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211514092.6A CN115794903A (en) 2022-11-29 2022-11-29 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115794903A true CN115794903A (en) 2023-03-14

Family

ID=85443274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211514092.6A Pending CN115794903A (en) 2022-11-29 2022-11-29 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115794903A (en)

Similar Documents

Publication Publication Date Title
US10410258B2 (en) Graphical user interface for high volume data analytics
US20170102866A1 (en) System for high volume data analytic integration and channel-independent advertisement generation
US8219575B2 (en) Method and system for specifying, preparing and using parameterized database queries
CN111858615B (en) Database table generation method, system, computer system and readable storage medium
CN103890709A (en) Cache based key-value store mapping and replication
US8805777B2 (en) Data record collapse and split functionality
US9031909B2 (en) Provisioning and/or synchronizing using common metadata
US10423416B2 (en) Automatic creation of macro-services
JP2023553220A (en) Process mining for multi-instance processes
CA3060800C (en) Single view presentation of multiple queries in a data visualization application
Guerra et al. Why you need a data warehouse
US11250002B2 (en) Result set output criteria
CN107894942B (en) Method and device for monitoring data table access amount
CN113570464B (en) Digital currency transaction community identification method, system, equipment and storage medium
CN115794903A (en) Data processing method and device, electronic equipment and storage medium
CN112035159B (en) Configuration method, device, equipment and storage medium of audit model
CN114065067A (en) Table display method and device, readable storage medium and electronic equipment
CN113779117A (en) Data monitoring method and device, storage medium and electronic equipment
CN110851517A (en) Source data extraction method, device and equipment and computer storage medium
CA3048876A1 (en) Retroreflective join graph generation for relational database queries
US9208224B2 (en) Business content hierarchy
CN112988291B (en) Page event management method and device, computer readable medium and electronic equipment
US20200234246A1 (en) Systems and Methods for Benefit Plan Management in Accordance with Captured User Intent
US20240005235A1 (en) Method and system for dynamically recommending commands for performing a product data management operation
US20240176766A1 (en) Dynamic modeling using profiles

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination