Multidimensional report generation method, device, equipment and storage medium
By receiving drag and drop requests in a preset browser and determining the association relationship from the dimension library, and generating and updating scripts to generate multi-dimensional reports, the problem of being unable to analyze the association relationship in the prior art is solved, and the accuracy and practicality of the report are improved.
Patent Information
- Application Number
- CN202110723299.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2041-06-29
AI Technical Summary
It is difficult to accurately generate multi-dimensional reports in the prior art because the correlation between multiple indicators cannot be analyzed, resulting in low practicality of the generated reports.
By receiving drag requests in the preset browser, obtaining drag indicators and target dimensions, determining the association relationship from the dimension library, generating initial scripts and updating them to target scripts, executing scripts to generate initial reports, and entering indicator data to generate target reports.
Improve the accuracy and practicality of multi-dimensional reports, avoid drag-and-drop metric error entry and unrelated dimension entry, and dynamically adjust the table header size to adapt to the indicator objects and dimensions.
Smart Images

Figure CN113282218B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a multidimensional report generation method, device, equipment and storage medium. Background Art
[0002] Reports can provide users with intuitive data views, so that users can better understand indicator data. In the current report generation solution, relevant data is directly obtained through the indicators entered by the user, and then reports are generated based on the entered indicators and related data. However, when multi-dimensional reports need to be generated, this method cannot analyze the correlation between multiple indicators, resulting in the inability to accurately generate corresponding multi-dimensional reports, resulting in low practicality of reports generated in this way. Therefore, how to accurately generate multi-dimensional reports to improve the practicality of reports has become an urgent problem to be solved. Summary of the invention
[0003] In view of the above, it is necessary to provide a multi-dimensional report generation method, device, equipment and storage medium, which can accurately generate multi-dimensional reports.
[0004] In one aspect, the present invention provides a multi-dimensional report generation method, the multi-dimensional report generation method comprising:
[0005] When a drag request from a preset browser is received, acquiring an indicator operation area represented by a drag indicator for dragging according to the drag request;
[0006] When an indicator request for creating a report is detected to be generated in the indicator operation area, a target dimension associated with the drag indicator is determined from a dimension library;
[0007] Generate an initial script according to the drag index and the target dimension, and update the initial script to obtain a target script;
[0008] Execute the target script based on the preset browser to obtain an initial report;
[0009] The index data is acquired by using the drag index, the drag dimension and the query time in the preset browser as a query statement, and the index data is entered into the initial report to obtain a target report.
[0010] According to a preferred embodiment of the present invention, the drag request carries an interface code indicating a generated interface, and obtaining an indicator operation area represented by a drag indicator for dragging according to the drag request includes:
[0011] Acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code;
[0012] Parsing the interface code to obtain multiple method bodies;
[0013] Extracting a method body including an indicator identification code from the plurality of method bodies as an indicator code of the drag indicator;
[0014] An attribute value corresponding to a preset tag is obtained from the indicator code as the indicator operation area.
[0015] According to a preferred embodiment of the present invention, generating an initial script according to the drag indicator and the target dimension includes:
[0016] extracting dimension codes from the plurality of method bodies according to the target dimension;
[0017] Acquire an attribute value corresponding to the preset tag from the dimension code as a dimension operation area;
[0018] Obtaining the operation dimension in the dimension operation area;
[0019] Determine a common dimension of the operation dimension and the target dimension as a drag dimension;
[0020] Calculating the indicator quantity of the drag indicator;
[0021] Processing a first configuration element in the template script according to the number of indicators, and processing a second configuration element in the template script according to the number of dimensions of the dragging dimension, to obtain a version script corresponding to the template script;
[0022] The drag indicator is entered into the first configuration element in the version script, and the drag dimension is entered into the second configuration element in the version script to obtain the initial script.
[0023] According to a preferred embodiment of the present invention, before determining the target dimension associated with the drag indicator from the dimension library, the method further includes:
[0024] Obtaining preset indicators and preset dimensions in the preset browser;
[0025] Determine the common value between each preset indicator and each preset dimension, and count the number of the common values to obtain the associated value between each preset indicator and each preset dimension;
[0026] Counting the number of all values in the preset browser to obtain a benchmark value;
[0027] Calculate the proportion of the associated value in the benchmark value to obtain the degree of association between each preset indicator and each preset dimension;
[0028] Determining the preset dimension whose correlation degree is greater than the preset correlation threshold as the correlation dimension of the preset indicator;
[0029] The association relationship between the preset indicator and the associated dimension is stored in the dimension library.
[0030] According to a preferred embodiment of the present invention, after determining the target dimension associated with the drag indicator from the dimension library, the method further includes:
[0031] Obtaining an interface dimension in the generated interface;
[0032] Determining the remaining interface dimensions in the interface dimensions except the target dimension as feature dimensions;
[0033] Turn off the dimension status of the feature dimension.
[0034] According to a preferred embodiment of the present invention, updating the initial script to obtain the target script includes:
[0035] Acquire an indicator script from the initial script according to the drag indicator, and acquire a dimension script from the initial script according to the drag dimension;
[0036] Determine the method body containing the length identifier in the indicator script as the indicator length setting script, and determine the method body containing the length identifier in the dimension script as the dimension length setting script;
[0037] generating a first field length according to a first number of characters of the drag indicator, and generating a second field length according to a second number of characters of the drag dimension;
[0038] The indicator length setting script is updated with the first field length, and the dimension length setting script is updated with the second field length to obtain the target script.
[0039] According to a preferred embodiment of the present invention, the obtaining of indicator data by using the drag indicator, the drag dimension and the query time in the preset browser as a query statement includes:
[0040] Obtain a query template, and enter the drag index, the drag dimension, and the query time into the query template to obtain a query statement;
[0041] Acquire the target relevance of the drag indicator from the dimension library, and acquire a target thread having a mapping relationship with the target relevance from a thread pool according to the target relevance;
[0042] The query statement is executed by using the target thread to obtain the indicator data.
[0043] On the other hand, the present invention further provides a multi-dimensional report generation device, the multi-dimensional report generation device comprising:
[0044] an acquisition unit, configured to acquire a drag indicator according to a drag request from a preset browser when receiving the drag request;
[0045] The acquisition unit is further configured to acquire an indicator operation area of the drag indicator based on the drag request;
[0046] a determining unit, configured to determine a target dimension associated with the drag indicator from a dimension library when an indicator request generated by the preset browser based on the indicator operation area is detected;
[0047] A generating unit, configured to generate an initial script according to the drag indicator and the target dimension;
[0048] An updating unit, configured to update the initial script according to the first field length of the drag indicator and the second field length of the drag dimension in the target dimension to obtain a target script;
[0049] An execution unit, configured to execute the target script based on the preset browser to obtain an initial report;
[0050] The input unit is used to obtain the indicator data according to the drag indicator, the drag dimension and the query time in the preset browser, and input the indicator data into the initial report to obtain the target report.
[0051] On the other hand, the present invention further provides an electronic device, comprising:
[0052] a memory storing computer readable instructions; and
[0053] The processor executes the computer-readable instructions stored in the memory to implement the multi-dimensional report generation method.
[0054] On the other hand, the present invention further proposes a computer-readable storage medium, in which computer-readable instructions are stored. The computer-readable instructions are executed by a processor in an electronic device to implement the multi-dimensional report generation method.
[0055] It can be seen from the above technical solutions that the present invention can avoid the drag indicator from being mistakenly entered into other positions by determining the indicator operation area, and can avoid entering unrelated dimensions into the same data table by determining the target dimension associated with the drag indicator, thereby improving the accuracy of multidimensional reports. The size of the table header in the target report can be dynamically adjusted through the first field length and the second field length, thereby improving the adaptability of the indicator object and the drag dimension in the target report. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1It is a flow chart of a preferred embodiment of the multi-dimensional report generation method of the present invention.
[0057] Figure 2 It is a functional module diagram of a preferred embodiment of the multi-dimensional report generating device of the present invention.
[0058] Figure 3 It is a structural schematic diagram of an electronic device of a preferred embodiment of the present invention for implementing a multi-dimensional report generation method. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] like Figure 1 FIG. 1 is a flowchart of a preferred embodiment of the multi-dimensional report generation method of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0061] The multidimensional report generation method is applied to one or more electronic devices, which are devices that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions, and whose hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0062] The electronic device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0063] The electronic device may include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network electronic device, an electronic device group consisting of multiple network electronic devices, or a cloud consisting of a large number of hosts or network electronic devices based on cloud computing.
[0064] The network where the electronic device is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0065] S10: When a drag request from a preset browser is received, an indication operation area indicated by a drag indicator for dragging is obtained according to the drag request.
[0066] In at least one embodiment of the present invention, the preset browser may be any system that communicates with the electronic device.
[0067] The drag request refers to a request generated when a user triggers any indicator in the preset browser.
[0068] The drag indicator refers to an indicator triggered by the user in the preset browser when generating the drag request.
[0069] In at least one embodiment of the present invention, the indicator operation area refers to the area where the indicators required for generating a data report are located in the generation interface.
[0070] In at least one embodiment of the present invention, the electronic device acquiring the drag indicator according to the drag request includes:
[0071] Parsing the message of the drag request to obtain the data information carried in the message;
[0072] Acquire information indicating an indicator from the data information as an indicator identification code;
[0073] Acquire information indicating an interface from the data information as an interface code, and determine an interface corresponding to the interface code as a generation interface of the drag request;
[0074] Obtaining display indicators on the generated interface;
[0075] A display indicator corresponding to the indicator identification code is determined from the display indicators as the drag indicator.
[0076] The data information includes, but is not limited to: the indicator identification code, the interface code, etc.
[0077] The display indicators refer to all indicators in the generation interface.
[0078] By parsing the message, the indicator identification code can be quickly acquired, and the drag indicator corresponding to the indicator identification code can be quickly determined through the display indicator on the generation interface, thereby improving the acquisition efficiency of the drag indicator.
[0079] In at least one embodiment of the present invention, the drag request carries an interface code indicating a generated interface, and the electronic device obtains an indicator operation area represented by a drag indicator for dragging according to the drag request, including:
[0080] Acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code;
[0081] Parsing the interface code to obtain multiple method bodies;
[0082] Extracting a method body including an indicator identification code from the plurality of method bodies as an indicator code of the drag indicator;
[0083] An attribute value corresponding to a preset tag is obtained from the indicator code as the indicator operation area.
[0084] The interface code refers to the script information corresponding to the generated interface.
[0085] The preset tag is used to indicate the operation area, for example, the preset tag may be div.
[0086] The interface code can be accurately obtained from the preset browser through the interface coding, so that the indicator code can be accurately extracted from the interface code according to the indicator identification code, thereby improving the accuracy of the indicator operation area.
[0087] S11, when it is monitored that an indicator request for creating a report is generated in the indicator operation area, a target dimension associated with the drag indicator is determined from a dimension library.
[0088] In at least one embodiment of the present invention, the indicator request refers to a request generated when the indicator operation area is triggered.
[0089] The dimension library stores the association relationship between indicators and dimensions, as well as the association degree between indicators and dimensions.
[0090] The target dimension refers to a dimension whose correlation with the drag indicator is greater than a preset correlation threshold.
[0091] In at least one embodiment of the present invention, before determining the target dimension associated with the drag indicator from the dimension library, the method further includes:
[0092] Obtaining preset indicators and preset dimensions in the preset browser;
[0093] Determine the common value between each preset indicator and each preset dimension, and count the number of the common values to obtain the associated value between each preset indicator and each preset dimension;
[0094] Counting the number of all values in the preset browser to obtain a benchmark value;
[0095] Calculate the proportion of the associated value in the benchmark value to obtain the degree of association between each preset indicator and each preset dimension;
[0096] Determining the preset dimension whose correlation degree is greater than the preset correlation threshold as the correlation dimension of the preset indicator;
[0097] The association relationship between the preset indicator and the associated dimension is stored in the dimension library.
[0098] The preset index and the preset dimension refer to the initialized index and dimension in the preset browser.
[0099] The common value refers to the same value in the preset indicator and the preset dimension.
[0100] The preset correlation threshold is a value preset according to requirements.
[0101] The common value and the reference value can be used to accurately determine the correlation between each preset indicator and each preset dimension, and thus the dimension library can be accurately determined, which is beneficial for subsequently accurately determining the target dimension from the dimension library.
[0102] In at least one embodiment of the present invention, the electronic device determines the target dimension associated with the drag indicator from the dimension library, including:
[0103] Determining a target association relationship corresponding to the drag indicator from the dimension library;
[0104] All dimensions are obtained from the target association relationship as the target dimensions.
[0105] The target dimension of the drag indicator can be quickly acquired through the target association relationship.
[0106] In at least one embodiment of the present invention, after determining the target dimension associated with the drag indicator from the dimension library, the method further includes:
[0107] Obtaining an interface dimension in the generated interface;
[0108] Determining the remaining interface dimensions in the interface dimensions except the target dimension as feature dimensions;
[0109] Turn off the dimension status of the feature dimension.
[0110] The dimension state refers to the association state between the drag indicator and the characteristic dimension.
[0111] By setting the dimension status, it is possible to avoid the user's erroneous operation on the feature dimension, which would result in data analysis of the drag indicator and feature dimensions that have no correlation, thereby improving the accuracy of data analysis and thus improving the accuracy of multidimensional report generation.
[0112] S12, generating an initial script according to the drag indicator and the target dimension, and updating the initial script to obtain a target script.
[0113] In at least one embodiment of the present invention, the initial script refers to script information required to generate a data report.
[0114] The target script refers to the script file required to generate a data report.
[0115] In at least one embodiment of the present invention, the electronic device generating an initial script according to the drag indicator and the target dimension includes:
[0116] extracting dimension codes from the plurality of method bodies according to the target dimension;
[0117] Acquire an attribute value corresponding to the preset tag from the dimension code as a dimension operation area;
[0118] Obtaining the operation dimension in the dimension operation area;
[0119] Determine a common dimension of the operation dimension and the target dimension as a drag dimension;
[0120] Calculating the indicator quantity of the drag indicator;
[0121] Processing a first configuration element in the template script according to the number of indicators, and processing a second configuration element in the template script according to the number of dimensions of the dragging dimension, to obtain a version script corresponding to the template script;
[0122] The drag indicator is entered into the first configuration element in the version script, and the drag dimension is entered into the second configuration element in the version script to obtain the initial script.
[0123] The dimension operation area refers to the area in the generation interface where the dimensions required for generating a data report are located.
[0124] The operation dimension refers to the dimension required for generating a data report selected according to user needs.
[0125] The template script refers to a preset script file corresponding to the generated data report. The number of elements of the first configuration element and the number of elements of the second configuration element in the template script are unique. The first configuration element is used to write indicators, and the second configuration element is used to write dimensions.
[0126] The version script refers to a script when the number of elements of the first configuration element and the second configuration element meets the report generation requirement.
[0127] By determining the dimension operation area, the drag dimension can be accurately determined according to the operation dimension in the dimension operation area and the target dimension, avoiding the generation of the same data report according to the dimension unrelated to the drag indicator and the drag indicator, thereby improving the accuracy of data report generation. In addition, by generating the initial script through the template script, since there is no need to reconstruct the template script, the generation efficiency of the initial script is improved. At the same time, by dynamically adjusting the template script, the practicality of the template script can be improved.
[0128] In at least one embodiment of the present invention, the electronic device updates the initial script to obtain the target script, including:
[0129] Acquire an indicator script from the initial script according to the drag indicator, and acquire a dimension script from the initial script according to the drag dimension;
[0130] Determine the method body containing the length identifier in the indicator script as the indicator length setting script, and determine the method body containing the length identifier in the dimension script as the dimension length setting script;
[0131] generating a first field length according to a first number of characters of the drag indicator, and generating a second field length according to a second number of characters of the drag dimension;
[0132] The indicator length setting script is updated with the first field length, and the dimension length setting script is updated with the second field length to obtain the target script.
[0133] The first field length refers to the length occupied by the drag indicator in the generated interface. For example, if the initial length of each character is 0.5 cm, the first field length of the indicator "interval net investment income" is 3.5.
[0134] The first number of characters refers to the number of characters in the drag indicator. For example, if the indicator is: interval net investment return, the first number of characters of the indicator is: 7.
[0135] The second field length refers to the length occupied by the drag dimension in the generated interface.
[0136] The second number of characters refers to the number of characters in the dimension index.
[0137] The size of the header in the report is dynamically adjusted by the first field length and the second field length to achieve personalized generation of data reports.
[0138] S13, executing the target script based on the preset browser to obtain an initial report.
[0139] In at least one embodiment of the present invention, the initial report refers to a table that does not contain data information, and the initial report only contains basic information in the table header.
[0140] S14, obtaining indicator data by using the drag indicator, the drag dimension and the query time in the preset browser as a query statement, and entering the indicator data into the initial report to obtain a target report.
[0141] In at least one embodiment of the present invention, the indicator data refers to data corresponding to the drag indicator, the drag dimension and the query time.
[0142] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target report, the above-mentioned target report can also be stored in a node of a blockchain.
[0143] In at least one embodiment of the present invention, the electronic device uses the drag indicator, the drag dimension, and the query time in the preset browser as a query statement to obtain the indicator data, including:
[0144] Obtain a query template, and enter the drag index, the drag dimension, and the query time into the query template to obtain a query statement;
[0145] Acquire the target relevance of the drag indicator from the dimension library, and acquire a target thread having a mapping relationship with the target relevance from a thread pool according to the target relevance;
[0146] The query statement is executed by using the target thread to obtain the indicator data.
[0147] The target thread refers to a thread in the thread pool that is in an idle state.
[0148] It should be noted that the greater the target correlation is, the more indicator data needs to be obtained, and therefore, the greater the number of target threads required is.
[0149] The target relevance can be used to obtain a suitable number of the target thread pools from the thread pool, thereby ensuring the efficiency of obtaining the indicator data.
[0150] It can be seen from the above technical solutions that the present invention can avoid the drag indicator from being mistakenly entered into other positions by determining the indicator operation area, and can avoid entering unrelated dimensions into the same data table by determining the target dimension associated with the drag indicator, thereby improving the accuracy of multidimensional reports. The size of the table header in the target report can be dynamically adjusted through the first field length and the second field length, thereby improving the adaptability of the indicator object and the drag dimension in the target report.
[0151] like Figure 2 , which is a functional module diagram of a preferred embodiment of the multi-dimensional report generation device of the present invention. The multi-dimensional report generation device 11 includes an acquisition unit 110, a determination unit 111, a generation unit 112, an update unit 113, an execution unit 114, an entry unit 115, a calculation unit 116, and a storage unit 117. The module / unit referred to in the present invention refers to a series of computer-readable instruction segments that can be acquired by the processor 13 and can complete fixed functions, which are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0152] When a drag request of a preset browser is received, the acquisition unit 110 acquires the indication operation area indicated by the drag indicator for dragging according to the drag request.
[0153] In at least one embodiment of the present invention, the preset browser may be any system that communicates with the electronic device.
[0154] The drag request refers to a request generated when a user triggers any indicator in the preset browser.
[0155] The drag indicator refers to an indicator triggered by the user in the preset browser when generating the drag request.
[0156] In at least one embodiment of the present invention, the indicator operation area refers to the area where the indicators required for generating a data report are located in the generation interface.
[0157] In at least one embodiment of the present invention, the acquiring unit 110 acquires the drag indicator according to the drag request, including:
[0158] Parsing the message of the drag request to obtain the data information carried in the message;
[0159] Acquire information indicating an indicator from the data information as an indicator identification code;
[0160] Acquire information indicating an interface from the data information as an interface code, and determine an interface corresponding to the interface code as a generation interface of the drag request;
[0161] Obtaining display indicators on the generated interface;
[0162] A display indicator corresponding to the indicator identification code is determined from the display indicators as the drag indicator.
[0163] The data information includes, but is not limited to: the indicator identification code, the interface code, etc.
[0164] The display indicators refer to all indicators in the generation interface.
[0165] By parsing the message, the indicator identification code can be quickly acquired, and the drag indicator corresponding to the indicator identification code can be quickly determined through the display indicator on the generation interface, thereby improving the acquisition efficiency of the drag indicator.
[0166] In at least one embodiment of the present invention, the drag request carries an interface code indicating a generated interface, and the acquisition unit 110 acquires the indicator operation area represented by the drag indicator for dragging according to the drag request, including:
[0167] Acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code;
[0168] Parsing the interface code to obtain multiple method bodies;
[0169] Extracting a method body including an indicator identification code from the plurality of method bodies as an indicator code of the drag indicator;
[0170] An attribute value corresponding to a preset tag is obtained from the indicator code as the indicator operation area.
[0171] The interface code refers to the script information corresponding to the generated interface.
[0172] The preset tag is used to indicate the operation area, for example, the preset tag may be div.
[0173] The interface code can be accurately obtained from the preset browser through the interface coding, so that the indicator code can be accurately extracted from the interface code according to the indicator identification code, thereby improving the accuracy of the indicator operation area.
[0174] When monitoring that an indicator request for creating a report is generated in the indicator operation area, the determining unit 111 determines a target dimension associated with the drag indicator from a dimension library.
[0175] In at least one embodiment of the present invention, the indicator request refers to a request generated when the indicator operation area is triggered.
[0176] The dimension library stores the association relationship between indicators and dimensions, as well as the association degree between indicators and dimensions.
[0177] The target dimension refers to a dimension whose correlation with the drag indicator is greater than a preset correlation threshold.
[0178] In at least one embodiment of the present invention, before determining the target dimension associated with the drag indicator from the dimension library, the acquisition unit 110 acquires the preset indicator and the preset dimension in the preset browser;
[0179] The determining unit 111 determines the common value between each preset indicator and each preset dimension, and counts the number of the common values to obtain the associated value between each preset indicator and each preset dimension;
[0180] The calculation unit 116 counts the number of all values in the preset browser to obtain a reference value;
[0181] The calculation unit 116 calculates the proportion of the associated value in the reference value to obtain the degree of association between each preset indicator and each preset dimension;
[0182] The determining unit 111 determines the preset dimension whose correlation degree is greater than the preset correlation threshold as the correlation dimension of the preset indicator;
[0183] The storage unit 117 stores the association relationship between the preset indicator and the associated dimension in the dimension library.
[0184] The preset index and the preset dimension refer to the initialized index and dimension in the preset browser.
[0185] The common value refers to the same value in the preset indicator and the preset dimension.
[0186] The preset correlation threshold is a value preset according to requirements.
[0187] The common value and the reference value can be used to accurately determine the correlation between each preset indicator and each preset dimension, and thus the dimension library can be accurately determined, which is beneficial for subsequently accurately determining the target dimension from the dimension library.
[0188] In at least one embodiment of the present invention, the determining unit 111 determines the target dimension associated with the drag indicator from the dimension library, including:
[0189] Determining a target association relationship corresponding to the drag indicator from the dimension library;
[0190] All dimensions are obtained from the target association relationship as the target dimensions.
[0191] The target dimension of the drag indicator can be quickly acquired through the target association relationship.
[0192] In at least one embodiment of the present invention, after determining the target dimension associated with the drag indicator from the dimension library, the acquisition unit 110 acquires the interface dimension in the generated interface;
[0193] The determining unit 111 determines the remaining interface dimensions except the target dimension in the interface dimensions as feature dimensions;
[0194] The execution unit 114 turns off the dimension state of the feature dimension.
[0195] The dimension state refers to the association state between the drag indicator and the characteristic dimension.
[0196] By setting the dimension status, it is possible to avoid the user's erroneous operation on the feature dimension, which would result in data analysis of the drag indicator and feature dimensions that have no correlation, thereby improving the accuracy of data analysis and thus improving the accuracy of multidimensional report generation.
[0197] The generating unit 112 generates an initial script according to the drag index and the target dimension, and updates the initial script to obtain a target script.
[0198] In at least one embodiment of the present invention, the initial script refers to script information required to generate a data report.
[0199] The target script refers to the script file required to generate a data report.
[0200] In at least one embodiment of the present invention, the generating unit 112 generates the initial script according to the drag indicator and the target dimension, including:
[0201] extracting dimension codes from the plurality of method bodies according to the target dimension;
[0202] Acquire an attribute value corresponding to the preset tag from the dimension code as a dimension operation area;
[0203] Obtaining the operation dimension in the dimension operation area;
[0204] Determine a common dimension of the operation dimension and the target dimension as a drag dimension;
[0205] Calculating the indicator quantity of the drag indicator;
[0206] Processing a first configuration element in the template script according to the number of indicators, and processing a second configuration element in the template script according to the number of dimensions of the dragging dimension, to obtain a version script corresponding to the template script;
[0207] The drag indicator is entered into the first configuration element in the version script, and the drag dimension is entered into the second configuration element in the version script to obtain the initial script.
[0208] The dimension operation area refers to the area in the generation interface where the dimensions required for generating a data report are located.
[0209] The operation dimension refers to the dimension required for generating a data report selected according to user needs.
[0210] The template script refers to a preset script file corresponding to the generated data report. The number of elements of the first configuration element and the number of elements of the second configuration element in the template script are unique. The first configuration element is used to write indicators, and the second configuration element is used to write dimensions.
[0211] The version script refers to a script when the number of elements of the first configuration element and the second configuration element meets the report generation requirement.
[0212] By determining the dimension operation area, the drag dimension can be accurately determined according to the operation dimension in the dimension operation area and the target dimension, avoiding the generation of the same data report according to the dimension unrelated to the drag indicator and the drag indicator, thereby improving the accuracy of data report generation. In addition, by generating the initial script through the template script, since there is no need to reconstruct the template script, the generation efficiency of the initial script is improved. At the same time, by dynamically adjusting the template script, the practicality of the template script can be improved.
[0213] In at least one embodiment of the present invention, the updating unit 113 updates the initial script to obtain a target script including:
[0214] Acquire an indicator script from the initial script according to the drag indicator, and acquire a dimension script from the initial script according to the drag dimension;
[0215] Determine the method body containing the length identifier in the indicator script as the indicator length setting script, and determine the method body containing the length identifier in the dimension script as the dimension length setting script;
[0216] generating a first field length according to a first number of characters of the drag indicator, and generating a second field length according to a second number of characters of the drag dimension;
[0217] The indicator length setting script is updated with the first field length, and the dimension length setting script is updated with the second field length to obtain the target script.
[0218] The first field length refers to the length occupied by the drag indicator in the generated interface. For example, if the initial length of each character is 0.5 cm, the first field length of the indicator "interval net investment income" is 3.5.
[0219] The first number of characters refers to the number of characters in the drag indicator. For example, if the indicator is: interval net investment return, the first number of characters of the indicator is: 7.
[0220] The second field length refers to the length occupied by the drag dimension in the generated interface.
[0221] The second number of characters refers to the number of characters in the dimension index.
[0222] The size of the header in the report is dynamically adjusted by the first field length and the second field length to achieve personalized generation of data reports.
[0223] The execution unit 114 executes the target script based on the preset browser to obtain an initial report.
[0224] In at least one embodiment of the present invention, the initial report refers to a table that does not contain data information, and the initial report only contains basic information in the table header.
[0225] The input unit 115 uses the drag index, the drag dimension and the query time in the preset browser as a query statement to obtain the index data, and inputs the index data into the initial report to obtain the target report.
[0226] In at least one embodiment of the present invention, the indicator data refers to data corresponding to the drag indicator, the drag dimension and the query time.
[0227] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target report, the above-mentioned target report can also be stored in a node of a blockchain.
[0228] In at least one embodiment of the present invention, the input unit 115 uses the drag index, the drag dimension and the query time in the preset browser as a query statement to obtain the index data, including:
[0229] Obtaining a query template, and entering the drag index, the drag dimension, and the query time into the query template to obtain a query statement;
[0230] Acquire the target relevance of the drag indicator from the dimension library, and acquire a target thread having a mapping relationship with the target relevance from a thread pool according to the target relevance;
[0231] The query statement is executed by using the target thread to obtain the indicator data.
[0232] The target thread refers to a thread in the thread pool that is in an idle state.
[0233] It should be noted that the greater the target correlation is, the more indicator data needs to be obtained, and therefore, the greater the number of target threads required is.
[0234] The target relevance can be used to obtain a suitable number of the target thread pools from the thread pool, thereby ensuring the efficiency of obtaining the indicator data.
[0235] It can be seen from the above technical solutions that the present invention can avoid the drag indicator from being mistakenly entered into other positions by determining the indicator operation area, and can avoid entering unrelated dimensions into the same data table by determining the target dimension associated with the drag indicator, thereby improving the accuracy of multidimensional reports. The size of the table header in the target report can be dynamically adjusted through the first field length and the second field length, thereby improving the adaptability of the indicator object and the drag dimension in the target report.
[0236] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device of a preferred embodiment of the method for generating a multi-dimensional report in the present invention.
[0237] In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer-readable instructions stored in the memory 12 and executable on the processor 13, such as a multi-dimensional report generation program.
[0238] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the electronic device 1 may also include input and output devices, network access devices, buses, etc.
[0239] The processor 13 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 13 is the computing core and control center of the electronic device 1, and uses various interfaces and lines to connect various parts of the entire electronic device 1, and executes the operating system of the electronic device 1 and various installed applications, program codes, etc.
[0240] Exemplarily, the computer-readable instructions may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer-readable instructions in the electronic device 1. For example, the computer-readable instructions may be divided into an acquisition unit 110, a determination unit 111, a generation unit 112, an update unit 113, an execution unit 114, an entry unit 115, a calculation unit 116, and a storage unit 117.
[0241] The memory 12 can be used to store the computer-readable instructions and / or modules, and the processor 13 implements various functions of the electronic device 1 by running or executing the computer-readable instructions and / or modules stored in the memory 12, and calling the data stored in the memory 12. The memory 12 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device, etc. The memory 12 can include non-volatile and volatile memories, such as: a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other storage devices.
[0242] The memory 12 may be an external memory and / or an internal memory of the electronic device 1. Furthermore, the memory 12 may be a memory in a physical form, such as a memory stick, a TF card (Trans-flash Card), and the like.
[0243] If the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete it through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned various method embodiments can be implemented.
[0244] The computer-readable instructions include computer-readable instruction codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction codes, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM).
[0245] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0246] Combination Figure 1 The memory 12 in the electronic device 1 stores computer-readable instructions to implement a multi-dimensional report generation method, and the processor 13 can execute the computer-readable instructions to implement:
[0247] When a drag request from a preset browser is received, acquiring an indicator operation area represented by a drag indicator for dragging according to the drag request;
[0248] When an indicator request for creating a report is detected to be generated in the indicator operation area, a target dimension associated with the drag indicator is determined from a dimension library;
[0249] Generate an initial script according to the drag index and the target dimension, and update the initial script to obtain a target script;
[0250] Execute the target script based on the preset browser to obtain an initial report;
[0251] The index data is acquired by using the drag index, the drag dimension and the query time in the preset browser as a query statement, and the index data is entered into the initial report to obtain a target report.
[0252] Specifically, the specific implementation method of the processor 13 for the above-mentioned computer readable instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0253] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0254] The computer-readable storage medium stores computer-readable instructions, wherein the computer-readable instructions are used to implement the following steps when executed by the processor 13:
[0255] When a drag request from a preset browser is received, acquiring an indicator operation area represented by a drag indicator for dragging according to the drag request;
[0256] When an indicator request for creating a report is detected to be generated in the indicator operation area, a target dimension associated with the drag indicator is determined from a dimension library;
[0257] Generate an initial script according to the drag index and the target dimension, and update the initial script to obtain a target script;
[0258] Execute the target script based on the preset browser to obtain an initial report;
[0259] The index data is acquired by using the drag index, the drag dimension and the query time in the preset browser as a query statement, and the index data is entered into the initial report to obtain a target report.
[0260] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0261] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0262] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0263] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices mentioned can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0264] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A multidimensional report generation method, characterized in that: The multidimensional report generation method comprises: When a drag request of a preset browser is received, an indicator operation area represented by a drag indicator for dragging is obtained according to the drag request, wherein the drag request carries an interface code indicating a generated interface, and the obtaining of the indicator operation area represented by the drag indicator for dragging according to the drag request comprises: obtaining an interface code corresponding to the generated interface from the preset browser based on the interface code; parsing the interface code to obtain a plurality of method bodies; extracting a method body including an indicator identification code from the plurality of method bodies as the indicator code of the drag indicator; and obtaining an attribute value corresponding to a preset tag from the indicator code as the indicator operation area; When an indicator request for creating a report is detected to be generated in the indicator operation area, a target dimension associated with the drag indicator is determined from a dimension library; An initial script is generated according to the drag indicator and the target dimension, and the initial script is updated to obtain a target script, wherein the generation of the initial script according to the drag indicator and the target dimension includes: extracting dimension codes from the multiple method bodies according to the target dimension; obtaining the attribute value corresponding to the preset label from the dimension code as the dimension operation area; obtaining the operation dimension in the dimension operation area; determining the common dimension of the operation dimension and the target dimension as the drag dimension; calculating the number of indicators of the drag indicator; processing the first configuration element in the template script according to the number of indicators, and processing the second configuration element in the template script according to the number of dimensions of the drag dimension to obtain a version script corresponding to the template script; entering the drag indicator into the first configuration element in the version script Setting element, and entering the drag dimension into the second configuration element in the version script to obtain the initial script; wherein, updating the initial script to obtain the target script includes: obtaining the indicator script from the initial script according to the drag indicator, and obtaining the dimension script from the initial script according to the drag dimension; determining the method body containing the length identifier in the indicator script as the indicator length setting script, and determining the method body containing the length identifier in the dimension script as the dimension length setting script; generating a first field length according to the first number of characters of the drag indicator, and generating a second field length according to the second number of characters of the drag dimension; updating the indicator length setting script with the first field length, and updating the dimension length setting script with the second field length to obtain the target script; Execute the target script based on the preset browser to obtain an initial report; The index data is acquired by using the drag index, the drag dimension and the query time in the preset browser as a query statement, and the index data is entered into the initial report to obtain a target report.
2. The multidimensional report generation method according to claim 1, characterized in that: Before determining the target dimension associated with the drag indicator from the dimension library, the method further includes: Obtaining preset indicators and preset dimensions in the preset browser; Determine the common value between each preset indicator and each preset dimension, and count the number of the common values to obtain the associated value between each preset indicator and each preset dimension; Counting the number of all values in the preset browser to obtain a benchmark value; Calculate the proportion of the associated value in the benchmark value to obtain the degree of association between each preset indicator and each preset dimension; Determining the preset dimension whose correlation degree is greater than the preset correlation threshold as the correlation dimension of the preset indicator; The association relationship between the preset indicator and the associated dimension is stored in the dimension library.
3. The multidimensional report generation method according to claim 1, characterized in that: After determining the target dimension associated with the drag indicator from the dimension library, the method further includes: Obtaining an interface dimension in the generated interface; Determining the remaining interface dimensions except the target dimension in the interface dimensions as feature dimensions; Turn off the dimension status of the feature dimension.
4. The multidimensional report generation method according to claim 1, characterized in that: The obtaining of index data by using the drag index, the drag dimension and the query time in the preset browser as a query statement includes: Obtaining a query template, and entering the drag index, the drag dimension, and the query time into the query template to obtain a query statement; Acquire the target relevance of the drag indicator from the dimension library, and acquire a target thread having a mapping relationship with the target relevance from a thread pool according to the target relevance; The query statement is executed by using the target thread to obtain the indicator data.
5. A multi-dimensional report generation device, characterized in that: The multidimensional report generation device comprises: an acquisition unit, configured to acquire, when receiving a drag request from a preset browser, an indicator operation area represented by a drag indicator for dragging according to the drag request, wherein the drag request carries an interface code indicating a generated interface, and acquiring, according to the drag request, an indicator operation area represented by a drag indicator for dragging comprises: acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code; parsing the interface code to obtain a plurality of method bodies; extracting a method body including an indicator identification code from the plurality of method bodies as the indicator code of the drag indicator; and acquiring an attribute value corresponding to a preset tag from the indicator code as the indicator operation area; a determining unit, configured to determine a target dimension associated with the drag indicator from a dimension library when an indicator request for creating a report is detected in the indicator operation area; A generation unit is used to generate an initial script according to the drag indicator and the target dimension, and update the initial script to obtain a target script, wherein the generation of the initial script according to the drag indicator and the target dimension includes: extracting dimension codes from the multiple method bodies according to the target dimension; obtaining the attribute value corresponding to the preset label from the dimension code as the dimension operation area; obtaining the operation dimension in the dimension operation area; determining the common dimension of the operation dimension and the target dimension as the drag dimension; calculating the indicator number of the drag indicator; processing the first configuration element in the template script according to the indicator number, and processing the second configuration element in the template script according to the dimension number of the drag dimension to obtain a version script corresponding to the template script; entering the drag indicator into the A first configuration element, and entering the drag dimension into the second configuration element in the version script to obtain the initial script; wherein, updating the initial script to obtain the target script includes: obtaining an indicator script from the initial script according to the drag indicator, and obtaining a dimension script from the initial script according to the drag dimension; determining the method body containing the length identifier in the indicator script as an indicator length setting script, and determining the method body containing the length identifier in the dimension script as a dimension length setting script; generating a first field length according to the first number of characters of the drag indicator, and generating a second field length according to the second number of characters of the drag dimension; updating the indicator length setting script with the first field length, and updating the dimension length setting script with the second field length to obtain the target script; An execution unit, configured to execute the target script based on the preset browser to obtain an initial report; The input unit is used to obtain indicator data by using the drag indicator, the drag dimension and the query time in the preset browser as a query statement, and input the indicator data into the initial report to obtain a target report.
6. An electronic device, characterized in that: The electronic device comprises: a memory storing computer-readable instructions; and A processor executes the computer-readable instructions stored in the memory to implement the multi-dimensional report generation method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement the multi-dimensional report generation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method generating multi-dimension report form
CN105095249A
Method and device for generating multi-dimensional reports
CN107632971A