CN108255967B - Method and device for calling storage process, storage medium and terminal - Google Patents

Method and device for calling storage process, storage medium and terminal Download PDF

Info

Publication number
CN108255967B
CN108255967B CN201711431187.0A CN201711431187A CN108255967B CN 108255967 B CN108255967 B CN 108255967B CN 201711431187 A CN201711431187 A CN 201711431187A CN 108255967 B CN108255967 B CN 108255967B
Authority
CN
China
Prior art keywords
data
report
oracle database
request
storage process
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.)
Active
Application number
CN201711431187.0A
Other languages
Chinese (zh)
Other versions
CN108255967A (en
Inventor
温善安
李磊
陈宝花
金鑫
杨雨芬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711431187.0A priority Critical patent/CN108255967B/en
Priority to PCT/CN2018/081037 priority patent/WO2019127956A1/en
Publication of CN108255967A publication Critical patent/CN108255967A/en
Application granted granted Critical
Publication of CN108255967B publication Critical patent/CN108255967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage 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/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Abstract

The invention is suitable for the technical field of communication, and provides a method, a device, a storage medium and a terminal for calling a storage process, wherein the method comprises the following steps: creating a report response function in the Oracle database, wherein the report response function is used for responding to a call request of a report system and calling a storage process in the Oracle database; when a data request message sent by a report system is acquired, analyzing the data request message to acquire a request parameter; transmitting the request parameter into the report response function, and calling a storage process corresponding to the request parameter by the report response function; executing the storage process to process the data in the Oracle database, and reading the processed data to respond to the data request of the report system; the invention solves the problems that the report system in the prior art can not call the storage process in the Oracle database and the data updating efficiency is low.

Description

Method and device for calling storage process, storage medium and terminal
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method and a device for calling a storage process, a storage medium and a terminal.
Background
Pentaho is the most popular open source business intelligent software at present, is a BI suite which takes workflow as a core and emphasizes solution-oriented schemes rather than tool components, and integrates a large number of machine learning algorithms capable of undertaking data mining tasks, including preprocessing, classifying, regressing, clustering and association rule analysis of data and visualizing the data on an interactive interface. However, existing BI reporting tools do not have the capability to carry data processing. The Pentaho report system mainly uses HSQLDB database as database, and updates the database only once a day. When a user views data on the Pentaho report system, the user cannot acquire the latest data in time due to the slow updating efficiency of the HSQLDB. Therefore, the Pentaho report system in the prior art cannot meet the requirement of a user for dynamically checking the latest data.
Disclosure of Invention
The embodiment of the invention provides a calling method, a calling device, a storage medium and a terminal of a storage process, and aims to solve the problems that in the prior art, a report system is low in data updating efficiency and cannot meet the requirement that a user can dynamically check latest data.
The embodiment of the invention provides a method for calling a storage process, which comprises the following steps:
creating a report response function in the Oracle database, wherein the report response function is used for responding to a call request of a report system and calling a storage process in the Oracle database;
when a data request message sent by a report system is acquired, analyzing the data request message to acquire a request parameter;
transmitting the request parameter into the report response function, and starting a storage process corresponding to the request parameter by the report response function;
and executing the storage process to process the data in the Oracle database, and reading the processed data to respond to the data request of the report system.
Further, the executing the storage process to process the data in the Oracle database, and reading the processed data to respond to the data request of the reporting system includes:
executing the storage process to process the data in the Oracle database;
acquiring a master table to be read from an Oracle database according to the request parameters;
reading target data from the main table, writing the read target data into a secondary table, and generating report data suitable for the report system;
and sending the report data to the report system so that the report system receives and displays the report data.
Further, the data request message includes a name of a storage process to be called, dimension information to be requested, a request date, and a timing query time.
Further, the reading the target data from the master table, writing the read target data into the slave table, and generating the report data applicable to the report system, and then further comprising:
acquiring a stored process name from the request parameter, and acquiring a Structured Query Language (SQL) code of the stored process according to the stored process name;
generating a check instruction based on the SQL code;
and checking whether the contents in the report data are consistent with the records of the main table or not according to the checking instruction, and if so, returning the report data to the report system.
Further, the data request message also includes a user account;
when the data request message sent by the report system is acquired, the data request message is analyzed, and then the method further comprises the following steps:
acquiring the user account;
checking whether the user account has processing authority or not based on a preset authorization table;
if yes, acquiring request parameters from the data request message;
if not, generating an unauthorized prompt message, and sending the unauthorized prompt message to the report system.
The embodiment of the invention also provides a calling device of the storage process, and the calling device comprises:
the system comprises a creating module, a storing module and a processing module, wherein the creating module is used for creating a report response function in an Oracle database, and the report response function is used for responding to a call request of a report system and calling a storage process in the Oracle database;
the acquisition module is used for analyzing the data request message and acquiring request parameters when the data request message sent by the report system is acquired;
the starting module is used for transmitting the request parameter into the report response function, and the report response function starts a storage process corresponding to the request parameter;
and the execution module is used for executing the storage process to process the data in the Oracle database, and reading the processed data so as to respond to the data request of the report system.
Further, the execution module includes:
the processing unit is used for executing the storage process so as to process the data in the Oracle database;
the first acquisition unit is used for acquiring a master table to be read from an Oracle database according to the request parameter;
the first generation unit is used for reading target data from the main table, writing the read target data into a secondary table and generating report data suitable for the report system;
and the sending unit is used for sending the report data to the report system so that the report system receives and displays the report data.
Further, the data request message also includes a user account;
the calling device further comprises:
the verification module is used for acquiring the user account and verifying whether the user account has the processing authority or not based on a preset authorization table;
the acquisition module is used for acquiring request parameters from the data request message when the verification result of the verification module is yes;
and the prompting module is used for generating an unauthorized prompting message and sending the unauthorized prompting message to the report system when the verification result of the verification module is negative.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for invoking a storage procedure as described above.
The embodiment of the invention also provides a terminal, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the steps of the calling method of the storage process when executing the computer program.
Compared with the prior art, the embodiment of the invention integrates the calling function of the Oracle database in the Pentaho report system, and responds the calling request of the report system to the storage process through the report response function by adding the report response function in the Oracle database; when a data request message sent by a report system is acquired, analyzing the data request message to acquire a request parameter; transmitting the request parameter into the report response function, and starting a storage process corresponding to the request parameter by the report response function; executing the storage process to process the data in the Oracle database, and reading the processed data to respond to the data request of the report system; therefore, the storage process in the Oracle database is called in the report system, the data updating efficiency of the Oracle database is high, the latest data can be read from the Oracle database through the storage process, and the problems that the data updating efficiency of the report system is low and the latest data cannot be dynamically checked by a user in the prior art are effectively solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of a first implementation of a method for invoking a stored procedure according to an embodiment of the present invention;
FIG. 2 is a flow chart of a second implementation of a method for invoking a stored procedure according to an embodiment of the present invention;
FIG. 3 is a flowchart of a third implementation of a method for invoking a stored procedure according to an embodiment of the present invention;
FIG. 4 is a flowchart of a fourth implementation of a method for invoking a stored procedure according to an embodiment of the present invention;
FIG. 5 is a block diagram of a calling device for a stored procedure according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the prior art, the Pentaho report system mainly uses HSQLDB database as database, and updates the database only once a day. When a user views data on the Pentaho report system, the user cannot acquire the latest data in time due to the slow updating efficiency of the HSQLDB. The Oracle database processes data through a storage process, and the data updating efficiency is higher. However, the Pentaho report system is a report query tool, only interfaces with a data table, and the existing function does not support the call of the storage process in the Oracle database. In order to meet the requirement of dynamically checking the latest data by a user, the method for calling the storage process is provided.
Example 1
Fig. 1 shows a first implementation flow of a method for calling a storage procedure according to an embodiment of the present invention.
In the embodiment of the present invention, the method for calling the stored procedure is applied to a terminal, including but not limited to a computer, a server, and the like.
Referring to fig. 1, the calling method of the storage procedure includes:
in step S101, a report response function is created in the Oracle database, and the report response function is used for calling a storage process in the Oracle database in response to a call request of the reporting system.
In the embodiment of the invention, the reporting system is a Pentaho reporting system. The Oracle database is a database related to the Pentaho report system, and various table information and table data are stored in the Oracle database. An Oracle database is usually provided with a plurality of native storage processes, wherein the storage processes refer to a group of SQL statements which are called again after first compiling and do not need to be compiled again in order to finish specific performance, and the names of the storage processes are specified through functions and parameters are given to execute the storage processes. In the embodiment of the invention, the report response function calls the storage process in the Oracle database by responding to the call request of the Pentaho report system so as to realize the data processing in the Pentaho report system.
Optionally, to implement a response to the Pentaho reporting system requires encoding both in the Oracle database and in the Pentaho reporting system. In the Oracle database, a program responding to the Pentaho report, that is, the report response function described in step S101, needs to be deployed on the Oracle server. In a Pentaho report system, a function and a starting identifier for requesting to start the report response function are added, and a parameter input interface is set; and returning the log in the calling process to the Oracle server. Optionally, an open source data exchange tool button may be introduced to the Pentaho reporting system to implement the function of scheduling the storage process from the reporting level.
In step S102, when the data request message sent by the report system is acquired, the data request message is analyzed, and the request parameter is acquired.
Here, when the user views the report on the Pentaho reporting system, the user may request to start the report response function by triggering the start identifier, and input a request parameter. And the Pentaho report system acquires the request instruction and the request parameter triggered by the starting identifier, generates the data request message based on the request parameter and sends the data request message to the Oracle database.
And the Oracle database receives and analyzes the data request message to obtain a request parameter. Optionally, the request parameters include, but are not limited to, a name of a stored procedure to be called, dimension information to be requested, a request date, and a timing query time. The name of the storage procedure is a name loadtable of the storage procedure to be called, such as Defaultvalue ═ PRG _ APV _ REPORT _ v2. permanent _ REPORT _ EN _ STATIC. The dimension information is a field to be requested in the report to be requested, and is generated by the configuration of a user on a Pentaho report system, including but not limited to a name field, an age field, an ID field and an identification number field in the report, and all displayed parameter values are combined by character strings, such as
concatenate ([ start _ date ]; ";"; [ end _ date ]; ";") CSVTEXT ([ id ]; 0; ";"; "). The timing query time is the time when the report response function calls the storage process, and is used for updating data when the report response function calls the storage process. The user can self-define the time interval and the frequency for reading data from the Oracle database by setting the timing query time.
In step S103, the request parameter is transmitted to the report response function, and the report response function starts a storage process corresponding to the request parameter.
After the request parameter is obtained, the report response function obtains a target process according to the storage function name in the request parameter, and transmits dimension information to be requested into the target process to start the target process, so that the storage process in the Oracle database is called on the Pentaho report system, and the call of a BI report tool to the Oracle storage process is realized. The storage process is a native storage process in the Oracle database, and can process data in the Oracle database according to business logic, such as adding, deleting and changing operations. The Oracle database can record all storage processes in a table mode, and the report response function reads the corresponding storage process from the table to trigger according to the request parameters.
In step S104, the storage process is executed to process the data in the Oracle database, and the processed data is read to respond to the data request of the reporting system.
The Oracle database executes the target process, namely, a storage process is called, the storage process processes the data in the Oracle database according to the request parameters, and then reads the processed data from the report stored in the Oracle database so as to complete the response to the data request of the Pentaho report system. After the Oracle database finishes data reading, the user can check the data in the Pentaho reporting system.
In conclusion, the Oracle database can update data by self and store the data without depending on the Pentaho reporting system. According to the embodiment of the invention, the call of the storage process in the Oracle database is added in the existing function of the Pentaho report system through the report response function so as to process the data, so that a user can acquire the latest report data from the Oracle database through the newly added function on the Pentaho report system, and the problem that the user cannot dynamically check the latest data due to the slow data updating efficiency of the report system in the prior art is solved.
Further, based on the first implementation flow of the method for calling the storage procedure provided in fig. 1, a second implementation flow of the method for calling the storage procedure provided in the embodiment of the present invention is provided.
As shown in fig. 2, which is a second implementation flowchart of the method for calling the storage procedure according to the embodiment of the present invention, the step S104 executes the storage procedure to process the data in the Oracle database, and reads the processed data, so as to respond to the data request of the reporting system, where the method includes:
in step S1041, the storage process is executed to process the data in the Oracle database.
In step S1042, the master table to be read is obtained from the Oracle database according to the request parameter.
As mentioned above, the request parameters in the data request message include, but are not limited to, the name of the stored procedure to be called, the dimension information to be requested, the request date, and the timing query time. And when Oracle executes a storage process, determining related table information according to the dimension information to be requested, and obtaining a main table to be read.
In step S1043, reading the target data from the master table, writing the read target data into the slave table, and generating report data applicable to the report system.
Here, the storing process uses a select statement to search the field value corresponding to the dimension information to be requested from the master table, obtains target data, creates a slave table, and saves a returned result set, that is, copies the target data into the slave table. And finally, generating report data applicable to the Pentaho report system based on the slave table. The report data applicable to the Pentaho report system is understood to mean that the Pentaho report system can analyze and call to display the report data.
In step S1044, the reporting data is sent to the reporting system, so that the reporting system receives and displays the reporting data.
And sending the report data to a Pentaho report system for a user to check, thereby realizing the support and calling of a storage process in an Oracle database in the Pentaho report system. The embodiment of the invention completes the updating and reading of data based on the Oracle database, views the data based on the Pentaho report system, utilizes the fast update frequency of the Oracle database, writes the target data from the table as the latest field value in the Oracle database, and enables the improved Pentaho report system to meet the requirement of a user for dynamically viewing the latest data in the report system.
Further, a third implementation procedure of the method for calling the storage procedure provided in the embodiment of the present invention is provided based on the second implementation procedure of the method for calling the storage procedure provided in fig. 2.
As shown in fig. 3, which is a flowchart of a third implementation of the method for calling a storage procedure according to the embodiment of the present invention, the step S104 executes the storage procedure to process data in an Oracle database, and reads the processed data, so as to respond to a data request of the reporting system, where the method includes:
in step S104a, the storage process is executed to process the data in the Oracle database.
In step S104b, the master table to be read is obtained from the Oracle database according to the request parameter.
In step S104c, the target data is read from the master table, and the read target data is written into the slave table, thereby generating the report data applicable to the report system.
The steps S104a to S104c are the same as the steps S1041 to S1043 described in the embodiment of fig. 2, for details, refer to the description of the above embodiment, and are not repeated here.
The method further comprises, after the step S104 c:
in step S104d, a stored procedure name is obtained from the request parameter, and a structured query language SQL code of the stored procedure is obtained according to the stored procedure name.
After the storage process name is obtained, the storage process corresponding to the storage process name is screened out from an Oracle server, and an SQL code corresponding to the storage process is obtained through a standard interface.
In step S104e, a check instruction is generated based on the SQL code.
And analyzing the SQL code, and identifying keywords including but not limited to a main table, a secondary table and dimension information recorded in the SQL code. Generating a check instruction based on the key.
In step S104f, it is checked whether the content in the report data is consistent with the record of the main table according to the check instruction.
Here, the checking whether the content in the report data is consistent with the record information of the main table may be: and summing the field lengths of each record in the main table and the report data, and then judging whether each record in the slave table is consistent with the record information in the main table according to the comparison of the main keys, so as to check whether the data copied from the main table to the slave table is correct, namely, determine whether each record in the report data is correct. Optionally, the field length summation may be performed by using a length b method.
After the verification is passed, if each record in the slave table is consistent with the record in the master table, so that it can be determined that the report data is correct, step S104g is executed. Otherwise, if the slave table has a record with a different master table, step S104a is executed again to perform the table reading and writing operations again.
In step S104g, the reporting data is sent to the reporting system, so that the reporting system receives and displays the reporting data.
Step S104g is the same as step S1044 described in the embodiment of fig. 2, please refer to the description of the above embodiments, and details are not repeated here.
According to the embodiment of the invention, the data copied from the main table is checked before the report data is output to the Pentaho report system, so that the accuracy of the report data output on the Pentaho report system is ensured, and the user experience is improved.
Further, based on the first implementation flow of the method for calling the storage procedure provided in fig. 1, a fourth implementation flow of the method for calling the storage procedure provided in the embodiment of the present invention is provided.
Fig. 4 is a flowchart illustrating a fourth implementation of the method for invoking a storage procedure according to the embodiment of the present invention. The calling method comprises the following steps:
in step S401, a report response function is created in the Oracle database, and the report response function is used for calling a storage process in the Oracle database in response to a call request of the reporting system.
In step S402, when the data request message sent by the reporting system is acquired, the data request message is analyzed.
Steps S401 to S402 are the same as steps S101 to S102 described in the embodiment of fig. 1, and for details, refer to the description of the above embodiment, which is not repeated herein.
The calling method further comprises the following steps:
in step S403, the user account is acquired.
In the embodiment of the invention, the user account is a certificate for logging in and using an Oracle database for the user. The user who executes the storage process has certain data operation authority to use the storage process, and the user without the data operation authority can only indirectly access the data under the control of the user.
In the embodiment of the present invention, the data request message may further include a user account. As described above, the user can view the report on the Pentaho reporting system, and input the request parameter by triggering the start identifier of the report response function. The Pentaho report system acquires the request instruction and the request parameter triggered by the starting identifier, acquires a user account of the user on the Pentaho report system, generates the data request message based on the request parameter and the user account, and sends the data request message to the Oracle database. And the Oracle database analyzes the data request message after receiving the data request message, and acquires a user account.
In step S404, it is checked whether the user account has a processing right based on a preset authorization table.
Here, the user account is a user credential on the Oracle database and a user credential on the Pentaho reporting system. The embodiment of the invention leads the user certificate with the data operation authority appointed on the Pentaho report system into the Oracle database in advance.
And the Oracle database maintains a user account set with data operation authority in a mode of an authorization table. And all the user accounts recorded in the authorization table have the authority to trigger the report response function, so that the user accounts have the authority to use the storage process in the Oracle database.
In step S404, whether the user account has the processing right may be determined by querying whether a preset authorization table includes the user account. If yes, go to step S405; otherwise, step S408 is performed.
In step S405, request parameters are acquired from the data request message.
And if and only if the authorization table includes the user account of the current user, that is, the user account has the processing right, acquiring the request parameter from the data request message in the embodiment of the present invention.
In step S406, the request parameter is transmitted to the report response function, and the report response function starts a storage process corresponding to the request parameter.
In step S407, the storage process is executed to process the data in the Oracle database, and the processed data is read to respond to the data request of the reporting system.
Steps S406 to S407 are the same as steps S103 to S104 described in the embodiment of fig. 1, and please refer to the description of the above embodiment for details, which are not repeated herein.
In step S408, an unauthorized prompt message is generated and sent to the reporting system.
If the authorization table does not include the user account of the current user, it is indicated that the user account does not have the processing authority, in this case, in the embodiment of the present invention, an unauthorized prompt message is generated according to the user account, and the unauthorized prompt message is returned to the Pentaho report system, so that the Pentaho report system outputs an alarm message according to the unauthorized prompt message, and terminates the data query or data update operation.
The embodiment of the invention further improves the safety of calling the storage process on the Pentaho report system by maintaining the authorization table in the Oracle database and limiting the use permission of the report response function.
It should be understood that, in the above embodiments, the order of execution of the steps is not meant to imply any order, and the order of execution of the steps should be determined by their function and inherent logic, and should not limit the implementation process of the embodiments of the present invention.
Example 2
Fig. 5 is a block diagram illustrating a calling device for storing a procedure according to an embodiment of the present invention, and only a part related to the embodiment of the present invention is shown for convenience of description.
In an embodiment of the present invention, the calling device of the stored procedure is used to implement the calling method of the stored procedure in the embodiments of fig. 1, fig. 2, fig. 3, and fig. 4, and may be a software unit, a hardware unit, or a unit combining software and hardware that is built in a server.
Referring to fig. 5, the calling device of the stored procedure includes:
the creating module 51 is used for creating a report response function in the Oracle database, wherein the report response function is used for responding to a call request of a report system and calling a storage process in the Oracle database;
the obtaining module 52 is configured to, when obtaining a data request message sent by a report system, analyze the data request message and obtain a request parameter;
the starting module 53 is configured to transmit the request parameter into the report response function, and start a storage process corresponding to the request parameter by the report response function;
and the execution module 54 is configured to execute the storage process to process the data in the Oracle database, and read the processed data to respond to the data request of the reporting system.
Optionally, the executing module 54 includes:
the processing unit 541 is used for executing the storage process to process the data in the Oracle database;
a first obtaining unit 542, configured to obtain a master table to be read from an Oracle database according to the request parameter;
a first generating unit 543, configured to read target data from the master table, write the read target data into a slave table, and generate report data applicable to the reporting system;
the sending unit 544 is configured to send the report data to the reporting system, so that the reporting system receives and displays the report data.
Optionally, the data request message includes, but is not limited to, a name of a storage procedure to be invoked, dimension information to be requested, a request date, and a timing query time.
Optionally, the executing module 54 further includes:
a second obtaining unit 545, configured to obtain a stored procedure name from the request parameter, and obtain a Structured Query Language (SQL) code of the stored procedure according to the stored procedure name;
a second generating unit 546, configured to generate a check instruction based on the SQL code;
a checking unit 547, configured to check whether the content in the report data is consistent with the record of the main table according to the checking instruction, and if so, return the report data to the reporting system.
Optionally, the data request message may further include a user account; the calling device further comprises:
the checking module 55 is configured to acquire the user account, and check whether the user account has a processing right based on a preset authorization table;
the obtaining module 52 is further configured to obtain a request parameter from the data request message when the verification result of the verifying module is yes;
and the prompting module 56 is configured to generate an unauthorized prompting message and send the unauthorized prompting message to the reporting system when the checking result of the checking module is negative.
It should be noted that each module/unit in the embodiment of the present invention may be configured to implement all technical solutions in the foregoing method embodiments, and specific working processes thereof may refer to corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Example 3
This embodiment provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for invoking a storage procedure in embodiment 1 is implemented, and details are not described here again to avoid repetition. Alternatively, the computer program, when executed by the processor, implements the functions of each module/unit in the calling device of the storage procedure in embodiment 2, and is not described herein again to avoid repetition.
Example 4
Fig. 6 is a schematic diagram of a terminal provided in an embodiment of the present invention, where the terminal includes, but is not limited to, a server and a mobile terminal. As shown in fig. 6, the terminal 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in said memory 61 and executable on said processor 60. When the processor 60 executes the computer program 62, the steps in the calling method embodiment of the above-mentioned storage procedure are implemented, for example, steps S101 to S104 shown in fig. 1, steps S1041 to S1044 described in the embodiment of fig. 2, steps S104a to S104g described in the embodiment of fig. 3, and steps S401 to S408 described in the embodiment of fig. 4; alternatively, the processor 60, when executing the computer program 62, implements the functions of the modules/units in the calling device embodiment of the above-mentioned stored procedure, such as the functions of the modules 51 to 56 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal 6. For example, the computer program 62 may be divided into a creating module, an obtaining module, a calling module, and an executing module, and the specific functions of the modules are as follows:
the system comprises a creating module, a storing module and a processing module, wherein the creating module is used for creating a report response function in an Oracle database, and the report response function is used for responding to a call request of a report system and calling a storage process in the Oracle database;
the acquisition module is used for analyzing the data request message and acquiring request parameters when the data request message sent by the report system is acquired;
the starting module is used for transmitting the request parameter into the report response function, and the report response function starts a storage process corresponding to the request parameter;
and the execution module is used for executing the storage process to process the data in the Oracle database, and reading the processed data so as to respond to the data request of the report system.
The terminal 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal may include, but is not limited to, a processor 60, a memory 61. It will be appreciated by those skilled in the art that fig. 6 is only an example of a terminal 6 and does not constitute a limitation of the terminal 6, and that it may comprise more or less components than those shown, or some components may be combined, or different components, for example the terminal may further comprise input output devices, network access devices, buses, etc.
The Processor 60 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, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the terminal and connects the various parts of the overall terminal using various interfaces and lines.
The memory 61 may be used to store the computer programs and/or modules, and the processor may implement various functions of the terminal by operating or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program 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 the use of the terminal, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
In addition, functional units 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, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, the computer readable storage medium does not include electrical carrier signals and telecommunication signals according to legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. A calling method of a stored procedure, the calling method comprising:
creating a report response function in an Oracle database, wherein the report response function is used for responding to a call request of a report system to call a storage process in the Oracle database, and the report system is a Pentaho report system;
when a data request message sent by a report system is acquired, analyzing the data request message to acquire a request parameter;
the request parameter is transmitted into the report response function, the report response function starts a storage process corresponding to the request parameter, and the function of scheduling the storage process in the Oracle database on the Pentaho report level is realized;
executing the storage process to process the data in the Oracle database, and reading the processed data to respond to the data request of the report system;
the executing the storage process to process the data in the Oracle database, and reading the processed data to respond to the data request of the report system includes:
executing the storage process to process the data in the Oracle database;
acquiring a master table to be read from an Oracle database according to the request parameters;
reading target data from the main table, writing the read target data into a secondary table, and generating report data suitable for the report system;
and sending the report data to the report system so that the report system receives and displays the report data.
2. The stored procedure calling method according to claim 1, wherein the data request message includes a stored procedure name to be called, dimension information to be requested, a request date, and a timing query time.
3. The calling method of the storage procedure according to claim 2, wherein the reading of the target data from the master table, the writing of the read target data into the slave table, and the generation of the report data applicable to the reporting system, further comprises:
acquiring a stored process name from the request parameter, and acquiring a Structured Query Language (SQL) code of the stored process according to the stored process name;
generating a check instruction based on the SQL code;
and checking whether the contents in the report data are consistent with the records of the main table or not according to the checking instruction, and if so, returning the report data to the report system.
4. The stored procedure invoking method according to any one of claims 1 to 3, wherein the data request message further comprises a user account;
when the data request message sent by the report system is acquired, the data request message is analyzed, and then the method further comprises the following steps:
acquiring the user account;
checking whether the user account has processing authority or not based on a preset authorization table;
if yes, acquiring request parameters from the data request message;
if not, generating an unauthorized prompt message, and sending the unauthorized prompt message to the report system.
5. A calling device for a stored procedure, the calling device comprising:
the system comprises a creating module, a storing module and a processing module, wherein the creating module is used for creating a report response function in an Oracle database, the report response function is used for responding a call request of a report system to call a storage process in the Oracle database, and the report system is a Pentaho report system;
the acquisition module is used for analyzing the data request message and acquiring request parameters when the data request message sent by the report system is acquired;
the starting module is used for transmitting the request parameters into the report response function, starting a storage process corresponding to the request parameters by the report response function, and realizing the function of scheduling the storage process in the Oracle database on the Pentaho report layer;
the execution module is used for executing the storage process to process the data in the Oracle database, and reading the processed data to respond to the data request of the report system;
the execution module comprises:
the processing unit is used for executing the storage process so as to process the data in the Oracle database;
the first acquisition unit is used for acquiring a master table to be read from an Oracle database according to the request parameter;
the first generation unit is used for reading target data from the main table, writing the read target data into a secondary table and generating report data suitable for the report system;
and the sending unit is used for sending the report data to the report system so that the report system receives and displays the report data.
6. The stored procedure invoking device according to claim 5, wherein the data request message further comprises a user account;
the calling device further comprises:
the verification module is used for acquiring the user account and verifying whether the user account has the processing authority or not based on a preset authorization table;
the obtaining module is further configured to obtain a request parameter from the data request message when the verification result of the verifying module is yes;
and the prompting module is used for generating an unauthorized prompting message and sending the unauthorized prompting message to the report system when the verification result of the verification module is negative.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for invoking a stored procedure of any one of claims 1 to 4.
8. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for invoking a stored procedure according to any one of claims 1 to 4 when executing the computer program.
CN201711431187.0A 2017-12-26 2017-12-26 Method and device for calling storage process, storage medium and terminal Active CN108255967B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711431187.0A CN108255967B (en) 2017-12-26 2017-12-26 Method and device for calling storage process, storage medium and terminal
PCT/CN2018/081037 WO2019127956A1 (en) 2017-12-26 2018-03-29 Calling method and device for storage process, and storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711431187.0A CN108255967B (en) 2017-12-26 2017-12-26 Method and device for calling storage process, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN108255967A CN108255967A (en) 2018-07-06
CN108255967B true CN108255967B (en) 2021-03-02

Family

ID=62723882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711431187.0A Active CN108255967B (en) 2017-12-26 2017-12-26 Method and device for calling storage process, storage medium and terminal

Country Status (2)

Country Link
CN (1) CN108255967B (en)
WO (1) WO2019127956A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992259B (en) * 2019-04-15 2020-10-30 成都四方伟业软件股份有限公司 Function dynamic creating method and device and electronic equipment
CN110968625A (en) * 2019-10-10 2020-04-07 望海康信(北京)科技股份公司 Method and system for interaction between SQLserver database and third-party platform
CN112131846A (en) * 2020-09-07 2020-12-25 北京思特奇信息技术股份有限公司 Method and system for parameter transmission based on mapping relation, electronic device and storage medium
CN113765876B (en) * 2020-11-30 2023-09-26 北京沃东天骏信息技术有限公司 Report processing software access method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8516062B2 (en) * 2010-10-01 2013-08-20 @Pay Ip Holdings Llc Storage, communication, and display of task-related data
CN104461531A (en) * 2014-12-02 2015-03-25 福建工程学院 Implementing method for self-defined functions of reporting system
CN105069134A (en) * 2015-08-18 2015-11-18 上海新炬网络信息技术有限公司 Method for automatically collecting Oracle statistical information
CN106951483A (en) * 2017-03-10 2017-07-14 国网江苏省电力公司电力科学研究院 Based on storing process realize across logic isolate by force and security audit communication means

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588369A (en) * 2004-09-06 2005-03-02 杭州恒生电子股份有限公司 Relation type data base system and its search and report method
CN100580662C (en) * 2007-12-29 2010-01-13 中国建设银行股份有限公司 Heterogeneous report form integration and centralized management device and system
CN105636071A (en) * 2014-11-04 2016-06-01 中兴通讯股份有限公司 System capacity prediction method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8516062B2 (en) * 2010-10-01 2013-08-20 @Pay Ip Holdings Llc Storage, communication, and display of task-related data
CN104461531A (en) * 2014-12-02 2015-03-25 福建工程学院 Implementing method for self-defined functions of reporting system
CN105069134A (en) * 2015-08-18 2015-11-18 上海新炬网络信息技术有限公司 Method for automatically collecting Oracle statistical information
CN106951483A (en) * 2017-03-10 2017-07-14 国网江苏省电力公司电力科学研究院 Based on storing process realize across logic isolate by force and security audit communication means

Also Published As

Publication number Publication date
WO2019127956A1 (en) 2019-07-04
CN108255967A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108268253B (en) Interface code generation method and terminal equipment
CN109344642B (en) Interface rule checking method, device, computer equipment and storage medium
CN109558748B (en) Data processing method and device, electronic equipment and storage medium
CN108255967B (en) Method and device for calling storage process, storage medium and terminal
CN107798038B (en) Data response method and data response equipment
US11210426B2 (en) Tracing objects across different parties
WO2019174124A1 (en) File sharing method based on two-dimensional code, server and terminal device
CN110941630A (en) Database operation and maintenance method, device and system
CN111352935B (en) Index creating method, device and equipment in block chain type account book
US10268477B1 (en) Modeling lifetime of hybrid software application using application manifest
CN108460068B (en) Method, device, storage medium and terminal for importing and exporting report
CN111818175B (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN111784318A (en) Data processing method and device, electronic equipment and storage medium
CN115758459A (en) Data authority management method and device
CN114239026A (en) Information desensitization conversion processing method, device, computer equipment and storage medium
CN112434062A (en) Quasi-real-time data processing method, device, server and storage medium
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN110874216B (en) Complete code generation method, device, equipment and storage medium
CN116541372A (en) Data asset management method and system
CN115658794A (en) Data query method and device, computer equipment and storage medium
CN114237798A (en) Data processing method, device, server and storage medium
CN113641628A (en) Data quality detection method, device, equipment and storage medium
CN115827589A (en) Authority verification method and device, electronic equipment and storage medium
CN113254399A (en) Log query method and device, electronic equipment and medium
CN109471849B (en) Model processing method and device, storage medium and electronic equipment

Legal Events

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