Algorithm updating method, device, computer system and readable storage medium

By obtaining updated data and comparing it to generate rules to be tested, it solves the problem of recovery after the server running rules are upgraded, ensures the smoothness and stability of the operation rules, and improves the efficiency of data rule upgrades.

CN111666087BActive Publication Date: 2024-10-29SHENZHEN PING AN MEDICAL HEALTH TECHNOLOGY SERVICES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010467614.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-28
Publication Date
2024-10-29
Estimated Expiration
2040-05-28

AI Technical Summary

Technical Problem

In the existing technology, after the server operation rules are upgraded, if there is a problem with the latest version and it is necessary to restore to the previous version, both the latest version and the previous version will often become unusable, causing the continuity and stability of the server to be affected.

Method used

By obtaining updated data, modifying the local operation rules to generate rules to be tested, calculating the preset test data and comparing it with the failure threshold, if it is qualified, the local rules will be replaced, otherwise the rules to be tested will be deleted to ensure the smoothness and reliability of the operation rule update.

Benefits of technology

It solves the smoothness and stability problems in the update process of operation rules, avoids the dilemma of being unable to use both the latest version and the previous version, and improves the efficiency of data rule upgrades and the reliability of operation rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111666087B_ABST
    Figure CN111666087B_ABST
Patent Text Reader

Abstract

The present invention discloses an operation rule updating method, device, computer system and readable storage medium, including: obtaining update data to be executed, wherein the update data is used to record data update rules; modifying local operation rules according to the update data to generate rules to be tested; calculating preset test data through the rules to be tested and obtaining test results; comparing the test results with a preset failure threshold; if the test results do not exceed the preset failure threshold, retaining the rules to be tested so that the rules to be tested replace the local operation rules; if the test results exceed the preset failure threshold, deleting the rules to be tested. The present invention enriches the modification methods of operation rules, improves the efficiency of data rule upgrades, ensures the smoothness of the operation rule update process, and the reliability of the replaced operation rules. In addition, the present invention also relates to blockchain technology, and the rules to be tested can be stored in blockchain nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data updating, and in particular to an operation rule updating method, device, computer system and readable storage medium. Background Art

[0002] A server, also known as a server, is a device that provides computing services. It responds to service requests based on needs, and processes the requests through the operating rules stored in it to obtain operating results, so as to achieve the ability to undertake and guarantee services. With the expansion of business and changes in regulatory standards, it is often necessary to upgrade and transform the operating rules in the server to adapt to the requirements of business and regulatory standards.

[0003] However, the current method of upgrading operating rules is usually for operators to manually modify the operating rules according to the indicators and formulas in the update standards to upgrade the operating rules. This method is not only prone to errors, but also greatly increases the workload of operators.

[0004] To solve the above problems, the current operating rule upgrade method uses a comparison device to compare the differences between the current operation rules and the latest operation rules, and modify the differences obtained to obtain the latest version of the operating rules, so as to achieve rapid upgrades and reduce the burden on staff.

[0005] The inventors of the present invention discovered during research that once a problem occurs with the latest version of the operating rules, the computing staff will need to spend time restoring it to the previous version again; in this process, the latest version of the operating rules in the server will become unusable due to upgrade failure, and the previous version of the operating rules will become unusable due to failure to restore, which seriously affects the continuity and stability of the server. Summary of the invention

[0006] The purpose of the present invention is to provide an operation rule updating method, device, computer system and readable storage medium, which are used to solve the dilemma problem existing in the prior art that once a problem occurs in the latest version of the operation rules and it is necessary to restore it to the previous version, both the latest version and the previous version of the operation rules cannot be used.

[0007] To achieve the above object, the present invention provides a method for updating an operation rule, comprising:

[0008] Acquire update data to be executed, wherein the update data is used to record data update rules;

[0009] Modify the local operation rules according to the update data to generate the rules to be tested;

[0010] The preset test data is calculated through the rule to be tested and the test result is obtained; the test result is compared with the preset failure threshold. If the test result does not exceed the preset failure threshold, the rule to be tested is retained so that the rule to be tested replaces the local operation rule; if the test result exceeds the preset failure threshold, the rule to be tested is deleted.

[0011] In the above solution, the update data includes: standard information and / or adjustment data, and the obtaining of the update data to be executed includes:

[0012] Acquire the updated standard and compare it with the local standard in a preset database by formula and text to obtain difference data, and modify the standard information corresponding to the local standard by using the difference data to generate the standard information; or

[0013] Receive adjustment data sent by the control end for modifying the operation rules.

[0014] In the above solution, the step of modifying the standard information corresponding to the local standard by using the difference data to generate updated standard information includes:

[0015] Acquire formula difference data and / or element difference data in the difference data, and modify the standard information in the database according to the formula difference data and / or element difference data;

[0016] The standard version number of the standard information modified according to the difference data is updated, and the standard version number is associated with the modified standard information to generate updated standard information.

[0017] In the above solution, modifying the local operation rules according to the update data to generate the rules to be tested includes:

[0018] Detecting whether the standard information has been modified; if the standard information has been modified, extracting the standard information and setting it as standard modification information; if the standard information has not been modified, generating standard modification information with empty content;

[0019] Detecting whether the adjustment data is received, if so, setting the adjustment data as the operation modification information; if not, generating the operation modification information with empty content;

[0020] The standard modification information and the operation modification information are aggregated to form rule modification information, and it is determined whether the rule modification information is empty; if the rule modification information is empty, the rule update is terminated; if the rule modification information is not empty, the operation rule is modified according to the rule modification information to obtain the rule to be tested, wherein the rule to be tested is stored in the blockchain.

[0021] In the above solution, the detecting whether the standard information has been modified includes:

[0022] Comparing the standard version number of the extracted standard information with the pre-stored standard version number;

[0023] If the two standard version numbers are consistent, it is determined that the standard information has not been modified;

[0024] If the two standard version numbers are inconsistent, it is determined that the standard information has been modified, and the pre-stored standard version number is replaced with the standard version number of the standard information.

[0025] In the above solution, modifying the operation rule according to the rule modification information to obtain the rule to be tested includes:

[0026] If the rule modification information only includes adjustment data, the operation rule is adjusted according to the element adjustment data and / or formula adjustment data in the adjustment data to obtain the operation rule to be tested, a new operation version number is formulated for the operation rule to be tested, and the new operation version number is associated with the operation rule to be tested;

[0027] If the rule modification information only includes standard information, the operation formula and operation index in the operation rule are replaced with the standard formula and standard index in the standard information to obtain the standard rule to be tested; a new operation version number is formulated for the marked rule to be tested, and it is associated with the marked rule to be tested;

[0028] If the rule modification information includes standard information and adjustment data, the operation formula and operation index in the operation rule are respectively replaced with the standard formula and standard index in the standard information; the standard operation rule to be tested is obtained by adjusting the replaced operation rule according to the element adjustment data and / or formula adjustment data in the adjustment data, a new operation version number is formulated for the standard operation rule to be tested, and it is associated with the marked operation rule to be tested.

[0029] In the above solution, after deleting the rule to be tested, the following steps may also be included:

[0030] Determine the type of the rule to be tested;

[0031] If the rule to be tested is an operation rule to be tested, a calculation error signal is generated and sent to the user end to inform that the calculation rule modified by the adjustment data cannot meet the requirement of the failure threshold;

[0032] If the rule to be tested is a standard rule to be tested, a standard error signal is generated and sent to the user end to inform that the operation rule modified by the standard information cannot meet the requirement of the failure threshold;

[0033] If the rule to be tested is a standard operation rule to be tested, a standard operation error signal is generated and sent to the user end to inform that the operation rule modified by the standard information and the adjustment data cannot meet the failure threshold requirement. To achieve the above purpose, the present invention also provides an operation rule updating device, comprising:

[0034] A difference comparison module, used to obtain update data to be executed, wherein the update data is used to record data update rules;

[0035] A copy and modify module, used to modify the local operation rules according to the update data to generate the rules to be tested;

[0036] An update test module is used to calculate preset test data through the rule to be tested and obtain test results; compare the test results with a preset failure threshold, and if the test results do not exceed the preset failure threshold, retain the rule to be tested so that the rule to be tested replaces the local operation rule; if the test results exceed the preset failure threshold, delete the rule to be tested.

[0037] To achieve the above-mentioned purpose, the present invention also provides a computer system, which includes multiple computer devices, each of which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processors of the multiple computer devices execute the computer program, they jointly implement the steps of the above-mentioned operation rule updating method.

[0038] To achieve the above objectives, the present invention also provides a computer-readable storage medium, which includes multiple storage media, each storage medium stores a computer program, and when the computer programs stored in the multiple storage media are executed by a processor, they jointly implement the steps of the above-mentioned operation rule updating method.

[0039] The operation rule updating method, device, computer system and readable storage medium provided by the present invention obtain difference data by acquiring the update standard and comparing it with the local standard in the preset database, and modify the standard information in the database by the difference data; or receive the adjustment data sent by the control end for modifying the operation rule. Therefore, the present application has two ways of obtaining information for modifying the operation rule, one is to modify according to the update standard, and the other is to modify according to the needs of the control end, which not only enriches the modification methods of the operation rules, but also solves the problem that the current operation server cannot automatically make changes according to the changes of the update standard. There is no need to manually obtain the update standard and compare it with the current operation rule through the comparison device, which further improves the efficiency of data rule upgrade;

[0040] By copying the current operation rules, modifying the operation rules according to the standard information and / or adjustment data to obtain the rules to be tested, and calculating the preset test data through the rules to be tested to obtain the test results; since the current operation rules are copied and modified, when the current operation rules are modified to obtain the rules to be tested, the current operation rules in the server are still working, and once the test results of the rules to be tested are qualified, the rules to be tested will replace the current operation rules, thereby ensuring the smoothness of the operation rule update process and the reliability of the replaced operation rules, and solving the current dilemma that both the latest version and the previous version of the operation rules cannot be used once a problem occurs in the latest version of the operation rules and it needs to be restored to the previous version. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart of Embodiment 1 of the operation rule updating method of the present invention;

[0042] Figure 2 It is a flow chart of modifying the standard information in the database in the first embodiment of the operation rule updating method of the present invention;

[0043] Figure 3 A flowchart of modifying the operation rules to obtain the rules to be tested in the first embodiment of the operation rule updating method of the present invention;

[0044] Figure 4 This is a flowchart for detecting whether the standard information has been modified in Embodiment 1 of the operation rule updating method of the present invention;

[0045] Figure 5 This is a flow chart of obtaining a failure threshold in Embodiment 1 of the operation rule updating method of the present invention;

[0046] Figure 6 This is a schematic diagram of a program module of a second embodiment of an operation rule updating device of the present invention;

[0047] Figure 7 Schematic diagram of the hardware structure of the computer device in the third embodiment of the computer system of the present invention.

[0048] Reference numerals:

[0049] 1. Operation rule updating device 2. Computer equipment 11. Difference comparison module

[0050] 12. Copy and modify module 13. Update test module 21. Memory 22. Processor DETAILED DESCRIPTION

[0051] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0052] The operation rule updating method, device, computer system and readable storage medium provided by the present invention are applicable to the field of data updating, and provide an operation rule updating method based on a difference comparison module, a copy modification module and an update test module. The present invention obtains the update data to be executed, modifies the local operation rules according to the update data to generate the rules to be tested, calculates the preset test data through the rules to be tested and obtains the test results, compares the test results with the preset failure threshold, and if the test results do not exceed the preset failure threshold, retains the rules to be tested so that the rules to be tested replace the local operation rules; if the test results exceed the preset failure threshold, deletes the rules to be tested.

[0053] Embodiment 1

[0054] See also Figure 1 A data rule updating operation rule updating method of this embodiment is used to update the operation rule currently running in the server, wherein the operation rule is a rule algorithm formulated based on the local standard, including:

[0055] S1: Acquire update data to be executed, wherein the update data is used to record data update rules;

[0056] S2: modifying the local operation rules according to the update data to generate the rules to be tested;

[0057] S3: Calculate the preset test data through the rule to be tested and obtain the test result; compare the test result with the preset failure threshold. If the test result does not exceed the preset failure threshold, retain the rule to be tested so that the rule to be tested replaces the local operation rule; if the test result exceeds the preset failure threshold, delete the rule to be tested.

[0058] Among them, by obtaining the update standard and comparing it with the local standard in the preset database to obtain difference data, the standard information in the database is modified by the difference data; or the adjustment data sent by the control end for modifying the operation rules is received. Therefore, the present application has two ways of obtaining information for modifying the operation rules, one is to modify according to the update standard, and the other is to modify according to the needs of the control end, which not only enriches the modification methods of the operation rules, but also solves the problem that the current operation server cannot automatically make changes according to the changes in the update standard. There is no need to manually obtain the update standard and compare it with the current operation rule through the comparison device, which further improves the efficiency of data rule upgrade;

[0059] By copying the current operation rules, modifying the operation rules according to the standard information and / or adjustment data to obtain the rules to be tested, and calculating the preset test data through the rules to be tested to obtain the test results; since the current operation rules are copied and modified, when the current operation rules are modified to obtain the rules to be tested, the current operation rules in the server are still working, and once the test results of the rules to be tested are qualified, the rules to be tested will replace the current operation rules; if the test results of the rules to be tested are unqualified, the rules to be tested will be deleted and the current operation rules will be retained, thereby ensuring the smoothness of the operation rule update process, the stability of the server operation, and the reliability of the replaced operation rules, and solving the current dilemma that both the latest version and the previous version of the operation rules cannot be used once the latest version of the operation rules has a problem and needs to be restored to the previous version.

[0060] In this embodiment, the update data includes: standard information and / or adjustment data.

[0061] In a preferred embodiment, the step of obtaining update data to be executed includes:

[0062] S101: obtaining an updated standard and performing formula and text comparison between the updated standard and the local standard in a preset database to obtain difference data, and modifying standard information corresponding to the local standard by using the difference data to obtain updated standard information; or

[0063] S102: receiving adjustment data sent by the control terminal for modifying the operation rules.

[0064] In this embodiment, the step of obtaining the update standard and performing formula comparison and text comparison with the local standard in the preset database to obtain difference data, modifying the standard information corresponding to the local standard by the difference data, and generating the update standard information includes:

[0065] S101-1: Create a database for storing local standards and standard information.

[0066] Among them, the standard refers to the normative document formulated by "national ministries and commissions" or "industry associations" to stipulate the calculation method of industry data, and the standard information refers to the standard formula and standard indicators extracted from local standards for calculating industry data. For example: the calculation formula of the national indicator T1 of the local standard is M1, and its indicator elements are A, B, and C, then the standard information is: G-T1[M1, A, B, C]-V1.

[0067] S101-2: Obtain updated standards from the Internet or standards libraries.

[0068] Exemplarily, the updated standards can be crawled from the department website through the Internet by a crawler, or they can be obtained from the national or local standard library according to the standard number; for example, the calculation formula of the updated standard T1 is M2, and its indicator elements are A, B, C, and D.

[0069] S101-3: Compare the updated standard with the local standard word by word to obtain difference data.

[0070] In this step, formula comparison refers to obtaining formula difference data by comparing the formulas in the updated standard and the local standard, obtaining element difference data by comparing the indicator elements in the updated standard and the local standard, and aggregating the formula difference data and element difference data to form the difference data. Indicator elements refer to information used to define data in the standard, such as MateData (metadata), Information (message), and DataSource (data source).

[0071] Text comparison is to use text difference comparison software to compare the updated standard with the local standard word by word to obtain difference data. The text difference comparison software is a text comparison tool that can compare the differences between similar words and numbers at both ends to quickly find problems in a certain section of code, such as a missing symbol, inconsistent capitalization, or replaced words, etc., which helps to greatly improve the accuracy.

[0072] Furthermore, the formula comparison refers to comparing whether the calculation logic of each data in the formula has changed, which at least includes:

[0073] The formula comparison includes changes in the database, changes in the calculation formula, changes in the calculation independent variables, and changes in the calculation coefficients.

[0074] The mutual comparison of the indicator elements includes string comparison and value comparison; the string comparison refers to extracting the same string from the update standard and the local standard respectively; the value comparison refers to extracting the value corresponding to the string from the update standard and the local standard respectively. If the two values ​​are equal, it is not difference data. If the two values ​​are not equal, the string and its value in the update standard are set as element difference data.

[0075] It should be noted that the difference mentioned in this application is to regard a certain formula or element as a whole. Once a part of the formula changes, or the character string or value in a certain element changes, the formula or element is set as difference data.

[0076] In a preferred embodiment, see Figure 2 , the step of modifying the standard information in the database by using the difference data includes:

[0077] S111: Acquire formula difference data and / or element difference data in the difference data, and modify the standard information in the database according to the formula difference data and / or element difference data.

[0078] In this step, the standard information contains standard formulas and standard indicators; if the difference data contains formula difference data, the formula difference data replaces the standard formula in the standard information; if the difference data contains element difference data, its character string is extracted, and the value of the standard indicator corresponding to the character string in the standard information is modified to the value in the element difference data; based on the above example, since the calculation formula of the updated standard T1 is M2, and its indicator elements are A, B, C, D, the modified standard information will be G-T1[M2, A, B, C, D].

[0079] It should be noted that regular expressions are used to identify the content in the difference data (the content is a formula, or element difference data, or a combination of a formula and element difference data), and the formula and / or element difference data are extracted through the regular expression. The regular expression is a computer technology used to retrieve and replace texts that conform to a certain pattern (rule). Many programming languages ​​support string operations using regular expressions. For example, a powerful regular expression engine is built into Perl. Regular expressions are usually abbreviated to "regex", the singular is regexp, regex, and the plural is regexps, regexes, and regexen.

[0080] S112: updating the standard version number of the standard information modified according to the difference data, and associating the standard version number with the modified standard information to generate updated standard information.

[0081] In this step, the standard version number increases successively with the number of modifications. By taking the standard version number as part of the name of the standard information, the association between the standard version number and the standard information is achieved. For example, V2 is obtained based on V1 in the original standard information G-T1[M1, A, B, C]-V1, and it is used as the standard version number of the modified standard information, that is, G-T1[M2, A, B, C, D]-V2.

[0082] It should be noted that the xlwt module of Python may be used to associate the standard version number with the modified standard information to generate updated standard information.

[0083] In an exemplary embodiment, the adjustment data for modifying the operation rule sent by the receiving control terminal includes:

[0084] Receive adjustment data consisting of element adjustment data and / or formula adjustment data sent by the control end.

[0085] In this step, the operation rules include operation formulas and operation indicators, and the operation rules are obtained based on standard information, for example: L-T1[A,B,C]-V1; the element adjustment data refers to the information sent by the control end for adjusting the operation indicators, which includes an adjustment string and an adjustment value; the formula adjustment data refers to the information sent by the control end for adjusting the calculation logic of the operation formula, which may include: changes in the database, and / or changes in the calculation formula, and / or changes in the calculation independent variables, and / or changes in the calculation coefficients.

[0086] In a preferred embodiment, see Figure 3 , modifying the local operation rules according to the update data to generate the rules to be tested includes:

[0087] S201: Detect whether the standard information has been modified; if the standard information has been modified, extract the standard information and set it as standard modification information; if the standard information has not been modified, generate standard modification information with empty content.

[0088] It should be noted that a regular expression is used to detect the modification time in the standard information. If the modification time is inconsistent with the stored final time, it is determined that the standard information has been modified, and the modification time is set as the new final time.

[0089] S202: Detect whether the adjustment data is received, if yes, set the adjustment data as the operation modification information; if no, generate the operation modification information with empty content;

[0090] S203: Aggregate the standard modification information and the operation modification information to form rule modification information, and determine whether the rule modification information is empty; if the rule modification information is empty, end the rule update; if the rule modification information is not empty, modify the operation rule according to the rule modification information to obtain the rule to be tested, wherein the rule to be tested is stored in the blockchain.

[0091] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned rules to be tested, the above-mentioned rules to be tested can also be stored in a node of a blockchain.

[0092] For further information, see Figure 4 , the detecting whether the standard information has been modified includes:

[0093] S201-1: Compare the standard version number of the extracted standard information with the pre-stored standard version number;

[0094] S202-2: If the two standard version numbers are consistent, it is determined that the standard information has not been modified;

[0095] If the two standard version numbers are inconsistent, it is determined that the standard information has been modified, and the pre-stored standard version number is replaced with the standard version number of the standard information.

[0096] Therefore, it is only necessary to identify whether the stored standard version number is consistent with the standard version number of the current standard information to know whether the standard information is updated, which greatly improves the efficiency of identifying the standard information version update.

[0097] Further, the modifying the operation rule according to the rule modification information to obtain the rule to be tested includes:

[0098] If the rule modification information only includes adjustment data, the operation rule is adjusted according to the element adjustment data and / or formula adjustment data in the adjustment data to obtain the operation rule to be tested, a new operation version number is formulated for the operation rule to be tested, and it is associated with the operation rule to be tested.

[0099] In this step, the adjustment character string in the element adjustment data is extracted, and the operation value corresponding to the adjustment character string in the operation rule is obtained, and replaced with the adjustment value of the element adjustment data; and / or the operation formula in the operation rule is replaced with the formula in the formula adjustment data;

[0100] If the rule modification information only includes standard information, the operation formula and operation index in the operation rule are replaced with the standard formula and standard index in the standard information to obtain the standard rule to be tested; a new operation version number is formulated for the marked rule to be tested, and it is associated with the marked rule to be tested.

[0101] If the rule modification information includes standard information and adjustment data, the operation formula and operation index in the operation rule are respectively replaced by the standard formula and standard index in the standard information; the standard operation rule to be tested is obtained by adjusting the replaced operation rule according to the element adjustment data and / or formula adjustment data in the adjustment data, a new operation version number is formulated for the standard operation rule to be tested, and it is associated with the marked operation rule to be tested.

[0102] The operation version number increases with the number of modifications. By using the operation version number as a part of the name of the operation rule, the operation version number is associated with the operation rule to be tested, the marked operation rule to be tested or the standard operation rule to be tested.

[0103] In this embodiment, the preset test data in S3 refers to pre-formulated information used to provide calculation data for the operation rule or the rule to be tested.

[0104] In an exemplary embodiment, see Figure 5 , the failure threshold is obtained by:

[0105] S301: Calculate preset test data using current calculation rules and obtain calculation results.

[0106] S302: Calculating the operation result by using the preset upper failure limit percentage and lower failure limit percentage to obtain an upper failure limit and a lower failure limit.

[0107] Among them, the upper failure percentage and the lower failure percentage can be set as needed; for example, the upper failure percentage is 150%, and the lower failure percentage is 75%, which means that once the test result exceeds 150% of the calculation result, or is lower than 75% of the calculation result, the rule to be tested will be deemed to be invalid and cannot achieve the expected effect.

[0108] It should be noted that the operation rules are constructed in the math module of Python and run through the math module; wherein the math module defines mathematical functions, and since this module belongs to the compilation system, it can unconditionally call the constructed formula.

[0109] S303: Determine a numerical range by using the upper failure limit and the lower failure limit to serve as the failure threshold.

[0110] In an exemplary embodiment, after deleting the rule to be tested and retaining the current operation rule, the method may further include:

[0111] Determine the type of the rule to be tested;

[0112] If the rule to be tested is an operation rule to be tested, a calculation error signal is generated and sent to the user end to inform that the calculation rule modified by the adjustment data cannot meet the requirement of the failure threshold;

[0113] If the rule to be tested is a standard rule to be tested, a standard error signal is generated and sent to the user end to inform that the operation rule modified by the standard information cannot meet the requirement of the failure threshold;

[0114] If the rule to be tested is a standard operation rule to be tested, a standard operation error signal is generated and sent to the user end to inform that the operation rule modified by the standard information and the adjustment data cannot meet the requirement of the failure threshold.

[0115] It should be noted that a regular expression is used to determine the type of the rule to be tested. The regular expression is a computer technology used to retrieve and replace texts that conform to a certain pattern (rule). Many programming languages ​​support string operations using regular expressions. For example, a powerful regular expression engine is built into Perl. Regular expressions are usually abbreviated to "regex", with the singular being regexp, regex, and the plural being regexps, regexes, and regexen.

[0116] In an exemplary embodiment, after deleting the rule to be tested, the following steps may also be included:

[0117] If the rule to be tested is a standard rule to be tested or a standard operation rule to be tested, the updated standard in the database is deleted and the local standard is retained, and the standard information is called back to restore it to the standard information of the previous standard version number.

[0118] Since the operating rules modified according to the standard information cannot meet the requirements of the failure threshold, the data in the database is restored to its original state by retaining the local standard and calling back the standard information to the content of the previous standard version number to ensure that the operation rules can continue to calculate the data to be operated normally.

[0119] Embodiment 2

[0120] See also Figure 6 , an operation rule updating device 1 of this embodiment includes:

[0121] The difference comparison module 11 is used to obtain update data to be executed, wherein the update data is used to record data update rules;

[0122] A copy and modify module 12, used to modify the local operation rules according to the update data to generate the rules to be tested;

[0123] The update test module 13 is used to calculate the preset test data through the rule to be tested and obtain the test result; compare the test result with the preset failure threshold; if the test result does not exceed the preset failure threshold, retain the rule to be tested so that the rule to be tested replaces the local operation rule; if the test result exceeds the preset failure threshold, delete the rule to be tested.

[0124] The technical solution can be applied in the cloud storage field of cloud technology, by obtaining the update standard and comparing it with the local standard in the preset database to obtain difference data, and modifying the standard information in the database through the difference data; or receiving the adjustment data sent by the control end for modifying the operation rules; copying the current operation rules, modifying the operation rules according to the standard information and / or adjustment data to obtain the rules to be tested; and calculating the preset test data through the rules to be tested and obtaining the test results; if the test results do not exceed the preset failure threshold, deleting the current operation rules and retaining the rules to be tested; if the test results exceed the preset failure threshold, deleting the rules to be tested and retaining the current operation rules, so as to realize the update of virtualized data of virtualized storage.

[0125] Embodiment three:

[0126] To achieve the above-mentioned purpose, the present invention further provides a computer system, which includes a plurality of computer devices 2. The components of the operation rule updating device 1 of the second embodiment can be dispersed in different computer devices. The computer devices can be smart phones, tablet computers, laptop computers, desktop computers, rack servers, blade servers, tower servers or cabinet servers (including independent servers, or server clusters composed of multiple servers) that execute programs. The computer devices of this embodiment include at least but are not limited to: a memory 21 and a processor 22 that can be interconnected through a system bus, such as Figure 7 It should be pointed out that Figure 7 Only a computer device with components is shown, but it should be understood that implementing all of the components shown is not a requirement and more or fewer components may alternatively be implemented.

[0127] In this embodiment, the memory 21 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 21 can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 21 can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 21 can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory 21 is generally used to store the operating system and various application software installed on the computer device, such as the program code of the operation rule updating device of the first embodiment. In addition, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.

[0128] The processor 22 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 22 is generally used to control the overall operation of the computer device. In this embodiment, the processor 22 is used to run the program code stored in the memory 21 or process data, such as running the operation rule updating device to implement the operation rule updating method of the first embodiment.

[0129] Embodiment 4:

[0130] To achieve the above purpose, the present invention also provides a computer-readable storage system, which includes multiple storage media, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application mall, etc., on which a computer program is stored, and the program implements the corresponding function when executed by the processor 22. The computer-readable storage medium of this embodiment is used to store the operation rule updating device, and when executed by the processor 22, the operation rule updating method of embodiment 1 is implemented.

[0131] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0132] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0134] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for updating an operation rule, characterized in that: include: Acquire update data to be executed, wherein the update data is used to record data update rules; the update data includes: update standard information and adjustment data, and the acquisition of update data to be executed includes: acquiring the update standard and performing formula and text comparison with the local standard in a preset database to obtain difference data, modifying the standard information corresponding to the local standard by using the difference data, and generating update standard information; receiving adjustment data for modifying the operation rules sent by the control terminal; Modify the local operation rules according to the update data to generate the rules to be tested; Calculating preset test data through the rule to be tested and obtaining a test result; comparing the test result with a preset failure threshold; if the test result does not exceed the preset failure threshold, retaining the rule to be tested so that the rule to be tested replaces the local operation rule; if the test result exceeds the preset failure threshold, deleting the rule to be tested; The formula comparison refers to obtaining formula difference data by comparing the formulas in the updated standard and the local standard, obtaining element difference data by comparing the indicator elements in the updated standard and the local standard, and aggregating the formula difference data and element difference data to form the difference data; the indicator element refers to information used to define the data in the standard; The text comparison is to use text difference comparison software to compare the updated standard with the local standard word by word to obtain difference data; the text difference comparison software is a text comparison tool, which is used to compare the differences between Chinese characters and numbers at both ends; The formula comparison includes changes in the database and changes in the calculation formula; The comparison between the indicator elements includes string comparison and value comparison; the string comparison refers to extracting the same string from the update standard and the local standard for comparison; the value comparison refers to extracting the value corresponding to the string from the update standard and the local standard respectively. If the two values ​​are equal, it is not difference data. If the two values ​​are not equal, the string and its value in the update standard are set as element difference data.

2. The operation rule updating method according to claim 1, characterized in that: The step of modifying the standard information corresponding to the local standard by using the difference data to generate updated standard information comprises: Acquire formula difference data and / or element difference data in the difference data, and modify the standard information in the database according to the formula difference data and / or element difference data; The standard version number of the standard information modified according to the difference data is updated, and the standard version number is associated with the modified standard information to generate updated standard information.

