CN116880927A - Rule management method, device, computer equipment and storage medium - Google Patents

Rule management method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116880927A
CN116880927A CN202311069390.3A CN202311069390A CN116880927A CN 116880927 A CN116880927 A CN 116880927A CN 202311069390 A CN202311069390 A CN 202311069390A CN 116880927 A CN116880927 A CN 116880927A
Authority
CN
China
Prior art keywords
rule
target
file
acquiring
rule file
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
CN202311069390.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311069390.3A priority Critical patent/CN116880927A/en
Publication of CN116880927A publication Critical patent/CN116880927A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a rule management method, a rule management device, computer equipment and a storage medium, and relates to the technical field of computers. Can be used in the field of financial science and technology or other related fields. The method comprises the following steps: acquiring a rule calling request; acquiring target rule files corresponding to the target rule names in a rule file library, and determining the execution sequence of each target rule file and the execution result transfer object of each target rule file according to the execution sequence of each target rule name; according to the execution sequence of each target rule file and the execution result, transmitting an object, acquiring calling parameters corresponding to the target rule files to be executed, and executing the target rule files to be executed according to the calling parameters until all target rule files are executed; and determining a target execution result according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result. The method can improve operation and maintenance efficiency.

Description

Rule management method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a rule management method, a rule management apparatus, a rule management computer device, a rule management storage medium, and a rule management program product.
Background
With the continuous development of cloud computing, big data and other technologies, the network architecture of the medium and large data centers is more complex, the operation and maintenance volume of the network is increased, and higher requirements are put on automatic operation and maintenance, so that operation and maintenance personnel usually develop scripts aiming at operation and maintenance requirements to complete some flow work.
However, in the actual production operation and maintenance process, many operation and maintenance requirements are repeated, and different operation and maintenance personnel may need to re-develop scripts for the same operation and maintenance requirements, or find corresponding historical scripts in scattered documents, which results in lower operation and maintenance efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a rule management method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve operation and maintenance efficiency.
In a first aspect, the present application provides a rule management method. The method comprises the following steps:
acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name;
in a rule file library, acquiring target rule files corresponding to the target rule names, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files;
Sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed;
executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed;
and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
In one embodiment, the method for constructing the rule file library includes:
acquiring a rule file and acquiring rule basic attributes corresponding to the rule file; the rule basic attributes comprise rule names, rule fields and rule types;
acquiring test data and a target verification result according to the rule field and the rule type;
calling and testing the rule file based on the test data to obtain a test result;
and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
In one embodiment, determining the target execution result from the execution results of each target rule file according to the output rule name includes:
Determining an output rule file from all target rule files according to the output rule name;
and after the execution of the output rule file is completed, acquiring an execution result of the output rule file as a target execution result.
In one embodiment, after generating the call result corresponding to the rule call request, the method further includes:
acquiring a target calling object;
adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
In one embodiment, the method further comprises:
acquiring a rule access request; the rule access request includes an access rule name and a filter parameter;
and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
In one embodiment, the method further comprises:
acquiring a rule editing request; the rule editing request comprises an editing rule name and request object information;
acquiring an editing rule file corresponding to the editing rule name from a rule file library, and acquiring creating object information of the editing rule file;
Determining editing rights corresponding to the rule editing request according to the matching result of the request object information and the creation object information;
acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes updating a rule file;
and generating a rule iteration record according to the updated rule file.
In a second aspect, the application further provides a rule management device. The device comprises:
the acquisition module is used for acquiring the rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name;
the first processing module is used for acquiring target rule files corresponding to the target rule names in the rule file library, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining the execution result transfer object of the target rule files according to the execution sequence of the target rule files;
the second processing module is used for sequentially executing each target rule file according to the execution sequence, transmitting objects according to the execution results of each target rule file and acquiring calling parameters corresponding to the target rule files to be executed;
The third processing module is used for executing the target rule file to be executed according to the calling parameters corresponding to the target rule file to be executed until all the target rule files are executed;
and the response module is used for determining a target execution result from the execution results of each target rule file according to the output rule name and generating a calling result corresponding to the rule calling request based on the target execution result.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name;
in a rule file library, acquiring target rule files corresponding to the target rule names, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files;
Sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed;
executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed;
and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name;
in a rule file library, acquiring target rule files corresponding to the target rule names, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files;
Sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed;
executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed;
and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name;
in a rule file library, acquiring target rule files corresponding to the target rule names, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files;
Sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed;
executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed;
and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
According to the rule management method, the device, the computer equipment, the storage medium and the computer program product, the rule calling request is firstly obtained, the target rule files corresponding to the target rule names are obtained in the rule file library, the execution sequence of the target rule names is used as the execution sequence of the target rule files, the execution result transfer object of the target rule files is determined according to the execution sequence of the target rule files, thus multiparty calling of the rule files with the same function can be realized through the rule file library, inconsistency of the rule files with the same function among systems is avoided, further, according to the execution sequence, the target rule files are sequentially executed, calling parameters corresponding to the target rule files to be executed are obtained according to the execution result transfer object of the target rule files, the target rule files to be executed are executed according to the calling parameters corresponding to the target rule files to be executed until all the target rule files are executed, so that nested calling of different rule files in the rule file library can be realized, the rule files are more generalized, finally, the target execution results are determined from the execution results of the target rule files according to the output rule names, and the corresponding calling request calling results are generated, and therefore the operation and the operation efficiency is improved.
Drawings
FIG. 1 is an application environment diagram of a rule management method in one embodiment;
FIG. 2 is a flow diagram of a rule management method in one embodiment;
FIG. 3 is a rule invocation schematic of a rule management method in one embodiment;
FIG. 4 is a flow chart of a rule management method according to another embodiment;
FIG. 5 is a block diagram of a rule management device in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The rule management method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, which may be smartwatches, smartbracelets, headsets, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a rule management method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
s202: acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name.
The target rule names refer to rule names to be called and executed, and the rule names correspond to the rule files one by one. The rule name may be a name, an identifier, etc., and is not particularly limited herein. The target rule name comprises a general rule name and an output rule name, wherein the general rule name refers to a rule name corresponding to a rule file which is only executed in the calling process, and the output rule name refers to a rule name corresponding to a rule file which needs to acquire a corresponding execution result after the calling execution is completed and is used for generating a calling result. The execution sequence can be used for determining the execution sequence among the rule files and the transmission direction of the execution results, so that the nested use of the rule files is realized.
Optionally, when the terminal needs to call the rule file, the server receives a rule call request sent by the terminal, acquires the target rule name and the execution sequence of each target rule name from the rule call request, and is used for subsequently calling the corresponding rule file, and generates a call result according to the execution result of the output rule file.
S204: and acquiring target rule files corresponding to the target rule names in the rule file library, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files.
The rule file library stores executable rule files, such as script rule files, and each executable rule file has a corresponding rule name.
Optionally, after receiving the rule calling request, the server matches in the rule file library according to the target rule names to obtain target rule files to be executed, and determines the execution sequence of each target rule file and the execution result transfer object of each target rule file according to the execution sequence of each target rule name.
For example, as shown in (a) of fig. 3, after receiving the rule call request, the server determines that the target rule file to be executed is a general rule file a, a general rule file B, and an output rule file C. And, the general rule file a, the general rule file B, and the output rule file C are sequentially executed; the execution result of the general rule file A is transmitted to the general rule file B and used as the execution parameter of the general rule file B; the execution result of the general rule file B is transmitted to the output rule file C and is used as the execution parameter of the output rule file C; and generating a calling result corresponding to the rule calling request based on the execution result of the output rule file C.
For another example, as shown in (b) of fig. 3, after receiving the rule call request, the server determines that the target rule file to be executed is an output rule file D, an output rule file E, and an output rule file F. The output rule file D is executed first, and the execution result is transmitted to the output rule file E and the output rule file F to be used as the execution parameters of the output rule file E and the output rule file F; the output rule file E and the output rule file F may be executed in series or in parallel; and generating a calling result corresponding to the rule calling request according to the execution results of the output rule file D, the output rule file E and the output rule file F.
S206: and sequentially executing the target rule files according to the execution sequence, transmitting the object according to the execution result of each target rule file, and acquiring the call parameters corresponding to the target rule files to be executed.
Optionally, after determining the execution sequence, the server sequentially executes each target rule file according to the execution sequence. Before executing each target rule file, the object needs to be transferred according to the execution result of each target rule file, so as to obtain the corresponding call parameter. For example, as shown in fig. 3 (a), before the general rule file B is executed, the execution result of the general rule file a needs to be received as an execution parameter. It should be noted that, the rule calling request may also include an initial calling parameter corresponding to each target rule name, which is also used as an execution parameter of the corresponding target rule file.
S208: and executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed.
Optionally, the server executes all the target rule files to be executed according to the execution sequence and the call parameters corresponding to the target rule files.
S210: and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
Optionally, the server may determine an output rule file from each target rule file according to the output rule name, and after the execution of the output rule file is completed or after the execution of the complete target rule file is performed, obtain an execution result of the output rule file as a target execution result, and generate a call result corresponding to the rule call request based on the target execution result.
In the rule management method, the rule calling request is firstly obtained, the target rule files corresponding to the target rule names are obtained in the rule file library, the execution sequence of the target rule names is used as the execution sequence of the target rule files, the execution result transfer object of the target rule files is determined according to the execution sequence of the target rule files, so that the multiparty calling of the rule files with the same function can be realized through the rule file library, the inconsistency of the rule files with the same function among systems is avoided, further, the target rule files are sequentially executed according to the execution sequence, the calling parameters corresponding to the target rule files to be executed are obtained according to the execution result transfer object of the target rule files, the target rule files to be executed are executed according to the calling parameters corresponding to the target rule files to be executed until all the target rule files are executed, the nested calling of different rule files in the rule file library can be realized, finally, the target execution result is determined from the execution results of the target rule files according to the output rule names, and the calling result corresponding to the rule calling request is generated, and therefore the operation and maintenance efficiency is improved.
In one embodiment, the method for constructing the rule file library includes: acquiring a rule file and acquiring rule basic attributes corresponding to the rule file; the rule basic attributes comprise rule names, rule fields and rule types; acquiring test data and a target verification result according to the rule field and the rule type; calling and testing the rule file based on the test data to obtain a test result; and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
The rule files can comprise different rule types such as attribute rule files, filtering rule files and script rule files, and the script rule files can be nested to use the attribute rule files and the filtering rule files. The attribute rule file comprises objects and attributes of the objects, and is used for realizing information sharing among systems. The filtering rule file includes filtering parameters, filtering thresholds and filtering expressions for matching rule execution objects. The script rule file includes flow steps for implementing the operational requirements.
Wherein, the rule name can uniquely identify the corresponding rule file. The rule field is used for classifying the rule files, can be preset and is changed according to the actual needs of the system.
Optionally, in the process of constructing the rule file library, the server acquires the rule file uploaded by the terminal, and acquires the rule name, the rule field and the rule type corresponding to the rule file. And under the condition that the rule type is the script rule type, the server acquires the test data and the target verification result of the corresponding rule field, and calls the rule file based on the test data to obtain a test result. And then, matching the test result with the target verification result, and storing the rule files into a rule file library according to the rule field under the condition that the test result is consistent with the target verification result, so as to realize the classification management of the rule files in different rule fields. And under the condition that the rule type is not the script rule type, the server directly stores the rule file into a value rule file library according to the rule field, and the test is not needed.
In an alternative implementation manner, the server may obtain a table or json format file uploaded by the user through the terminal as an attribute rule file, and may cover information such as an internal table, a list, and the like maintained by a general system. For example, a table-type attribute rule file, "overseas and overseas mechanism business time related information", maintains business operation times corresponding to all related business mechanisms of the data center, including start time, end time, time zone information, mechanism name, mechanism identification number, mechanism contacts, and the like. Because the change implementation window needs to avoid the service operation time, the rule file can be used for changing operation related to the relevant service organization and checking whether the change implementation time meets the regulation. In addition, the rule file can also be used for setting information such as organization names, organization contacts and the like on the lines of the overseas and overseas organizations, so that when a special line fails, whether the special line is in service operation time or not can be checked in time, and the organization contacts are informed of the failure condition at the first time.
In an alternative embodiment, the server may obtain a threshold rule file generated by the user according to the threshold rule creation template, where the threshold rule file includes filtering parameters, filtering thresholds, filtering expressions, and alarm levels corresponding to different filtering thresholds. One or more filtering thresholds may be included in one threshold rule file. For example, "a performance capacity evaluation rule of a network management tool server", the rule may be set according to server information that an application node describes as "a network management tool server", the filter parameter is a central processing unit utilization rate, the filter expression is greater than or equal to a set alarm level 6 corresponds to a filter threshold of 80%, the alarm level 5 corresponds to a filter threshold of 90%, and the rule is used for performing a level 6 alarm when the network management tool server central processing unit utilization rate is not less than 80%, and performing a level 5 alarm when the network management tool server central processing unit utilization rate is not less than 90%.
In an alternative embodiment, the server may obtain a script rule file generated by a user according to a script rule creation template, where standard inputs and outputs are set for normalizing the script rule file.
In this embodiment, by first obtaining a rule file, obtaining a rule basic attribute corresponding to the rule file, obtaining inspection data and a target verification result according to a rule field and a rule type, and calling the rule file based on the inspection data to obtain a test result, so that the availability of the rule file can be verified before the rule file is stored, and then a rule file library is constructed according to the rule file and the rule field under the condition that the test result is matched with the target verification result, so that unified nanotubes can be performed on the rule file, and the rule file can be conveniently queried and called, thereby improving the operation and maintenance efficiency.
In one embodiment, after generating the call result corresponding to the rule call request, the method further includes: acquiring a target calling object; adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
Where the target call object refers to a rule call requester, such as a third party system. The calling tag is mainly used for marking the called rule file, and the marked rule file indicates that the calling request party corresponding to the calling tag has called. The number of call tags of the rule file is N, which indicates that the rule file has been called by N call requesters.
In this embodiment, by first obtaining the target call object and adding a call tag to each target rule file after execution according to the target call object, the rule file call condition can be conveniently and intuitively checked, and when the rule file is modified, the rule file is known, controlled and globally organized, and whether the rule modification result meets the expectations is verified. In addition, the query can be performed through the label layer, and whether the related rule files accord with the expected result or not can be verified when a certain calling label exists or a certain number of rule files are called, so that a calling requester can conveniently transfer, put into production or iterate the version.
In one embodiment, the method further comprises: acquiring a rule access request; the rule access request includes an access rule name and a filter parameter; and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
Optionally, when the terminal needs to access the rule file in the rule file library, the server receives the rule access request of the terminal, matches the rule file library according to the access rule name in the rule access request to obtain the corresponding access rule file, and filters the content in the rule file according to the filtering parameter to obtain the response information. After obtaining the response information, the server may send a rule access response to the terminal, where the rule access response includes the response information. After receiving the rule access response, the terminal can visually display the response information.
In this embodiment, by first obtaining a rule access request, then obtaining an access rule file corresponding to an access rule name from a rule file library, and determining response information corresponding to the rule access request from the access rule file according to a filtering parameter, it is possible to facilitate a user to view rule files available in the rule file library, and related information such as classification and labels of the rule files.
In one embodiment, the method further comprises: acquiring a rule editing request; the rule editing request comprises an editing rule name and request object information; acquiring an editing rule file corresponding to the editing rule name from a rule file library, and acquiring creating object information of the editing rule file; determining editing rights corresponding to the rule editing request according to the matching result of the request object information and the creation object information; acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes updating a rule file; and generating a rule iteration record according to the updated rule file.
The request object information refers to related information of a user requesting rule editing, and the creation object information refers to related information of a creation user of the rule file.
Optionally, in the case that the user wants to update the rule file, the server receives a rule editing request sent by the terminal, matches the rule file according to the editing rule name in the rule editing request to obtain a corresponding editing rule file, and obtains the creation object information of the editing rule file. It is set that only the creator of the rule file has authority to modify the rule file, and therefore, the server further matches the request object information with the creation object information to obtain a matching result. When the request object information is consistent with the creation object information, the server determines that the current editing user has editing authority, instructs the terminal to provide a relevant editing window, receives a rule updating request sent by the terminal after the current editing user submits modification, uniformly stores an updating rule file in the rule updating request and a corresponding rule file, and generates a rule iteration record.
In this embodiment, by first obtaining a rule editing request, obtaining an editing rule file corresponding to an editing rule name from a rule file library, obtaining creation object information of the editing rule file, and then determining editing rights corresponding to the rule editing request according to a matching result of the request object information and the creation object information, so as to ensure reasonable modification of the rule file, further obtaining a rule updating request under the condition that the editing rights corresponding to the rule editing request are editable, and generating a rule iteration record according to the updating rule file, version rollback can be performed when a problem occurs in the rule file, and operation and maintenance requirements can be timely completed according to a history version, thereby improving operation and maintenance efficiency.
In one embodiment, as shown in fig. 4, a rule management method is provided, the method comprising the steps of:
s402: in the construction stage of the rule file library, a rule file is obtained, and rule basic attributes corresponding to the rule file are obtained; acquiring test data and a target verification result according to the rule field and the rule type; calling and testing the rule file based on the test data to obtain a test result; and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
S404: in the access stage of the rule file, acquiring a rule access request; the rule access request includes an access rule name and a filter parameter; and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
S406: in the updating stage of the rule file, acquiring a rule editing request; the rule editing request comprises an editing rule name and request object information; acquiring an editing rule file corresponding to the editing rule name from a rule file library, and acquiring creating object information of the editing rule file; and determining the editing authority corresponding to the rule editing request according to the matching result of the request object information and the creation object information.
S408: acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes updating a rule file; and generating a rule iteration record according to the updated rule file.
S410: in a calling stage of a rule file, a rule calling request is obtained; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name.
S412: and acquiring target rule files corresponding to the target rule names in the rule file library, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files.
S414: sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed; and executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed.
S416: determining an output rule file from all target rule files according to the output rule name; after the execution of the output rule file is completed, an execution result of the output rule file is obtained and is used as a target execution result, and a calling result corresponding to the rule calling request is generated based on the target execution result.
S418: acquiring a target calling object; adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a rule management device for realizing the above related rule management method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the rule management device provided below may refer to the limitation of the rule management method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 5, there is provided a rule management apparatus including: an acquisition module 510, a first processing module 520, a second processing module 530, a third processing module 540, and a response module 550, wherein:
an obtaining module 510, configured to obtain a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name.
The first processing module 520 is configured to obtain, from the rule file library, a target rule file corresponding to each target rule name, take an execution sequence of each target rule name as an execution sequence of each target rule file, and determine an execution result transfer object of each target rule file according to the execution sequence of each target rule file.
The second processing module 530 is configured to sequentially execute each target rule file according to the execution sequence, and transfer the object according to the execution result of each target rule file, so as to obtain the call parameter corresponding to the target rule file to be executed.
The third processing module 540 is configured to execute the target rule file to be executed according to the call parameter corresponding to the target rule file to be executed until all the target rule files are executed.
And a response module 550, configured to determine a target execution result from the execution results of each target rule file according to the output rule name, and generate a call result corresponding to the rule call request based on the target execution result.
In one embodiment, the obtaining module 510 is further configured to obtain a rule file, and obtain a rule basic attribute corresponding to the rule file; the rule basic attributes comprise rule names, rule fields and rule types; acquiring test data and a target verification result according to the rule field and the rule type; calling and testing the rule file based on the test data to obtain a test result; and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
In one embodiment, the response module 550 is further configured to determine an output rule file from the target rule files according to the output rule name; and after the execution of the output rule file is completed, acquiring an execution result of the output rule file as a target execution result.
In one embodiment, the response module 550 is further configured to obtain a target call object; adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
In one embodiment, the response module 550 is further configured to obtain a rule access request; the rule access request includes an access rule name and a filter parameter; and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
In one embodiment, the response module 550 is further configured to obtain a rule edit request; the rule editing request comprises an editing rule name and request object information; acquiring an editing rule file corresponding to the editing rule name from a rule file library, and acquiring creating object information of the editing rule file; determining editing rights corresponding to the rule editing request according to the matching result of the request object information and the creation object information; acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes updating a rule file; and generating a rule iteration record according to the updated rule file.
The respective modules in the rule management apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store rule files and other business data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a rule management method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name; in a rule file library, acquiring target rule files corresponding to the target rule names, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files; sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed; executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed; and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a rule file and acquiring rule basic attributes corresponding to the rule file; the rule basic attributes comprise rule names, rule fields and rule types; acquiring test data and a target verification result according to the rule field and the rule type; calling and testing the rule file based on the test data to obtain a test result; and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
In one embodiment, the processor when executing the computer program further performs the steps of: determining an output rule file from all target rule files according to the output rule name; and after the execution of the output rule file is completed, acquiring an execution result of the output rule file as a target execution result.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a target calling object; adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a rule access request; the rule access request includes an access rule name and a filter parameter; and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a rule editing request; the rule editing request comprises an editing rule name and request object information; acquiring an editing rule file corresponding to the editing rule name from a rule file library, and acquiring creating object information of the editing rule file; determining editing rights corresponding to the rule editing request according to the matching result of the request object information and the creation object information; acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes updating a rule file; and generating a rule iteration record according to the updated rule file.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name; in a rule file library, acquiring target rule files corresponding to the target rule names, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files; sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed; executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed; and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a rule file and acquiring rule basic attributes corresponding to the rule file; the rule basic attributes comprise rule names, rule fields and rule types; acquiring test data and a target verification result according to the rule field and the rule type; calling and testing the rule file based on the test data to obtain a test result; and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining an output rule file from all target rule files according to the output rule name; and after the execution of the output rule file is completed, acquiring an execution result of the output rule file as a target execution result.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a target calling object; adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a rule access request; the rule access request includes an access rule name and a filter parameter; and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a rule editing request; the rule editing request comprises an editing rule name and request object information; acquiring an editing rule file corresponding to the editing rule name from a rule file library, and acquiring creating object information of the editing rule file; determining editing rights corresponding to the rule editing request according to the matching result of the request object information and the creation object information; acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes updating a rule file; and generating a rule iteration record according to the updated rule file.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of: acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name; in a rule file library, acquiring target rule files corresponding to the target rule names, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining an execution result transfer object of the target rule files according to the execution sequence of the target rule files; sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed; executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all the target rule files are executed; and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a rule file and acquiring rule basic attributes corresponding to the rule file; the rule basic attributes comprise rule names, rule fields and rule types; acquiring test data and a target verification result according to the rule field and the rule type; calling and testing the rule file based on the test data to obtain a test result; and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining an output rule file from all target rule files according to the output rule name; and after the execution of the output rule file is completed, acquiring an execution result of the output rule file as a target execution result.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a target calling object; adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a rule access request; the rule access request includes an access rule name and a filter parameter; and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a rule editing request; the rule editing request comprises an editing rule name and request object information; acquiring an editing rule file corresponding to the editing rule name from a rule file library, and acquiring creating object information of the editing rule file; determining editing rights corresponding to the rule editing request according to the matching result of the request object information and the creation object information; acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes updating a rule file; and generating a rule iteration record according to the updated rule file.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method of rule management, the method comprising:
acquiring a rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name;
acquiring target rule files corresponding to each target rule name in a rule file library, taking the execution sequence of each target rule name as the execution sequence of each target rule file, and determining an execution result transfer object of each target rule file according to the execution sequence of each target rule file;
Sequentially executing each target rule file according to the execution sequence, transmitting an object according to the execution result of each target rule file, and acquiring calling parameters corresponding to the target rule file to be executed;
executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all target rule files are executed;
and determining a target execution result from the execution results of each target rule file according to the output rule name, and generating a calling result corresponding to the rule calling request based on the target execution result.
2. The method according to claim 1, wherein the rule file library is constructed in a manner that includes:
acquiring a rule file and acquiring a rule basic attribute corresponding to the rule file; the rule basic attributes comprise rule names, rule fields and rule types;
acquiring test data and a target verification result according to the rule field and the rule type;
calling and testing the rule file based on the test data to obtain a test result;
and under the condition that the test result is matched with the target verification result, constructing a rule file library according to the rule file and the rule field.
3. The method according to claim 1, wherein determining a target execution result from execution results of each target rule file according to the output rule name comprises:
determining an output rule file from all target rule files according to the output rule name;
and after the execution of the output rule file is completed, acquiring an execution result of the output rule file as the target execution result.
4. The method according to claim 1, further comprising, after the generating the call result corresponding to the rule call request:
acquiring a target calling object;
adding a call label to each target rule file which is executed according to the target call object; the call tag is used for representing called information of each target rule file.
5. The method according to claim 1, wherein the method further comprises:
acquiring a rule access request; the rule access request comprises an access rule name and a filtering parameter;
and acquiring an access rule file corresponding to the access rule name from the rule file library, and determining response information corresponding to the rule access request from the access rule file according to the filtering parameters.
6. The method according to claim 1, wherein the method further comprises:
acquiring a rule editing request; the rule editing request comprises an editing rule name and request object information;
acquiring an editing rule file corresponding to the editing rule name from the rule file library, and acquiring creation object information of the editing rule file;
determining editing rights corresponding to the rule editing request according to the matching result of the request object information and the creation object information;
acquiring a rule updating request under the condition that the editing authority corresponding to the rule editing request is editable; the rule update request includes an update rule file;
and generating a rule iteration record according to the updated rule file.
7. A rule management apparatus, the apparatus comprising:
the acquisition module is used for acquiring the rule calling request; the rule calling request comprises at least one target rule name and an execution sequence of each target rule name; the at least one target rule name includes an output rule name;
the first processing module is used for acquiring target rule files corresponding to the target rule names from the rule file library, taking the execution sequence of the target rule names as the execution sequence of the target rule files, and determining the execution result transfer object of the target rule files according to the execution sequence of the target rule files;
The second processing module is used for sequentially executing each target rule file according to the execution sequence, transmitting objects according to the execution results of each target rule file and acquiring calling parameters corresponding to the target rule files to be executed;
the third processing module is used for executing the target rule file to be executed according to the call parameters corresponding to the target rule file to be executed until all target rule files are executed;
and the response module is used for determining a target execution result from the execution results of each target rule file according to the output rule name and generating a calling result corresponding to the rule calling request based on the target execution result.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311069390.3A 2023-08-23 2023-08-23 Rule management method, device, computer equipment and storage medium Pending CN116880927A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311069390.3A CN116880927A (en) 2023-08-23 2023-08-23 Rule management method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311069390.3A CN116880927A (en) 2023-08-23 2023-08-23 Rule management method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116880927A true CN116880927A (en) 2023-10-13

