CN112445470B - Dynamic rule creation method and system based on newly added scene - Google Patents
Dynamic rule creation method and system based on newly added scene Download PDFInfo
- Publication number
- CN112445470B CN112445470B CN202011254972.5A CN202011254972A CN112445470B CN 112445470 B CN112445470 B CN 112445470B CN 202011254972 A CN202011254972 A CN 202011254972A CN 112445470 B CN112445470 B CN 112445470B
- Authority
- CN
- China
- Prior art keywords
- foreground
- scene
- attribute
- general class
- class
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000004458 analytical method Methods 0.000 claims abstract description 9
- 230000000007 visual effect Effects 0.000 claims description 8
- 238000003491 array Methods 0.000 claims description 6
- 238000011161 development Methods 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
- G06F8/24—Object-oriented
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
The invention discloses a dynamic rule creation method and a system based on a newly added scene, wherein the method comprises the following steps: the background reads the pre-created general class and the corresponding attribute and feeds the general class and the corresponding attribute back to the foreground; the foreground creates and generates dynamic rules according to the scene creation instruction and the general class and attribute selection instruction; the foreground transmits the dynamic rules generated by configuration to the background for analysis, executes the dynamic rules and returns the results to the foreground for display. According to the technical scheme, the rules are configured visually in the foreground, new scene classes are not developed through the background, the background development workload is reduced, the host restarting operation is reduced, the rules are configured visually in the self-defined foreground, the development efficiency is improved, and the error probability is reduced.
Description
Technical Field
The invention relates to the technical field of business scene support, in particular to a dynamic rule creation method based on a new scene and a dynamic rule creation system based on the new scene.
Background
In the conventional business processing process, a rule is created by a method of creating a rule in advance. Therefore, if new scenes are added, java class corresponding to the background creation scene must be executed, then a drools rule is set, finally scene rule matching is executed, and then the effect is achieved. The conventional method has the defects that operations such as background development and host restarting are needed in each newly added scene, the rule creation efficiency in the newly added scene is affected, the background development workload is large, and the error probability is high.
Disclosure of Invention
Aiming at the problems, the invention provides a dynamic rule creation method and a system based on a new scene, which match the general class attribute with the rule, visually configure the rule in the foreground, do not develop a new scene class through the background, reduce the development workload of the background, reduce the restarting operation of a host, and visually configure the rule in the self-defined foreground, thereby improving the development efficiency and reducing the error probability.
In order to achieve the above object, the present invention provides a dynamic rule creation method based on a newly added scene, including: the background reads the pre-created general class and the corresponding attribute and feeds the general class and the corresponding attribute back to the foreground; the foreground creates and generates dynamic rules according to the scene creation instruction and the general class and attribute selection instruction; and the foreground transmits the dynamic rule generated by configuration to the background for analysis, executes the dynamic rule and returns the result to the foreground for display.
In the above technical solution, preferably, the specific process of reading the pre-created generic class and the corresponding attribute by the background and feeding back the generic class and the corresponding attribute to the foreground includes: the background creates a general class of the same service direction in a designated package; creating the attribute of the general class, and setting the operation method of the attribute according to the scene of the attribute; and reading the class name and the corresponding attribute of the general class through a reflection technology, generating a json array and feeding back to the foreground.
In the above technical solution, preferably, creating the dynamic rule according to the foreground scene creation instruction and the generic class and attribute selection instruction specifically includes: the foreground creates a scene based on the general class according to the received scene creation instruction and the general class in the package in the json array; and the foreground adds attribute rules required by the scene according to the received attribute selection instruction and the general class attribute in the package in the json array to generate the dynamic rules.
In the above technical solution, preferably, the foreground performs visual scene creation, attribute selection and rule display through a web page.
In the above technical solution, preferably, the generic class of the corresponding type is created according to a service scene type, where each service scene type corresponds to one generic class.
The invention also provides a dynamic rule creation system based on the new scene, which applies the dynamic rule creation method based on the new scene according to any one of the technical schemes, and comprises a foreground module and a background module; the background module reads the pre-created general class and the corresponding attribute and feeds the general class and the corresponding attribute back to the foreground module; the foreground module creates and generates dynamic rules according to the scene creation instruction and the general class and attribute selection instruction; the foreground module transmits the dynamic rule generated by configuration to the background module for analysis, and the background module executes the dynamic rule and returns the result to the foreground module for display.
In the above technical solution, preferably, the background module is specifically configured to: creating a general class of the same service direction in the designated package; creating the attribute of the general class, and setting the operation method of the attribute according to the scene of the attribute; and reading the class name and the corresponding attribute of the general class through a reflection technology, generating a json array and feeding back to the foreground module.
In the above technical solution, preferably, the foreground module is specifically configured to: creating a scene based on a general class according to the received scene creation instruction and the general class in the package in the json array; and adding attribute rules required by the scene according to the received attribute selection instruction and the general class attribute in the package in the json array, and generating the dynamic rules.
In the above technical solution, preferably, the foreground module performs visual scene creation, attribute selection and rule display through a web page.
In the above technical solution, preferably, the generic class of the corresponding type is created according to a service scene type, where each service scene type corresponds to one generic class.
Compared with the prior art, the invention has the beneficial effects that: the rule is visually configured in the foreground through matching the general class attribute with the rule, and new scene classes are not developed through the background, so that the background development workload is reduced, the host restarting operation is reduced, the rule is visually configured in the self-defined foreground, the development efficiency is improved, and the error probability is reduced.
Drawings
FIG. 1 is a flow chart of a method for creating dynamic rules based on a new scenario according to an embodiment of the present invention;
FIG. 2 is a diagram of a foreground interface for scene creation according to one embodiment of the present invention;
FIG. 3 is a diagram of a foreground interface for attribute selection according to one embodiment of the present invention;
fig. 4 is a schematic diagram of a foreground interface for rule presentation according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention is described in further detail below with reference to the attached drawing figures:
as shown in fig. 1, the method for creating a dynamic rule based on a new scene provided by the invention comprises the following steps: the background reads the pre-created general class and the corresponding attribute and feeds the general class and the corresponding attribute back to the foreground; the foreground creates and generates dynamic rules according to the scene creation instruction and the general class and attribute selection instruction; the foreground transmits the dynamic rules generated by configuration to the background for analysis, executes the dynamic rules and returns the results to the foreground for display.
In the embodiment, the rule is visually configured in the foreground through matching the general class attribute with the rule, and new scene classes are not developed through the background, so that the background development workload is reduced, the host restarting operation is reduced, the visual self-defined foreground configuration is carried out on the rule, the development efficiency is improved, and the error probability is reduced.
As shown in fig. 2 to 4, in particular, the background creates a generic Java class, more than one of which can be created according to the total service division, each service type corresponds to a generic class, and the creation of the generic class includes attributes and set, get methods. The background feeds the created general class and the corresponding attribute back to the foreground, so that the foreground can find the corresponding general class and the corresponding attribute according to the class name when receiving a scene creation instruction and an attribute selection instruction operated by service personnel, and the creation of the dynamic rule is completed. And transmitting the created dynamic rule to the background for analysis, executing the dynamic rule by the background, and returning the execution result to the foreground for display.
In the foregoing embodiment, preferably, the specific process of reading the pre-created generic class and the corresponding attribute by the background and feeding back to the foreground includes: the background creates a general class of the same service direction in the appointed package; creating the attribute of the general class, and setting the operation method of the attribute according to the scene of the attribute; and reading class names and corresponding attributes of the general classes through a reflection technology, generating a json array and feeding back the json array to the foreground.
In the above embodiment, preferably, creating and generating the dynamic rule according to the foreground scene creation instruction and the generic class and attribute selection instruction specifically includes: the foreground creates a scene based on a general class according to the received scene creation instruction and the general class in the package in the json array; and adding an attribute rule required by the scene according to the received attribute selection instruction and the general class attribute in the package in the json array by the foreground to generate a dynamic rule.
In the above embodiment, preferably, the foreground performs visual scene creation, attribute selection and rule display through the web page, so as to improve the creation efficiency and convenience of the dynamic rule.
In the above embodiment, it is preferable that a generic class of a corresponding type is created according to the service scene types, and each service scene type corresponds to one generic class.
The invention also provides a dynamic rule creation system based on the new scene, which applies the dynamic rule creation method based on the new scene according to any one of the embodiments, and comprises a foreground module and a background module; the background module reads the pre-created general class and the corresponding attribute and feeds the general class and the corresponding attribute back to the foreground module; the foreground module creates and generates dynamic rules according to the scene creation instruction and the general class and attribute selection instruction; the foreground module transmits the dynamic rules generated by configuration to the background module for analysis, and the background module executes the dynamic rules and returns the results to the foreground module for display.
In the embodiment, the rule is visually configured in the foreground through matching the general class attribute with the rule, and new scene classes are not developed through the background, so that the background development workload is reduced, the host restarting operation is reduced, the visual self-defined foreground configuration is carried out on the rule, the development efficiency is improved, and the error probability is reduced.
Specifically, the background creates more than one general Java class, a plurality of general Java classes can be created according to the total business division, each business type corresponds to one general class, and the creation of the general Java classes comprises attribute, set and get methods. The background feeds the created general class and the corresponding attribute back to the foreground, so that the foreground can find the corresponding general class and the corresponding attribute according to the class name when receiving a scene creation instruction and an attribute selection instruction operated by service personnel, and the creation of the dynamic rule is completed. And transmitting the created dynamic rule to the background for analysis, executing the dynamic rule by the background, and returning the execution result to the foreground for display.
In the above embodiment, preferably, the background module is specifically configured to: creating a general class of the same service direction in the designated package; creating the attribute of the general class, and setting the operation method of the attribute according to the scene of the attribute; and reading class names and corresponding attributes of the general classes through a reflection technology, generating json arrays and feeding back the json arrays to the foreground module.
In the above embodiment, preferably, the foreground module is specifically configured to: creating a scene based on a general class according to the received scene creation instruction and the general class in the package in the json array; and adding attribute rules required by the scene according to the received attribute selection instruction and the general class attribute in the package in the json array, and generating dynamic rules.
In the above embodiment, preferably, the foreground module performs visual scene creation, attribute selection and rule display through the web page, so as to improve the creation efficiency and convenience of the dynamic rule.
In the above embodiment, it is preferable that a generic class of a corresponding type is created according to the service scene types, and each service scene type corresponds to one generic class.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (4)
1. The dynamic rule creation method based on the newly added scene is characterized by comprising the following steps:
the background reads the pre-created general class and the corresponding attribute and feeds the general class and the corresponding attribute back to the foreground, and the specific process comprises the following steps:
the background creates a general class of the same service direction in a designated package;
creating the attribute of the general class, and setting the operation method of the attribute according to the scene of the attribute;
reading class names and corresponding attributes of the general classes through a reflection technology, generating json arrays and feeding back the json arrays to the foreground;
the foreground creates and generates dynamic rules according to a scene creation instruction and a general class and attribute selection instruction, and the specific process comprises the following steps:
the foreground creates a scene based on the general class according to the received scene creation instruction and the general class in the package in the json array;
the foreground adds attribute rules required by the scene according to the received attribute selection instruction and the general class attribute in the package in the json array to generate the dynamic rules;
the foreground transmits the dynamic rule generated by configuration to the background for analysis, executes the dynamic rule and returns a result to the foreground for display;
and the foreground performs visual scene creation, attribute selection and rule display through the web page.
2. The method for creating dynamic rules based on new scenes according to claim 1, wherein the generic classes of corresponding types are created according to the types of the business scenes, each type of business scene corresponding to a generic class.
3. A dynamic rule creation system based on a new scene, which applies the dynamic rule creation method based on the new scene as claimed in claim 1 or 2, and is characterized by comprising a foreground module and a background module;
the background module reads the pre-created general class and the corresponding attribute and feeds the general class and the corresponding attribute back to the foreground module;
the foreground module creates and generates dynamic rules according to the scene creation instruction and the general class and attribute selection instruction;
the foreground module transmits the dynamic rule generated by configuration to the background module for analysis, and the background module executes the dynamic rule and returns a result to the foreground module for display;
the background module is specifically used for:
creating a general class of the same service direction in the designated package;
creating the attribute of the general class, and setting the operation method of the attribute according to the scene of the attribute;
reading class names and corresponding attributes of the general classes through a reflection technology, generating json arrays and feeding back the json arrays to the foreground module;
the foreground module is specifically configured to:
creating a scene based on a general class according to the received scene creation instruction and the general class in the package in the json array;
adding attribute rules required by the scene according to the received attribute selection instruction and the general class attribute in the package in the json array to generate the dynamic rules;
the foreground module performs visual scene creation, attribute selection and rule display through the web page.
4. The dynamic rule creation system based on the new scene as claimed in claim 3, wherein the generic class of the corresponding type is created according to the service scene types, each service scene type corresponding to one generic class.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011254972.5A CN112445470B (en) | 2020-11-11 | 2020-11-11 | Dynamic rule creation method and system based on newly added scene |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011254972.5A CN112445470B (en) | 2020-11-11 | 2020-11-11 | Dynamic rule creation method and system based on newly added scene |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112445470A CN112445470A (en) | 2021-03-05 |
CN112445470B true CN112445470B (en) | 2023-11-07 |
Family
ID=74736824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011254972.5A Active CN112445470B (en) | 2020-11-11 | 2020-11-11 | Dynamic rule creation method and system based on newly added scene |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112445470B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114298514A (en) * | 2021-12-21 | 2022-04-08 | 汇承金融科技服务(南京)有限公司 | Data processing method and device for business wind control, storage medium and electronic device |
CN117234489B (en) * | 2023-11-14 | 2024-03-15 | 云筑信息科技(成都)有限公司 | Method for realizing dynamic module arrangement based on business process |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793223A (en) * | 2013-12-27 | 2014-05-14 | 远光软件股份有限公司 | Rule creating method and system |
CN103870274A (en) * | 2014-03-14 | 2014-06-18 | 浪潮集团山东通用软件有限公司 | Visual development assembly for realizing data interaction between heterogeneous systems based on web service technology |
CN106371613A (en) * | 2016-10-12 | 2017-02-01 | 大连文森特软件科技有限公司 | Collaborative visual programmed VR starry sky manufacturing and observing system |
CN106528129A (en) * | 2016-10-27 | 2017-03-22 | 南京南瑞继保电气有限公司 | Web application interface generation system and method |
CN107145789A (en) * | 2017-05-22 | 2017-09-08 | 国网江苏省电力公司电力科学研究院 | A kind of Visual Interactive method of big data safety analysis |
CN110688403A (en) * | 2019-09-23 | 2020-01-14 | 中国船舶重工集团公司第七一六研究所 | Activiti process manual node transactor screening engine |
CN110704047A (en) * | 2019-09-28 | 2020-01-17 | 苏州创旅天下信息技术有限公司 | Dynamic visual configuration system and operation management method based on same |
CN110865797A (en) * | 2018-08-28 | 2020-03-06 | 北京京东尚科信息技术有限公司 | Method and device for processing dynamic attributes of services |
CN111399814A (en) * | 2020-03-09 | 2020-07-10 | 中国邮政储蓄银行股份有限公司 | Visual arrangement method and device for construction tasks |
CN111694547A (en) * | 2019-03-12 | 2020-09-22 | 湛江市霞山区新软佳科技有限公司 | Automatic coding data processing application design tool based on data state change |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8195598B2 (en) * | 2007-11-16 | 2012-06-05 | Agilence, Inc. | Method of and system for hierarchical human/crowd behavior detection |
-
2020
- 2020-11-11 CN CN202011254972.5A patent/CN112445470B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793223A (en) * | 2013-12-27 | 2014-05-14 | 远光软件股份有限公司 | Rule creating method and system |
CN103870274A (en) * | 2014-03-14 | 2014-06-18 | 浪潮集团山东通用软件有限公司 | Visual development assembly for realizing data interaction between heterogeneous systems based on web service technology |
CN106371613A (en) * | 2016-10-12 | 2017-02-01 | 大连文森特软件科技有限公司 | Collaborative visual programmed VR starry sky manufacturing and observing system |
CN106528129A (en) * | 2016-10-27 | 2017-03-22 | 南京南瑞继保电气有限公司 | Web application interface generation system and method |
CN107145789A (en) * | 2017-05-22 | 2017-09-08 | 国网江苏省电力公司电力科学研究院 | A kind of Visual Interactive method of big data safety analysis |
CN110865797A (en) * | 2018-08-28 | 2020-03-06 | 北京京东尚科信息技术有限公司 | Method and device for processing dynamic attributes of services |
CN111694547A (en) * | 2019-03-12 | 2020-09-22 | 湛江市霞山区新软佳科技有限公司 | Automatic coding data processing application design tool based on data state change |
CN110688403A (en) * | 2019-09-23 | 2020-01-14 | 中国船舶重工集团公司第七一六研究所 | Activiti process manual node transactor screening engine |
CN110704047A (en) * | 2019-09-28 | 2020-01-17 | 苏州创旅天下信息技术有限公司 | Dynamic visual configuration system and operation management method based on same |
CN111399814A (en) * | 2020-03-09 | 2020-07-10 | 中国邮政储蓄银行股份有限公司 | Visual arrangement method and device for construction tasks |
Non-Patent Citations (2)
Title |
---|
Combining Static and Dynamic Analyses to Reverse-Engineer Scenario Diagrams;Y. Labiche 等;《2013 IEEE International Conference on Software Maintenance》;130-139 * |
虚拟场景动态交互式可视化的研究;袁海波 等;《电脑与信息技术》;第16卷(第06期);7-9, 45 * |
Also Published As
Publication number | Publication date |
---|---|
CN112445470A (en) | 2021-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108228166B (en) | Template-based back-end code generation method and system | |
CN112445470B (en) | Dynamic rule creation method and system based on newly added scene | |
CN111736840B (en) | Method for compiling applet application, method for running applet application, storage medium and electronic device | |
US20210185111A1 (en) | Data processing methods, electronic devices, and storage media | |
CN110609681A (en) | System, method, device and medium for visually configuring and generating WEB application | |
US10162628B2 (en) | Transactional distributed data analysis and transformation | |
CN111221729B (en) | Automatic testing method and system for separating platform service from testing service | |
CN111125496B (en) | Price query method, device and system | |
CN102945287A (en) | Java server page (JSP) data automatic paging java standard tag library (JSTL) label technology and application | |
CN110727429A (en) | Front-end page generation method, device and equipment | |
US20200167209A1 (en) | Configurable Analytics For Microservices Performance Analysis | |
CN111881385A (en) | Push content generation method, device, equipment and readable storage medium | |
CN113641700A (en) | Data processing method and device based on Spring boot frame | |
CN112506854A (en) | Method, device, equipment and medium for storing page template file and generating page | |
CN110633258B (en) | Log insertion method, device, computer device and storage medium | |
CN115630835A (en) | Activity-based workflow general parameter configuration method and system | |
CN113760242B (en) | Data processing method, device, server and medium | |
CN112685127A (en) | Data source operation method and system based on content management system | |
CN110175917B (en) | Device and method for parameter graphical processing | |
CN110941658A (en) | Data export method, device, server and storage medium | |
CN111061522A (en) | Method, device, equipment and storage medium for generating front-end card assembly based on back end | |
CN110399296B (en) | Method, system and medium for testing interactive interface between client and server | |
US11734299B2 (en) | Message templatization for log analytics | |
CN113656041A (en) | Data processing method, device, equipment and storage medium | |
CN114637951A (en) | Method and system for dynamically loading functional page based on configuration file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |