CN111782208A - Index early warning method and device, computer equipment and storage medium - Google Patents

Index early warning method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111782208A
CN111782208A CN202010611647.3A CN202010611647A CN111782208A CN 111782208 A CN111782208 A CN 111782208A CN 202010611647 A CN202010611647 A CN 202010611647A CN 111782208 A CN111782208 A CN 111782208A
Authority
CN
China
Prior art keywords
early warning
index
rule
information
data processing
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
CN202010611647.3A
Other languages
Chinese (zh)
Inventor
叶俊孟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010611647.3A priority Critical patent/CN111782208A/en
Publication of CN111782208A publication Critical patent/CN111782208A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The scheme relates to rack operation and maintenance, in particular to an index early warning method, an index early warning device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring index early warning configuration information input in an index early warning configuration page of a terminal; the index early warning configuration information comprises index information, early warning rule information and early warning standard information; inquiring a rule template statement corresponding to an early warning rule in the early warning rule information; updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code; packaging the early warning rule codes according to an early warning strategy in the early warning rule information to obtain an early warning rule engine; and operating an early warning rule engine to obtain index early warning information. The present disclosure also relates to blockchain techniques, wherein the indicator warning information can be stored in the blockchain. According to the method and the device, early warning codes do not need to be written every time, and corresponding rule template sentences can be called for early warning only by inputting index early warning configuration information, so that the early warning efficiency is improved.

Description