Family

ID=88258917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311069390.3A Pending CN116880927A (en) 2023-08-23 2023-08-23 Rule management method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116880927A (en)

Similar Documents

Publication Publication Date Title
CN116719799A (en) Environment-friendly data management method, device, computer equipment and storage medium
CN117033424A (en) Query optimization method and device for slow SQL (structured query language) statement and computer equipment
CN114238085A (en) Interface testing method and device, computer equipment and storage medium
CN116795995A (en) Knowledge graph construction method, knowledge graph construction device, computer equipment and storage medium
CN116167882A (en) Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device
CN114462859A (en) Workflow processing method and device, computer equipment and storage medium
CN116880927A (en) Rule management method, device, computer equipment and storage medium
CN113849482A (en) Data migration method and device and electronic equipment
CN112035471A (en) Transaction processing method and computer equipment
CN116483532A (en) Scheduling processing method, device, computer equipment and storage medium
CN114036171B (en) Application data management method, device, computer equipment and storage medium
CN117540056B (en) Method, device, computer equipment and storage medium for data query
CN116756022A (en) Data preparation method, device, computer equipment and storage medium
CN117971649A (en) Data processing method, device, computer equipment and storage medium
CN116010424A (en) Attribute configuration method, attribute configuration device, computer equipment, storage medium and program product
CN116910069A (en) Database updating method, device, computer equipment and storage medium
CN117151839A (en) Mechanism tree changing method and device based on block chain and computer equipment
CN117349131A (en) System error information display method and device and computer equipment
CN118170833A (en) Resource information transfer method, device, computer equipment and storage medium
CN117370339A (en) Report blood edge relationship processing method and device, computer equipment and storage medium
CN116561074A (en) Method, device, computer equipment and storage medium for grouping resource data
CN116401323A (en) Index data processing method and device and computer equipment
CN118260075A (en) Data processing method, apparatus, computer device, readable storage medium, and product
CN117076721A (en) Data query method, device, equipment, medium and product
CN116225830A (en) Service operation log reporting method and device, computer equipment and storage medium

Legal Events

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