CN111130987A - Automatic acquisition method and device for AWR report, electronic equipment and storage medium - Google Patents

Automatic acquisition method and device for AWR report, electronic equipment and storage medium Download PDF

Info

Publication number
CN111130987A
CN111130987A CN201911060710.2A CN201911060710A CN111130987A CN 111130987 A CN111130987 A CN 111130987A CN 201911060710 A CN201911060710 A CN 201911060710A CN 111130987 A CN111130987 A CN 111130987A
Authority
CN
China
Prior art keywords
report
detected
mail
awr
automatic acquisition
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
CN201911060710.2A
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 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 CN201911060710.2A priority Critical patent/CN111130987A/en
Publication of CN111130987A publication Critical patent/CN111130987A/en
Priority to PCT/CN2020/098235 priority patent/WO2021082484A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • 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/21Design, administration or maintenance of databases
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

An AWR report automatic acquisition method based on data display, a device, electronic equipment and a storage medium are provided, wherein the method comprises the steps of constructing an AWR report automatic acquisition platform; the automatic acquisition platform of the AWR report comprises a front end and a back end; asynchronous data interaction is carried out between the front end and the back end; receiving input characteristic query parameters when a parameter input instruction is detected; setting a target mailbox and monitoring parameters in an AWR report automatic acquisition platform; monitoring the received mails in the target mailbox in real time and identifying the target mails; extracting characteristic query parameters from a target mail; and generating a specified report according to the characteristic query parameters. The automatic acquisition method of the AWR report can trigger the automatic acquisition program by inputting operation or monitoring the content of the specified mailbox so as to acquire the AWR report according to the set parameters, thereby realizing the automatic acquisition of the AWR report, and simultaneously, the asynchronous program is adopted to ensure the effectiveness and the stability of the execution of the program.

Description

Automatic acquisition method and device for AWR report, electronic equipment and storage medium
Technical Field
The invention relates to an automatic acquisition method, an automatic acquisition device, electronic equipment and a storage medium for an AWR report.
Background
The AWR (automatic Workload reporting) is an english abbreviation of an automatic load information base, the AWR report is a performance collection and analysis tool provided by Oracle, and can provide a report of the use condition of the whole system resource in a time period, the whole operation condition of a system can be known through the report, and the generated report comprises a plurality of parts. However, in the prior art, the AWR report needs to obtain corresponding AWR content by manually querying a relevant time period, and then paste the content in an html file to obtain an AWR report, which is cumbersome to operate and time-consuming.
Disclosure of Invention
The invention mainly aims to provide an automatic acquisition method, an automatic acquisition device, electronic equipment and a storage medium for an AWR report, and aims to solve the problems of complex operation and serious time consumption in the prior art.
An AWR report automatic acquisition method comprises the following steps:
when a construction instruction is detected, constructing an AWR report automatic acquisition platform; the AWR report automatic acquisition platform comprises a front end and a back end; asynchronous data interaction is carried out between the front end and the back end;
when a parameter input instruction is detected, receiving input characteristic query parameters; the characteristic query parameters comprise a database instance name, a retrieval time range and a report type;
when a mailbox setting instruction is detected, setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform;
when a monitoring instruction is detected, monitoring the received mails in the target mailbox in real time and identifying the target mails;
when an extracting instruction is detected, extracting a characteristic query parameter from the target mail;
and generating a specified report according to the characteristic query parameters.
Preferably, the target mailbox comprises a plurality of mails; the monitoring parameters comprise identification parameters and specified keywords; the identification parameter is used for identifying whether the source of the mail is a target mail source; the specified keywords are used for identifying whether the content of the mail is the content of the target mail.
Preferably, the mail in the target mailbox has a corresponding reading state identifier; wherein the reading state identification comprises read and unread; the step of monitoring the received mails in the target mailbox in real time and identifying the target mails comprises the following steps:
acquiring a preset number of mails in the target mailbox every other first designated time interval, wherein the reading state identifier is an unread mail;
extracting mails with identification parameters from the acquired mails to be used as mails to be detected;
judging whether the content of the mail to be detected has a specified keyword or not;
when the mail to be detected has the designated keyword, identifying the mail to be detected as a target mail;
when the content of the mail to be detected does not have the designated keyword, identifying the mail to be detected as a common mail;
and identifying the read state of the detected mail to be detected as read.
Preferably, the step of generating a specific report according to the characteristic query parameter comprises:
acquiring corresponding data information according to the characteristic query parameters to form the specified report;
acquiring the generation progress of the specified report every second specified period;
judging whether the generation progress is equal to a preset value or not;
and when the generation progress is equal to the preset value, displaying the preset parameters of the specified report at the front end.
Preferably, the method for automatically acquiring an AWR report further includes:
and when a storage instruction is detected, storing the characteristic query parameters and the corresponding specified reports as historical characteristic query parameters and historical specified reports in a memory.
Preferably, before the step of generating the specified report according to the characteristic query parameter, the method further comprises:
when a comparison instruction is detected, judging whether the extracted characteristic query parameters exist in the historical characteristic query parameters or not;
and when the extracted characteristic query parameters exist in the historical characteristic parameters, extracting the specified report corresponding to the characteristic query parameters from historical specified reports according to the characteristic query parameters.
Preferably, the front end is composed of reach and Ajax; the React is used for constructing a user interface; the Ajax is used for carrying out asynchronous data interaction with the back end; and the back end adopts Django and Celery to form a distributed task queue frame so as to realize asynchronous processing of data.
Further, in order to achieve the above object, the present invention also proposes an AWR report automatic acquisition apparatus comprising:
the automatic AWR report acquisition device comprises:
the building module is used for building an AWR report automatic acquisition platform when a building instruction is detected; the AWR report automatic acquisition platform comprises a front end and a back end; asynchronous data interaction is carried out between the front end and the back end;
the input module is used for receiving input characteristic query parameters when a parameter input instruction is detected; the characteristic query parameters comprise a database instance name, a retrieval time range and a report type;
the setting module is used for setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform when a mailbox setting instruction is detected;
the monitoring module is used for monitoring the received mails in the target mailbox in real time and identifying the target mails when the monitoring instruction is detected;
the extraction module is used for extracting the characteristic query parameters from the target mail when an extraction instruction is detected;
and the report generating module is used for generating a specified report according to the characteristic query parameters.
Furthermore, in order to achieve the above object, the present invention further provides an electronic device, which includes a processor and a memory, wherein the processor is configured to execute the following steps when executing the computer program stored in the memory:
when a construction instruction is detected, constructing an AWR report automatic acquisition platform; the AWR report automatic acquisition platform comprises a front end and a back end; asynchronous data interaction is carried out between the front end and the back end;
when a parameter input instruction is detected, receiving input characteristic query parameters; wherein the characteristic query parameters may include a database instance name, a retrieval time range, and a report type;
when a mailbox setting instruction is detected, setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform;
when a monitoring instruction is detected, monitoring the received mails in the target mailbox in real time and identifying the target mails;
when an extracting instruction is detected, extracting the characteristic query parameters from the target mail;
and generating a specified report according to the characteristic query parameters.
In addition, in order to achieve the above object, the present invention further provides a storage medium, which is a computer-readable storage medium and stores at least one instruction, and when the at least one instruction is executed by a processor, the at least one instruction implements the following steps:
when a construction instruction is detected, constructing an AWR report automatic acquisition platform; the AWR report automatic acquisition platform comprises a front end and a back end; asynchronous data interaction is carried out between the front end and the back end;
when a parameter input instruction is detected, receiving input characteristic query parameters; the characteristic query parameters comprise a database instance name, a retrieval time range and a report type;
when a mailbox setting instruction is detected, setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform;
when a monitoring instruction is detected, monitoring the received mails in the target mailbox in real time and identifying the target mails;
when an extracting instruction is detected, extracting the characteristic query parameters from the target mail;
and generating a specified report according to the characteristic query parameters.
According to the automatic acquisition method, the device, the electronic equipment and the storage medium for the AWR report, the automatic acquisition program is triggered by inputting operation or monitoring the content of the specified mailbox so as to acquire the AWR report according to the set parameters, the automatic acquisition of the AWR report is realized, and meanwhile, the effectiveness and the stability of program execution are ensured by adopting an asynchronous program.
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 embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic diagram of an automatic acquisition method of an AWR report of the present invention.
Fig. 2 is a detailed flowchart of step S13 in fig. 1.
Fig. 3 is a detailed flowchart of step S17 in fig. 1.
Fig. 4 is a functional block diagram of an automatic AWR report acquisition apparatus according to the present invention.
Fig. 5 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
Description of the main elements
Automatic AWR report acquisition device 1
Building block 10
Input module 20
Setup module 30
Monitoring module 40
Extraction module 50
Comparison module 60
Report generating module 70
Memory 102
Communication bus 104
Processor 106
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and "third," etc. in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
The following describes a specific embodiment of the automatic AWR report acquisition method according to the present invention with reference to the accompanying drawings.
In at least one embodiment of the present invention, the method for automatically acquiring an AWR report is applied to an AWR report automatic acquisition system formed by at least one mobile terminal and a server. The automatic acquisition system for the AWR report provides a visual interface. The visual interface is used for providing a human-computer interaction interface for a user, and the user can be connected to the AWR report automatic acquisition system through terminal equipment such as a mobile phone or a computer. And data transmission is carried out between the terminal equipment and the server according to a preset protocol. Preferably, the preset protocol includes, but is not limited to, any one of the following: an HTTP Protocol (Hyper Text Transfer Protocol), an HTTPs Protocol (Hyper Text Transfer Protocol over secure Socket Layer), and the like. In at least one embodiment of the present invention, the server may be a single server, or may be a server cluster composed of several functional servers. The terminal device may be any terminal having a network connection function, for example, the terminal device may be a mobile device such as a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive web Television (IPTV), an intelligent wearable device, a navigation device, or the like, or a fixed device such as a desktop computer, a Digital TV, or the like. The AWR report automatic acquisition system has a data store (as shown in fig. 5). The data store may be used to store data processing code and specified reports. The automatic AWR report acquisition method is used for automatically acquiring the AWR report according to the user requirement.
And S10, when the building instruction is detected, building an AWR report automatic acquisition platform.
In at least one embodiment of the present invention, the AWR report automatic acquisition platform comprises a front end and a back end. The front end consists of React and Ajax. And the React is a view layer framework used for constructing a user interface. Ajax is asynchronous JavaScript and XML and is used for carrying out asynchronous data interaction with the back end. And the back end adopts Django and Celery to form a distributed task queue frame so as to realize asynchronous processing of data. Django is an open-source web development framework written by python language and follows MVC design, and the core idea of MVC is division of labor and decoupling, so that coupling among different code blocks is reduced, expandability and portability of codes are enhanced, and backward compatibility is realized. Celery is a distributed asynchronous message task queue developed based on Python. And the Celery adopts Redis as a task scheduling queue. The automatic AWR report acquisition platform may be Chatops, and interaction between the front end and the back end is achieved through man-machine conversation.
S11, when the parameter input command is detected, the input characteristic query parameter is received.
In at least one embodiment of the invention, the characteristic query parameters may include a database instance name, a database type, a query time range, and a report type. Wherein the report types include automatic load library (AWR) reports, DIFF AWR reports, and periodic reports.
And S12, setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform when a mailbox setting instruction is detected.
In at least one embodiment of the invention, the target mailbox comprises a plurality of mails. The monitoring parameters comprise identification parameters and specified keywords. The identification parameter is used for identifying whether the source of the mail is a target mail source. The specified keywords are used for identifying whether the content of the mail is the content of the target mail. The identification parameter is from hidba. The specified keywords are words of AWR, Oracle, report, etc., but are not limited thereto.
And S13, when the monitoring instruction is detected, monitoring the received mails in the target mailbox in real time and identifying the target mails.
In at least one embodiment of the present invention, the real-time monitoring is implemented by executing exchannelib in the background. In at least one embodiment of the present invention, the mail in the target mailbox has a corresponding reading status identifier. Wherein, the reading state identification comprises read and unread.
Referring to fig. 2, in at least one embodiment of the present invention, the step of monitoring the received mails in the target mailbox in real time and identifying the target mail may further include:
s131, acquiring a preset number of mails in the target mailbox every other first designated time interval, wherein the reading state identifier is an unread mail;
s132, extracting the mail with the identification parameters from the acquired mails to be used as the mail to be detected;
s133, judging whether the mail to be detected has the specified keywords;
s134, when the content of the mail to be detected has the designated key words, identifying the mail to be detected as a target mail;
s135, when the content of the mail to be detected does not have the specified keywords, identifying the mail to be detected as a common mail;
s136, identifying the reading state of the detected mail to be detected as read.
In at least one embodiment of the present invention, the predetermined number is 20 mails, and the first specified period of time is 15 seconds. In other embodiments, the predetermined number and the first designated period may be adjusted according to the performance of the processor and the requirements of the user, but are not limited thereto.
And S14, when an extraction instruction is detected, extracting the characteristic query parameters from the target mail.
And S15, when a comparison instruction is detected, judging whether the extracted characteristic query parameter exists in the historical characteristic parameters.
And S16, when the extracted feature query parameters exist in the historical feature query parameters, acquiring the corresponding specified report from a memory according to the feature query parameters.
If the extracted feature query parameter does not exist in the historical feature query parameters, the process proceeds to step S17.
And S17, generating a designated report according to the characteristic query parameters when the acquisition instruction is detected.
In at least one embodiment of the invention, the specified report is obtained by executing SQL statements according to the specified query parameters.
Referring to fig. 3, in this embodiment, the step of generating the specific report according to the characteristic query parameter may further include:
s171, acquiring corresponding data information according to the characteristic query parameters to form the specified report;
s172, acquiring the generation progress of the specified report at intervals of a second specified period;
s173, judging whether the generation progress is equal to a preset value or not;
s174, when the generating progress is equal to the preset numerical value, showing preset parameters of the specified report at the front end;
and returning to the step S172 when the generation progress is smaller than the preset value.
In at least one embodiment of the present invention, the predetermined value is a maximum value of the generation progress, so there is no possibility that the generation progress is larger than the predetermined value.
In at least one embodiment of the invention, the predetermined parameters include a name, a generation time, and an execution time of the specified report. The first specified period of time is 5 seconds. The predetermined value is 100. In other embodiments, the predetermined value may also be 1, or the total number of bytes of the data information corresponding to the specified report.
And S18, when a storage instruction is detected, storing the characteristic query parameters and the corresponding specified reports as historical characteristic query parameters and historical specified reports in a memory.
In at least one embodiment of the invention, the storing act is performed by executing a specified SQL statement. The specified storage statement may be PostgreSQL. In other embodiments, the specified storage statements may also include, but are not limited to, RabbitMQ, Redis, MongoDB, SQLAlchemy, Memcached, and the like.
In at least one embodiment of the present invention, the test instruction may be a data request instruction received by the terminal device. The input device may include a keyboard, a touch screen, etc., but the user input manner in the example embodiment of the present disclosure is not limited thereto. Can be generated for the user through specific operations on the visual interface. Specifically, the user's operations include, but are not limited to: sliding operation, clicking operation (such as single clicking operation, double clicking operation, etc.). Specifically, the preset key may be an entity key on the terminal device, or may be a virtual key on the terminal device (for example, the virtual key may be a virtual icon on a display of the terminal device, etc.), and the present invention is not limited herein.
By adopting the automatic acquisition method of the AWR report with the structure, the automatic acquisition program is triggered by inputting operation or monitoring the content of the specified mailbox so as to acquire the AWR report according to the set parameters, thereby realizing the automatic acquisition of the AWR report, and simultaneously, the effectiveness and the stability of the execution of the program are ensured by adopting an asynchronous program.
Referring to fig. 4, the present invention provides an automatic AWR report acquiring apparatus 1, which is applied to one or more devices. In at least one embodiment of the present invention, the AWR report automatic acquisition apparatus 1 is applied to an AWR report automatic acquisition system composed of at least one mobile terminal and a server. And data transmission is carried out between the terminal equipment and the server according to a preset protocol.
In one embodiment of the present invention, the AWR report automatic acquisition apparatus 1 includes:
and the building module 10 is used for building an AWR report automatic acquisition platform when a building instruction is detected.
In at least one embodiment of the present invention, the AWR report automatic acquisition platform comprises a front end and a back end. The front end consists of React and Ajax. And the React is a view layer framework used for constructing a user interface. Ajax is asynchronous JavaScript and XML and is used for carrying out asynchronous data interaction with the back end. And the back end adopts Django and Celery to form a distributed task queue frame so as to realize asynchronous processing of data. Django is an open-source web development framework written by python language and follows MVC design, and the core idea of MVC is division of labor and decoupling, so that coupling among different code blocks is reduced, expandability and portability of codes are enhanced, and backward compatibility is realized. Celery is a distributed asynchronous message task queue developed based on Python. And the Celery adopts Redis as a task scheduling queue. The automatic AWR report acquisition platform may be Chatops, and interaction between the front end and the back end is achieved through man-machine conversation.
The input module 20 is configured to receive an input feature query parameter when a parameter input command is detected.
In at least one embodiment of the invention, the characteristic query parameters may include a database instance name, a database type, a query time range, and a report type. Wherein the report types include automatic load library (AWR) reports, DIFF AWR reports, and periodic reports.
And the setting module 30 is configured to set a target mailbox and monitoring parameters in the AWR report automatic acquisition platform when a mailbox setting instruction is detected.
In at least one embodiment of the invention, the target mailbox comprises a plurality of mails. The monitoring parameters comprise identification parameters and specified keywords. The identification parameter is used for identifying whether the source of the mail is a target mail source. The specified keywords are used for identifying whether the content of the mail is the content of the target mail. The identification parameter is from hidba. The specified keywords are words of AWR, Oracle, report, etc., but are not limited thereto.
And the monitoring module 40 is used for monitoring the received mails in the target mailbox in real time and identifying the target mails when the monitoring instruction is detected.
In at least one embodiment of the present invention, the real-time monitoring is implemented by executing exchannelib in the background. In at least one embodiment of the present invention, the mail in the target mailbox has a corresponding reading status identifier. Wherein, the reading state identification comprises read and unread.
The monitoring module 40 further acquires a predetermined number of mails in the target mailbox every first designated time interval, the reading status identifier of which is unread, and extracts mails with identification parameters from the acquired mails to be used as the mails to be detected. The monitoring module 40 further determines whether the mail to be detected has the specified keyword. When the content of the mail to be detected has the designated keyword, the monitoring module 40 further identifies the mail to be detected as the target mail. When the content of the mail to be detected does not have the designated keyword, the monitoring module 40 further identifies that the mail to be detected is a normal mail. The monitoring module 40 further identifies the reading status of the detected mail to be detected as read.
In at least one embodiment of the present invention, the predetermined number is 20 mails, and the first specified period of time is 15 seconds. In other embodiments, the predetermined number and the first designated period may be adjusted according to the performance of the processor and the requirements of the user, but are not limited thereto.
An extracting module 50, configured to extract the feature query parameter from the target email when an extracting instruction is detected.
The comparing module 60 is configured to determine whether the characteristic query parameter exists in the historical characteristic parameters when the comparison instruction is detected.
When the historical characteristic query parameters comprise the characteristic query parameters, the comparison module further acquires the corresponding specified report from a memory according to the characteristic query parameters.
And a report generating module 70, configured to generate a specified report according to the feature query parameter when the acquisition instruction is detected.
In at least one embodiment of the invention, the specified report is obtained by executing SQL statements according to the specified query parameters.
The report generating module 70 further obtains corresponding data information according to the characteristic query parameter to form the specified report. The report generating module 70 further acquires a generation progress of the designated report every second designated period and determines whether the generation progress is equal to a predetermined value. When the generation progress is equal to the predetermined value, the report generation module 70 further displays the predetermined parameters of the specified report at the front end.
In at least one embodiment of the present invention, the predetermined value is a maximum value of the generation progress, so there is no possibility that the generation progress is larger than the predetermined value.
In at least one embodiment of the invention, the predetermined parameters include a name, a generation time, and an execution time of the specified report. The first specified time is 5 seconds. The predetermined value is 100. In other embodiments, the predetermined value may also be 1, or the total number of bytes of the data information corresponding to the specified report.
The report generation module 70 further stores the feature query parameter and the corresponding designated report as a historical feature query parameter and a historical designated report in a memory when a storage instruction is detected.
In at least one embodiment of the invention, the storing act is performed by executing a specified SQL statement. The specified storage statement may be PostgreSQL. In other embodiments, the specified storage statements may also include, but are not limited to, RabbitMQ, Redis, MongoDB, SQLAlchemy, Memcached, and the like.
The automatic AWR report acquisition device adopting the structure triggers an automatic acquisition program through input operation or monitoring the content of the specified mailbox so as to acquire the AWR report according to the set parameters, thereby realizing the automatic acquisition of the AWR report, and simultaneously, the asynchronous program is adopted to ensure the effectiveness and the stability of the execution of the program.
Please refer to fig. 5, which is a storage medium according to an embodiment of the present invention. The storage medium is a computer-readable storage medium. The computer readable storage medium has stored thereon computer instructions. The computer instructions may be stored on the memory 102 and when executed by the one or more processors 106, implement the AWR report auto-acquisition method as described above in the method embodiments.
The memory 102 is used to store program code. The memory 102 may be a circuit without a physical form having a storage function in an integrated circuit, or the memory 102 may also be a memory with a physical form, such as a memory bank, a TF Card (Trans-flash Card), a smart media Card (smart media Card), a secure digital Card (secure Card), a flash memory Card (flash Card), and other storage devices. The memory 102 may be in data communication with the processor 106 via a communication bus 104. The memory 102 may include an operating system, a network communication module, and an AWR report auto-acquisition program. The operating system is a program that manages and controls the hardware and software resources of the electronic device, supporting the operation of the AWR report auto-acquisition program, as well as other software and/or programs. The network communication module is used for realizing communication among components in the memory 102 and other hardware and software in the AWR report automatic acquisition device.
The processor 106 may include one or more microprocessors, digital processors. The processor 106 may call program code stored in the memory 102 to perform the associated functions. For example, the various modules depicted in fig. 4 are program code stored in the memory 102 and executed by the processor 106 to implement an AWR report auto-acquisition method. The processor 106 is also called a Central Processing Unit (CPU), and is an ultra-large scale integrated circuit, which is an operation Core (Core) and a Control Core (Control Unit).
The processor 106 is configured to execute a plurality of computer instructions stored in the memory 102 to implement an AWR report auto-acquisition method, the processor 106 is configured to execute the plurality of instructions to implement the steps of:
and S10, when the building instruction is detected, building an AWR report automatic acquisition platform.
In at least one embodiment of the present invention, the AWR report automatic acquisition platform comprises a front end and a back end. The front end consists of React and Ajax. And the React is a view layer framework used for constructing a user interface. Ajax is asynchronous JavaScript and XML and is used for carrying out asynchronous data interaction with the back end. And the back end adopts Django and Celery to form a distributed task queue frame so as to realize asynchronous processing of data. Django is an open-source web development framework written by python language and follows MVC design, and the core idea of MVC is division of labor and decoupling, so that coupling among different code blocks is reduced, expandability and portability of codes are enhanced, and backward compatibility is realized. Celery is a distributed asynchronous message task queue developed based on Python. And the Celery adopts Redis as a task scheduling queue. The automatic AWR report acquisition platform may be Chatops, and interaction between the front end and the back end is achieved through man-machine conversation.
S11, when the parameter input command is detected, the input characteristic query parameter is received.
In at least one embodiment of the invention, the characteristic query parameters may include a database instance name, a database type, a query time range, and a report type. Wherein the report types include automatic load library (AWR) reports, DIFF AWR reports, and periodic reports.
And S12, setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform when a mailbox setting instruction is detected.
In at least one embodiment of the invention, the target mailbox comprises a plurality of mails. The monitoring parameters comprise identification parameters and specified keywords. The identification parameter is used for identifying whether the source of the mail is a target mail source. The specified keywords are used for identifying whether the content of the mail is the content of the target mail. The identification parameter is from hidba. The specified keywords are words of AWR, Oracle, report, etc., but are not limited thereto.
And S13, when the monitoring instruction is detected, monitoring the received mails in the target mailbox in real time and identifying the target mails.
In at least one embodiment of the present invention, the real-time monitoring is implemented by executing exchannelib in the background. In at least one embodiment of the present invention, the mail in the target mailbox has a corresponding reading status identifier. Wherein, the reading state identification comprises read and unread.
In at least one embodiment of the present invention, the step of monitoring the received mails in the target mailbox in real time and identifying the target mail may further include:
s131, acquiring a preset number of mails in the target mailbox every other first designated time interval, wherein the reading state identifier is an unread mail;
s132, extracting the mail with the identification parameters from the acquired mails to be used as the mail to be detected;
s133, judging whether the mail to be detected has the specified keywords;
s134, when the content of the mail to be detected has the designated key words, identifying the mail to be detected as a target mail;
s135, when the content of the mail to be detected does not have the specified keywords, identifying the mail to be detected as a common mail;
s136, identifying the reading state of the detected mail to be detected as read.
In at least one embodiment of the present invention, the predetermined number is 20 mails, and the first specified period of time is 15 seconds. In other embodiments, the predetermined number and the designated time period may be adjusted according to the performance of the processor and the requirements of the user, but are not limited thereto.
And S14, when an extraction instruction is detected, extracting the characteristic query parameters from the target mail.
And S15, when a comparison instruction is detected, judging whether the extracted characteristic query parameter exists in the historical characteristic parameters.
And S16, when the extracted feature query parameters exist in the historical feature query parameters, acquiring the corresponding specified report from a memory according to the feature query parameters.
If the extracted feature query parameter does not exist in the historical feature query parameters, the process proceeds to step S17.
And S17, generating a designated report according to the characteristic query parameters when the acquisition instruction is detected.
In at least one embodiment of the invention, the specified report is obtained by executing SQL statements according to the specified query parameters.
In this embodiment, the step of generating the specific report according to the characteristic query parameter may further include:
s171, acquiring corresponding data information according to the characteristic query parameters to form the specified report;
s172, acquiring the generation progress of the specified report at intervals of a second specified period;
s173, judging whether the generation progress is equal to a preset value or not;
s174, when the generating progress is equal to the preset numerical value, showing preset parameters of the specified report at the front end;
and returning to the step S172 when the generation progress is smaller than the preset value.
In at least one embodiment of the present invention, the predetermined value is a maximum value of the generation progress, so there is no possibility that the generation progress is larger than the predetermined value.
In at least one embodiment of the invention, the predetermined parameters include a name, a generation time, and an execution time of the specified report. The first specified period of time is 5 seconds. The predetermined value is 100. In other embodiments, the predetermined value may also be 1, or the total number of bytes of the data information corresponding to the specified report.
And S18, when a storage instruction is detected, storing the characteristic query parameters and the corresponding specified reports as historical characteristic query parameters and historical specified reports in a memory.
In at least one embodiment of the invention, the storing act is performed by executing a specified SQL statement. The specified storage statement may be PostgreSQL. In other embodiments, the specified storage statements may also include, but are not limited to, RabbitMQ, Redis, MongoDB, SQLAlchemy, Memcached, and the like.
According to the embodiment, the automatic acquisition method of the AWR report triggers the automatic acquisition program through input operation or monitoring the content of the specified mailbox to acquire the AWR report according to the set parameters, so that the automatic acquisition of the AWR report is realized, and the effectiveness and the stability of program execution are ensured by adopting the asynchronous program.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some interfaces, and may be in an electrical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. 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 processor, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
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; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An automatic acquisition method for an AWR report, the automatic acquisition method for the AWR report comprising:
when a construction instruction is detected, constructing an AWR report automatic acquisition platform; the AWR report automatic acquisition platform comprises a front end and a back end; asynchronous data interaction is carried out between the front end and the back end;
receiving input characteristic query parameters when a parameter input instruction is detected; the characteristic query parameters comprise a database instance name, a retrieval time range and a report type;
when a mailbox setting instruction is detected, setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform;
when a monitoring instruction is detected, monitoring the received mails in the target mailbox in real time and identifying the target mails;
when an extracting instruction is detected, extracting the characteristic query parameters from the target mail;
and generating a specified report according to the characteristic query parameters.
2. The AWR report automatic acquisition method of claim 1 wherein multiple packages of mail are included in the target mailbox; the monitoring parameters comprise identification parameters and specified keywords; the identification parameter is used for identifying whether the source of the mail is a target mail source; the specified keywords are used for identifying whether the content of the mail is the content of the target mail.
3. The AWR report auto-acquisition method of claim 2, wherein the mail in the target mailbox has a corresponding reading status flag; wherein the reading state identification comprises read and unread; the step of monitoring the received mails in the target mailbox in real time and identifying the target mails comprises the following steps:
acquiring a preset number of mails in the target mailbox every other first designated time interval, wherein the reading state identifier is an unread mail;
extracting mails with identification parameters from the acquired mails to be used as mails to be detected;
judging whether the mail to be detected has the specified keywords;
when the content of the mail to be detected has the designated keyword, identifying the mail to be detected as a target mail;
when the content of the mail to be detected does not have the designated keyword, identifying the mail to be detected as a common mail;
and identifying the read state of the detected mail to be detected as read.
4. The AWR report automatic acquisition method of claim 1, wherein the step of generating a specified report according to the characteristic query parameters comprises:
acquiring corresponding data information according to the characteristic query parameters to form the specified report;
acquiring the generation progress of the specified report every second specified period;
judging whether the generation progress is equal to a preset value or not;
and when the generation progress is equal to the preset value, displaying the preset parameters of the specified report at the front end.
5. The AWR report auto-acquisition method of claim 1 further comprising:
and when a storage instruction is detected, storing the characteristic query parameters and the corresponding specified reports as historical characteristic query parameters and historical specified reports to a memory.
6. The AWR report automatic acquisition method of claim 1 further comprising, prior to the step of generating a specified report in accordance with characteristic query parameters:
when a comparison instruction is detected, judging whether the extracted characteristic query parameters exist in the historical characteristic query parameters or not;
and when the extracted characteristic query parameters exist in the historical characteristic parameters, extracting the specified report corresponding to the characteristic query parameters from historical specified reports according to the characteristic query parameters.
7. The AWR report automatic acquisition method of any of claims 1 to 5, characterized in that the front-end is composed of React and Ajax; the React is used for constructing a user interface; the Ajax is used for carrying out asynchronous data interaction with the back end; and the back end adopts Django and Celery to form a distributed task queue frame so as to realize asynchronous processing of data.
8. An AWR report automatic acquisition apparatus, comprising:
the building module is used for building an AWR report automatic acquisition platform when a building instruction is detected; the AWR report automatic acquisition platform comprises a front end and a back end; asynchronous data interaction is carried out between the front end and the back end;
the input module is used for receiving input characteristic query parameters when a parameter input instruction is detected; wherein the characteristic query parameters may include a database instance name, a retrieval time range, and a report type;
the setting module is used for setting a target mailbox and monitoring parameters in the AWR report automatic acquisition platform when a mailbox setting instruction is detected;
the monitoring module is used for monitoring the received mails in the target mailbox in real time and identifying the target mails when the monitoring instruction is detected;
the extraction module is used for extracting the characteristic query parameters from the target mail when an extraction instruction is detected;
and the report generating module is used for generating a specified report according to the characteristic query parameters.
9. An electronic device, comprising a processor and a memory, wherein the processor is configured to implement the AWR report automatic acquisition method of any one of claims 1 to 7 when executing a computer program stored in the memory.
10. A storage medium, characterized in that it is a computer-readable storage medium, storing at least one instruction which, when executed by a processor, implements the AWR report automatic acquisition method according to any of claims 1 to 7.
CN201911060710.2A 2019-11-01 2019-11-01 Automatic acquisition method and device for AWR report, electronic equipment and storage medium Pending CN111130987A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911060710.2A CN111130987A (en) 2019-11-01 2019-11-01 Automatic acquisition method and device for AWR report, electronic equipment and storage medium
PCT/CN2020/098235 WO2021082484A1 (en) 2019-11-01 2020-06-24 Awr report automatic acquisition method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911060710.2A CN111130987A (en) 2019-11-01 2019-11-01 Automatic acquisition method and device for AWR report, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111130987A true CN111130987A (en) 2020-05-08

