CN112307030A - Dimension combination obtaining method and related equipment - Google Patents

Dimension combination obtaining method and related equipment Download PDF

Info

Publication number
CN112307030A
CN112307030A CN202011224198.3A CN202011224198A CN112307030A CN 112307030 A CN112307030 A CN 112307030A CN 202011224198 A CN202011224198 A CN 202011224198A CN 112307030 A CN112307030 A CN 112307030A
Authority
CN
China
Prior art keywords
dimensional array
dimension
target
elements
members
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.)
Granted
Application number
CN202011224198.3A
Other languages
Chinese (zh)
Other versions
CN112307030B (en
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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202011224198.3A priority Critical patent/CN112307030B/en
Publication of CN112307030A publication Critical patent/CN112307030A/en
Application granted granted Critical
Publication of CN112307030B publication Critical patent/CN112307030B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2264Multidimensional index structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application discloses a dimension combination obtaining method, which is used for obtaining different dimension combinations in the process of analyzing reports and comprises the following steps: acquiring a plurality of dimension types of a report selected by a user and members corresponding to the dimension types; filling members corresponding to a plurality of dimension types into a two-dimensional array, wherein the dimension types of elements with the same first dimension in the two-dimensional array are the same; acquiring a target one-dimensional array, wherein the number of elements of the target one-dimensional array is the same as the number of dimension types, and subscripts of all elements in the target one-dimensional array correspond to first dimensions of a two-dimensional array one to one; the maximum value of each element in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the element. According to the scheme, different dimensional combinations can be obtained by taking different element values from the one-dimensional array through the corresponding relation between the target one-dimensional array and the two-dimensional array, and a mode for obtaining the dimensional combinations, which is simple in code, high in implementability and small in occupied computing resources, is provided.

Description

Dimension combination obtaining method and related equipment
Technical Field
The embodiment of the application relates to the field of data processing, in particular to a dimension combination obtaining method and related equipment
Background
In the analysis process of the report, the dimension belongs to the angle of analyzing report data, the dimension is used for recording the characteristics of the facts recorded in the fact data table, the characteristics particularly provide descriptive information for real-time data, and the dimension is used for indicating how to sum up the data under the data table so as to provide useful information for an analyst. Members of different classifications can exist in a dimension, and all the members are set for describing attributes of data in the dimension, if the dimension of materials exists in a report, it is difficult for data recorded in a table to have members of metal, plastic, wood and the like, all the members belong to a parallel relation in the dimension, and data in the table can belong to any member classification in the dimension.
For a report, there may be a plurality of different dimensions, which describe data from different angles, and determining the members of each dimension under the report also determines the type of data classified to the minimum, and this combination is called a dimension combination.
When a report is analyzed, a user often needs to select some dimensions under a current report and select a certain number of members for the dimensions, and hope that the selected dimensions and the dimension combination of the members can be displayed in the report so as to complete data analysis.
Disclosure of Invention
The embodiment of the application provides a dimension combination method, which is used for acquiring combination conditions of different dimensions in a report, the scheme inputs the dimensions and members corresponding to the dimensions into a two-dimensional array, sets a one-dimensional array with certain limits, and acquires corresponding members from the two-dimensional array based on values and subscripts of elements in the one-dimensional array.
A first aspect of an embodiment of the present application provides a dimension combination obtaining method, including:
acquiring a plurality of dimension types of a report selected by a user and members corresponding to the dimension types;
filling members corresponding to the multiple dimension types into a two-dimensional array, wherein the dimension types of elements with the same first dimension in the two-dimensional array are the same;
acquiring a target one-dimensional array, wherein the number of elements of the target one-dimensional array is the same as the number of the dimension types, and subscripts of all elements in the target one-dimensional array correspond to the first dimension of the two-dimensional array one to one; the maximum value of each element in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the element, and the target one-dimensional array is an integer array;
and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination.
Based on the dimension combination obtaining method provided by the first aspect of the embodiment of the present application, optionally, the target one-dimensional array is obtained;
acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination, wherein the dimension combination comprises:
acquiring a target one-dimensional array with each element value being 0;
gradually increasing the value of each element in the target one-dimensional array;
and each time a target one-dimensional array with different element values is obtained, executing the following steps: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value.
Based on the dimension combination obtaining method provided in the first aspect of the embodiment of the present application, optionally, the values of the elements in the target one-dimensional array are sequentially increased, and each time a target one-dimensional array with a different element value is obtained, the following steps are performed: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value, wherein the step is executed by an iterator.
Based on the dimension combination obtaining method provided by the first aspect of the embodiments of the present application, optionally,
the dimension types are fixed;
the method comprises the steps of obtaining a plurality of dimension types of a report selected by a user and members corresponding to the dimension types;
the method comprises the following steps: and acquiring the members of the report selected by the user for each dimension type.
A second aspect of the embodiments of the present application provides a dimension combination acquiring apparatus, including:
the system comprises a member acquisition unit, a report generation unit and a report generation unit, wherein the member acquisition unit is used for acquiring a plurality of dimension types of a report selected by a user and members corresponding to the dimension types;
the filling unit is used for filling the members corresponding to the plurality of dimension types into a two-dimensional array, and the dimension types of the elements with the same first dimension in the two-dimensional array are the same;
the target one-dimensional array obtaining unit is used for obtaining a target one-dimensional array, the number of elements of the target one-dimensional array is the same as the number of the dimension types, and subscripts of all elements in the target one-dimensional array correspond to the first dimensions of the two-dimensional array one by one; the maximum value of each element in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the element, and the target one-dimensional array is an integer array;
and the dimension combination obtaining unit is used for obtaining corresponding members from the two-dimensional array based on the subscript and the element value of each element of the target one-dimensional array to obtain the dimension combination.
Based on the dimension combination obtaining device provided by the second aspect of the embodiment of the present application, optionally,
the dimension combination obtaining unit is specifically configured to obtain a target one-dimensional array with each element value being 0;
gradually increasing the value of each element in the target one-dimensional array, and executing each time a target one-dimensional array with different element values is obtained: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value.
Based on the dimension combination obtaining device provided by the second aspect of the embodiment of the present application, optionally,
and successively increasing the value of each element in the target one-dimensional array, and executing each time a target one-dimensional array with different element values is obtained: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value, wherein the step is executed by an iterator.
A third aspect of the embodiments of the present application provides a dimension combination acquiring apparatus, including:
the system comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;
the memory is a transient memory or a persistent memory;
the central processing unit is configured to communicate with the memory, and execute the instruction operations in the memory on the people counting device to execute the method according to any one of the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to perform the method according to any one of the first aspects of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product containing instructions, which when executed on a computer, cause the computer to perform the method according to any one of the first aspect of embodiments of the present application.
According to the technical scheme, the embodiment of the application has the following advantages: according to the scheme, the selected dimensionality and the members corresponding to the dimensionality are filled into the two-dimensional array, the target one-dimensional array is obtained, the number of elements of the target one-dimensional array is the same as the number of dimensionality types, and subscripts of all elements in the target one-dimensional array correspond to the first dimensionality of the two-dimensional array one by one; the maximum value of each element in the target one-dimensional array is smaller than the member number of the elements in the first dimension of the two-dimensional array corresponding to the element, and the target one-dimensional array is an integer array; and acquiring corresponding members from the two-dimensional array based on each element in the target one-bit array, and further acquiring corresponding dimension combinations. The method and the device have the advantages that different dimensional combinations can be obtained only by taking different element values from the one-dimensional array through the corresponding relation between the target one-dimensional array and the two-dimensional array, a new mode for obtaining the dimensional combinations is provided, and meanwhile the method and the device have the characteristics of simple codes, strong practicability and the like.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a dimension combination obtaining method according to the present application;
FIG. 2 is another schematic flow chart diagram illustrating an embodiment of a dimension combination obtaining method according to the present application;
FIG. 3 is a schematic diagram of a dimension combination report according to an embodiment of the dimension combination obtaining method of the present application;
FIG. 4 is a schematic structural diagram of an embodiment of a dimension combination acquiring apparatus according to the present application;
fig. 5 is another schematic structural diagram of an embodiment of the dimension combination obtaining apparatus according to the present application.
Detailed Description
The embodiment of the application provides a dimension combination obtaining method, which is used for obtaining combination conditions of different dimensions in a report, the scheme inputs the dimensions and members corresponding to the dimensions into a two-dimensional array, a one-dimensional array with certain limits is set, corresponding members are obtained from the two-dimensional array based on values and subscripts of all elements in the one-dimensional array, and the corresponding dimension combinations can be obtained based on the one-dimensional array because the number of the elements in the one-dimensional array corresponds to the number of the dimensions and the values of the elements in the one-dimensional array are smaller than the number of the members corresponding to all the dimensions, so that the obtaining process of the dimension combinations is completed, and the obtaining efficiency of the dimension combinations is improved.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
In the process of analyzing the report, the members corresponding to multiple dimensions are often required to be combined, specifically, one member is selected for each dimension, and the members are combined together to classify the data into the finest category, for example, two dimensions of material dimension and heat insulation exist, three members of metal, plastic and wood exist in the material dimension, three members of good, good and poor exist in the heat insulation, and one member is selected in the material dimension and the heat insulation dimension, so that a minimum category under the report is obtained, in the actual use process, a user does not always combine all the members in all the dimensions and dimensions in the report to obtain all the dimension categories, but needs to combine a part of the dimensions and the corresponding members to obtain the corresponding dimension combinations, in this case, the codes supporting the members are complicated and the calculation logic required to be used is complex, the consumed computing resources are more, which causes a lot of inconvenience.
Referring to fig. 1, an embodiment of a dimension combination obtaining method of the present application includes: step 101-step 104.
101. The method comprises the steps of obtaining a plurality of dimension types of a report selected by a user and members corresponding to the dimension types.
The method comprises the steps of obtaining a plurality of dimension types of a report selected by a user and members corresponding to the dimension types. The method includes the steps that a dimension type provided by a user based on a current report and members corresponding to the dimension types are obtained, in the actual using process, the user can select all the dimension types and all the members corresponding to the dimension types in the current report, and can also selectively obtain partial dimension types and the members corresponding to the partial dimension types, the method can be specifically determined according to actual conditions, and the method is not limited here. Meanwhile, the number of the reports is not limited in the selection process, and a user can select the reports under a plurality of correlated reports according to the self requirement, wherein the specific position is not limited.
102. And filling the members corresponding to the multiple dimension types into a two-dimensional array.
And filling members corresponding to the plurality of dimension types into a two-dimensional array, wherein the dimension types of the elements with the same first dimension in the two-dimensional array are the same. And filling the dimension types and the corresponding members selected by the user into a two-dimensional array, wherein the two-dimensional array is an array taking the array as an element. Can be expressed as a [ i ] [ j ], [ i ] is the first dimension of the two-dimensional array and [ j ] is the second dimension of the two-dimensional array. Taking the example that the material dimensions include three members of metal, plastic and wood, and the heat insulation property includes three members of good, good and poor, the two-dimensional array is a two-row three-column array after being filled, and corresponding elements can be obtained by taking different values based on i and j, such as:
a [0] [0] ═ metal, a [0] [1] ═ plastic, a [0] [2] ═ wood;
a [1] [0] is good, a [1] [1] is good, and a [1] [2] is bad.
That is, when the first dimension of the two-dimensional array is equal to 0, the corresponding element is a member in the material dimension, and when the first dimension is equal to 1, the corresponding element is a member in the heat insulation property. It can be understood that the number of members corresponding to each dimension may be different in the actual implementation process of the present solution, that is, the two-dimensional array obtained after the selected dimension and the number of members are filled is an irregular two-dimensional array, which does not affect the implementation process of the present solution, and the specific details are not limited herein. In the actual implementation process of the scheme, a two-dimensional array can be preset in the system, and the two-dimensional array is filled in the corresponding two-dimensional array after the user selects the dimension type and the member, and similarly, the corresponding two-dimensional array can be formed based on the selected data after the user determines the dimension type and the member, and then the corresponding data is filled in, which can be determined according to the actual situation, and is not limited herein.
103. And acquiring a target one-dimensional array.
Acquiring a target one-dimensional array, wherein the number of elements of the target one-dimensional array is the same as the number of the dimension types, and subscripts of all elements in the target one-dimensional array correspond to the first dimension of the two-dimensional array one by one; the maximum value of each element in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the element, and the target one-dimensional array is an integer array. The target one-dimensional array is the array used for obtaining the dimension combination, the value of each element in the one-dimensional array is smaller than the corresponding element number, in the practical implementation process of the scheme, the one-dimensional array can be preset in the system and can be subjected to value taking, and in order to ensure that each element in the one-dimensional array has a corresponding member, therefore, the element number and the element value of the one-dimensional array meet the requirements, namely: the number of elements of the target one-dimensional array is the same as the number of the dimension types, and the maximum value of each element in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the element. As for the array described in the above step 102, the number of members of the target one-dimensional array should be two, and the two element values should be smaller than 3 corresponding to the number of dimension types included in the two-dimensional array, that is, any integer value from 0 to 2 may be taken. In order to obtain the corresponding member.
104. And acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination.
And acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination. And acquiring members corresponding to each element of the one-dimensional array based on the subscript of the target one-dimensional array and the corresponding relation between the element value and the two-bit array, and further determining the combination of each member as a dimension combination to acquire the dimension combination required by the user. As for the array described in the above step 102, when the target one-dimensional array a [1], (1, 0) is obtained, the member corresponding to the first element is a [0] [1], (plastic), and the member corresponding to the second element is a [1] [0], (plastic, preferably), the dimension classification obtained by combining the two is obtained, and the user can continue to use the dimension classification to obtain the corresponding data may specifically depend on the actual situation, which is not limited herein.
According to the technical scheme, the embodiment of the application has the following advantages: according to the scheme, the selected dimensionality and the members corresponding to the dimensionality are filled into the two-dimensional array, the target one-dimensional array is obtained, the number of elements of the target one-dimensional array is the same as the number of dimensionality types, and subscripts of all elements in the target one-dimensional array correspond to the first dimensionality of the two-dimensional array one by one; the maximum value of each element in the target one-dimensional array is smaller than the member number of the elements in the first dimension of the two-dimensional array corresponding to the element, and the target one-dimensional array is an integer array; and acquiring corresponding members from the two-dimensional array based on each element in the target one-bit array, and further acquiring corresponding dimension combinations. The method and the device have the advantages that different dimensional combinations can be obtained only by taking different element values from the one-dimensional array through the corresponding relation between the target one-dimensional array and the two-dimensional array, a new mode for obtaining the dimensional combinations is provided, and meanwhile the method and the device have the characteristics of simple codes, strong practicability and the like.
Based on the embodiment described in fig. 1, a more specific implementation scheme of the method for obtaining a combination of dimensions of the present application in an actual implementation process is provided below, and specifically, referring to fig. 2, an embodiment of the method for obtaining a combination of dimensions of the present application includes: step 201-step 206.
201. And acquiring a plurality of dimension types of the report selected by the user and the members corresponding to the dimension types.
The embodiment is used for analyzing basic reports (an asset balance table, a profit table and a cash flow table) of an enterprise by a user. When data of the three types of report contents are analyzed, comparison is often required from a time perspective, and for compilation of business reports, effective information obtained by analysis from a financial year perspective and a month perspective is more, so that the financial year and the month are taken as the other two dimensions, namely the dimensions required by a user to analyze comprise three dimensions of the type, the financial year and the month of the table. In the actual implementation process of the scheme, the requirements of the user are relatively fixed, so that the three dimensions can be provided for the user as basic choices, and only the user needs to provide members required to be combined under each dimension, namely, the dimension types are fixed, and the members selected by the user for each dimension type are obtained.
Here members under the report dimension include: an asset liability statement, a profit statement and a cash flow statement;
members under the financial year dimension include: 2018. 2019, 2020;
members in the month dimension include: month 1, month 2, month 3, month 4; for the sake of illustration, it is understood that in the actual implementation of the present solution. The selected members in each dimension can be adjusted according to actual requirements, and the number of the same dimensions can also be adjusted according to actual requirements, and the examples given here are only for describing the present solution and do not limit the actual implementation process.
When data is analyzed, data tables are often merged, and at this time, a user needs to obtain all dimension combinations to perform operations such as data tracing, multidimensional query analysis, and the like, and all dimension combinations under a selected dimension need to be obtained when corresponding operations are performed, which is described here by taking an example that the user has such a requirement.
202. And filling the members corresponding to the multiple dimension types into a two-dimensional array.
And filling the members corresponding to the multiple dimension types into a two-dimensional array. This step is similar to step 102 corresponding to the embodiment of fig. 1, and is not described herein again, and it should be noted that after the dimension type and the member are filled into the two-dimensional array, the elements and the sequence in the two-dimensional array will affect the subsequent dimension combination output process, so that the sequence of the corresponding elements can be adjusted before inputting the corresponding elements into the two-dimensional array, for example, it is ensured that the elements are arranged in sequence after inputting the two-dimensional array in 1 month, 2 months, 3 months, and 4 months, so that the obtained dimension combinations are arranged in the required sequence, and the user requirements are met.
203. And acquiring a target one-dimensional array with each element value being 0.
204. And gradually increasing the value of each element in the target one-dimensional array.
Acquiring a target one-dimensional array with each element value being 0, wherein the number of the elements of the target one-dimensional array is the same as the number of the dimension types, and subscripts of each element in the target one-dimensional array correspond to the first dimension of the two-dimensional array one to one; the maximum value of each element in the target one-dimensional array is smaller than the member number of the elements in the first dimension of the two-dimensional array corresponding to the elements, and the target one-dimensional array is an integer array. As for the case in this embodiment as described in step 201 above, the target one-dimensional array includes three elements, which correspond to three dimensions of the report, the year and the month, respectively, and the specific form is that a [2] ═ 0,0,0, when each element takes the maximum value, the form of the one-dimensional array is that a [2] ═ 2,3, when the value in the target one-dimensional array is increased, one may be successively added by using the last bit as the reference, when the last bit reaches the maximum value of the element, the value of the element returns to zero, the previous bit is advanced by 1, that is, by using the maximum value as the carry condition, one is successively added to obtain different one-dimensional arrays, thereby ensuring that no omission occurs.
205. And acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination.
When the step 204 is executed to obtain the target one-dimensional array successively, each time a target one-dimensional array with different element values is obtained, the corresponding member is obtained from the two-dimensional array according to the subscript and the element value of each element, so as to obtain the corresponding dimension combination.
206. And combining the dimension combinations to obtain a dimension combination report.
Specifically, for the present solution, the report obtained by combining the dimension combinations can refer to fig. 3, and fig. 3 is a report for displaying the dimension combinations obtained based on the dimension combination method provided in the present application. Each row comprises one member of three dimensions of report forms, property years and months, and a user can perform a specific data analysis process according to the obtained dimension combination. It can be understood that, in fig. 3, to facilitate the representation that the cells with the same members in the corresponding positions of the uplink and the downlink are merged, so as to simply show the obtained dimension combination, in the actual implementation process of the present solution, the user may also merge or not merge the same members according to the own requirements, and the specific details are not limited herein.
It can be understood that, in the obtaining process, in order to simplify the code, the iterator may be used to perform the above-mentioned processes of adding the target one-dimensional array and obtaining the corresponding dimension combination after each time of adding the target one-dimensional array, the iterator may perform the value taking in a next () manner, and each time one value is taken, one value is correspondingly removed from the corresponding target one-dimensional array, which is more convenient for executing the dimension combination obtaining method provided by the present solution.
It can be understood that when the iterator is adopted to execute the above process, each element of the dimension combination is determined by the target one-dimensional array, and meanwhile, the value of the target one-dimensional array is gradually increased from small to large in the acquisition process of the dimension combination, so that whether the dimension combination is repeatedly supervised or not is ensured, namely, one dimension combination can be correspondingly output every time one dimension combination is acquired in the execution process, and the dimension combination is not reserved after being output, so that the pressure on the memory is reduced, and the feasibility of the scheme is improved.
According to the technical scheme, the embodiment of the application has the following advantages: according to the scheme, the corresponding target one-dimensional array is processed from the condition that each element value is 0, the value of each element in the target one-dimensional array is gradually increased until the target one-dimensional array reaches the maximum value, all dimension combination conditions under the dimension selected by a user and the members are obtained, meanwhile, an iterator is used for executing the code, and the complexity of the code is reduced. The target one-dimensional array is gradually increased, the output dimension combination is determined according to the element value of the target one-dimensional array, and then the dimension combination can output one dimension combination every time one dimension combination is obtained, so that the caching pressure is reduced, and the feasibility of the scheme is improved.
Referring to fig. 4, an embodiment of a dimension combination acquiring apparatus of the present application includes:
a second aspect of the embodiments of the present application provides a dimension combination acquiring apparatus, including:
a member obtaining unit 401, configured to obtain multiple dimension types of a report selected by a user and members corresponding to the multiple dimension types;
a filling unit 402, configured to fill members corresponding to the multiple dimension types into a two-dimensional array, where the dimension types to which elements having the same first dimension belong in the two-dimensional array are the same;
a target one-dimensional array obtaining unit 403, configured to obtain a target one-dimensional array, where the number of elements in the target one-dimensional array is the same as the number of the dimension types, and subscripts of each element in the target one-dimensional array correspond to the first dimension of the two-dimensional array one to one; the maximum value of each element in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the element, and the target one-dimensional array is an integer array;
a dimension combination obtaining unit 404, configured to obtain corresponding members from the two-dimensional array based on the subscripts and the element values of each element of the target one-dimensional array, so as to obtain a dimension combination.
In this embodiment, the flow executed by each unit in the dimension combination device is similar to the method flow described in the embodiment corresponding to fig. 1, and is not described herein again.
Based on the above-described dimension combination acquisition device, optionally,
the dimension combination obtaining unit 404 is specifically configured to obtain a target one-dimensional array with each element value being 0;
gradually increasing the value of each element in the target one-dimensional array, and executing each time a target one-dimensional array with different element values is obtained: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value.
Based on the above-described dimension combination acquisition device, optionally,
and successively increasing the value of each element in the target one-dimensional array, and executing each time a target one-dimensional array with different element values is obtained: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value, wherein the step is executed by an iterator.
Fig. 5 is a schematic structural diagram of a dimension combination acquiring apparatus according to an embodiment of the present disclosure, where the server 500 may include one or more Central Processing Units (CPUs) 501 and a memory 505, and the memory 505 stores one or more applications or data therein.
In this embodiment, the specific functional module division in the central processing unit 501 of the dimension combination acquiring device may be similar to the functional module division manner of each unit described in the foregoing fig. 4, and details are not repeated here.
Memory 505 may be volatile storage or persistent storage, among others. The program stored in memory 505 may include one or more modules, each of which may include a sequence of instructions operating on a server. Still further, the central processor 501 may be arranged to communicate with the memory 505 to execute a series of instruction operations in the memory 505 on the server 500.
The server 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input-output interfaces 504, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The central processing unit 501 may perform the operations performed by the dimension combination obtaining method in the embodiment shown in fig. 1, and details are not described here.
An embodiment of the present application further provides a computer storage medium, which is used to store computer software instructions for the above-mentioned application, and includes a program for executing the program designed for the dimension combination obtaining method.
The dimension combination obtaining method may be the dimension combination obtaining method described in the foregoing fig. 1.
An embodiment of the present application further provides a computer program product, where the computer program product includes computer software instructions, and the computer software instructions may be loaded by a processor to implement the flow of the dimension combination obtaining method in any one of fig. 1 and fig. 2.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. A dimension combination obtaining method is characterized by comprising the following steps:
acquiring a plurality of dimension types of a report selected by a user and members corresponding to the dimension types;
filling members corresponding to the multiple dimension types into a two-dimensional array, wherein the dimension types of elements with the same first dimension in the two-dimensional array are the same;
acquiring a target one-dimensional array, wherein the number of elements of the target one-dimensional array is the same as the number of the dimension types, subscripts of all elements in the target one-dimensional array correspond to the first dimension of the two-dimensional array one by one, the maximum value of all elements in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the elements, and the target one-dimensional array is an integer array;
and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination.
2. The dimension combination acquisition method according to claim 1, wherein the acquisition of a target one-dimensional array;
acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination, wherein the dimension combination comprises:
acquiring a target one-dimensional array with each element value being 0;
gradually increasing the value of each element in the target one-dimensional array;
and each time a target one-dimensional array with different element values is obtained, executing the following steps: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value.
3. The dimension combination obtaining method according to claim 2, wherein the values of the elements in the target one-dimensional array are successively increased, and each time a target one-dimensional array with a different element value is obtained, the following steps are performed: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value, wherein the step is executed by an iterator.
4. The dimension combination acquisition method according to claim 1,
the dimension types are fixed;
the method comprises the steps of obtaining a plurality of dimension types of a report selected by a user and members corresponding to the dimension types;
the method comprises the following steps: and acquiring the members of the report selected by the user for each dimension type.
5. The dimension combination obtaining method according to any one of claims 1 to 4, characterized in that the method further comprises:
and combining the dimension combinations to obtain a dimension combination report.
6. A dimension combination acquisition apparatus, characterized by comprising:
the system comprises a member acquisition unit, a report generation unit and a report generation unit, wherein the member acquisition unit is used for acquiring a plurality of dimension types of a report selected by a user and members corresponding to the dimension types;
the filling unit is used for filling the members corresponding to the plurality of dimension types into a two-dimensional array, and the dimension types of the elements with the same first dimension in the two-dimensional array are the same;
the target one-dimensional array obtaining unit is used for obtaining a target one-dimensional array, the number of elements of the target one-dimensional array is the same as the number of the dimension types, and subscripts of all elements in the target one-dimensional array correspond to the first dimensions of the two-dimensional array one by one; the maximum value of each element in the target one-dimensional array is smaller than the number of elements in the first dimension of the two-dimensional array corresponding to the element, and the target one-dimensional array is an integer array;
and the dimension combination obtaining unit is used for obtaining corresponding members from the two-dimensional array based on the subscript and the element value of each element of the target one-dimensional array to obtain the dimension combination.
7. The dimension combination acquisition apparatus according to claim 6,
the dimension combination obtaining unit is specifically configured to obtain a target one-dimensional array with each element value being 0;
gradually increasing the value of each element in the target one-dimensional array, and executing each time a target one-dimensional array with different element values is obtained: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value.
8. The dimension combination acquisition apparatus according to claim 7,
and successively increasing the value of each element in the target one-dimensional array, and executing each time a target one-dimensional array with different element values is obtained: and acquiring corresponding members from the two-dimensional array based on the subscripts and the element values of the elements of the target one-dimensional array to obtain a dimension combination until the elements in the target one-dimensional array reach the maximum value, wherein the step is executed by an iterator.
9. A dimension combination acquisition apparatus, characterized by comprising:
a central processing unit, a memory;
the memory is a transient memory or a persistent memory;
the central processor is configured to communicate with the memory, the operations of the instructions in the memory being executed on the dimension combination acquisition device to perform the method of any of claims 1-5.
10. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-5.
CN202011224198.3A 2020-11-05 2020-11-05 Dimension combination acquisition method and related equipment Active CN112307030B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011224198.3A CN112307030B (en) 2020-11-05 2020-11-05 Dimension combination acquisition method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011224198.3A CN112307030B (en) 2020-11-05 2020-11-05 Dimension combination acquisition method and related equipment

Publications (2)

Publication Number Publication Date
CN112307030A true CN112307030A (en) 2021-02-02
CN112307030B CN112307030B (en) 2023-12-26

Family

ID=74325125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011224198.3A Active CN112307030B (en) 2020-11-05 2020-11-05 Dimension combination acquisition method and related equipment

Country Status (1)

Country Link
CN (1) CN112307030B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1470900A (en) * 2002-07-24 2004-01-28 ���±�ӡˢ��е�ɷݹ�˾ Compact device for printing-plate imaging
CN105488231A (en) * 2016-01-22 2016-04-13 杭州电子科技大学 Self-adaption table dimension division based big data processing method
CN105843591A (en) * 2016-04-08 2016-08-10 龙芯中科技术有限公司 Method and device for generating data through multi-dimensional array sliding as well as processor
CN106709032A (en) * 2016-12-29 2017-05-24 深圳市华傲数据技术有限公司 Method and device for extracting structured information from spreadsheet document
CN111027294A (en) * 2019-12-12 2020-04-17 中国联合网络通信集团有限公司 Table summarizing method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1470900A (en) * 2002-07-24 2004-01-28 ���±�ӡˢ��е�ɷݹ�˾ Compact device for printing-plate imaging
CN105488231A (en) * 2016-01-22 2016-04-13 杭州电子科技大学 Self-adaption table dimension division based big data processing method
CN105843591A (en) * 2016-04-08 2016-08-10 龙芯中科技术有限公司 Method and device for generating data through multi-dimensional array sliding as well as processor
CN106709032A (en) * 2016-12-29 2017-05-24 深圳市华傲数据技术有限公司 Method and device for extracting structured information from spreadsheet document
CN111027294A (en) * 2019-12-12 2020-04-17 中国联合网络通信集团有限公司 Table summarizing method, device and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHRISTIAN RUSCH等: "Electric beam scanning in two dimensions with holographic phased array antenna", 《2013 INTERNATIONAL WORKSHOP ON ANTENNA TECHNOLOGY》, pages 1 - 2 *
沈逸飞 等: "浅析c语言、java、Python的数组合并方法", 《电脑知识与技术》, vol. 16, no. 3, pages 78 - 82 *

Also Published As

Publication number Publication date
CN112307030B (en) 2023-12-26

Similar Documents

Publication Publication Date Title
US10191968B2 (en) Automated data analysis
CN116109121B (en) User demand mining method and system based on big data analysis
CN114090838B (en) Method, system, electronic device and storage medium for visually displaying big data
Türkoglu et al. Edge-based wedge sampling to estimate triangle counts in very large graphs
CN111460011A (en) Page data display method and device, server and storage medium
Perron et al. On the usefulness or lack thereof of optimality criteria for structural change tests
Modarresi Unsupervised feature extraction using singular value decomposition
Xiao et al. Parameter identification for the discretely observed geometric fractional Brownian motion
Kontonasios et al. Maximum entropy modelling for assessing results on real-valued data
CN110807053A (en) Method for finding frequent item set based on improved Apriori algorithm
CN116701714A (en) Data storage method, device, equipment and medium based on multi-way tree
CN112307030A (en) Dimension combination obtaining method and related equipment
CN112035555A (en) Information display method, device and equipment
CN117813602A (en) Principal component analysis
Oliveira et al. Unsupervised dimensionality reduction for very large datasets: Are we going to the right direction?
CN109885710B (en) User image depicting method based on differential evolution algorithm and server
CN113327154A (en) E-commerce user message pushing method and system based on big data
Yang et al. Robust fitting of mixtures of factor analyzers using the trimmed likelihood estimator
Matuzas et al. On the efficiency of functional decomposition in fault tree analysis
WATSON et al. An exploratory statistical analysis of financial measures
CN116578583B (en) Abnormal statement identification method, device, equipment and storage medium
CN111126015B (en) Report form compiling method and equipment
Ma Exploratory dynamic capacity analysis of Defense Forces
CN118096381A (en) Asset allocation method, device, computer equipment and storage medium
CN115935933A (en) List analysis method and device, computer equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant