CN113282218A - Multi-dimensional report generation method, device, equipment and storage medium - Google Patents

Multi-dimensional report generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113282218A
CN113282218A CN202110723299.3A CN202110723299A CN113282218A CN 113282218 A CN113282218 A CN 113282218A CN 202110723299 A CN202110723299 A CN 202110723299A CN 113282218 A CN113282218 A CN 113282218A
Authority
CN
China
Prior art keywords
index
dimension
dragging
script
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110723299.3A
Other languages
Chinese (zh)
Inventor
贺少锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202110723299.3A priority Critical patent/CN113282218A/en
Publication of CN113282218A publication Critical patent/CN113282218A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • 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/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to data processing and provides a method, a device, equipment and a storage medium for generating a multi-dimensional report. The method can acquire an index operation area represented by a dragging index for dragging according to a dragging request; when it is monitored that an index request for creating a report is generated in the index operation area, determining a target dimension associated with the dragging index from a dimension library; generating an initial script according to the dragging index and the target dimension, and updating the initial script to obtain a target script; executing the target script based on the preset browser to obtain an initial report; and acquiring index data by taking the dragging index, the dragging dimension and the query time in the preset browser as query statements, and inputting the index data into the initial report to obtain a target report. The invention can accurately generate the target report. In addition, the invention also relates to a block chain technology, and the target report can be stored in the block chain.

Description

Multi-dimensional report generation method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to a method, a device, equipment and a storage medium for generating a multi-dimensional report.
Background
The report forms can provide visual data views for users, and the users can learn the index data better. In the current report generation scheme, related data is directly obtained through indexes input by a user, and then a report is generated according to input indexes and the related data, however, when a multi-dimensional report needs to be generated, because the incidence relation among a plurality of indexes cannot be analyzed in the mode, the corresponding multi-dimensional report cannot be accurately generated, and the practicability of the report generated in the mode is low, so that how to accurately generate the multi-dimensional report becomes a problem which needs to be solved urgently to improve the practicability of the report.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, a device and a storage medium for generating a multidimensional report, which can accurately generate the multidimensional report.
In one aspect, the present invention provides a method for generating a multidimensional report, where the method for generating a multidimensional report includes:
when a dragging request of a preset browser is received, acquiring an index operation area represented by a dragging index for dragging according to the dragging request;
when it is monitored that an index request for creating a report is generated in the index operation area, determining a target dimension associated with the dragging index from a dimension library;
generating an initial script according to the dragging index and the target dimension, and updating the initial script to obtain a target script;
executing the target script based on the preset browser to obtain an initial report;
and acquiring index data by taking the dragging index, the dragging dimension and the query time in the preset browser as query statements, and inputting the index data into the initial report to obtain a target report.
According to a preferred embodiment of the present invention, the drag request carries an interface code indicating a generated interface, and the obtaining an index operation area indicated by a drag index for dragging according to the drag request includes:
acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code;
analyzing the interface code to obtain a plurality of method bodies;
extracting a method body containing an index identification code from the plurality of method bodies as an index code of the drag index;
and acquiring an attribute value corresponding to a preset label from the index code as the index operation area.
According to a preferred embodiment of the present invention, the generating an initial script according to the drag index and the target dimension includes:
extracting dimension codes from the plurality of method bodies according to the target dimension;
acquiring an attribute value corresponding to the preset label from the dimension code as a dimension operation area;
acquiring an operation dimension in the dimension operation area;
determining a common dimension of the operation dimension and the target dimension as the dragging dimension;
calculating the index number of the dragging indexes;
processing a first configuration element in a template script according to the index number, and processing a second configuration element in the template code according to the dimension number of the dragging dimension to obtain a version script corresponding to the template script;
and inputting the dragging index into the first configuration element in the version script, and inputting the dragging dimension into the second configuration element in the version script to obtain the initial script.
According to a preferred embodiment of the present invention, before determining the target dimension associated with the drag index from the dimension library, the method further comprises:
acquiring a preset index and a preset dimension in the preset browser;
determining a common value of each preset index and each preset dimension, and counting the number of the common values to obtain a correlation value of each preset index and each preset dimension;
counting the number of all values in the preset browser to obtain a reference value;
calculating the ratio of the correlation value in the reference value to obtain the correlation degree of each preset index and each preset dimension;
determining a preset dimension with the correlation degree larger than a preset correlation threshold value as a correlation dimension of the preset index;
and storing the incidence relation between the preset index and the incidence dimension in the dimension library.
According to a preferred embodiment of the present invention, after determining the target dimension associated with the drag index from the dimension library, the method further comprises:
acquiring interface dimensions in the generated interface;
determining the remaining interface dimensions except the target dimension in the interface dimensions as characteristic dimensions;
closing the dimension state of the feature dimension.
According to a preferred embodiment of the present invention, the updating the initial script to obtain the target script includes:
acquiring an index script from the initial script according to the dragging index, and acquiring a dimension script from the initial index according to the dragging dimension;
determining the method body containing the length identification in the index script as an index length setting script, and determining the method body containing the length identification in the dimension script as a dimension length setting script;
generating a first field length according to the first character number of the dragging index, and generating a second field length according to the second character number of the dragging dimension;
and updating the index length setting script by the first field length, and updating the dimension length setting script by the second field length to obtain the target script.
According to a preferred embodiment of the present invention, the obtaining index data using the drag index, the drag dimension, and the query time in the preset browser as the query statement includes:
acquiring a query template, and inputting the dragging index, the dragging dimension and the query time into the query template to obtain a query statement;
acquiring the target association degree of the dragging index from the dimension library, and acquiring a target thread having a mapping relation with the target association degree from a thread pool according to the target association degree;
and running the query statement by using the target thread to obtain the index data.
On the other hand, the invention also provides a multi-dimensional report generation device, which comprises:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a dragging index according to a dragging request of a preset browser when the dragging request is received;
the obtaining unit is further configured to obtain an index operation area of the drag index based on the drag request;
the determining unit is used for determining a target dimension associated with the dragging index from a dimension library when an index request generated by the preset browser based on the index operation area is monitored;
the generating unit is used for generating an initial script according to the dragging index and the target dimension;
the updating unit is used for updating the initial script according to the first field length of the dragging index and the second field length of the dragging dimension in the target dimension to obtain a target script;
the execution unit is used for executing the target script based on the preset browser to obtain an initial report;
and the input unit is used for acquiring index data according to the dragging index, the dragging dimension and the query time in the preset browser, and inputting the index data into the initial report to obtain a target report.
In another aspect, the present invention further provides an electronic device, including:
a memory storing computer readable instructions; and
and the processor executes the computer readable instructions stored in the memory to realize the multi-dimensional report generation method.
In another aspect, the present invention further provides a computer-readable storage medium, in which computer-readable instructions are stored, and the computer-readable instructions are executed by a processor in an electronic device to implement the multidimensional report generation method.
According to the technical scheme, the method and the device can avoid mistakenly inputting the dragging index into other positions by determining the index operation area, can avoid inputting dimensions without relevance into the same data table by determining the target dimension associated with the dragging index, so that the accuracy of the multi-dimensional report is improved, and can dynamically adjust the size of the header in the target report by the first field length and the second field length, so that the adaptability of the index object and the dragging dimension in the target report is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for generating a multi-dimensional report according to a preferred embodiment of the present invention.
FIG. 2 is a functional block diagram of a multi-dimensional report generation apparatus according to a preferred embodiment of the present invention.
FIG. 3 is a schematic structural diagram of an electronic device implementing the method for generating a multi-dimensional report according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flowchart illustrating a method for generating a multidimensional report according to a preferred embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The multi-dimensional report generation method is applied to one or more electronic devices, where the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to computer readable instructions set or stored in advance, and hardware of the electronic devices includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive Internet Protocol Television (IPTV), a smart wearable device, and the like.
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 a plurality of network electronic devices, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network electronic devices.
The network in which 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), and the like.
S10, when a dragging request of a preset browser is received, an indication operation area represented by a dragging index used for dragging is obtained according to the dragging request.
In at least one embodiment of the invention, the predetermined browser can be any system that communicates with the electronic device.
The dragging request refers to a request generated when a user triggers any index in the preset browser.
The dragging index refers to an index triggered in the preset browser by the user when the dragging request is generated.
In at least one embodiment of the present invention, the index operation area refers to an area where an index required in generating a data report is located in the generation interface.
In at least one embodiment of the present invention, the obtaining, by the electronic device, a drag index according to the drag request includes:
analyzing the message of the dragging request to obtain data information carried by the message;
acquiring information indicating an index from the data information as an index identification code;
acquiring information indicating an interface from the data information as an interface code, and determining an interface corresponding to the interface code as a generation interface of the dragging request;
acquiring a display index on the generation interface;
and determining a display index corresponding to the index identification code from the display indexes as the dragging index.
Wherein, the data information includes, but is not limited to: the index identification code, the interface code, and the like.
The display indexes refer to all indexes in the generation interface.
The index identification code can be quickly acquired by analyzing the message, the dragging index corresponding to the index identification code can be quickly determined by the display index on the generation interface, and the acquisition efficiency of the dragging index is improved.
In at least one embodiment of the present invention, the drag request carries an interface code indicating a generated interface, and the acquiring, by the electronic device, an index operation area indicated by a drag index for dragging according to the drag request includes:
acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code;
analyzing the interface code to obtain a plurality of method bodies;
extracting a method body containing an index identification code from the plurality of method bodies as an index code of the drag index;
and acquiring an attribute value corresponding to a preset label from the index code as the index operation area.
The interface code refers to script information corresponding to the generated interface.
The preset tag is used to indicate an operation area, for example, the preset tag may be div.
The interface code can be accurately acquired from the preset browser through the interface code, so that the index code can be accurately extracted from the interface code according to the index identification code, and the accuracy of the index operation area is improved.
S11, when it is monitored that an index request for creating a report is generated in the index operation area, determining a target dimension associated with the drag index from a dimension library.
In at least one embodiment of the present invention, the index request refers to a request generated when the index operation region is triggered.
The dimension library stores the association relationship between the indexes and the dimensions and the association degree between the indexes and the dimensions.
The target dimension is a dimension of which the association degree with the dragging index is greater than a preset association degree threshold value.
In at least one embodiment of the invention, before determining the target dimension associated with the drag index from the dimension library, the method further comprises:
acquiring a preset index and a preset dimension in the preset browser;
determining a common value of each preset index and each preset dimension, and counting the number of the common values to obtain a correlation value of each preset index and each preset dimension;
counting the number of all values in the preset browser to obtain a reference value;
calculating the ratio of the correlation value in the reference value to obtain the correlation degree of each preset index and each preset dimension;
determining a preset dimension with the correlation degree larger than a preset correlation threshold value as a correlation dimension of the preset index;
and storing the incidence relation between the preset index and the incidence dimension in the dimension library.
The preset index and the preset dimension refer to initialized indexes and dimensions in the preset browser.
The common value refers to the same numerical value in the preset index and the preset dimension.
The preset correlation threshold is a numerical value preset according to requirements.
The association degree between each preset index and each preset dimension can be accurately determined through the common value and the reference value, so that the dimension library can be accurately determined, and the target dimension can be accurately determined from the dimension library in the follow-up process.
In at least one embodiment of the present invention, the electronic device determining, from a dimension library, a target dimension associated with the drag index includes:
determining a target incidence relation corresponding to the dragging index from the dimension library;
and acquiring all dimensions from the target association relation as the target dimensions.
And the target dimension of the dragging index can be quickly obtained through the target incidence relation.
In at least one embodiment of the invention, after determining the target dimension associated with the drag index from the dimension library, the method further comprises:
acquiring interface dimensions in the generated interface;
determining the remaining interface dimensions except the target dimension in the interface dimensions as characteristic dimensions;
closing the dimension state of the feature dimension.
And the dimension state refers to the association state of the dragging index and the feature dimension.
By setting the dimension state, the condition that the user performs data analysis on the dragging index and the feature dimension without the incidence relation due to misoperation of the feature dimension can be avoided, the accuracy of the data analysis is improved, and therefore the accuracy of generating the multi-dimensional report is improved.
And S12, generating an initial script according to the dragging index and the target dimension, and updating the initial script to obtain a target script.
In at least one embodiment of the present invention, the initial script refers to script information required for generating a data report.
The target script is a script file required for generating a data report.
In at least one embodiment of the present invention, the generating, by the electronic device, an initial script according to the drag indicator and the target dimension includes:
extracting dimension codes from the plurality of method bodies according to the target dimension;
acquiring an attribute value corresponding to the preset label from the dimension code as a dimension operation area;
acquiring an operation dimension in the dimension operation area;
determining a common dimension of the operation dimension and the target dimension as the dragging dimension;
calculating the index number of the dragging indexes;
processing a first configuration element in a template script according to the index number, and processing a second configuration element in the template code according to the dimension number of the dragging dimension to obtain a version script corresponding to the template script;
and inputting the dragging index into the first configuration element in the version script, and inputting the dragging dimension into the second configuration element in the version script to obtain the initial script.
The dimension operation area refers to an area where a dimension required in the generation of the data report is located in the generation interface.
The operation dimension is the dimension which is selected according to the user requirement and is needed for generating the data report.
The template script is a preset script file corresponding to a 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 for writing in an index, and the second configuration element is used for writing in a dimension.
The version script is a script when the number of the elements of the first configuration element and the second configuration element meets the report generation requirement.
By determining the dimension operation area, the dragging dimension can be accurately determined according to the operation dimension in the dimension operation area and the target dimension, the generation of the same data report according to the dimension which is not associated with the dragging index and the dragging index is avoided, and therefore the generation accuracy of the data report is improved. In addition, the initial script is generated through the template script, and the template script does not need to be reconstructed, so that the generation efficiency of the initial script is improved, and meanwhile, the practicability of the template script can be improved through dynamically adjusting the template script.
In at least one embodiment of the present invention, the updating, by the electronic device, the initial script to obtain a target script includes:
acquiring an index script from the initial script according to the dragging index, and acquiring a dimension script from the initial index according to the dragging dimension;
determining the method body containing the length identification in the index script as an index length setting script, and determining the method body containing the length identification in the dimension script as a dimension length setting script;
generating a first field length according to the first character number of the dragging index, and generating a second field length according to the second character number of the dragging dimension;
and updating the index length setting script by the first field length, and updating the dimension length setting script by the second field length to obtain the target script.
The first field length refers to a length occupied by the drag index in the generation interface, for example, if an initial length of each character is 0.5 cm, the first field length of the index "net investment profit between zones" is 3.5.
The first number of characters refers to the number of characters in the drag index, and the index is, for example: the net investment yield of the interval, and the first character number of the index is: 7.
the second field length refers to a length occupied by the dragging dimension in the generation interface.
The second number of characters refers to the number of characters in the dimension index.
And dynamically adjusting the size of a header in the report according to the length of the first field and the length of the second field, thereby realizing the personalized generation of the data report.
And S13, executing the target script based on the preset browser to obtain an initial report.
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 of a header.
And S14, acquiring index data by taking the dragging index, the dragging dimension and the query time in the preset browser as query statements, and inputting the index data into the initial report to obtain a target report.
In at least one embodiment of the present invention, the index data refers to data corresponding to the drag index, the drag dimension, and the query time.
It is emphasized that, in order to further ensure the privacy and security of the target report, the target report may also be stored in a node of a block chain.
In at least one embodiment of the present invention, the acquiring, by the electronic device, index data using the drag index, the drag dimension, and the query time in the preset browser as a query statement includes:
acquiring a query template, and inputting the dragging index, the dragging dimension and the query time into the query template to obtain a query statement;
acquiring the target association degree of the dragging index from the dimension library, and acquiring a target thread having a mapping relation with the target association degree from a thread pool according to the target association degree;
and running the query statement by using the target thread to obtain the index data.
The target thread is a thread in an idle state in the thread pool.
It should be noted that, the greater the target association degree is, the more index data needs to be acquired, and therefore, the more target threads are required.
And acquiring a proper number of target thread pools from the thread pools through the target relevance, thereby ensuring the acquisition efficiency of the index data.
According to the technical scheme, the method and the device can avoid mistakenly inputting the dragging index into other positions by determining the index operation area, can avoid inputting dimensions without relevance into the same data table by determining the target dimension associated with the dragging index, so that the accuracy of the multi-dimensional report is improved, and can dynamically adjust the size of the header in the target report by the first field length and the second field length, so that the adaptability of the index object and the dragging dimension in the target report is improved.
Fig. 2 is a functional block diagram of a multidimensional report generation apparatus according to a preferred embodiment 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 herein is a series of computer readable instruction segments that can be accessed by the processor 13 and perform a fixed function and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
When a drag request of a preset browser is received, the obtaining unit 110 obtains an indication operation area represented by a drag index for dragging according to the drag request.
In at least one embodiment of the invention, the predetermined browser can be any system that communicates with the electronic device.
The dragging request refers to a request generated when a user triggers any index in the preset browser.
The dragging index refers to an index triggered in the preset browser by the user when the dragging request is generated.
In at least one embodiment of the present invention, the index operation area refers to an area where an index required in generating a data report is located in the generation interface.
In at least one embodiment of the present invention, the obtaining unit 110 obtains a drag index according to the drag request includes:
analyzing the message of the dragging request to obtain data information carried by the message;
acquiring information indicating an index from the data information as an index identification code;
acquiring information indicating an interface from the data information as an interface code, and determining an interface corresponding to the interface code as a generation interface of the dragging request;
acquiring a display index on the generation interface;
and determining a display index corresponding to the index identification code from the display indexes as the dragging index.
Wherein, the data information includes, but is not limited to: the index identification code, the interface code, and the like.
The display indexes refer to all indexes in the generation interface.
The index identification code can be quickly acquired by analyzing the message, the dragging index corresponding to the index identification code can be quickly determined by the display index on the generation interface, and the acquisition efficiency of the dragging index is improved.
In at least one embodiment of the present invention, the drag request carries an interface code indicating a generated interface, and the obtaining unit 110 obtains, according to the drag request, an index operation area indicated by a drag index for dragging, including:
acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code;
analyzing the interface code to obtain a plurality of method bodies;
extracting a method body containing an index identification code from the plurality of method bodies as an index code of the drag index;
and acquiring an attribute value corresponding to a preset label from the index code as the index operation area.
The interface code refers to script information corresponding to the generated interface.
The preset tag is used to indicate an operation area, for example, the preset tag may be div.
The interface code can be accurately acquired from the preset browser through the interface code, so that the index code can be accurately extracted from the interface code according to the index identification code, and the accuracy of the index operation area is improved.
When it is monitored that an index request for creating a report is generated in the index operation area, the determining unit 111 determines a target dimension associated with the drag index from a dimension library.
In at least one embodiment of the present invention, the index request refers to a request generated when the index operation region is triggered.
The dimension library stores the association relationship between the indexes and the dimensions and the association degree between the indexes and the dimensions.
The target dimension is a dimension of which the association degree with the dragging index is greater than a preset association degree threshold value.
In at least one embodiment of the present invention, before determining a target dimension associated with the drag index from a dimension library, the obtaining unit 110 obtains a preset index and a preset dimension in the preset browser;
the determining unit 111 determines a common value of each preset index and each preset dimension, and counts the number of the common values to obtain a correlation value of each preset index and each preset dimension;
the calculating unit 116 counts the number of all values in the preset browser to obtain a reference value;
the calculating unit 116 calculates the ratio of the correlation value in the reference value to obtain the correlation degree between each preset index and each preset dimension;
the determining unit 111 determines a preset dimension with the association degree greater than a preset association threshold as an association dimension of the preset index;
the storage unit 117 stores the association relationship between the preset index and the associated dimension in the dimension library.
The preset index and the preset dimension refer to initialized indexes and dimensions in the preset browser.
The common value refers to the same numerical value in the preset index and the preset dimension.
The preset correlation threshold is a numerical value preset according to requirements.
The association degree between each preset index and each preset dimension can be accurately determined through the common value and the reference value, so that the dimension library can be accurately determined, and the target dimension can be accurately determined from the dimension library in the follow-up process.
In at least one embodiment of the present invention, the determining unit 111 determines the target dimension associated with the drag index from a dimension library, including:
determining a target incidence relation corresponding to the dragging index from the dimension library;
and acquiring all dimensions from the target association relation as the target dimensions.
And the target dimension of the dragging index can be quickly obtained through the target incidence relation.
In at least one embodiment of the present invention, after determining a target dimension associated with the drag index from a dimension library, the obtaining unit 110 obtains an interface dimension in the generated interface;
the determining unit 111 determines the remaining interface dimensions except the target dimension among the interface dimensions as feature dimensions;
the execution unit 114 closes the dimension state of the feature dimension.
And the dimension state refers to the association state of the dragging index and the feature dimension.
By setting the dimension state, the condition that the user performs data analysis on the dragging index and the feature dimension without the incidence relation due to misoperation of the feature dimension can be avoided, the accuracy of the data analysis is improved, and therefore the accuracy of generating the multi-dimensional report is improved.
The generating unit 112 generates an initial script according to the dragging index and the target dimension, and updates the initial script to obtain a target script.
In at least one embodiment of the present invention, the initial script refers to script information required for generating a data report.
The target script is a script file required for generating a data report.
In at least one embodiment of the present invention, the generating unit 112 generates an initial script according to the drag indicator and the target dimension, including:
extracting dimension codes from the plurality of method bodies according to the target dimension;
acquiring an attribute value corresponding to the preset label from the dimension code as a dimension operation area;
acquiring an operation dimension in the dimension operation area;
determining a common dimension of the operation dimension and the target dimension as the dragging dimension;
calculating the index number of the dragging indexes;
processing a first configuration element in a template script according to the index number, and processing a second configuration element in the template code according to the dimension number of the dragging dimension to obtain a version script corresponding to the template script;
and inputting the dragging index into the first configuration element in the version script, and inputting the dragging dimension into the second configuration element in the version script to obtain the initial script.
The dimension operation area refers to an area where a dimension required in the generation of the data report is located in the generation interface.
The operation dimension is the dimension which is selected according to the user requirement and is needed for generating the data report.
The template script is a preset script file corresponding to a 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 for writing in an index, and the second configuration element is used for writing in a dimension.
The version script is a script when the number of the elements of the first configuration element and the second configuration element meets the report generation requirement.
By determining the dimension operation area, the dragging dimension can be accurately determined according to the operation dimension in the dimension operation area and the target dimension, the generation of the same data report according to the dimension which is not associated with the dragging index and the dragging index is avoided, and therefore the generation accuracy of the data report is improved. In addition, the initial script is generated through the template script, and the template script does not need to be reconstructed, so that the generation efficiency of the initial script is improved, and meanwhile, the practicability of the template script can be improved through dynamically adjusting the template script.
In at least one embodiment of the present invention, the updating unit 113 updates the initial script to obtain a target script, where the obtaining includes:
acquiring an index script from the initial script according to the dragging index, and acquiring a dimension script from the initial index according to the dragging dimension;
determining the method body containing the length identification in the index script as an index length setting script, and determining the method body containing the length identification in the dimension script as a dimension length setting script;
generating a first field length according to the first character number of the dragging index, and generating a second field length according to the second character number of the dragging dimension;
and updating the index length setting script by the first field length, and updating the dimension length setting script by the second field length to obtain the target script.
The first field length refers to a length occupied by the drag index in the generation interface, for example, if an initial length of each character is 0.5 cm, the first field length of the index "net investment profit between zones" is 3.5.
The first number of characters refers to the number of characters in the drag index, and the index is, for example: the net investment yield of the interval, and the first character number of the index is: 7.
the second field length refers to a length occupied by the dragging dimension in the generation interface.
The second number of characters refers to the number of characters in the dimension index.
And dynamically adjusting the size of a header in the report according to the length of the first field and the length of the second field, thereby realizing the personalized generation of the data report.
The execution unit 114 executes the target script based on the preset browser to obtain an initial report.
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 of a header.
The entry unit 115 obtains index data by using the dragging index, the dragging dimension, and the query time in the preset browser as a query statement, and enters the index data into the initial report to obtain a target report.
In at least one embodiment of the present invention, the index data refers to data corresponding to the drag index, the drag dimension, and the query time.
It is emphasized that, in order to further ensure the privacy and security of the target report, the target report may also be stored in a node of a block chain.
In at least one embodiment of the present invention, the acquiring, by the entry unit 115, index data using the drag index, the drag dimension, and the query time in the preset browser as a query statement includes:
acquiring a query template, and inputting the dragging index, the dragging dimension and the query time into the query template to obtain a query statement;
acquiring the target association degree of the dragging index from the dimension library, and acquiring a target thread having a mapping relation with the target association degree from a thread pool according to the target association degree;
and running the query statement by using the target thread to obtain the index data.
The target thread is a thread in an idle state in the thread pool.
It should be noted that, the greater the target association degree is, the more index data needs to be acquired, and therefore, the more target threads are required.
And acquiring a proper number of target thread pools from the thread pools through the target relevance, thereby ensuring the acquisition efficiency of the index data.
According to the technical scheme, the method and the device can avoid mistakenly inputting the dragging index into other positions by determining the index operation area, can avoid inputting dimensions without relevance into the same data table by determining the target dimension associated with the dragging index, so that the accuracy of the multi-dimensional report is improved, and can dynamically adjust the size of the header in the target report by the first field length and the second field length, so that the adaptability of the index object and the dragging dimension in the target report is improved.
Fig. 3 is a schematic structural diagram of an electronic device for implementing the method for generating a multi-dimensional report according to the preferred embodiment of the present invention.
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, such as a multidimensional report generator, stored in the memory 12 and executable on the processor 13.
It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the electronic device 1 may further comprise an input output device, a network access device, a bus, etc.
The Processor 13 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The processor 13 is an operation core and a control center of the electronic device 1, and is connected to each part of the whole electronic device 1 by various interfaces and lines, and executes an operating system of the electronic device 1 and various installed application programs, program codes, and the like.
Illustratively, the computer readable instructions may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing specific functions, which are used for describing 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.
The memory 12 may be used for storing the computer readable instructions and/or modules, and the processor 13 implements various functions of the electronic device 1 by executing or executing the computer readable instructions and/or modules stored in the memory 12 and invoking data stored in the memory 12. The memory 12 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. The memory 12 may include non-volatile and volatile memories, such as: a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a memory having a physical form, such as a memory stick, a TF Card (Trans-flash Card), or the like.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by hardware that is configured to be instructed by computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer readable instructions comprise computer readable instruction code which may be in source code form, object code form, an executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying said computer readable instruction code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM).
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
With reference to fig. 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:
when a dragging request of a preset browser is received, acquiring an index operation area represented by a dragging index for dragging according to the dragging request;
when it is monitored that an index request for creating a report is generated in the index operation area, determining a target dimension associated with the dragging index from a dimension library;
generating an initial script according to the dragging index and the target dimension, and updating the initial script to obtain a target script;
executing the target script based on the preset browser to obtain an initial report;
and acquiring index data by taking the dragging index, the dragging dimension and the query time in the preset browser as query statements, and inputting the index data into the initial report to obtain a target report.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer readable instructions, which is not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The computer readable storage medium has computer readable instructions stored thereon, wherein the computer readable instructions when executed by the processor 13 are configured to implement the steps of:
when a dragging request of a preset browser is received, acquiring an index operation area represented by a dragging index for dragging according to the dragging request;
when it is monitored that an index request for creating a report is generated in the index operation area, determining a target dimension associated with the dragging index from a dimension library;
generating an initial script according to the dragging index and the target dimension, and updating the initial script to obtain a target script;
executing the target script based on the preset browser to obtain an initial report;
and acquiring index data by taking the dragging index, the dragging dimension and the query time in the preset browser as query statements, and inputting the index data into the initial report to obtain a target report.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention 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, or in a form of hardware plus a software functional module.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. The plurality of units or devices may also be implemented by one unit or device through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A multi-dimensional report generation method is characterized by comprising the following steps:
when a dragging request of a preset browser is received, acquiring an index operation area represented by a dragging index for dragging according to the dragging request;
when it is monitored that an index request for creating a report is generated in the index operation area, determining a target dimension associated with the dragging index from a dimension library;
generating an initial script according to the dragging index and the target dimension, and updating the initial script to obtain a target script;
executing the target script based on the preset browser to obtain an initial report;
and acquiring index data by taking the dragging index, the dragging dimension and the query time in the preset browser as query statements, and inputting the index data into the initial report to obtain a target report.
2. The method for generating a multi-dimensional report according to claim 1, wherein the dragging request carries an interface code indicating a generated interface, and the obtaining an index operation area indicated by a dragging index for dragging according to the dragging request comprises:
acquiring an interface code corresponding to the generated interface from the preset browser based on the interface code;
analyzing the interface code to obtain a plurality of method bodies;
extracting a method body containing an index identification code from the plurality of method bodies as an index code of the drag index;
and acquiring an attribute value corresponding to a preset label from the index code as the index operation area.
3. The multi-dimensional report generation method according to claim 2, wherein the generating an initial script according to the dragging indicator and the target dimension comprises:
extracting dimension codes from the plurality of method bodies according to the target dimension;
acquiring an attribute value corresponding to the preset label from the dimension code as a dimension operation area;
acquiring an operation dimension in the dimension operation area;
determining a common dimension of the operation dimension and the target dimension as the dragging dimension;
calculating the index number of the dragging indexes;
processing a first configuration element in a template script according to the index number, and processing a second configuration element in the template code according to the dimension number of the dragging dimension to obtain a version script corresponding to the template script;
and inputting the dragging index into the first configuration element in the version script, and inputting the dragging dimension into the second configuration element in the version script to obtain the initial script.
4. The multi-dimensional report generation method according to claim 1, wherein prior to determining the target dimension associated with the drag index from the dimension library, the method further comprises:
acquiring a preset index and a preset dimension in the preset browser;
determining a common value of each preset index and each preset dimension, and counting the number of the common values to obtain a correlation value of each preset index and each preset dimension;
counting the number of all values in the preset browser to obtain a reference value;
calculating the ratio of the correlation value in the reference value to obtain the correlation degree of each preset index and each preset dimension;
determining a preset dimension with the correlation degree larger than a preset correlation threshold value as a correlation dimension of the preset index;
and storing the incidence relation between the preset index and the incidence dimension in the dimension library.
5. The multi-dimensional report generation method according to claim 1, wherein after determining the target dimension associated with the drag index from the dimension library, the method further comprises:
acquiring interface dimensions in the generated interface;
determining the remaining interface dimensions except the target dimension in the interface dimensions as characteristic dimensions;
closing the dimension state of the feature dimension.
6. The multi-dimensional report generation method according to claim 1, wherein said updating said initial script to obtain a target script comprises:
acquiring an index script from the initial script according to the dragging index, and acquiring a dimension script from the initial index according to the dragging dimension;
determining the method body containing the length identification in the index script as an index length setting script, and determining the method body containing the length identification in the dimension script as a dimension length setting script;
generating a first field length according to the first character number of the dragging index, and generating a second field length according to the second character number of the dragging dimension;
and updating the index length setting script by the first field length, and updating the dimension length setting script by the second field length to obtain the target script.
7. The method for generating a multi-dimensional report according to claim 1, wherein the obtaining index data for the query statement using the dragging index, the dragging dimension, and the query time in the preset browser comprises:
acquiring a query template, and inputting the dragging index, the dragging dimension and the query time into the query template to obtain a query statement;
acquiring the target association degree of the dragging index from the dimension library, and acquiring a target thread having a mapping relation with the target association degree from a thread pool according to the target association degree;
and running the query statement by using the target thread to obtain the index data.
8. A multi-dimensional report generation apparatus, comprising:
the device comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring an index operation area represented by a dragging index for dragging according to a dragging request when the dragging request of a preset browser is received;
the determining unit is used for determining a target dimension associated with the dragging index from a dimension library when it is monitored that an index request for creating a report is generated in the index operation area;
the generating unit is used for generating an initial script according to the dragging index and the target dimension, and updating the initial script to obtain a target script;
the execution unit is used for executing the target script based on the preset browser to obtain an initial report;
and the input unit is used for acquiring index data by taking the dragging index, the dragging dimension and the query time in the preset browser as query statements, and inputting the index data into the initial report to obtain a target report.
9. An electronic device, characterized in that the electronic device comprises:
a memory storing computer readable instructions; and
a processor executing computer readable instructions stored in the memory to implement the multidimensional report generation method of any of claims 1 to 7.
10. A computer-readable storage medium characterized by: the computer-readable storage medium stores therein computer-readable instructions, which are executed by a processor in an electronic device to implement the multidimensional report generation method according to any one of claims 1 to 7.
CN202110723299.3A 2021-06-29 2021-06-29 Multi-dimensional report generation method, device, equipment and storage medium Pending CN113282218A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110723299.3A CN113282218A (en) 2021-06-29 2021-06-29 Multi-dimensional report generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110723299.3A CN113282218A (en) 2021-06-29 2021-06-29 Multi-dimensional report generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113282218A true CN113282218A (en) 2021-08-20