Family

ID=70495640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911060710.2A Pending CN111130987A (en) 2019-11-01 2019-11-01 Automatic acquisition method and device for AWR report, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111130987A (en)
WO (1) WO2021082484A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021082484A1 (en) * 2019-11-01 2021-05-06 平安科技(深圳)有限公司 Awr report automatic acquisition method and apparatus, electronic device, and storage medium
CN114742033A (en) * 2022-06-10 2022-07-12 武汉四通信息服务有限公司 Data analysis method and device, storage medium and electronic equipment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113701811B (en) * 2021-08-23 2024-03-15 立讯电子科技(昆山)有限公司 Design automatic test method, platform, storage medium and electronic equipment
WO2023115278A1 (en) * 2021-12-20 2023-06-29 深圳晶泰科技有限公司 Task data processing method, system and apparatus
CN115480995B (en) * 2022-11-01 2023-02-28 杭州沃趣科技股份有限公司 Database inspection method, device, equipment and medium
CN117307418B (en) * 2023-11-13 2024-03-22 北京通泰恒盛科技有限责任公司 Inertial navigation-based fan blade attitude monitoring method, system and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170041270A1 (en) * 2015-08-06 2017-02-09 Sap Se Email-initiated report service
CN107506276A (en) * 2017-06-26 2017-12-22 杭州沃趣科技股份有限公司 A kind of method for realizing batch collection Oracle AWR reports
CN107656858A (en) * 2016-07-26 2018-02-02 深圳联友科技有限公司 A kind of method and system of automatic O&M monitoring oracle database
CN108363761A (en) * 2018-02-02 2018-08-03 深圳市华讯方舟软件信息有限公司 Hadoop awr automatic loads analyze information bank, analysis method and storage medium
CN109815081A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 The long range acquisition method and collection device of database performance

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541885A (en) * 2010-12-10 2012-07-04 中国移动通信集团浙江有限公司 Method and device for detecting database blockage
US20130097119A1 (en) * 2011-10-17 2013-04-18 Lei ZENG Method for Analyzing Performance Data for a Database
CN111130987A (en) * 2019-11-01 2020-05-08 平安科技(深圳)有限公司 Automatic acquisition method and device for AWR report, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170041270A1 (en) * 2015-08-06 2017-02-09 Sap Se Email-initiated report service
CN107656858A (en) * 2016-07-26 2018-02-02 深圳联友科技有限公司 A kind of method and system of automatic O&M monitoring oracle database
CN107506276A (en) * 2017-06-26 2017-12-22 杭州沃趣科技股份有限公司 A kind of method for realizing batch collection Oracle AWR reports
CN108363761A (en) * 2018-02-02 2018-08-03 深圳市华讯方舟软件信息有限公司 Hadoop awr automatic loads analyze information bank, analysis method and storage medium
CN109815081A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 The long range acquisition method and collection device of database performance

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021082484A1 (en) * 2019-11-01 2021-05-06 平安科技(深圳)有限公司 Awr report automatic acquisition method and apparatus, electronic device, and storage medium
CN114742033A (en) * 2022-06-10 2022-07-12 武汉四通信息服务有限公司 Data analysis method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
WO2021082484A1 (en) 2021-05-06

Similar Documents

Publication Publication Date Title
CN111130987A (en) Automatic acquisition method and device for AWR report, electronic equipment and storage medium
CN107491488B (en) Page data acquisition method and device
EP3916630A1 (en) Method and apparatus for identifying video
CN107390983B (en) Service instruction execution method, client and storage medium
CN112394908A (en) Method and device for automatically generating embedded point page, computer equipment and storage medium
WO2014154033A1 (en) Method and apparatus for extracting web page content
CN106886594B (en) Method and device for displaying information
CN111651318A (en) Prometheus-based interface monitoring method and device, computer equipment and storage medium
CN109491733B (en) Interface display method based on visualization and related equipment
US20230269304A1 (en) Method and apparatus for processing notification trigger message
CN108062401B (en) Application recommendation method and device and storage medium
CN113595886A (en) Instant messaging message processing method and device, electronic equipment and storage medium
CN111581518A (en) Information pushing method and device
CN111459792A (en) WEB front-end performance monitoring method and device, electronic equipment and storage medium
CN109684156B (en) Monitoring method, device, terminal and storage medium based on mixed mode application
CN114816389B (en) Management system building method, device, equipment and medium based on meta-model
CN111435326A (en) Method and device for analyzing crash logs
CN107908629B (en) Information query method, terminal and equipment
EP3832985A1 (en) Method and apparatus for processing local hot spot, electronic device and storage medium
CN113742501A (en) Information extraction method, device, equipment and medium
CN114265777A (en) Application program testing method and device, electronic equipment and storage medium
CN110045961B (en) Management method and management platform of business rules
CN113448985A (en) API (application program interface) interface generation method, calling method and device and electronic equipment
CN112947918A (en) Data display method and device
CN111124841A (en) Abnormal page alarming method and device and computer system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication