WO2020155735A1 - 规则引擎系统的规则更新方法、装置和计算机设备 - Google Patents
规则引擎系统的规则更新方法、装置和计算机设备 Download PDFInfo
- Publication number
- WO2020155735A1 WO2020155735A1 PCT/CN2019/116334 CN2019116334W WO2020155735A1 WO 2020155735 A1 WO2020155735 A1 WO 2020155735A1 CN 2019116334 W CN2019116334 W CN 2019116334W WO 2020155735 A1 WO2020155735 A1 WO 2020155735A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- executable file
- rule
- update
- file
- business
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Definitions
- This application relates to the technical field of data processing, in particular to a rule update method, device, computer equipment and storage medium of a rule engine system.
- the rule engine is a component that separates business decisions from application code and uses predefined semantic modules to write business decisions. It accepts data input, interprets business rules, and makes business decisions based on business rules.
- the rules engine can be applied In various businesses, but for different businesses, it will be more troublesome to update again after the business rule code is written.
- the existing rule engine system updates business rules, it first needs to export the rule set, then modify the rule set offline, and then zip the modified rule set into a compressed package, then upload it to the rule compilation platform, and manually trigger the compilation to generate the The executable package is downloaded and the executable package is finally deployed to achieve the update. Not only is the steps cumbersome, time-consuming and labor-intensive, but also cannot be updated in real time. For business market changes, the response to business rules adjustment is slow. For different businesses, it can only be artificially Deploying and updating the corresponding business rules to an adapted server environment based on experience is slow and error-prone.
- the main purpose of this application is to provide a rule updating method, device, computer equipment, and storage medium of a rule engine system that improves efficiency, and aims to solve the problem of slow update efficiency of business rules in the existing rule engine system.
- this application proposes a rule update method for a rule engine system, including:
- the target executable file is a file that is generated by a preset business rule set and can be run on the server;
- This application also provides a rule update device of the rule engine system, including:
- the obtaining instruction unit is used to obtain the update instruction for updating the business rules in the rule engine system
- the file reading unit is configured to read the latest version of the target executable file from the designated database according to the update instruction, where the target executable file is a file that is generated by a preset business rule set and can be run on the server;
- the obtaining type unit is used to obtain the service type corresponding to the business rule according to the target executable file and record it as the first service type, wherein the same service type includes multiple different services;
- the calculation coefficient unit is configured to calculate the important coefficient corresponding to the first service type according to the weights corresponding to all the services in the first service type and the usage amount corresponding to each of the services in the first service type;
- the judgment coefficient unit is used to judge whether the important coefficient is greater than a preset threshold
- the update file unit is used to update the target executable file in a stand-alone server environment when it is determined that the important coefficient is greater than a preset threshold; if not, then update the target executable file in a public server environment Update.
- the present application also provides a computer device including a memory and a processor, the memory stores computer readable instructions, and the processor implements the steps of the above method when the computer readable instructions are executed.
- the present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of the foregoing method are implemented.
- the beneficial effects of this application are: directly read the executable file when updating the rules, and then deploy the executable file in the corresponding server environment according to the calculated important coefficients of the rule system, which is convenient and fast, without artificially relying on experience To deploy business rules and deploy them in a targeted manner, which saves resources while avoiding cross-influence of important business rules.
- business rules can be modified in real time to quickly respond to changes in the business market.
- FIG. 1 is a schematic diagram of the steps of a rule update method of a rule engine system in an embodiment of this application;
- FIG. 2 is a schematic block diagram of the structure of a rule updating device of a rule engine system in an embodiment of the application;
- FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
- the rule update method of the rule engine system in this embodiment includes:
- Step S1 Obtain an update instruction for updating the business rules in the rule engine system
- Step S2 Read the latest version of the target executable file from the designated database according to the update instruction, where the target executable file is a file that is generated by a preset business rule set and can be run on the server;
- Step S3 Obtain the business type corresponding to the business rule according to the target executable file, and record it as the first business type, where the same business type includes multiple different businesses;
- Step S4 Calculate the important coefficient corresponding to the first service type according to the weights corresponding to all the services in the first service type and the usage amount corresponding to each of the services in the first service type;
- Step S5 Determine whether the important coefficient is greater than a preset threshold
- Step S6 If yes, update the target executable file part in an independent server environment, if not, update the target executable file in a public server environment.
- the current business rules can be updated according to the update instructions.
- the business rules are rule data corresponding to a certain business type. These rule data include rule codes.
- the aforementioned update instruction can be generated based on an update request initiated by a user, or can be automatically triggered when the rule engine system restarts.
- the target executable file is a file that is generated by a preset business rule set and can be run on the server.
- the file is a jar package that can be run and deployed, and the target executable file is generated by the system It is generated according to the rule parameters entered by the user and stored in a specified database, such as a MongoDB database.
- the business rules of the rule engine system are applied to different businesses, and some businesses in different businesses can use the same business rules, so these different businesses can be classified to obtain multiple business types, and Each business type includes multiple different businesses, and each business type corresponds to a business rule. Since the target executable file is generated by the rule parameters entered by the user, and the rule parameters contain business information, the corresponding business type can be obtained from this information, so the corresponding business type of the business rule can be obtained according to the target executable file In this embodiment, for ease of presentation, the service type is recorded as the first service type.
- the important coefficient of the first service type can be calculated, and then the above-mentioned business rules can be updated according to the important coefficient. Since the importance of the service type is different, it will be deployed to different server environments when updating.
- the importance of a business type is determined by the various businesses it contains. For example, a business type includes financial transactions, ordinary transactions, core businesses, and non-core businesses. Among them, financial transactions are more important, and their weights are also relatively important. high. Therefore, the above-mentioned important coefficient can be calculated by the importance of all services in the first service type, that is, the preset weights corresponding to each service.
- the above-mentioned updating of the target executable file in the server environment can be achieved by deploying the target executable file in the server. Due to different business rules, the update will be deployed to different server environments.
- the server environments are divided into independent server environments and public server environments.
- the business rules deployed in the independent server environment can be run in the independent environment separately.
- For business rules deployed in a public server environment multiple different business rules can be deployed, and multiple business rules run at the same time. This targeted deployment not only saves resources, but also avoids important business rules at runtime.
- the important coefficient is calculated using the following formula:
- n services in the first service type there are preset n services in the first service type, R is the important coefficient, W is the weight of each service in the first service type, and C is each service in the first service type Usage.
- the above-mentioned important coefficients can be calculated by the weight of each service of the above-mentioned service type and the usage of each service.
- the above-mentioned weight can be preset by the user, and the usage can be obtained through the corresponding service system.
- the aforementioned first service type is predicted There are four businesses, namely financial transaction, ordinary transaction, core business and non-core business. W1, W2, W3, W4 are the weights of financial transaction, ordinary transaction, core business and non-core business type in turn, where W1> W2>W3>W4, c1, c2, c3, and c4 are the usage of the above-mentioned financial transactions, ordinary transactions, core business, and non-core business in turn.
- the important coefficient of the first service type is calculated by the above formula.
- the important system is between 0 and 1.
- the important coefficient can be compared with the preset threshold.
- the preset threshold may be 0.7.
- the target executable file can be deployed in an independent server environment. If the threshold is not exceeded, the rule system is not important. It can be deployed in a public service environment.
- step S4 the method includes:
- Step S41 Invoke the historical record of each of the services used in the first service type
- Step S42 Count the usage times of each service according to the historical records, and record the usage times as the usage amount.
- the usage amount of each service in the first service type is needed to calculate the above important coefficients, it is necessary to obtain the usage amount of each service before calculating. It is known that each service is being used. It will be recorded, for example, in the system log. Therefore, by calling the corresponding log and checking the record in the log, you can get the number of uses of this type of business. The number of uses is recorded as the amount of use mentioned above. Check the corresponding record to get the usage of each service in the first service type.
- step S1 the method includes:
- Step S01 receiving the rule parameters input by the user in the rule editing interface to form a target rule file
- Step S02 Parse the target rule file into a target prl file
- Step S03 Compile the prl file into the target executable file
- Step S04 Store the target executable file in the designated database
- Step S05 Define the target executable file as the latest version through a tag tag in the designated database according to a historical file, the historical file being stored before storing the target executable file in the designated database The executable file in the specified database.
- the rule editing interface is displayed through a browser.
- the rule parameters are added to the set of business rules preset by the developer to form
- the user fills in different rule parameters to form different target rule files, where the target rule file exists in the form of html.
- the user after the user finishes inputting the rule parameters on the rule editing interface, he can input the formation instruction, and the system can form the target rule file according to the formation instruction to the business rule set added to the rule parameters.
- the above prl file is the code program corresponding to the rule, and running the code program can realize the business strategy corresponding to the business rule.
- parsing the target rule file into the target prl file can be specifically as follows Steps: According to the parameters input by the user, the target rule file is logically divided into three parts: when, then, and else, and then these three parts are packaged and merged to form the target prl file.
- the target prl file is compiled into the target executable file, that is, the target prl file is marked into a jar package that can be run and deployed, the jar package is the target executable file, and then the target can be The execution file is stored in the specified database.
- the latest version of the target executable file is defined through the tag tag of the above-mentioned target executable file, and this version is defined on the basis of the old version corresponding to the historical file.
- the history file is an executable file that exists before the target executable file is stored in the specified database. For example, when an executable file is stored in MongoDB for the first time, it is defined as the first generation version, and the user updates it again afterwards.
- the executable file stored in the MongoDB is defined as the second-generation version, and so on, each update defines its corresponding version on the basis of the previous version, and the target executable file mentioned above is in the specified database The latest version in.
- the user can directly generate the latest version of the current rule by filling in the parameters in the rule editing interface.
- the user can modify the rule in real time, the update speed is accelerated, and the efficiency is greatly improved. There is no need to go offline for each update. Modify and upload it to reduce the rule update steps and avoid the impact of human error.
- the step of deploying and then updating the target executable file in a stand-alone server environment includes:
- Step S601 Replace the executable file that has been deployed in the independent server with the target executable file of the latest version
- Step S602 Deploy the target executable file to complete the update.
- the old version of the executable file in the independent server is replaced with the latest version of the target executable file, that is, the old version of the executable file is overwritten, and the target executable file is Executable files are deployed to implement rule updates, such as replacing the first-generation rules in the server with second-generation rules according to user requests.
- rule updates such as replacing the first-generation rules in the server with second-generation rules according to user requests.
- the method includes:
- Step S61 Obtain the first feedback information returned by the independent server indicating that the updated business rule version is not compatible, including that the target executable file cannot be updated in the independent server environment, and The target executable file cannot run after the update is completed in the independent server environment;
- Step S62 Re-read the executable file from the designated database according to the first feedback information
- Step S63 Replace the target executable file with the executable file, and deploy the executable file
- the method includes:
- Step S61' Obtain the second feedback information returned by the public server that the updated business rule version is not suitable, and the updated business rule version is not suitable, including that the target executable file cannot be updated in the public server environment, And the target executable file cannot run after the update is completed in the public server environment;
- Step S62' re-read the executable file from the designated database according to the second feedback information
- Step S63' Replace the target executable file with the executable file, and deploy the executable file in the public server environment.
- the server since the target executable file is an updated version, the server may not necessarily adapt to and be able to run the target executable file, so after replacing the old version executable file with the latest version of the target executable file ,
- the server is not suitable for updating the version, that is, the update corresponding business rules are not suitable, then feedback information is returned.
- the above-mentioned updating business rules are not suitable for two situations, one is that the target executable file is in the public server environment The update cannot be completed in the middle, one is the case where the target executable file cannot run after the update is completed in the public server environment, and the above feedback information is information corresponding to these two cases.
- the server can be an independent server or a public server.
- the method includes:
- Step S7 Determine whether the update method for updating the business rule is based on the important coefficient
- Step S8 If the update method is to update based on the important coefficient, generate a calculation instruction for calculating the important coefficient; if the update method is not to update based on the important coefficient, then determine whether the business rule operation volume corresponding to the first business type is Exceed the preset operating volume;
- Step S9 If the running volume of the business rule exceeds the preset running volume, update the target executable file in the independent server environment, and if the running volume of the business rule does not exceed the preset running volume, then The target executable file is updated in the public server environment.
- the deployment environment of business rules can also be determined directly based on the running volume. Therefore, after obtaining the first business type, first determine the update method of the business rule and the update method There are two types: update based on important coefficients and update based on operating volume. When the update method is based on important coefficients, directly generate calculation instructions for calculating important coefficients, calculate the important coefficients according to the calculation instructions, and then execute step S5- S6. When the update method is not updated based on the important coefficient, it can be judged based on the running volume. Because of the different business types and different users, the running volume of the corresponding business rules is also different. At this time, the running server can also be different.
- the small running volume is sent to the public server to run. Because the running volume is small, the public server can run multiple executable files at the same time, while the large running volume needs to be sent to a separate server, which is run by a server alone. Ensure that the program runs normally. Therefore, in steps S8-S9, first determine whether the running volume of the target executable file exceeds the preset running volume.
- the preset running volume can be set with reference to the running volume of the server. When the preset running volume is exceeded, the target executable can be set The file is distributed to a separate server, the old version of the executable file is replaced with the latest version of the target executable file, and the deployment is performed to complete the update. If the preset running volume is not exceeded, the target executable file is distributed to the public server , Replace the old version of the executable file with the latest version of the target executable file, and forget to deploy the target executable to complete the update.
- the rule updating device of the rule engine system in this embodiment includes:
- the obtaining instruction unit 100 is configured to obtain an update instruction for updating business rules in the rule engine system
- the file reading unit 200 is configured to read a target executable file of the latest version from a designated database according to the update instruction, the target executable file being a file generated by a preset business rule set and that can be run on a server;
- the obtaining type unit 300 is configured to obtain the service type corresponding to the business rule according to the target executable file, and record it as the first service type, wherein the same service type includes multiple different services;
- the calculation coefficient unit 400 is configured to calculate an important coefficient corresponding to the first service type according to the weights corresponding to all the services in the first service type and the usage amount corresponding to each of the services in the first service type;
- the judging coefficient unit 500 is used to judge whether the important coefficient is greater than a preset threshold
- the update file unit 600 is used to update the target executable file in an independent server environment when it is determined that the important coefficient is greater than a preset threshold; if not, update the target executable file in a public server environment To be updated.
- the current business rules can be updated according to the update instructions, and the foregoing business rules are rules corresponding to a certain business type.
- these rule data include rule codes.
- the aforementioned update instruction can be generated based on an update request initiated by a user, or can be automatically triggered when the rule engine system restarts.
- the above-mentioned target executable file is a file that is generated by a preset set of business rules and can be run on the server. If the above-mentioned file is a jar package that can be run and deployed, the target executable file is The file is generated by the system according to the rule parameters entered by the user, and stored in a specified database, such as a MongoDB database.
- the business rules of the above-mentioned rule engine system are applied to different businesses, and some of the different businesses can use the same business rules, so these different businesses can be classified to obtain multiple business types , And each business type includes multiple different businesses, and each business type corresponds to a business rule. Since the target executable file is generated by the rule parameters entered by the user, and the rule parameters contain business information, the corresponding business type can be obtained from this information, so the corresponding business type of the business rule can be obtained according to the target executable file In this embodiment, for ease of presentation, the service type is recorded as the first service type.
- the important coefficient of the first service type can be calculated, and then the above-mentioned business rules can be updated according to the important coefficient.
- the importance of the service type is different, it will be deployed to different
- the importance of a business type is determined by the various businesses it contains. For example, a business type contains four businesses: financial transactions, ordinary transactions, core businesses, and non-core businesses. Among them, financial transactions are more important. Also relatively high. Therefore, the above-mentioned important coefficient can be calculated by the importance of all services in the first service type, that is, the preset weights corresponding to each service.
- the usage of the first service type is required to calculate the above important coefficients.
- the important coefficient corresponding to the first service type is based on the weight of all services in the first service type and the corresponding usage of each service in the first service type. Then according to the important factor to allocate updates to the applicable server environment.
- the aforementioned update of the target executable file in the server environment can be implemented by deploying the target executable file in the server. Due to different business rules, the update will be deployed to different server environments.
- the server environments are divided into independent server environments and public server environments.
- the business rules deployed in the independent server environment can be separately deployed in the independent environment For business rules deployed in a public server environment, multiple different business rules can be deployed, and multiple business rules run at the same time.
- important Business rules are cross-influenced by unimportant business rules, so important business rules need to be deployed in an independent server environment, unimportant business rules can be deployed in a public server environment, so after obtaining the business type corresponding to the business rule, you can follow
- the corresponding weights of all services in the business type and the corresponding usage of each business in the business type calculate the important coefficient corresponding to the business type. The higher the important coefficient, the more important the business type. When the important coefficient is greater than the preset threshold, Then the business rules corresponding to the business type can be deployed to the independent server environment, otherwise it can be directly deployed in the public server environment.
- the important coefficient is calculated using the following formula:
- n services in the first service type there are preset n services in the first service type, R is the important coefficient, W is the weight of each service in the first service type, and C is each service in the first service type Usage.
- the rule update device of the above-mentioned step rule engine system includes:
- a call recording unit which is used to call a historical record of each of the services used in the first service type
- the statistical usage unit is used to count the usage times of each type of service according to the historical records, and record the usage times as the usage amount.
- the rule updating device of the aforementioned step rule engine system further includes:
- the parameter receiving unit is used to receive the rule parameters input by the user in the rule editing interface to form a target rule file
- the file storage unit is used to store the target executable file in the designated database
- the definition version unit is used to define the target executable file as the latest version through a tag tag in the specified database according to a history file, where the history file is before storing the target executable file in the specified database , The executable file that has been stored in the specified database.
- the aforementioned update file unit 600 includes:
- the file replacement unit is used to replace the executable file deployed in the independent server with the target executable file of the latest version
- the deployment file unit is used to deploy the target executable file to complete the update.
- the rule updating device of the above-mentioned rule engine system includes:
- the first acquiring unit is configured to acquire the first feedback information returned by the independent server that the updated business rule version is not compatible, and the updated business rule version is not compatible, including that the target executable file cannot be updated in the independent server environment , And the target executable file cannot run after the update is completed in the independent server environment;
- the first reread unit is configured to reread the executable file from the designated database according to the first feedback information
- the first replacement unit is configured to replace the target executable file with the executable file, and deploy the executable file
- the rule update device of the above rule engine system also includes:
- the second obtaining unit is configured to obtain the second feedback information returned by the public server that the updated business rule version is not suitable, and the updated business rule version is not suitable for including the target executable file cannot be found in the public server environment.
- the update is completed, and the target executable file cannot run after the update is completed in the public server environment;
- a second reread unit configured to reread the executable file from the designated database according to the second feedback information
- the second deployment unit is configured to replace the target executable file with the executable file, and deploy the executable file in the public server environment.
- the rule updating device of the above-mentioned rule engine system includes:
- the judging operation unit is configured to generate a calculation instruction for calculating important coefficients when the update mode is to update based on the important coefficient; if the update mode is not to update based on the important coefficient, determine the business corresponding to the first service type Whether the running volume of the rule exceeds the preset running volume;
- An operation update unit configured to update the target executable file in the independent server environment if the operation volume of the business rule exceeds the preset operation volume, and if the operation volume of the business rule does not exceed the preset operation volume ,
- the target executable file is updated in the public server environment.
- an embodiment of the present application also provides a computer device.
- the computer device may be a server, and its internal structure may be as shown in FIG. 3.
- the computer equipment includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the computer designed processor is used to provide calculation 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 readable instructions, and a database.
- the memory provides an environment for the operation of the operating system and computer readable instructions in the non-volatile storage medium.
- the database of the computer equipment is used to store all the data required to update the rules in the rule engine system.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the computer readable instruction is executed by the processor to realize a rule update method of the rule engine system.
- the processor executes the steps of the rule update method of the rule engine system: obtains an update instruction for updating the business rules in the rule engine system; reads the latest version of the target executable file from the designated database according to the update instruction, so
- the target executable file is a file that is generated by a preset business rule set and can be run on the server; the business type corresponding to the business rule is obtained according to the target executable file, and is recorded as the first business type, where the same A service type includes multiple different services; according to the weights corresponding to all services in the first service type, and the corresponding usage of each service in the first service type, the corresponding first service is calculated
- the important coefficient of the type determine whether the important coefficient is greater than the preset threshold; if yes, update the target executable file in a stand-alone server environment; if not, update the target executable file in a public server environment To be updated.
- the above-mentioned calculation of the important coefficient corresponding to the first service type is based on the weights corresponding to all the services in the first service type and the usage amount corresponding to each of the services in the first service type. Before the step, it includes: invoking the historical record of each of the services used in the first service type; counting the number of uses of each service according to the historical record, and recording the number of uses as the amount of use .
- the step before the step of obtaining the update instruction for updating the business rules in the rule engine system, the step includes: receiving the rule parameters input by the user in the rule editing interface to form a target rule file; The rule file is parsed into a target prl file; the prl file is compiled into the target executable file; the target executable file is stored in the designated database; the target is stored in the designated database according to the historical file
- the executable file is defined as the latest version through a tag, and the history file is an executable file that has been stored in the specified database before the target executable file is stored in the specified database.
- the above step of updating the target executable file in an independent server environment includes: replacing the executable file already deployed in the independent server with the target executable file; The target executable file is deployed to complete the update.
- the target executable file in an independent server environment includes: obtaining the first feedback information returned by the independent server that the updated business rule version is not suitable, and the update service
- the rule version incompatibility includes that the target executable file cannot be updated in the independent server environment, and the target executable file cannot run after the update is completed in the independent server environment; according to the first feedback information from Re-read the executable file in the designated database; replace the target executable file with the executable file, and deploy the executable file in the independent server environment; or
- the step of updating the target executable file in the public server environment it includes: acquiring the second feedback information returned by the public server that the updated business rule version is not suitable, and the updated business rule version is not suitable for including the target
- the executable file cannot be updated in the public server environment, and the target executable file cannot be run after the update is completed in the public server environment; re-read all files from the designated database according to the second feedback information
- the executable file replace the target executable file with the executable file, and
- the step of obtaining the business type of the business rule based on the target executable file and recording it as the first business type it includes: judging whether the update method of the business rule is based on The important coefficient is updated; if the update method is based on the important coefficient, a calculation instruction for calculating the important coefficient is generated; if the update method is not based on the important coefficient, the business rule corresponding to the first business type is determined Whether the running volume exceeds the preset running volume; if the running volume of the business rules exceeds the preset running volume, the target executable file is updated in the independent server environment, and if the running volume of the business rules does not exceed the preset running volume, Assuming the running volume, the target executable file is updated in the public server environment.
- FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- An embodiment of the present application further provides a computer-readable storage medium.
- the computer-readable storage medium is, for example, a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
- the target executable file is a file that is generated by a preset business rule set and can be run on the server; and the corresponding target executable file is obtained according to the target executable file.
- the business type of the business rule is recorded as the first business type, where the same business type includes multiple different businesses; based on the weights corresponding to all businesses in the first business type, and the first business type Calculate the important coefficient corresponding to the first service type according to the usage amount corresponding to each of the services; determine whether the important coefficient is greater than a preset threshold; if so, perform the target executable file in an independent server environment Update, if not, update the target executable file in the public server environment.
- the above-mentioned computer-readable storage medium the above-mentioned calculation of an important coefficient corresponding to the first service type based on the weights corresponding to all the services in the first service type and the usage amount corresponding to each of the services in the first service type
- the weight of each service, C is the usage amount of each service in the first service type.
- the above-mentioned calculation of the important coefficient corresponding to the first service type is based on the weights corresponding to all the services in the first service type and the usage amount corresponding to each of the services in the first service type. Before the step, it includes: invoking the historical record of each of the services used in the first service type; counting the number of uses of each service according to the historical record, and recording the number of uses as the amount of use .
- the step before the step of obtaining the update instruction for updating the business rules in the rule engine system, the step includes: receiving the rule parameters input by the user in the rule editing interface to form a target rule file; The rule file is parsed into a target prl file; the prl file is compiled into the target executable file; the target executable file is stored in the designated database; the target is stored in the designated database according to the historical file
- the executable file is defined as the latest version through a tag, and the history file is an executable file that has been stored in the specified database before the target executable file is stored in the specified database.
- the above step of updating the target executable file in an independent server environment includes: replacing the executable file already deployed in the independent server with the target executable file; The target executable file is deployed to complete the update.
- the target executable file in an independent server environment includes: obtaining the first feedback information returned by the independent server that the updated business rule version is not suitable, and the update service
- the rule version incompatibility includes that the target executable file cannot be updated in the independent server environment, and the target executable file cannot run after the update is completed in the independent server environment; according to the first feedback information from Re-read the executable file in the designated database; replace the target executable file with the executable file, and deploy the executable file in the independent server environment; or
- the step of updating the target executable file in the public server environment it includes: acquiring the second feedback information returned by the public server that the updated business rule version is not suitable, and the updated business rule version is not suitable for including the target
- the executable file cannot be updated in the public server environment, and the target executable file cannot be run after the update is completed in the public server environment; re-read all files from the designated database according to the second feedback information
- the executable file replace the target executable file with the executable file, and
- the step of obtaining the business type of the business rule based on the target executable file and recording it as the first business type it includes: judging whether the update method of the business rule is based on The important coefficient is updated; if the update method is based on the important coefficient, a calculation instruction for calculating the important coefficient is generated; if the update method is not based on the important coefficient, the business rule corresponding to the first business type is determined Whether the running volume exceeds the preset running volume; if the running volume of the business rules exceeds the preset running volume, the target executable file is updated in the independent server environment, and if the running volume of the business rules does not exceed the preset running volume, Assuming the running volume, the target executable file is updated in the public server environment.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请提出的规则引擎系统的规则更新方法、装置、计算机设备和存储介质,其中方法包括:获取对规则引擎系统中的业务规则进行更新的更新指令;依据更新指令从指定数据库中读取最新版本的目标可执行文件,依据目标可执行文件获取对应业务规则的第一业务类型;依据第一业务类型中所有业务对应的权重,以及第一业务类型中各业务对应的使用量计算出对应第一业务类型的重要系数;判断重要系数是否大于预设阀值;若是,则将目标可执行文件在独立服务器环境中进行更新,若否,则将目标可执行文件在公共服务器环境中进行更新,这样方便快捷,无需人为地依靠经验去部署业务规则,在节约资源的同时还可以避免重要的业务规则被交叉影响。
Description
本申请要求于2019年1月31日提交中国专利局、申请号为201910101290.1,申请名称为“规则引擎系统的规则更新方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及到数据处理的技术领域,特别是涉及到一种规则引擎系统的规则更新方法、装置、计算机设备和存储介质。
规则引擎是一个将业务决策从应用程序代码中分离出来,并使用预定义的语义模块编写业务决策的组件,它接受数据输入,解释业务规则,并根据业务规则做出业务决策,规则引擎可应用在各种业务中,但是对于不同业务,其业务规则代码编写完成后,再次进行更新会较为麻烦。
现有的规则引擎系统更新业务规则时,首先需要导出规则集,然后线下修改规则集,再将修改后的规则集打成压缩包,然后上传到规则编译平台,通过人工触发编译进而生成可执行的包,最后下载可执行包来部署才能实现更新,不但步骤繁琐,耗时耗力,还不能实时更新,对于业务市场变化,对应业务规则调整响应较慢,对于不同业务,只能人为地依据经验将对应的业务规则部署更新到适应的服务器环境中,效率慢且容易出错。
发明内容
本申请的主要目的为提供一种提高效率的规则引擎系统的规则更新方法、装置、计算机设备和存储介质,旨在解决现有规则引擎系统中业务规则更新效率慢的问题。
基于上述发明目标,本申请提出一种规则引擎系统的规则更新方法,包括:
获取对规则引擎系统中的业务规则进行更新的更新指令;
依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;
依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;
依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务 对应的使用量计算出对应所述第一业务类型的重要系数;
判断所述重要系数是否大于预设阀值;
若是,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
本申请还提供一种规则引擎系统的规则更新装置,包括:
获取指令单元,用于获取到对规则引擎系统中的业务规则进行更新的更新指令;
读取文件单元,用于依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;
获取类型单元,用于依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;
计算系数单元,用于依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;
判断系数单元,用于判断所述重要系数是否大于预设阀值;
更新文件单元,用于判断所述重要系数大于预设阀值时,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述方法的步骤。
本申请还提供了一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述方法的步骤。
本申请的有益效果为:在更新规则时直接读取可执行文件,然后依据计算出的规则系统的重要系数,将该可执行文件部署在对应的服务器环境中,方便快捷,无需人为地依靠经验去部署业务规则,且有针对性部署,节约资源的同时还可以避免重要的业务规则被交叉影响,另外还可以实时修改业务规则,快速响应业务市场的变化。
图1为本申请一实施例中规则引擎系统的规则更新方法的步骤示意图;
图2为本申请一实施例中规则引擎系统的规则更新装置的结构示意框图;
图3为本申请一实施例的计算机设备的结构示意框图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本实施例中的规则引擎系统的规则更新方法,包括:
步骤S1:获取对规则引擎系统中的业务规则进行更新的更新指令;
步骤S2:依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;
步骤S3:依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;
步骤S4:依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;
步骤S5:判断所述重要系数是否大于预设阀值;
步骤S6:若是,则将所述目标可执行文件部在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
如上述步骤S1所述,当获取到对规则引擎系统的业务规则进行更新的更新指令时,可依据更新指令对当前的业务规则进行更新,上述业务规则即为对应某一业务类型的规则数据,这些规则数据包括规则代码。上述更新指令可以依据用户发起的更新请求而生成,也可以是在规则引擎系统重启时自动触发而产生。
如上述步骤S2所述,上述目标可执行文件为由预设的业务规则集生成的且可在服务器中运行的文件,如上述文件为可进行运行部署的jar包,该目标可执行文件由系统依据用户输入的规则参数生成,并存储在指定的数据库中,如存储在MongoDB数据库。
如上述步骤S3所述,上述规则引擎系统的业务规则应用到不同的业务,而不同的业务当中部分业务可采用同一种业务规则,故而可将这些不同的业务分类,得到多个业务类型,且每种业务类型包括有多个不同的业务,每个业务类型均对应一种业务规则。由于目标可执行文件由用户输入的规则参数生成,而规则参数中包含有业务信息,从该信息中可得到对应的业务类型,故而依据目标可执行文件可获取得到对应的该业务规则的业务类型,本实施例中为了便于表述将该业务类型记为第一业务类型。
如上述步骤S4所述,可通过计算出第一业务类型的重要系数,然后依据重要系数来更新上述业务规则,由于业务类型的重要程度不同,在进行更新时,会将其部署到不同服务器环境中,而业务类型的重要程度由其包含的各个业务决定,例如在一个业务类型中包含有金融交易、普通交易、核心业务以及非核心业务四种业务,其中金融交易较为重要, 则权重也相对高。故而可通过第一业务类型中所有业务的重要程度,即预设的对应各业务的权重来计算上述重要系数。同时为了保证业务规则部署后运行顺畅,需要知道第一业务类型的使用量,以便更好分配更新到对应服务器环境中,故而需要第一业务类型中各业务的使用量来计算上述重要系数,综上,在更新之前,无需人为凭经验去分配部署,直接依据第一业务类型中所有业务的权重,以及第一业务类型中各业务对应的使用量计算出对应第一业务类型的重要系数,再依据重要系数来分配更新到适用的服务器环境中。
如上述步骤S5-S6所述,上述在目标可执行文件在服务器环境中进行更新,可通过将目标可执行文件在服务器中部署来实现。由于不同的业务规则,更新时会部署到不同的服务器环境中,而服务器环境分为独立服务器环境以及公共服务器环境,其中部署在独立服务器环境中的业务规则,可单独在该独立环境中运行,而部署在公共服务器环境中的业务规则,则可以部署多个不同的业务规则,多个业务规则同时运行,这样有针对性的部署,不但可以节省资源同时也可以避免运行时,重要的业务规则被不重要的业务规则交叉影响,故而重要的业务规则需要部署在独立服务器环境中,不重要的业务规则可以部署在公共服务器环境中,所以获取到对应业务规则的业务类型之后,可依据业务类型中所有业务对应的权重,以及业务类型中各业务对应的使用量计算出对应该业务类型的重要系数,重要系数越高,表明该业务类型越重要,当重要系数大于预设阀值,则可将对应该业务类型的业务规则部署到独立服务器环境,否则可直接部署在公共服务器环境。
在一个实施例中,利用以下公式计算出所述重要系数:
R=(W
1+W
2+…+W
n)/(π*W
1/2arctan(C
1)+π*W
2/2arctan(C
2)+…+π*W
n/2arctan(C
n));
其中,所述第一业务类型中预设有n个业务,R为所述重要系数,W为所述第一业务类型中的各业务的权重,C为所述第一业务类型中的各业务的使用量。
上述重要系数可通过上述业务类型的各个业务的权重以及各业务的使用量来计算,上述权重可由用户预设,使用量可通过对应的业务系统获取,本实施例中,上述第一业务类型预设有四个业务,分别为金融交易、普通交易、核心业务以及非核心业务,则W1、W2、W3、W4依次为金融交易、普通交易、核心业务以及非核心业务类型的权重,其中W1>W2>W3>W4,c1、c2、c3、c4依次为上述金融交易、普通交易、核心业务以及非核心业务的使用量。通过上述公式计算出第一业务类型的重要系数,该重要系统在0与1之间,重要系数越高说明该第一业务类型越重要,这时可以将重要系数与预设阀值对比,本实施例中,上述预设阀值可为0.7,当超过该阀值,则可将上述目标可执行文件部署在 独立服务器环境中,若不超过预设阀值,则说明该规则系统不重要,则可部署在公共服务环境中。
在一个实施例中,上述步骤S4之前,包括:
步骤S41:调用所述第一业务类型中每种所述业务每次被使用的历史记录;
步骤S42:依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
本实施例中,由于需要第一业务类型中各业务的使用量来进行计算上述重要系数,故而在计算之前,需要获取到上述各业务的使用量,已知的是,每种业务在被使用的时候,均会被记录下来,例如记录在系统日志中,故而通过调用对应的日志,查看日志中的记录即可得到该种业务的使用次数,将使用次数记为上述使用量,通过调用并查看对应的记录可得到第一业务类型中每个业务的使用量。
在一个实施例中,上述步骤S1之前,包括:
步骤S01:接收用户在规则编辑界面中输入的规则参数,以形成目标规则文件;
步骤S02:将所述目标规则文件解析成目标prl文件;
步骤S03:将所述prl文件编译成所述目标可执行文件;
步骤S04:将所述目标可执行文件存储至所述指定数据库中;
步骤S05:在所述指定数据库中依据历史文件将所述目标可执行文件通过tag标签定义为最新版本,所述历史文件为在将所述目标可执行文件存储在所述指定数据库之前,已经存储在所述指定数据库中的可执行文件。
如上述步骤S01所述,上述规则编辑界面通过浏览器的方式展现,当接收到用户(如业务人员)输入的规则参数之后,将规则参数加入到由开发人员预设的业务规则集中,以形成对应上述规则参数的目标规则文件,用户填入不同的规则参数,则会形成不同的目标规则文件,其中,该目标规则文件以html的方式存在。本实施例中,当用户在规则编辑界面完成输入规则参数之后,可输入形成指令,系统即可依据形成指令将加入上述规则参数的业务规则集形成上述目标规则文件。
如上述步骤S02所述,上述prl文件即为对应规则的代码程序,运行该代码程序可实现对应该业务规则的业务策略,本实施例中,将目标规则文件解析成目标prl文件具体可通过如下步骤:依据用户输入的参数将目标规则文件按逻辑关系分成when、then、else三部分,然后依次对这三部分进行打包合并形成上述目标prl文件。
如上述步骤S03及步骤S04所述,将目标prl文件编译成上述目标可执行文件,即将 目标prl文件打成可以运行部署的jar包,该jar包即为上述目标可执行文件,然后将目标可执行文件存储至指定数据库中。
如上述步骤S05所述,在上述指定数据库中,将上述目标可执行文件通过tag标签定义出该目标可执行文件的最新版本,该版本是在历史文件对应的旧版本的基础上进行定义的,该历史文件为在将目标可执行文件存储在指定数据库之前已经存在的可执行文件,如某可执行文件在第一次存储到MongoDB时,定义为第一代版本,之后用户再一次更新,重新存储至该MongoDB中的可执行文件定义为第二代版本,以此类推,每一次更新都在前一个版本的基础上往后定义其对应的版本,而上述目标可执行文件即是在指定数据库中的最新版本。
通过上述方法,当需要更新规则时,用户直接通过在规则编辑界面填入参数即可生成当前规则的最新版本,用户可实时修改规则,更新速度加快,效率大大提高,无需每次更新时在线下修改再上传,减少规则更新步骤,避免人为出错带来影响。
在一个实施例中,上述步骤S6中,依据将目标可执行文件部署进而更新在独立服务器环境中的步骤,包括:
步骤S601:将所述独立服务器中已经部署的所述可执行文件替换成所述最新版本的目标可执行文件;
步骤S602:对所述目标可执行文件进行部署以完成更新。
本实施例中,将该目标可执行文件下发至独立服务器之后,将独立服务器中旧版本的可执行文件替换成最新版本的目标可执行文件,即覆盖旧版本的可执行文件,并对目标可执行文件进行部署,从而实现规则更新,如依据用户请求,将服务器中第一代的规则替换成第二代规则,同理,在公共服务器环境中更新时,可将公共服务器中旧版本的可执行文件替换成最新版本的目标可执行文件,并对该目标可执行文件进行部署,以完成更新。
在一个实施例中,上述步骤S6之后,包括:
步骤S61:获取所述独立服务器返回的更新业务规则版本不适应的第一反馈信息所述更新业务规则版本不适应包括所述目标可执行文件在所述独立服务器环境中无法完成更新,以及所述目标可执行文件在所述独立服务器环境中更新完成之后无法运行;
步骤S62:依据所述第一反馈信息从所述指定数据库中重新读取所述可执行文件;
步骤S63:将所述目标可执行文件替换成所述可执行文件,并对所述可执行文件进行部署;
或者,将所述目标可执行文件在公共服务器环境中进行更新的步骤之后,包括:
步骤S61’:获取到所述公共服务器返回的更新业务规则版本不适应的第二反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述公共服务器环境中无法完成更新,以及所述目标可执行文件在所述公共服务器环境中更新完成之后无法运行;
步骤S62’:依据所述第二反馈信息从所述指定数据库中重新读取所述可执行文件;
步骤S63’:将所述目标可执行文件替换成所述可执行文件,并在所述公共服务器环境中对所述可执行文件进行部署。
本实施例中,由于目标可执行文件为更新后的版本,服务器并不一定会适应并能够运行该目标可执行文件,故而在将旧版本的可执行文件替换成最新版本的目标可执行文件之后,当该服务器在更新该版本不适合时,即更新对应的业务规则不适应,这时返回反馈信息,上述更新业务规则不适应的情况包括两种,一种为目标可执行文件在公共服务器环境中无法完成更新,一种为目标可执行文件在公共服务器环境中更新完成之后无法运行的情况,上述反馈信息为对应这两种情况的信息。获取该反馈信息之后,会从指定数据库中重新读取旧版板的可执行文件,将服务器中已更新的新版本替换成原来的旧版本可执行文件,避免出现更新不适合无法运行的情况,上述服务器可为独立服务器,也可为公共服务器。
另一实施例中,上述步骤S3之后,包括:
步骤S7:判断对所述业务规则进行更新的更新方式是否为依据所述重要系数更新;
步骤S8:若更新方式为依据所述重要系数更新,则生成计算重要系数的计算指令;若更新方式不为依据所述重要系数更新,则判断所述第一业务类型对应的业务规则运行量是否超过预设运行量;
步骤S9:若所述业务规则运行量超过预设运行量,则将所述目标可执行文件在所述独立服务器环境中进行更新,若所述业务规则运行量未超过预设运行量,则将所述目标可执行文件在所述公共服务器环境中进行更新。
可以理解的是,除了通过重要系数来决定业务规则的部署环境,还可以直接根据运行量来决定业务规则的部署环境,故而在获得第一业务类型之后,首先判断业务规则的更新方式,更新方式有两种,分别为依据重要系数更新以及依据运行量更新,当更新方式为依据重要系数更新时,直接生成生成计算重要系数的计算指令,依据该计算指令进行计算重要系数,然后执行步骤S5-S6。当更新方式不是依据重要系数更新时,则可以依据运行量来判断,由于业务类型的不同,用户不一样,故而对应的业务规则的运行量也不一样,这时下发到运行的服务器也可不一样,运行量小的下发到公共服务器运行,由于运行量少,所以公共服务器可以同时运行多个可执行文件,而运行量大的则需要下发到单独服务器中, 由一个服务器单独运行,以保证程序正常运行。所以在步骤S8-S9中先判断目标可执行文件的运行量是否超过预设运行量,该预设运行量可参考服务器的运行量来设置,当超过预设运行量时,可将目标可执行文件下发至单独服务器,将旧版本的可执行文件替换成最新版本的目标可执行文件,并进行部署以完成更新,若没有超过预设运行量,则将目标可执行文件下发至公共服务器,将旧版本的可执行文件替换成最新版本的目标可执行文件,并对该目标可执行忘记进行部署以完成更新。
参照图2,本实施例中规则引擎系统的规则更新装置,包括:
获取指令单元100,用于获取对规则引擎系统中的业务规则进行更新的更新指令;
读取文件单元200,用于依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;
获取类型单元300,用于依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;
计算系数单元400,用于依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;
判断系数单元500,用于判断所述重要系数是否大于预设阀值;
更新文件单元600,用于判断所述重要系数大于预设阀值时,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
如上述获取指令单元100所述,当获取到对规则引擎系统的业务规则进行更新的更新指令时,可依据更新指令对当前的业务规则进行更新,上述业务规则即为对应某一业务类型的规则数据,这些规则数据包括规则代码。上述更新指令可以依据用户发起的更新请求而生成,也可以是在规则引擎系统重启时自动触发而产生。
如上述读取文件单元200所述,上述目标可执行文件为由预设的业务规则集生成的且可在服务器中运行的文件,如上述文件为可进行运行部署的jar包,该目标可执行文件由系统依据用户输入的规则参数生成,并存储在指定的数据库中,如存储在MongoDB数据库。
如上述获取类型单元300所述,上述规则引擎系统的业务规则应用到不同的业务,而不同的业务当中部分业务可采用同一种业务规则,故而可将这些不同的业务分类,得到多个业务类型,且每种业务类型包括有多个不同的业务,每个业务类型均对应一种业务规则。由于目标可执行文件由用户输入的规则参数生成,而规则参数中包含有业务信息,从该信 息中可得到对应的业务类型,故而依据目标可执行文件可获取得到对应的该业务规则的业务类型,本实施例中为了便于表述将该业务类型记为第一业务类型。
如上述获取类型单元300所述,可通过计算出第一业务类型的重要系数,然后依据重要系数来更新上述业务规则,由于业务类型的重要程度不同,在进行更新时,会将其部署到不同服务器环境中,而业务类型的重要程度由其包含的各个业务决定,例如在一个业务类型中包含有金融交易、普通交易、核心业务以及非核心业务四种业务,其中金融交易较为重要,则权重也相对高。故而可通过第一业务类型中所有业务的重要程度,即预设的对应各业务的权重来计算上述重要系数。同时为了保证到业务规则部署后运行顺畅,需要知道第一业务类型的使用量,以便更好分配更新到对应服务器环境中,故而需要第一业务类型中各业务的使用量来计算上述重要系数,综上,在更新之前,无需人为凭经验去分配部署,直接依据第一业务类型中所有业务的权重,以及第一业务类型中各业务对应的使用量计算出对应第一业务类型的重要系数,再依据重要系数来分配更新到适用的服务器环境中。
如上述判断系数单元500以及更新文件单元600所述,上述在目标可执行文件在服务器环境中进行更新,可通过将目标可执行文件在服务器中部署来实现。由于不同的业务规则,更新时会部署到不同的服务器环境中,其中,而服务器环境分为独立服务器环境以及公共服务器环境,其中部署在独立服务器环境中的业务规则,可单独在该独立环境中运行,而部署在公共服务器环境中的业务规则,则可以部署多个不同的业务规则,多个业务规则同时运行,这样有针对性的部署,不但可以节省资源同时也可以避免运行时,重要的业务规则被不重要的业务规则交叉影响,故而重要的业务规则需要部署在独立服务器环境中,不重要的业务规则可以部署在公共服务器环境中,所以获取到对应业务规则的业务类型之后,可依据业务类型中所有业务对应的权重,以及业务类型中各业务对应的使用量计算出对应该业务类型的重要系数,重要系数越高,表明该业务类型越重要,当重要系数大于预设阀值,则可将对应该业务类型的业务规则部署到独立服务器环境,否则可直接部署在公共服务器环境。
在一个实施例中,利用以下公式计算出所述重要系数:
R=(W
1+W
2+…+W
n)/(π*W
1/2arctan(C
1)+π*W
2/2arctan(C
2)+…+π*W
n/2arctan(C
n));
其中,所述第一业务类型中预设有n个业务,R为所述重要系数,W为所述第一业务类型中的各业务的权重,C为所述第一业务类型中的各业务的使用量。
在一个实施例中,上述步规则引擎系统的规则更新装置,包括:
调用记录单元,用于调用所述第一业务类型中每种所述业务每次被使用的历史记录;
统计用量单元,用于依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
在一个实施例中,上述步规则引擎系统的规则更新装置,还包括:
接收参数单元,用于接收用户在规则编辑界面中输入的规则参数,以形成目标规则文件;
解析文件单元,用于将所述目标规则文件解析成目标prl文件;
编译文件单元,用于将所述prl文件编译成所述目标可执行文件;
存储文件单元,用于将所述目标可执行文件存储至所述指定数据库中;
定义版本单元,用于在所述指定数据库中依据历史文件将所述目标可执行文件通过tag标签定义为最新版本,所述历史文件为在将所述目标可执行文件存储在所述指定数据库之前,已经存储在所述指定数据库中的可执行文件。
在一个实施例中,上述更新文件单元600,包括:
替换文件单元,用于将所述独立服务器中已经部署的所述可执行文件替换成所述最新版本的目标可执行文件;
部署文件单元,用于对所述目标可执行文件进行部署以完成更新。
在一个实施例中,上述规则引擎系统的规则更新装置,包括:
第一获取单元,用于获取所述独立服务器返回的更新业务规则版本不适应的第一反馈信息所述更新业务规则版本不适应包括所述目标可执行文件在所述独立服务器环境中无法完成更新,以及所述目标可执行文件在所述独立服务器环境中更新完成之后无法运行;
第一重读单元,用于依据所述第一反馈信息从所述指定数据库中重新读取所述可执行文件;
第一替换单元,用于将所述目标可执行文件替换成所述可执行文件,并对所述可执行文件进行部署;
上述规则引擎系统的规则更新装置,还包括:
第二获取单元,用于获取到所述公共服务器返回的更新业务规则版本不适应的第二反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述公共服务器环境中无法完成更新,以及所述目标可执行文件在所述公共服务器环境中更新完成之后无法运行;
第二重读单元,用于依据所述第二反馈信息从所述指定数据库中重新读取所述可执行文件;
第二部署单元,用于将所述目标可执行文件替换成所述可执行文件,并在所述公共服务器环境中对所述可执行文件进行部署。
另一实施例中,上述规则引擎系统的规则更新装置,包括:
判断方式单元,用于判断对所述业务规则进行更新的更新方式是否为依据所述重要系数更新;
判断运行单元,用于在更新方式为依据所述重要系数更新时,则生成计算重要系数的计算指令;若更新方式不为依据所述重要系数更新,则判断所述第一业务类型对应的业务规则运行量是否超过预设运行量;
运行更新单元,用于若所述业务规则运行量超过预设运行量,则将所述目标可执行文件在所述独立服务器环境中进行更新,若所述业务规则运行量未超过预设运行量,则将所述目标可执行文件在所述公共服务器环境中进行更新。
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储更新规则引擎系统中的规则所需的所有数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种规则引擎系统的规则更新方法。
上述处理器执行上述规则引擎系统的规则更新方法的步骤:获取对规则引擎系统中的业务规则进行更新的更新指令;依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;判断所述重要系数是否大于预设阀值;若是,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
上述计算机设备,上述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤,包括:利用以下公式计算出所述重要系数: R=(W
1+W
2+…+W
n)/(π*W
1/2arctan(C
1)+π*W
2/2arctan(C
2)+…+π*W
n/2arctan(C
n));其中,所述第一业务类型中预设有n个业务,R为所述重要系数,W为所述第一业务类型中的各业务的权重,C为所述第一业务类型中的各业务的使用量。
在一个实施例中,上述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤之前,包括:调用所述第一业务类型中每种所述业务每次被使用的历史记录;依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
在一个实施例中,上述获取到对规则引擎系统中的业务规则进行更新的更新指令的步骤之前,包括:接收用户在规则编辑界面中输入的规则参数,以形成目标规则文件;将所述目标规则文件解析成目标prl文件;将所述prl文件编译成所述目标可执行文件;将所述目标可执行文件存储至所述指定数据库中;在所述指定数据库中依据历史文件将所述目标可执行文件通过tag标签定义为最新版本,所述历史文件为在将所述目标可执行文件存储在所述指定数据库之前,已经存储在所述指定数据库中的可执行文件。
在一个实施例中,上述将所述目标可执行文件在独立服务器环境中进行更新的步骤,包括:将所述独立服务器中已经部署的所述可执行文件替换成所述目标执行文件;对所述目标可执行文件进行部署以完成更新。
在一个实施例中,上述将所述目标可执行文件在独立服务器环境中进行更新的步骤之后,包括:获取所述独立服务器返回的更新业务规则版本不适应的第一反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述独立服务器环境中无法完成更新,以及所述目标可执行文件在所述独立服务器环境中更新完成之后无法运行;依据所述第一反馈信息从所述指定数据库中重新读取所述可执行文件;将所述目标可执行文件替换成所述可执行文件,并在所述独立服务器环境中对所述可执行文件进行部署;或者,将所述目标可执行文件在公共服务器环境中进行更新的步骤之后,包括:获取所述公共服务器返回的更新业务规则版本不适应的第二反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述公共服务器环境中无法完成更新,以及所述目标可执行文件在所述公共服务器环境中更新完成之后无法运行;依据所述第二反馈信息从所述指定数据库中重新读取所述可执行文件;将所述目标可执行文件替换成所述可执行文件,并在所述公共服务器环境中对所述可执行文件进行部署。
在一个实施例中,上述依据所述目标可执行文件获取所述业务规则的业务类型,并记为第一业务类型的步骤之后,包括:判断对所述业务规则进行更新的更新方式是否为依据 所述重要系数更新;若更新方式为依据所述重要系数更新,则生成计算重要系数的计算指令;若更新方式不为依据所述重要系数更新,则判断所述第一业务类型对应的业务规则运行量是否超过预设运行量;若所述业务规则运行量超过预设运行量,则将所述目标可执行文件在所述独立服务器环境中进行更新,若所述业务规则运行量未超过预设运行量,则将所述目标可执行文件在所述公共服务器环境中进行更新。
本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。
本申请一实施例还提供一种计算机可读存储介质,所述计算机可读存储介质,例如为非易失性的计算机可读存储介质,或者为易失性的计算机可读存储介质。其上存储有计算机可读指令,计算机可读指令被处理器执行时实现一种规则引擎系统的规则更新方法,具体为:获取对规则引擎系统中的业务规则进行更新的更新指令;依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;判断所述重要系数是否大于预设阀值;若是,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
上述计算机可读存储介质,上述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤,包括:利用以下公式计算出所述重要系数:R=(W
1+W
2+…+W
n)/(π*W
1/2arctan(C
1)+π*W
2/2arctan(C
2)+…+π*W
n/2arctan(C
n));其中,所述第一业务类型中预设有n个业务,R为所述重要系数,W为所述第一业务类型中的各业务的权重,C为所述第一业务类型中的各业务的使用量。
在一个实施例中,上述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤之前,包括:调用所述第一业务类型中每种所述业务每次被使用的历史记录;依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
在一个实施例中,上述获取到对规则引擎系统中的业务规则进行更新的更新指令的步骤之前,包括:接收用户在规则编辑界面中输入的规则参数,以形成目标规则文件;将所 述目标规则文件解析成目标prl文件;将所述prl文件编译成所述目标可执行文件;将所述目标可执行文件存储至所述指定数据库中;在所述指定数据库中依据历史文件将所述目标可执行文件通过tag标签定义为最新版本,所述历史文件为在将所述目标可执行文件存储在所述指定数据库之前,已经存储在所述指定数据库中的可执行文件。
在一个实施例中,上述将所述目标可执行文件在独立服务器环境中进行更新的步骤,包括:将所述独立服务器中已经部署的所述可执行文件替换成所述目标执行文件;对所述目标可执行文件进行部署以完成更新。
在一个实施例中,上述将所述目标可执行文件在独立服务器环境中进行更新的步骤之后,包括:获取所述独立服务器返回的更新业务规则版本不适应的第一反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述独立服务器环境中无法完成更新,以及所述目标可执行文件在所述独立服务器环境中更新完成之后无法运行;依据所述第一反馈信息从所述指定数据库中重新读取所述可执行文件;将所述目标可执行文件替换成所述可执行文件,并在所述独立服务器环境中对所述可执行文件进行部署;或者,将所述目标可执行文件在公共服务器环境中进行更新的步骤之后,包括:获取所述公共服务器返回的更新业务规则版本不适应的第二反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述公共服务器环境中无法完成更新,以及所述目标可执行文件在所述公共服务器环境中更新完成之后无法运行;依据所述第二反馈信息从所述指定数据库中重新读取所述可执行文件;将所述目标可执行文件替换成所述可执行文件,并在所述公共服务器环境中对所述可执行文件进行部署。
在一个实施例中,上述依据所述目标可执行文件获取所述业务规则的业务类型,并记为第一业务类型的步骤之后,包括:判断对所述业务规则进行更新的更新方式是否为依据所述重要系数更新;若更新方式为依据所述重要系数更新,则生成计算重要系数的计算指令;若更新方式不为依据所述重要系数更新,则判断所述第一业务类型对应的业务规则运行量是否超过预设运行量;若所述业务规则运行量超过预设运行量,则将所述目标可执行文件在所述独立服务器环境中进行更新,若所述业务规则运行量未超过预设运行量,则将所述目标可执行文件在所述公共服务器环境中进行更新。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种规则引擎系统的规则更新方法,其特征在于,包括:获取对规则引擎系统中的业务规则进行更新的更新指令;依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;判断所述重要系数是否大于预设阀值;若是,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
- 根据权利要求1所述的规则引擎系统的规则更新方法,其特征在于,所述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤,包括:利用以下公式计算出所述重要系数:R=(W 1+W 2+…+W n)/(π*W 1/2arctan(C 1)+π*W 2/2arctan(C 2)+…+π*W n/2arctan(C n));其中,所述第一业务类型中预设有n个业务,R为所述重要系数,W为所述第一业务类型中的各业务的权重,C为所述第一业务类型中的各业务的使用量。
- 根据权利要求1所述的规则引擎系统的规则更新方法,其特征在于,所述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤之前,包括:调用所述第一业务类型中每种所述业务每次被使用的历史记录;依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
- 根据权利要求1所述的规则引擎系统的规则更新方法,其特征在于,所述获取到对规则引擎系统中的业务规则进行更新的更新指令的步骤之前,包括:接收用户在规则编辑界面中输入的规则参数,以形成目标规则文件;将所述目标规则文件解析成目标prl文件;将所述prl文件编译成所述目标可执行文件;将所述目标可执行文件存储至所述指定数据库中;在所述指定数据库中依据历史文件将所述目标可执行文件通过tag标签定义为最新版本,所述历史文件为在将所述目标可执行文件存储在所述指定数据库之前,已经存储在所述指定数据库中的可执行文件。
- 根据权利要求4所述的规则引擎系统的规则更新方法,其特征在于,所述将所述目标可执行文件在独立服务器环境中进行更新的步骤,包括:将所述独立服务器中已经部署的所述可执行文件替换成所述目标执行文件;对所述目标可执行文件进行部署以完成更新。
- 根据权利要求4所述的规则引擎系统的规则更新方法,其特征在于,所述将所述目标可执行文件在独立服务器环境中进行更新的步骤之后,包括:获取所述独立服务器返回的更新业务规则版本不适应的第一反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述独立服务器环境中无法完成更新,以及所述目标可执行文件在所述独立服务器环境中更新完成之后无法运行;依据所述第一反馈信息从所述指定数据库中重新读取所述可执行文件;将所述目标可执行文件替换成所述可执行文件,并在所述独立服务器环境中对所述可执行文件进行部署;或者,将所述目标可执行文件在公共服务器环境中进行更新的步骤之后,包括:获取所述公共服务器返回的更新业务规则版本不适应的第二反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述公共服务器环境中无法完成更新,以及所述目标可执行文件在所述公共服务器环境中更新完成之后无法运行;依据所述第二反馈信息从所述指定数据库中重新读取所述可执行文件;将所述目标可执行文件替换成所述可执行文件,并在所述公共服务器环境中对所述可执行文件进行部署。
- 根据权利要求1所述的规则引擎系统的规则更新方法,其特征在于,所述依据所述目标可执行文件获取所述业务规则的业务类型,并记为第一业务类型的步骤之后,包括:判断对所述业务规则进行更新的更新方式是否为依据所述重要系数更新;若更新方式为依据所述重要系数更新,则生成计算重要系数的计算指令;若更新方式不为依据所述重要系数更新,则判断所述第一业务类型对应的业务规则运行量是否超过预设运行量;若所述业务规则运行量超过预设运行量,则将所述目标可执行文件在所述独立服务器环境中进行更新,若所述业务规则运行量未超过预设运行量,则将所述目标可执行文件在所述公共服务器环境中进行更新。
- 一种规则引擎系统的规则更新装置,其特征在于,包括:获取指令单元,用于获取对规则引擎系统中的业务规则进行更新的更新指令;读取文件单元,用于依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;获取类型单元,用于依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;计算系数单元,用于依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;判断系数单元,用于判断所述重要系数是否大于预设阀值;更新文件单元,用于判断所述重要系数大于预设阀值时,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
- 根据权利要求8所述的规则引擎系统的规则更新装置,其特征在于,还包括:调用记录单元,用于调用所述第一业务类型中每种所述业务每次被使用的历史记录;统计用量单元,用于依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
- 根据权利要求8所述的规则引擎系统的规则更新装置,其特征在于,还包括:接收参数单元,用于接收用户在规则编辑界面中输入的规则参数,以形成目标规则文件;解析文件单元,用于将所述目标规则文件解析成目标prl文件;编译文件单元,用于将所述prl文件编译成所述目标可执行文件;存储文件单元,用于将所述目标可执行文件存储至所述指定数据库中;定义版本单元,用于在所述指定数据库中依据历史文件将所述目标可执行文件通过tag标签定义为最新版本,所述历史文件为在将所述目标可执行文件存储在所述指定数据库之前,已经存储在所述指定数据库中的可执行文件。
- 根据权利要求10所述的规则引擎系统的规则更新装置,其特征在于,所述更新文件单元包括:替换文件单元,用于将所述独立服务器中已经部署的所述可执行文件替换成所述最新版本的目标可执行文件;部署文件单元,用于对所述目标可执行文件进行部署以完成更新。
- 根据权利要求10所述的规则引擎系统的规则更新装置,其特征在于,还包括:第一获取单元,用于获取所述独立服务器返回的更新业务规则版本不适应的第一反馈信息所述更新业务规则版本不适应包括所述目标可执行文件在所述独立服务器环境中无法完成更新,以及所述目标可执行文件在所述独立服务器环境中更新完成之后无法运行;第一重读单元,用于依据所述第一反馈信息从所述指定数据库中重新读取所述可执行文件;第一替换单元,用于将所述目标可执行文件替换成所述可执行文件,并对所述可执行文件进行部署;上述规则引擎系统的规则更新装置,还包括:第二获取单元,用于获取到所述公共服务器返回的更新业务规则版本不适应的第二反馈信息,所述更新业务规则版本不适应包括所述目标可执行文件在所述公共服务器环境中无法完成更新,以及所述目标可执行文件在所述公共服务器环境中更新完成之后无法运行;第二重读单元,用于依据所述第二反馈信息从所述指定数据库中重新读取所述可执行文件;第二部署单元,用于将所述目标可执行文件替换成所述可执行文件,并在所述公共服务器环境中对所述可执行文件进行部署。
- 根据权利要求8所述的规则引擎系统的规则更新装置,其特征在于,还包括:判断方式单元,用于判断对所述业务规则进行更新的更新方式是否为依据所述重要系数更新;判断运行单元,用于在更新方式为依据所述重要系数更新时,则生成计算重要系数的计算指令;若更新方式不为依据所述重要系数更新,则判断所述第一业务类型对应的业务规则运行量是否超过预设运行量;运行更新单元,用于若所述业务规则运行量超过预设运行量,则将所述目标可执行文件在所述独立服务器环境中进行更新,若所述业务规则运行量未超过预设运行量,则将所述目标可执行文件在所述公共服务器环境中进行更新。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现规则引擎系统的规则更新方法,该 规则引擎系统的规则更新方法包括:获取对规则引擎系统中的业务规则进行更新的更新指令;依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;判断所述重要系数是否大于预设阀值;若是,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
- 根据权利要求14所述的计算机设备,其特征在于,所述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤,包括:利用以下公式计算出所述重要系数:R=(W 1+W 2+…+W n)/(π*W 1/2arctan(C 1)+π*W 2/2arctan(C 2)+…+π*W n/2arctan(C n));其中,所述第一业务类型中预设有n个业务,R为所述重要系数,W为所述第一业务类型中的各业务的权重,C为所述第一业务类型中的各业务的使用量。
- 根据权利要求14所述的计算机设备,其特征在于,所述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤之前,包括:调用所述第一业务类型中每种所述业务每次被使用的历史记录;依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
- 根据权利要求14所述的计算机设备,其特征在于,所述获取到对规则引擎系统中的业务规则进行更新的更新指令的步骤之前,包括:接收用户在规则编辑界面中输入的规则参数,以形成目标规则文件;将所述目标规则文件解析成目标prl文件;将所述prl文件编译成所述目标可执行文件;将所述目标可执行文件存储至所述指定数据库中;在所述指定数据库中依据历史文件将所述目标可执行文件通过tag标签定义为最新版本,所述历史文件为在将所述目标可执行文件存储在所述指定数据库之前,已经存储在所述指定数据库中的可执行文件。
- 一种计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现规则引擎系统的规则更新方法,该规则引擎系统的规则更新方法包括:获取对规则引擎系统中的业务规则进行更新的更新指令;依据所述更新指令从指定数据库中读取最新版本的目标可执行文件,所述目标可执行文件为预设业务规则集生成的且可在服务器中运行的文件;依据所述目标可执行文件获取对应所述业务规则的业务类型,并记为第一业务类型,其中,同一种业务类型中包括有多个不同的业务;依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数;判断所述重要系数是否大于预设阀值;若是,则将所述目标可执行文件在独立服务器环境中进行更新,若否,则将所述目标可执行文件在公共服务器环境中进行更新。
- 根据权利要求18所述的计算机可读存储介质,其特征在于,所述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤,包括:利用以下公式计算出所述重要系数:R=(W 1+W 2+…+W n)/(π*W 1/2arctan(C 1)+π*W 2/2arctan(C 2)+…+π*W n/2arctan(C n));其中,所述第一业务类型中预设有n个业务,R为所述重要系数,W为所述第一业务类型中的各业务的权重,C为所述第一业务类型中的各业务的使用量。
- 根据权利要求18所述的计算机可读存储介质,其特征在于,所述依据所述第一业务类型中所有业务对应的权重,以及所述第一业务类型中各所述业务对应的使用量计算出对应所述第一业务类型的重要系数的步骤之前,包括:调用所述第一业务类型中每种所述业务每次被使用的历史记录;依据所述历史记录统计每种业务的使用次数,将所述使用次数记为所述使用量。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910101290.1A CN109918079B (zh) | 2019-01-31 | 2019-01-31 | 规则引擎系统的规则更新方法、装置和计算机设备 |
| CN201910101290.1 | 2019-01-31 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020155735A1 true WO2020155735A1 (zh) | 2020-08-06 |
Family
ID=66961248
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/116334 Ceased WO2020155735A1 (zh) | 2019-01-31 | 2019-11-07 | 规则引擎系统的规则更新方法、装置和计算机设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109918079B (zh) |
| WO (1) | WO2020155735A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113485869A (zh) * | 2021-06-08 | 2021-10-08 | 上海众言网络科技有限公司 | 数据库升级方法及装置 |
| CN115878217A (zh) * | 2022-12-02 | 2023-03-31 | 浪潮通用软件有限公司 | 一种应用程序的配置信息获取方法、装置、设备及介质 |
| CN116303475A (zh) * | 2023-05-17 | 2023-06-23 | 吉奥时空信息技术股份有限公司 | 一种多源指标数据智能存储的管理方法及装置 |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109918079B (zh) * | 2019-01-31 | 2022-03-18 | 平安科技(深圳)有限公司 | 规则引擎系统的规则更新方法、装置和计算机设备 |
| CN110413286B (zh) * | 2019-07-31 | 2023-08-22 | 创新先进技术有限公司 | 一种应用部署方法、装置及设备 |
| CN110750242B (zh) * | 2019-09-19 | 2023-05-02 | 北京字节跳动网络技术有限公司 | 一种部署文件的方法、系统、介质和电子设备 |
| CN111221550B (zh) * | 2019-10-24 | 2022-09-06 | 支付宝(杭州)信息技术有限公司 | 用于流式计算的规则更新方法、装置及流式计算系统 |
| CN110851159B (zh) * | 2019-10-31 | 2023-01-10 | 浙江大搜车软件技术有限公司 | 业务规则更新方法、装置、计算机设备和存储介质 |
| CN111679847B (zh) * | 2020-05-26 | 2026-04-14 | 深圳Tcl数字技术有限公司 | 规则文件的更新方法、终端设备及存储介质 |
| CN113126991A (zh) * | 2021-04-26 | 2021-07-16 | 中国邮政储蓄银行股份有限公司 | 业务数据处理方法及装置 |
| CN113254061B (zh) * | 2021-06-02 | 2021-11-09 | 深圳前海大道金融服务有限公司 | 基于规则引擎的业务决策方法、系统及存储介质 |
| CN115905405A (zh) * | 2022-11-16 | 2023-04-04 | 零犀(北京)科技有限公司 | 一种业务数据分层方法、系统、电子设备及存储介质 |
| CN117453278B (zh) * | 2023-11-01 | 2024-05-14 | 国任财产保险股份有限公司 | 一种基于业务规则的规则管理系统 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104995964A (zh) * | 2013-02-04 | 2015-10-21 | Metropcs无线公司 | 智能网络选择系统 |
| CN105426748A (zh) * | 2014-09-18 | 2016-03-23 | 腾讯科技(深圳)有限公司 | 一种规则文件的更新方法和设备 |
| CN106126215A (zh) * | 2016-06-17 | 2016-11-16 | 深圳市麦斯杰网络有限公司 | 业务规则脚本生成方法及装置 |
| US20180322185A1 (en) * | 2017-05-02 | 2018-11-08 | Sap Se | Cloud-based pluggable classification system |
| CN109284106A (zh) * | 2018-07-18 | 2019-01-29 | 平安科技(深圳)有限公司 | 业务规则的发布管理方法、电子装置及可读存储介质 |
| CN109918079A (zh) * | 2019-01-31 | 2019-06-21 | 平安科技(深圳)有限公司 | 规则引擎系统的规则更新方法、装置和计算机设备 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101739248A (zh) * | 2008-11-13 | 2010-06-16 | 国际商业机器公司 | 执行规则集的方法和系统 |
| CN107656755A (zh) * | 2016-07-24 | 2018-02-02 | 平安科技(深圳)有限公司 | 规则引擎的编辑方法及装置 |
| US10162613B1 (en) * | 2017-07-18 | 2018-12-25 | Sap Portals Israel Ltd. | Re-usable rule parser for different runtime engines |
-
2019
- 2019-01-31 CN CN201910101290.1A patent/CN109918079B/zh active Active
- 2019-11-07 WO PCT/CN2019/116334 patent/WO2020155735A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104995964A (zh) * | 2013-02-04 | 2015-10-21 | Metropcs无线公司 | 智能网络选择系统 |
| CN105426748A (zh) * | 2014-09-18 | 2016-03-23 | 腾讯科技(深圳)有限公司 | 一种规则文件的更新方法和设备 |
| CN106126215A (zh) * | 2016-06-17 | 2016-11-16 | 深圳市麦斯杰网络有限公司 | 业务规则脚本生成方法及装置 |
| US20180322185A1 (en) * | 2017-05-02 | 2018-11-08 | Sap Se | Cloud-based pluggable classification system |
| CN109284106A (zh) * | 2018-07-18 | 2019-01-29 | 平安科技(深圳)有限公司 | 业务规则的发布管理方法、电子装置及可读存储介质 |
| CN109918079A (zh) * | 2019-01-31 | 2019-06-21 | 平安科技(深圳)有限公司 | 规则引擎系统的规则更新方法、装置和计算机设备 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113485869A (zh) * | 2021-06-08 | 2021-10-08 | 上海众言网络科技有限公司 | 数据库升级方法及装置 |
| CN115878217A (zh) * | 2022-12-02 | 2023-03-31 | 浪潮通用软件有限公司 | 一种应用程序的配置信息获取方法、装置、设备及介质 |
| CN116303475A (zh) * | 2023-05-17 | 2023-06-23 | 吉奥时空信息技术股份有限公司 | 一种多源指标数据智能存储的管理方法及装置 |
| CN116303475B (zh) * | 2023-05-17 | 2023-08-08 | 吉奥时空信息技术股份有限公司 | 一种多源指标数据智能存储的管理方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109918079B (zh) | 2022-03-18 |
| CN109918079A (zh) | 2019-06-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020155735A1 (zh) | 规则引擎系统的规则更新方法、装置和计算机设备 | |
| US9465608B2 (en) | Code separation with semantic guarantees | |
| US10061573B2 (en) | User interfaces of application porting software platform | |
| US7849179B2 (en) | System and program for managing devices in a network | |
| US7743414B2 (en) | System and method for executing a permissions recorder analyzer | |
| US9411616B2 (en) | Classloader/instrumentation approach for invoking non-bound libraries | |
| US9524279B2 (en) | Help document animated visualization | |
| US20200081709A1 (en) | Component management platform | |
| US10083016B1 (en) | Procedurally specifying calculated database fields, and populating them | |
| US8935288B2 (en) | User specific logs in multi-user applications | |
| US7836055B2 (en) | XNA relationship management | |
| US8311794B2 (en) | Testing executable logic | |
| US20210026756A1 (en) | Deriving software application dependency trees for white-box testing | |
| US20130060845A1 (en) | Dynamic web services system and method | |
| CN114780109A (zh) | Python项目第三方库依赖自动化解析与安装方法 | |
| US8166347B2 (en) | Automatic testing for dynamic applications | |
| US20070178968A1 (en) | Displaying game asset relationship in a game development environment | |
| CN115809065A (zh) | 一种低代码开发平台、数据存储方法及电子设备 | |
| US20160011897A1 (en) | Method and system for integrating and implementing virtual service packages across different service virtualization tools | |
| CN120371273A (zh) | Sql语句生成方法、装置、存储介质及电子设备 | |
| US8433729B2 (en) | Method and system for automatically generating a communication interface | |
| US20150074678A1 (en) | Device and method for automating a process of defining a cloud computing resource | |
| EP1634166B1 (en) | System and method for incremental object generation | |
| US10733192B1 (en) | Expression evaluation infrastructure | |
| CN120017712B (zh) | 大数据平台api数据服务可见域处理方法、设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19912319 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19912319 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19912319 Country of ref document: EP Kind code of ref document: A1 |