3. The operation rule updating method according to claim 1, characterized in that: Modifying the local operation rules according to the update data to generate the rules to be tested includes: Detecting whether the standard information has been modified; if the standard information has been modified, extracting the standard information and setting it as the standard modification information; detecting whether the adjustment data is received, and if so, setting the adjustment data as the calculation modification information; The standard modification information and the operation modification information are aggregated to form rule modification information, and it is determined whether the rule modification information is empty; if the rule modification information is not empty, the operation rule is modified according to the rule modification information to obtain a rule to be tested, wherein the rule to be tested is stored in the blockchain.

4. The operation rule updating method according to claim 3, characterized in that: The detecting whether the standard information has been modified comprises: Comparing the standard version number of the extracted standard information with the pre-stored standard version number; If the two standard version numbers are consistent, it is determined that the standard information has not been modified; If the two standard version numbers are inconsistent, it is determined that the standard information has been modified, and the pre-stored standard version number is replaced with the standard version number of the standard information.

5. The operation rule updating method according to claim 3, characterized in that: Modifying the operation rule according to the rule modification information to obtain the rule to be tested includes: If the rule modification information includes standard information and adjustment data, the operation formula and operation index in the operation rule are respectively replaced by the standard formula and standard index in the standard information; the standard operation rule to be tested is obtained by adjusting the replaced operation rule according to the element adjustment data and / or formula adjustment data in the adjustment data, a new operation version number is formulated for the standard operation rule to be tested, and it is associated with the standard operation rule to be tested.

6. The operation rule updating method according to claim 1, characterized in that: After deleting the rule to be tested, the method may further include: Determine the type of the rule to be tested; If the rule to be tested is an operation rule to be tested, a calculation error signal is generated and sent to the user end to inform that the calculation rule modified by the adjustment data cannot meet the requirement of the failure threshold; If the rule to be tested is a standard rule to be tested, a standard error signal is generated and sent to the user end to inform that the operation rule modified by the standard information cannot meet the requirement of the failure threshold; If the rule to be tested is a standard operation rule to be tested, a standard operation error signal is generated and sent to the user end to inform that the operation rule modified by the standard information and the adjustment data cannot meet the requirement of the failure threshold.

7. An operation rule updating device, characterized in that: include: The difference comparison module is used to obtain the update data to be executed, wherein the update data is used to record the data update rules; the update data includes: update standard information and adjustment data, and the update data to be executed includes: obtaining the update standard and performing formula and text comparison with the local standard in the preset database to obtain difference data, modifying the standard information corresponding to the local standard by the difference data, and generating update standard information; receiving the adjustment data sent by the control terminal for modifying the operation rules; A copy and modify module, used to modify the local operation rules according to the update data to generate the rules to be tested; An update test module is used to calculate preset test data through the rule to be tested and obtain a test result; compare the test result with a preset failure threshold, and if the test result does not exceed the preset failure threshold, retain the rule to be tested so that the rule to be tested replaces the local operation rule; if the test result exceeds the preset failure threshold, delete the rule to be tested; The formula comparison refers to obtaining formula difference data by comparing the formulas in the updated standard and the local standard, obtaining element difference data by comparing the indicator elements in the updated standard and the local standard, and aggregating the formula difference data and element difference data to form the difference data; the indicator element refers to information used to define the data in the standard; The text comparison is to use text difference comparison software to compare the updated standard with the local standard word by word to obtain difference data; the text difference comparison software is a text comparison tool, which is used to compare the differences between Chinese characters and numbers at both ends; The formula comparison includes changes in the database and changes in the calculation formula; The comparison between the indicator elements includes string comparison and value comparison; the string comparison refers to extracting the same string from the update standard and the local standard for comparison; the value comparison refers to extracting the value corresponding to the string from the update standard and the local standard respectively. If the two values ​​are equal, it is not difference data. If the two values ​​are not equal, the string and its value in the update standard are set as element difference data.

8. A computer system comprising a plurality of computer devices, each of which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processors of the plurality of computer devices jointly implement the steps of the operation rule updating method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, comprising a plurality of storage media, each storage medium storing a computer program, characterized in that: The computer programs stored in the plurality of storage media, when executed by a processor, jointly implement the steps of the operation rule updating method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN111090641A