Index early warning method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to rack operation and maintenance, and in particular, to an index early warning method, an index early warning device, a computer device, and a storage medium.
Background
The early warning system is used for monitoring various indexes, and early warning is carried out when the monitored indexes are abnormal. Existing warning systems typically rely on commonly available commercial rule engines that accept data input and make decisions based on written business rules.
However, the existing rule engine needs to write codes according to the early warning requirement before being used, so that technical knowledge training is needed for business personnel and operators who use the rule engine. When the early warning requirements are various and complex, the development and modification processes of the early warning system are complex, and the early warning efficiency is low.
Disclosure of Invention
The embodiment of the application aims to provide an index early warning method, an index early warning device, computer equipment and a storage medium, so as to solve the problem of low early warning efficiency.
In order to solve the above technical problem, an embodiment of the present application provides an index early warning method, which adopts the following technical scheme:
acquiring index early warning configuration information input in an index early warning configuration page of a terminal; the index early warning configuration information comprises index information, early warning rule information and early warning standard information;
inquiring a rule template statement corresponding to an early warning rule in the early warning rule information;
updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code;
packaging the early warning rule codes according to an early warning strategy in the early warning rule information to obtain an early warning rule engine;
and operating the early warning rule engine to obtain index early warning information.
Further, before the step of acquiring the index early warning configuration information entered in the index early warning configuration page of the terminal, the method further includes:
acquiring a rule template statement input in an extended page of a terminal;
adding the obtained rule template statement into a rule template library;
and adding an early warning rule associated with the rule template statement in an index early warning configuration page.
Further, the step of acquiring the index early warning configuration information entered in the index early warning configuration page of the terminal specifically includes:
when an index early warning configuration instruction sent by a terminal is received, displaying an index early warning configuration page through the terminal;
and acquiring clicking or inputting operation in the index early warning configuration page through the terminal to obtain index early warning configuration information.
Further, the acquiring of the early warning rule information includes:
acquiring at least one early warning rule input in the index early warning configuration page;
acquiring an early warning strategy corresponding to an early warning rule input in the index early warning configuration page;
and generating early warning rule information according to the early warning strategy and the early warning rule.
Further, the step of updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code specifically includes:
identifying an alternative variable in the rule template statement;
and updating the identified replaceable variables according to the index information and the early warning standard information to obtain early warning rule codes.
Further, the index early warning information is stored in a block chain, and the step of operating the early warning rule engine to obtain the index early warning information specifically includes:
operating early warning rule codes in the early warning rule engine according to the early warning strategy;
when the early warning rule code is operated, data processing is carried out on index data corresponding to the index information through a data processing interface to obtain a data processing result;
comparing the data processing result with the early warning standard information to obtain a code running result;
and after the early warning rule codes are operated according to the early warning strategy, generating index early warning information according to the operation result of each code.
Further, when the early warning rule code is run, the data processing interface performs data processing on the index data corresponding to the index information to obtain a data processing result, which specifically includes:
determining a data processing interface corresponding to the running early warning rule code based on the template identification in the early warning rule code, and calling the determined data processing interface; the data processing interface comprises a common data processing interface, a continuous comparison data processing interface and a composite index data processing interface;
updating an access template corresponding to the data processing interface according to the index information to obtain an access code;
running the access code to extract the index data;
and calculating the index data through the data processing interface to obtain a data processing result.
In order to solve the above technical problem, an embodiment of the present application further provides an index early warning device, including:
the information acquisition module is used for acquiring index early warning configuration information input in an index early warning configuration page of the terminal; the index early warning configuration information comprises index information, early warning rule information and early warning standard information;
the template query module is used for querying rule template sentences corresponding to the early warning rules in the early warning rule information;
the template updating module is used for updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code;
the code packaging module is used for packaging the early warning rule codes according to the early warning strategy in the early warning rule information to obtain an early warning rule engine;
and the engine operation module is used for operating the early warning rule engine to obtain index early warning information.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the index early warning method when executing the computer program.
In order to solve the above technical problem, an embodiment of the present application further 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 steps of the index early warning method are implemented.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects: the user inputs index early warning configuration information in a page instead of compiling codes, so that the early warning configuration operation is simple and quick; the index early warning configuration information comprises index information, early warning rule information and early warning standard information; calling corresponding rule template sentences according to early warning rules in early warning rule information from the stored rule template sentences with early warning functions without rewriting codes every time, and updating the rule template sentences according to index information and early warning standard information to obtain early warning rule codes; the early warning rule codes are packaged according to the early warning strategy in the early warning rule information to obtain an early warning rule engine, early warning can be performed according to index data after the early warning rule engine is operated to obtain index early warning information, and in the early warning process, a user only needs to configure what you see is what you get, so that the early warning setting process is simplified, and the early warning efficiency is improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an indicator warning method according to the present application;
FIG. 3 is a flow diagram for one embodiment of step 205 of FIG. 2;
FIG. 4 is a flowchart of one embodiment of step 2052 of FIG. 3;
fig. 5 is a schematic structural diagram of an embodiment of an index warning apparatus according to the present application;
FIG. 6 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the index early warning method provided in the embodiment of the present application is generally executed by a server, and accordingly, the index early warning apparatus is generally disposed in the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continuing reference to FIG. 2, a flow diagram of one embodiment of an indicator warning method according to the present application is shown. The index early warning method comprises the following steps:
step 201, acquiring index early warning configuration information input in an index early warning configuration page of a terminal; the index early warning configuration information comprises index information, early warning rule information and early warning standard information.
In this embodiment, an electronic device (for example, a server shown in fig. 1) on which the index early warning method operates may receive the index early warning configuration information sent by the terminal through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
The index early warning configuration page can be a page for configuring the index early warning in a visual mode; the index warning configuration information may be setting information of index warning.
Specifically, a user logs in an index early warning configuration page at a terminal. And the index early warning configuration page realizes visual index early warning configuration. The user does not need to write a program, and only needs to input the index early warning configuration information in the modes of selecting options, inputting texts and the like in the index early warning configuration page. The index early warning configuration information comprises index information, early warning rule information and early warning standard information. And the terminal sends the input index early warning configuration information to the server.
The index information comprises index identification and value information. The index identification is an identification of an index, and the index corresponding to the input index identification is an early warning object. The index may be an index in various fields such as finance, economy, industrial production, weather, and the like. The value information is used to indicate to acquire the index data, for example, the value information may indicate to acquire data of the index in a specified region or indicate to acquire data of the index in a specified time. For example, when the value information includes "city a" and "the next half year of 2019", the index data of the next half year of 2019 in the city a needs to be monitored and early-warned.
The early warning rule information comprises an early warning rule and an early warning strategy, the early warning rule is input by a user in an index early warning configuration page, and the early warning rule defines which type of early warning is carried out on the index or which type of operation is carried out on the index. For example, when the indicator is insurance sales, the average value and the monthly parity change can be the early warning rules. When the early warning rule is 'average', the insurance sales amount needs to be averaged; when the early warning rule is 'month year change', the calculation of month year change of the insurance sales is needed. The early warning strategy is used for limiting or stipulating the early warning rule. For example, if an index only needs to be pre-warned once a month, the frequency information of once a month can be used as the pre-warning policy corresponding to the pre-warning rule.
The early warning standard information can be a judgment standard or an expected value of the index by the user. For example, when the user wants to monitor whether the percentage increase rate of a certain insurance sales is greater than 5%, and when the percentage increase rate is less than 5%, index early warning information is sent to the terminal, and the index early warning information is the input early warning standard information, namely 'less than 5%'.
In one embodiment, the step of acquiring the index early warning configuration information entered in the index early warning configuration page of the terminal specifically includes: when an index early warning configuration instruction sent by a terminal is received, displaying an index early warning configuration page through the terminal; and obtaining click or input operation in the index early warning configuration page through the terminal to obtain index early warning configuration information.
The index early warning configuration instruction may be an instruction for performing early warning configuration on an index triggered by a terminal.
Specifically, the user may configure the index warning at the terminal. After a user clicks an early warning configuration button in a preset page, the terminal triggers an index early warning configuration instruction and sends the index early warning configuration instruction to the server. And after receiving the index early warning configuration instruction, the server sends the stored configuration page data to the terminal, and the terminal displays the index early warning configuration page according to the configuration page data.
The user can input the index early warning configuration information in the index early warning configuration page through modes of text box input, click operation and the like. In order to ensure the accuracy of the input information, click operation can be preferentially adopted for inputting. The information of the numerical value type can be input by a text box input mode besides being input by clicking operation.
The user can also move the page component into a configuration area in the index early warning configuration page in a dragging and pulling mode, the dragged and pulled component corresponds to the index early warning configuration information, and the terminal determines the index early warning configuration information in the background according to the selected component.
When the index early warning configuration information is input through the text box, the input text information needs to be standardized, for example, if the input text information is greater than or equal to the input text information, the input text information is converted into a standard symbol which is greater than or equal to the input text information, and then the subsequent operation of inquiring a rule template statement is carried out; when the number is '1000', meaningless pause between characters needs to be removed, and index early warning configuration information is obtained.
In the embodiment, the index early warning configuration information is input in the terminal through simple clicking or text input operation, so that the index early warning configuration information is obtained in what you see, and the input efficiency of the index early warning configuration information is improved.
In one embodiment, the step of acquiring the warning rule information includes: acquiring at least one early warning rule input in an index early warning configuration page; acquiring an early warning strategy corresponding to an early warning rule input in an index early warning configuration page; and generating early warning rule information according to the early warning strategy and the early warning rule.
Specifically, after the user enters at least one early warning rule on the index early warning configuration page, the user enters an early warning strategy corresponding to the early warning rule. The early warning strategy can stipulate or limit a single early warning rule and can also stipulate or limit a plurality of early warning rules. For example, two indexes are monitored, and if one of the two indexes meets the expectation, the two indexes can be considered to be normal, the early warning rules of the two indexes can be set to be in an or relationship, and an early warning strategy can be obtained.
The early warning rules and the early warning strategies which are mutually associated form early warning rule information.
In this embodiment, the entered at least one early warning rule is supplemented with a corresponding early warning policy to obtain early warning rule information, and the early warning policy can integrate the early warning rules, so as to meet complex early warning requirements.
In one embodiment, before the step of obtaining the index early warning configuration information entered in the index early warning configuration page of the terminal, the method further includes: acquiring a rule template statement input in an extended page of a terminal; adding the obtained rule template statement into a rule template library; and adding an early warning rule associated with the rule template statement in the index early warning configuration page.
The extension page can be a page for performing function development on index early warning. The rule template statement can be a program code defining a data processing logic, and can call a data processing interface to process index data after running and judge according to a data processing result, so that the monitoring and early warning functions are realized; the rule template statements may be stored in a rule template library.
Specifically, a developer can develop a new function of the index early warning in an extended page of the terminal. And (3) a developer writes program codes in the extended page according to development requirements and required data processing logic to obtain rule template statements, and the server adds the rule template statements to a rule template library for storing the rule template statements.
The rule template statements correspond to the early warning rules, and the entered early warning rules can be realized by the server running the corresponding rule template statements. When a rule template statement is newly added in the rule template base, an early warning rule associated with the rule template statement is also required to be added in the index early warning configuration page.
In the embodiment, the rule template base is expanded according to the rule template statements in the expansion page, the early warning rules associated with the rule template statements are added in the index early warning configuration page, only one development operation needs to be carried out, index early warning can be quickly realized only by inputting index early warning configuration information subsequently, and the efficiency of index early warning is ensured.
Step 202, inquiring a rule template statement corresponding to the early warning rule in the early warning rule information.
Specifically, the early warning rules correspond to rule template statements. The rule template statement is a section of program code, the rule template statement corresponds to a data processing logic, the server inquires the rule template statement corresponding to the early warning rule, and reads the rule template statement from the rule template library.
And step 203, updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code.
Specifically, the read ground rule template statement is only one section of initial program code, and lacks variables required for operation, and the server fills currently acquired index information and early warning standard information into the rule template statement to obtain an early warning rule code with actual execution significance.
In one embodiment, the step of updating the rule template statement according to the index information and the early warning standard information to obtain the early warning rule code specifically includes: identifying an alternative variable in the rule template statement; and updating the identified replaceable variables according to the index information and the early warning standard information to obtain an early warning rule code.
Wherein the replaceable variable can be a variable in the rule template statement, and the replaceable variable can be replaced in different early warning.
Specifically, there are alternative variables in the rule template statement, which are accompanied by variable declarations to explain the alternative variables. And the server identifies replaceable variables in the rule template sentences, and correspondingly fills in the index information and the early warning standard information according to the variable description to obtain early warning rule codes. The rule template statement and the updated early warning rule code have the same data processing logic.
And after the server determines the rule template statement corresponding to the early warning rule, updating the rule template statement according to the index information and the early warning standard information corresponding to the early warning rule.
In the embodiment, the replaceable variables in the rule template statement are identified, and then the replaceable variables are replaced according to the index information and the early warning standard information, so that the normal execution of the rule template statement is ensured.
And step 204, packaging the early warning rule codes according to the early warning strategy in the early warning rule information to obtain an early warning rule engine.
Specifically, the early warning policy in the early warning rule information prescribes or limits the execution of the rule template statement, including the execution frequency, the execution sequence, whether to execute or not, and the like. After the rule template statement is updated to the early warning rule code, the early warning strategy has the same constraint force on the early warning rule code.
And the server sets the execution of each early warning rule code according to the early warning strategy. When the early warning rule codes need to be executed at regular time, the early warning strategy can be execution frequency, and the server sets a timing task according to the early warning strategy to trigger the execution of the early warning rule codes. And when the early warning strategy is the execution sequence or the execution condition of the early warning rule codes, the server sets the execution of the early warning rule codes according to the early warning strategy. For example, a set of existing logged-in warning strategies (actual warning strategies need to add index information and warning standard information) is as follows:
1. index A >80& index B < 10;
(index C > index D) & index E continuously rise for two months.
Two rows of early warning rules are arranged in the group of early warning strategies, and two early warning rules are arranged in each row of early warning rules. According to default setting, the early warning rules among different rows are in an OR relationship, the execution sequence of the early warning rules with the front row number is prior to the execution sequence of the early warning rules with the rear row number, and the early warning rules in the rows are in the OR relationship. The server sets to execute "index a >80& index B < 10" first, does not execute "(index C > index D) & index E for two consecutive months when execution is true, and executes" (index C > index D) & index E for two consecutive months when execution is false.
And the server packages the early warning rule codes and the execution setting information of the early warning rule codes into a complete executable program to obtain an early warning rule engine.
And step 205, operating an early warning rule engine to obtain index early warning information.
Specifically, the server runs an early warning rule engine and runs early warning rule codes according to an early warning strategy in the early warning rule engine. When the early warning rule codes are operated, index data are extracted from the database according to the index information, and the extracted index data are processed according to data processing logic specified by the early warning rule codes to obtain data processing results. And the server compares the data processing result with the early warning standard information to generate index early warning information and sends the index early warning information to the terminal.
It should be emphasized that, in order to further ensure the privacy and security of the index warning information, the index warning information may also be stored in a node of a block chain.
In the embodiment, the user inputs the index early warning configuration information in the page instead of compiling codes, so that the early warning configuration operation is simple and quick; the index early warning configuration information comprises index information, early warning rule information and early warning standard information; calling corresponding rule template sentences according to early warning rules in early warning rule information from the stored rule template sentences with early warning functions without rewriting codes every time, and updating the rule template sentences according to index information and early warning standard information to obtain early warning rule codes; the early warning rule codes are packaged according to the early warning strategy in the early warning rule information to obtain an early warning rule engine, early warning can be performed according to index data after the early warning rule engine is operated to obtain index early warning information, and in the early warning process, a user only needs to configure what you see is what you get, so that the early warning setting process is simplified, and the early warning efficiency is improved.
Further, the index warning information is stored in a block chain, as shown in fig. 3, step 205 may include:
and step 2051, operating early warning rule codes in the early warning rule engine according to the early warning strategy.
Specifically, an early warning strategy and an early warning rule code are packaged in the early warning rule engine, and the server reads and executes the early warning rule code according to the early warning strategy.
And step 2052, when the early warning rule code is operated, performing data processing on the index data corresponding to the index information through the data processing interface to obtain a data processing result.
In particular, the early warning rule code defines how to process the index data. The server can call the data processing interface, obtain the index data corresponding to the index information through the data processing interface, and calculate the index data according to the processing logic corresponding to the early warning rule code, so as to obtain the data processing result. For example, when the early warning rule code is to calculate the month ring ratio variation of the sales of february, the sales of february and the sales of january are obtained through the data processing interface, and the month ring ratio variation is obtained by subtracting the sales of january from the sales of january, and is the data processing result.
And step 2053, comparing the data processing result with the early warning standard information to obtain a code running result.
Specifically, after the data processing result is obtained, the server compares the data processing result with the early warning standard information, and generates a code running result according to the comparison result. The code operation result can indicate whether the data processing result meets the early warning standard information.
And step 2054, after the early warning rule codes are operated according to the early warning strategy, generating index early warning information according to the operation result of each code.
The index early warning information may be an early warning result output by the early warning rule engine.
Specifically, when the server executes the early warning rule codes according to the early warning policy, all the early warning rule codes do not need to be operated. After the early warning rule codes are operated, the operated early warning rule codes generate code operation results, and the server integrates the code operation results according to an early warning strategy to generate index early warning information. And the server sends the generated index early warning information to a specified terminal so as to display the index early warning information to related personnel through the terminal.
The index early warning information comprises early warning rule codes corresponding to which early warning rules are operated, the code operation results of which early warning rule codes accord with the early warning standard information, and the code operation results of which early warning rule codes do not accord with the early warning standard information. For example, there is a set of early warning strategies:
1. index A >80& index B < 10;
(index C > index D) & index E continuously rise for two months.
The early warning strategy comprises two rows of early warning rules, including four early warning rules of 'index A > 80', 'index B < 10', 'index C > index D' and 'index E continuously rising for two months'. The inter-row early warning rules need to satisfy and be related, and the inter-row satisfies or is related.
When the early warning rule engine runs, the index A is greater than 80 and the index B is less than 10 in the first row, and if the indexes are both met, the second row does not need to be run. If "indicator A > 80" is met, but "indicator B < 10" is not met, then the second row is run. When the index C, the index D and the index E in the second row are consistent in two-month continuous rising, the group of early warning strategies are consistent, index early warning information passing monitoring is generated, and which early warning rule in the two rows of early warning rules is consistent and which early warning rule is not consistent is displayed.
When the two lines do not accord with each other, generating monitoring failed index early warning information, and displaying which early warning rule does not accord with each other so as to position the early warning rule which does not accord with the early warning standard information, so that a user of the terminal can further monitor or process according to the index early warning information.
In the embodiment, the early warning rule codes are operated according to the early warning strategy, each group of early warning rule codes corresponds to one group of code operation results, and after the early warning rule codes are operated according to the early warning strategy, index early warning information is generated by combining the code operation results, so that the accuracy of the index early warning information is ensured.
Further, as shown in fig. 4, the step 2052 may include:
step 20521, determining a data processing interface corresponding to the running early warning rule code based on the template identifier in the early warning rule code, and calling the determined data processing interface; the data processing interface comprises a common data processing interface, a continuous comparison data processing interface and a composite index data processing interface.
The data processing interface may be an interface for processing the index data.
Specifically, the rule template statement includes a template identifier, and the template identifier still exists after the rule template statement is updated to the early warning rule code. Different early warning rule codes correspond to different data processing logics, and different data processing logics can correspond to the same type of data processing interface or different types of data processing interfaces.
The server extracts the template identification in the early warning rule code, inquires the preset data processing interface identification corresponding to the template identification, and calls the data processing interface corresponding to the data processing interface identification.
In one embodiment, the data processing interfaces are divided into three categories according to the data processing logic, including a normal data processing interface, a continuous comparison data processing interface, and a composite index data processing interface. The common data processing interface can be used for conventional calculation processing; the continuous comparison data processing interface can be used for calculating and processing continuous change of the index; the composite index data processing interface can be used for calculating and processing the continuous change of multiple indexes.
For example, when the early warning rule code is an increment for calculating sales, a common data processing interface is called; when calculating the change of the sales volume for N months (N is a positive integer greater than 0), calling a continuous comparison data processing interface; and when the detected sales speed increase is continuously lower than the market speed increase by N months, calling a composite index data processing interface.
And step 20522, updating the access template corresponding to the data processing interface according to the index information to obtain an access code.
The access template may be a program for extracting data from a database.
Specifically, the data processing interface corresponds to an access template, a replaceable variable exists in the access template, and a variable description is attached to the replaceable variable to declare what kind of information the variable is. And the server identifies the replaceable variables in the access template, and fills the index information in the early warning rule codes according to the variable descriptions to obtain the access codes.
The access template may be an SQL (Structured Query Language) statement, which is a database Query and programming Language for accessing data and querying, updating, and managing a relational database system.
Step 20523, the access code is run to extract the index data.
Specifically, the server runs the access code, accesses a data table in the database according to the access code, and extracts index data from the data table.
And step 20524, calculating the index data through the data processing interface to obtain a data processing result.
Specifically, the server calculates the extracted index data through a data processing interface to obtain a data processing result of the early warning rule code.
In this embodiment, the data processing interface is called when the early warning rule code is run, the data processing interface can automatically implement multi-type data operation, and a fetch template corresponding to the data processing interface is called, and the fetch template can automatically read index data for processing according to index information, so that the processing efficiency of the index data is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 5, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an index early warning apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the index warning apparatus 300 according to the present embodiment includes: an information acquisition module 301, a template query module 302, a template update module 303, a code encapsulation module 304, and an engine execution module 305, wherein:
the information acquisition module 301 is configured to acquire index early warning configuration information entered in an index early warning configuration page of the terminal; the index early warning configuration information comprises index information, early warning rule information and early warning standard information.
And the template query module 302 is configured to query a rule template statement corresponding to the early warning rule in the early warning rule information.
And the template updating module 303 is configured to update the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code.
And the code packaging module 304 is configured to package the early warning rule code according to the early warning policy in the early warning rule information to obtain an early warning rule engine.
And an engine running module 305, configured to run the early warning rule engine to obtain the index early warning information. It should be emphasized that, in order to further ensure the privacy and security of the index warning information, the index warning information may also be stored in a node of a block chain.
In the embodiment, the user inputs the index early warning configuration information in the page instead of compiling codes, so that the early warning configuration operation is simple and quick; the index early warning configuration information comprises index information, early warning rule information and early warning standard information; calling corresponding rule template sentences according to early warning rules in early warning rule information from the stored rule template sentences with early warning functions without rewriting codes every time, and updating the rule template sentences according to index information and early warning standard information to obtain early warning rule codes; the early warning rule codes are packaged according to the early warning strategy in the early warning rule information to obtain an early warning rule engine, early warning can be performed according to index data after the early warning rule engine is operated to obtain index early warning information, and in the early warning process, a user only needs to configure what you see is what you get, so that the early warning setting process is simplified, and the early warning efficiency is improved.
In some optional implementation manners of this embodiment, the index early warning apparatus 300 further includes: statement acquisition module, statement addition module and rule addition module, wherein:
and the sentence acquisition module is used for acquiring the rule template sentences input in the expansion page of the terminal.
And the statement adding module is used for adding the obtained rule template statement into the rule template library.
And the rule adding module is used for adding the early warning rule associated with the rule template statement in the index early warning configuration page.
In the embodiment, the rule template base is expanded according to the rule template statements in the expansion page, the early warning rules associated with the rule template statements are added in the index early warning configuration page, only one development operation needs to be carried out, index early warning can be quickly realized only by inputting index early warning configuration information subsequently, and the efficiency of index early warning is ensured.
In some optional implementation manners of this embodiment, the information obtaining module 301 includes: the page display sub-module and the information acquisition sub-module, wherein:
and the page display submodule is used for displaying the index early warning configuration page through the terminal when receiving the index early warning configuration instruction sent by the terminal.
And the information acquisition submodule is used for acquiring clicking or inputting operation in the index early warning configuration page through the terminal to obtain the index early warning configuration information.
In the embodiment, the index early warning configuration information is input in the terminal through simple clicking or text input operation, so that the index early warning configuration information is obtained in what you see, and the input efficiency of the index early warning configuration information is improved.
In some optional implementation manners of this embodiment, the information obtaining sub-module includes: rule acquisition unit, tactics acquisition unit and information generation unit, wherein:
and the rule obtaining unit is used for obtaining at least one early warning rule input in the index early warning configuration page.
And the strategy acquisition unit is used for acquiring the early warning strategy which is recorded in the index early warning configuration page and corresponds to the early warning rule.
And the information generating unit is used for generating early warning rule information according to the early warning strategy and the early warning rule.
In this embodiment, the entered at least one early warning rule is supplemented with a corresponding early warning policy to obtain early warning rule information, and the early warning policy can integrate the early warning rules, so as to meet complex early warning requirements.
In some optional implementations of this embodiment, the template updating module 302 includes: a variable identification submodule and a variable update submodule, wherein:
and the variable identification submodule is used for identifying the replaceable variable in the rule template statement.
And the variable updating submodule is used for updating the identified replaceable variable according to the index information and the early warning standard information to obtain an early warning rule code.
In the embodiment, the replaceable variables in the rule template statement are identified, and then the replaceable variables are replaced according to the index information and the early warning standard information, so that the normal execution of the rule template statement is ensured.
In some optional implementations of this embodiment, the index warning information is stored in a block chain, and the engine running module 305 includes: the system comprises a code operation submodule, a data processing submodule, a result comparison submodule and an information generation submodule, wherein:
and the code operation submodule is used for operating the early warning rule codes in the early warning rule engine according to the early warning strategy.
And the data processing submodule is used for carrying out data processing on the index data corresponding to the index information through the data processing interface when the early warning rule code is operated, so as to obtain a data processing result.
And the result comparison submodule is used for comparing the data processing result with the early warning standard information to obtain a code operation result.
And the information generation submodule is used for generating index early warning information according to the operation result of each code after the early warning rule code is operated according to the early warning strategy.
In the embodiment, the early warning rule codes are operated according to the early warning strategy, each group of early warning rule codes corresponds to one group of code operation results, and after the early warning rule codes are operated according to the early warning strategy, index early warning information is generated by combining the code operation results, so that the accuracy of the index early warning information is ensured.
In some optional implementations of this embodiment, the data processing sub-module includes: interface determining unit, template updating unit, data extracting unit and data calculating unit, wherein:
the interface determining unit is used for determining a data processing interface corresponding to the running early warning rule code based on the template identification in the early warning rule code and calling the determined data processing interface; the data processing interface comprises a common data processing interface, a continuous comparison data processing interface and a composite index data processing interface.
And the template updating unit is used for updating the access template corresponding to the data processing interface according to the index information to obtain the access code.
And the data extraction unit is used for operating the access code to extract the index data.
And the data calculation unit is used for calculating the index data through the data processing interface to obtain a data processing result.
In this embodiment, the data processing interface is called when the early warning rule code is run, the data processing interface can automatically implement multi-type data operation, and a fetch template corresponding to the data processing interface is called, and the fetch template can automatically read index data for processing according to index information, so that the processing efficiency of the index data is improved.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 6, fig. 6 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as program codes of an index warning method. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute the program code stored in the memory 41 or process data, for example, execute the program code of the index warning method. It should be emphasized that, in order to further ensure the privacy and security of the index warning information, the index warning information may also be stored in a node of a block chain.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The computer device provided in this embodiment may perform the steps of the index early warning method. Here, the steps of the index early warning method may be steps in the index early warning methods of the above embodiments.
In the embodiment, the user inputs the index early warning configuration information in the page instead of compiling codes, so that the early warning configuration operation is simple and quick; the index early warning configuration information comprises index information, early warning rule information and early warning standard information; calling corresponding rule template sentences according to early warning rules in early warning rule information from the stored rule template sentences with early warning functions without rewriting codes every time, and updating the rule template sentences according to index information and early warning standard information to obtain early warning rule codes; the early warning rule codes are packaged according to the early warning strategy in the early warning rule information to obtain an early warning rule engine, early warning can be performed according to index data after the early warning rule engine is operated to obtain index early warning information, and in the early warning process, a user only needs to configure what you see is what you get, so that the early warning setting process is simplified, and the early warning efficiency is improved.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing an index pre-warning program, which is executable by at least one processor to cause the at least one processor to perform the steps of the index pre-warning program as described above.
In the embodiment, the user inputs the index early warning configuration information in the page instead of compiling codes, so that the early warning configuration operation is simple and quick; the index early warning configuration information comprises index information, early warning rule information and early warning standard information; calling corresponding rule template sentences according to early warning rules in early warning rule information from the stored rule template sentences with early warning functions without rewriting codes every time, and updating the rule template sentences according to index information and early warning standard information to obtain early warning rule codes; the early warning rule codes are packaged according to the early warning strategy in the early warning rule information to obtain an early warning rule engine, early warning can be performed according to index data after the early warning rule engine is operated to obtain index early warning information, and in the early warning process, a user only needs to configure what you see is what you get, so that the early warning setting process is simplified, and the early warning efficiency is improved.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. An index early warning method is characterized by comprising the following steps:
acquiring index early warning configuration information input in an index early warning configuration page of a terminal; the index early warning configuration information comprises index information, early warning rule information and early warning standard information;
inquiring a rule template statement corresponding to an early warning rule in the early warning rule information;
updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code;
packaging the early warning rule codes according to an early warning strategy in the early warning rule information to obtain an early warning rule engine;
and operating the early warning rule engine to obtain index early warning information.
2. The index early warning method according to claim 1, wherein before the step of acquiring the index early warning configuration information entered in the index early warning configuration page of the terminal, the method further comprises:
acquiring a rule template statement input in an extended page of a terminal;
adding the obtained rule template statement into a rule template library;
and adding an early warning rule associated with the rule template statement in an index early warning configuration page.
3. The index early warning method according to claim 1 or 2, wherein the step of acquiring the index early warning configuration information entered in the index early warning configuration page of the terminal specifically includes:
when an index early warning configuration instruction sent by a terminal is received, displaying an index early warning configuration page through the terminal;
and acquiring clicking or inputting operation in the index early warning configuration page through the terminal to obtain index early warning configuration information.
4. The index warning method according to claim 1 or 2, wherein the step of acquiring warning rule information includes:
acquiring at least one early warning rule input in the index early warning configuration page;
acquiring an early warning strategy corresponding to an early warning rule input in the index early warning configuration page;
and generating early warning rule information according to the early warning strategy and the early warning rule.
5. The index early warning method according to claim 1 or 2, wherein the step of updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code specifically comprises:
identifying an alternative variable in the rule template statement;
and updating the identified replaceable variables according to the index information and the early warning standard information to obtain early warning rule codes.
6. The index early warning method according to claim 1, wherein the index early warning information is stored in a block chain, and the step of operating the early warning rule engine to obtain the index early warning information specifically comprises:
operating early warning rule codes in the early warning rule engine according to the early warning strategy;
when the early warning rule code is operated, data processing is carried out on index data corresponding to the index information through a data processing interface to obtain a data processing result;
comparing the data processing result with the early warning standard information to obtain a code running result;
and after the early warning rule codes are operated according to the early warning strategy, generating index early warning information according to the operation result of each code.
7. The index early warning method according to claim 6, wherein when the early warning rule code is run, the step of performing data processing on the index data corresponding to the index information through the data processing interface to obtain a data processing result specifically comprises:
determining a data processing interface corresponding to the running early warning rule code based on the template identification in the early warning rule code, and calling the determined data processing interface; the data processing interface comprises a common data processing interface, a continuous comparison data processing interface and a composite index data processing interface;
updating an access template corresponding to the data processing interface according to the index information to obtain an access code;
running the access code to extract the index data;
and calculating the index data through the data processing interface to obtain a data processing result.
8. An index early warning device, characterized by comprising:
the information acquisition module is used for acquiring index early warning configuration information input in an index early warning configuration page of the terminal; the index early warning configuration information comprises index information, early warning rule information and early warning standard information;
the template query module is used for querying rule template sentences corresponding to the early warning rules in the early warning rule information;
the template updating module is used for updating the rule template statement according to the index information and the early warning standard information to obtain an early warning rule code;
the code packaging module is used for packaging the early warning rule codes according to the early warning strategy in the early warning rule information to obtain an early warning rule engine;
and the engine operation module is used for operating the early warning rule engine to obtain index early warning information.
9. A computer device comprising a memory having stored therein a computer program and a processor which, when executing the computer program, implements the steps of the index warning method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the index warning method as claimed in any one of claims 1 to 7.
CN202010611647.3A 2020-06-29 2020-06-29 Index early warning method and device, computer equipment and storage medium Pending CN111782208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010611647.3A CN111782208A (en) 2020-06-29 2020-06-29 Index early warning method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010611647.3A CN111782208A (en) 2020-06-29 2020-06-29 Index early warning method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111782208A true CN111782208A (en) 2020-10-16