Family

ID=77285997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110723299.3A Pending CN113282218A (en) 2021-06-29 2021-06-29 Multi-dimensional report generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282218A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705184A (en) * 2021-09-01 2021-11-26 同盾科技有限公司 Method and device for generating custom report, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705184A (en) * 2021-09-01 2021-11-26 同盾科技有限公司 Method and device for generating custom report, storage medium and electronic equipment
CN113705184B (en) * 2021-09-01 2023-09-22 同盾科技有限公司 Custom report generation method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN112182224A (en) Referee document abstract generation method and device, electronic equipment and readable storage medium
CN111883251A (en) Medical misdiagnosis detection method and device, electronic equipment and storage medium
CN111985241A (en) Medical information query method, device, electronic equipment and medium
CN112711398A (en) Method, device and equipment for generating buried point file and storage medium
CN112948418A (en) Dynamic query method, device, equipment and storage medium
CN114035827A (en) Application program updating method, device, equipment and storage medium
CN114510487A (en) Data table merging method, device, equipment and storage medium
CN114372060A (en) Data storage method, device, equipment and storage medium
CN113900955A (en) Automatic testing method, device, equipment and storage medium
CN113268597A (en) Text classification method, device, equipment and storage medium
CN113282218A (en) Multi-dimensional report generation method, device, equipment and storage medium
CN112632098A (en) Dynamic generation method of structured query statement and related equipment
CN112819305A (en) Service index analysis method, device, equipment and storage medium
CN111986771A (en) Medical prescription query method and device, electronic equipment and storage medium
CN112947911A (en) Interface script generation method, device, equipment and storage medium
CN112199494A (en) Medical information searching method and device, electronic equipment and storage medium
CN114238296A (en) Product index data display method, device, equipment and storage medium
CN116089535A (en) Data synchronization method, device, equipment and storage medium
CN113343700B (en) Data processing method, device, equipment and storage medium
CN112667721A (en) Data analysis method, device, equipment and storage medium
CN114692204A (en) Data query method, device, equipment and storage medium
CN111933241B (en) Medical data analysis method, device, electronic equipment and storage medium
CN113283677A (en) Index data processing method, device, equipment and storage medium
CN113420143A (en) Document abstract generation method, device, equipment and storage medium
CN113420545A (en) Abstract generation method, device, 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