Family

ID=72761405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010611647.3A Pending CN111782208A (en) 2020-06-29 2020-06-29 Index early warning method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111782208A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818343A (en) * 2021-03-23 2021-05-18 黄超 Block chain big data analysis early warning method and system and cloud platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818343A (en) * 2021-03-23 2021-05-18 黄超 Block chain big data analysis early warning method and system and cloud platform

Similar Documents

Publication Publication Date Title
CN109840257B (en) Database query method, database query device, computer device and readable storage medium
CN112052138A (en) Service data quality detection method and device, computer equipment and storage medium
CN112148987A (en) Message pushing method based on target object activity and related equipment
CN112052111A (en) Processing method, device and equipment for server abnormity early warning and storage medium
CN113377372A (en) Business rule analysis method and device, computer equipment and storage medium
CN112394908A (en) Method and device for automatically generating embedded point page, computer equipment and storage medium
CN111680477A (en) Method and device for exporting spreadsheet file, computer equipment and storage medium
CN114493255A (en) Enterprise abnormity monitoring method based on knowledge graph and related equipment thereof
CN115329381A (en) Sensitive data-based analysis and early warning method and device, computer equipment and medium
CN114157679A (en) Cloud-native-based distributed application monitoring method, device, equipment and medium
WO2022089235A1 (en) Product demonstration method and apparatus, computer device, and storage medium
CN111782208A (en) Index early warning method and device, computer equipment and storage medium
CN110618797B (en) Method and device for generating character trotting horse lamp and terminal equipment
CN116860311A (en) Script analysis method, script analysis device, computer equipment and storage medium
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN116843395A (en) Alarm classification method, device, equipment and storage medium of service system
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN115757075A (en) Task abnormity detection method and device, computer equipment and storage medium
CN115543428A (en) Simulated data generation method and device based on strategy template
CN115471582A (en) Map generation method and device, computer equipment and storage medium
CN114925275A (en) Product recommendation method and device, computer equipment and storage medium
CN114090407A (en) Interface performance early warning method based on linear regression model and related equipment thereof
CN114265835A (en) Data analysis method and device based on graph mining and related equipment
CN110677271B (en) Big data alarm method, device, equipment and storage medium based on ELK
CN110851346A (en) Method, device and equipment for detecting boundary problem of query statement and storage medium

Legal Events

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