CN111061679B - Method and system for rapid configuration of technological innovation policy based on rete and drools rules - Google Patents

Method and system for rapid configuration of technological innovation policy based on rete and drools rules Download PDF

Info

Publication number
CN111061679B
CN111061679B CN201911293516.9A CN201911293516A CN111061679B CN 111061679 B CN111061679 B CN 111061679B CN 201911293516 A CN201911293516 A CN 201911293516A CN 111061679 B CN111061679 B CN 111061679B
Authority
CN
China
Prior art keywords
file
excel
technological innovation
scientific
format file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911293516.9A
Other languages
Chinese (zh)
Other versions
CN111061679A (en
Inventor
赵燕
朱悦
王渭
沐宏
邓言博
周许承
王文杰
魏方明
卢玉华
张婷婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai R&d Public Service Platform Management Center
Original Assignee
Shanghai R&d Public Service Platform Management Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai R&d Public Service Platform Management Center filed Critical Shanghai R&d Public Service Platform Management Center
Priority to CN201911293516.9A priority Critical patent/CN111061679B/en
Publication of CN111061679A publication Critical patent/CN111061679A/en
Application granted granted Critical
Publication of CN111061679B publication Critical patent/CN111061679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/144Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Abstract

The invention relates to the technical field of rapid configuration of technological innovation policies, and discloses a method and a system for rapid configuration of technological innovation policies based on rete and drools rules, wherein the method and the system specifically generate corresponding technological innovation policy rules according to each collected technological innovation policy; loading the scientific and technological innovation policy rules to a corresponding scientific and technological innovation policy rule file; dynamically loading the scientific and technological innovation policy rule file into a memory; generating a Rete tree corresponding to the technological innovation policy rules through a rule engine drools; establishing a field and a field value of guided search according to the technological innovation policy as guided search conditions; and establishing a priority relation of the guided search condition, and guiding a user to search the technological innovation policy. The technical problems that a search result is not an optimal result, data of application conditions of the scientific and technological policies are irregular, and specific structural rules cannot be established to process all the scientific and technological policies due to the fact that no priority strategy exists during retrieval are solved.

Description

Method and system for rapid configuration of technological innovation policy based on rete and drools rules
Technical Field
The invention relates to the technical field of rapid configuration of technological innovation policies, in particular to a method and a system for rapid configuration of the technological innovation policies based on rete and drools rules.
Background
The science and technology policy is a basic action rule specified by the state to realize a science and technology task in a certain historical period, and is a strategy and a strategy principle for determining the development direction of a science and technology career and guiding the whole science and technology career.
In recent years, various scientific and technical policies are introduced by governments, and almost every enterprise, individual, team and the like has corresponding policies to be declared. However, generally, a lot of time and labor are needed, attention needs to be paid to the dynamics of each large policy platform all the time, and it is very time-consuming and energy-consuming to keep track of when the relevant policies are out of service. The establishment of a method and a system for rapid matching of technological policies is urgent.
The technical policy matching system in the prior art generally adopts a mode of marking each application condition of the technical policy, a user searches the technical policy through a label, the technical policy result searched in the mode is large in range result and can pop up a plurality of technical policies at one time, the user still needs to go to all search results page by page and see whether each policy is the required technical policy of the user, and no strategy with a priority exists during searching, so that the searched result is not optimal.
Further, the rule of every application condition of a scientific and technological policy is not fixed, and data is irregular, can't establish specific structured rule and handle all scientific and technological policies, also can't get the label to all application conditions and let the user go the retrieval simultaneously, must cause scientific and technological policy to match inaccurately, and good scientific and technological policy can be omitted even a bit, to the enterprise, talent, the team etc. all is a loss.
The invention discloses an intelligent policy matching system which is disclosed in an invention patent application document with the application number of '201811287900.3' and the subject name of 'an intelligent policy matching system and method', and comprises a user platform and a background management system.
The user platform comprises a user category selection module, a user information filling module and a policy intelligent matching module. In the user category selection module, enterprises, talents, college parks, park incubators and service institutions can be selected, and each user selects different categories according to the attribute and the requirement of the user. After each user selects the category, the user enters a user information filling module, the user information filling module is provided with a corresponding basic information filling interface, and each information index is defined according to various policy information. After the user fills in the basic information, clicking the basic information for immediate matching, entering a policy intelligent matching module, establishing a matching rule, wherein the matching rule is used for carrying out priority sequencing on the difficulty degree of quantifiable qualitative hard indexes, starting matching from the hardest index, comparing information filled in by the front-end user with a matching formula of each item of policy information compiled by the policy, and when the user information accords with the matching formula, successfully matching, automatically outputting a policy matching result, wherein the matching result displays a related item name, declared income and a latest policy notification link so as to show that the declared condition of the policy of the category is met at present, and the user can declare the policy.
The background management module mainly comprises a policy database, a policy compiling module and a user management module. Various policy information associated with each user is collected from national, provincial, municipal and regional government websites, and is imported into a policy database after data standardization and arrangement according to project names, innovation subject types, declaration conditions, quantifiable qualitative hard indexes, declaration benefits and latest policy notification links. The policy compiling module compiles quantifiable qualitative hard indexes of various policy information in the imported policy database by using a computer program language to establish a matching formula, wherein the matching formula is established, and the matching formula is for example that the declaration condition requires that the number of invented patents is at least more than 1, and personnel require more than 20. The user management module mainly stores the information filled in the user information filling module, and displays the collected most basic user information, such as enterprise names, unified social credit codes, establishment time, registered capital and the like, in a background in a list form.
In the above-mentioned published application documents, the user information filling module has a corresponding basic information filling interface, each information index is defined according to various policy information, but in actual life, the rules of the information of the outgoing scientific and technological policy are not fixed, the filling options of the basic information filling interface cannot cover all policy information, and the uncertainty of manually inputting the basic information is too large. Furthermore, the data is standardized and arranged according to the project name, the innovation subject type, the reporting condition, the quantifiable qualitative hard index, the reporting income and the latest policy notice link and then is imported into the policy database, the reporting condition of the scientific and technological innovation policy is irregular, certain policies cannot be standardized and arranged by the method, and the technical problems in the prior art still exist.
In summary, in the prior art, there is no priority policy in the retrieval process, which results in that the search result is not the optimal result, and the rule of the application condition of each technological policy is not fixed, the data is irregular, and a specific structured rule cannot be established to process all the technological policies.
Disclosure of Invention
In view of the above problems, the present invention provides a method and a system for rapidly matching a technical innovation policy based on rete and drools rules, which have the advantages of establishing a guided input element, guiding a user to search out an optimal policy according to a priority, not requiring to perform structured processing on the technical innovation policy, enabling any technical innovation policy to be entered into the system, and outputting a small amount of technical innovation policies with high matching degrees at a time.
The above object of the present invention is achieved by the following technical solutions:
a method for rapid configuration of technological innovation policies based on rete and drools rules is characterized by comprising the following steps:
s1: generating corresponding scientific and technological innovation policy rules identified by a computer for each acquired scientific and technological innovation policy according to the corresponding name and the corresponding application condition of the policy;
s2: loading the scientific and technological innovation policy rules to a corresponding scientific and technological innovation policy rule file;
s3: dynamically loading the scientific and technological innovation policy rule file into a memory;
s4: generating a Rete tree corresponding to the technological innovation policy rules through a rule engine drools;
s5: establishing a guided input element database, establishing fields and field values of guided search according to the technological innovation policy as guided search conditions, and storing the fields and the field values in the guided input element database;
s6: and establishing a priority relation of the guided search condition, guiding a user to search the technological innovation policy, and displaying the technological innovation policy corresponding to the endpoint of the node of the Rete tree to the user according to the node trend of the Rete tree corresponding to the selected guided search condition.
Further, in step S1, the rules of the scientific and technological innovation policies, including attributes, conditions and results,
the attribute is used for defining the name of the current scientific and technological innovation policy rule;
the condition is used for setting application conditions of the scientific and technological innovation policy, establishing a constraint connection relationship, and expressing the application conditions of the scientific and technological innovation policy through the constraint connection relationship;
the constraint connection relation is formed by connecting the application conditions of the scientific and technological innovation policies by adopting connectors including sum, or more than or less than;
and the result is used for outputting the technological innovation policy after the user meets the application conditions of all the technological innovation policies.
Further, in step S2, in the process of loading the scientific and technological innovation policy rules into the corresponding scientific and technological innovation policy rule file, the updating operation of the scientific and technological innovation policy rules in the scientific and technological innovation policy rule file is performed, and the updated scientific and technological innovation policy rule file is stored into the scientific and technological innovation policy rule file library, where the updating operation includes at least one of deletion, addition, and modification of the scientific and technological innovation policy rules.
Further, the scientific and technological innovation policy rule file includes a drl format file, and the step S3 specifically includes: and automatically loading the drl format file into the memory through the function of dynamically loading the drl format file by the rule engine drools.
Further, the scientific and technological innovation policy rule file further includes an excel format file, and the step S3 specifically includes:
converting the excel format file into the dri format file through a file type conversion interface of the rule engine drools, and further automatically loading the dri format file into the memory through a function of dynamically loading the dri format file through the rule engine drools.
Further, when the scientific and technological innovation policy rule file is an excel format file, the step S3 specifically includes the following steps:
s31: establishing an excel folder, wherein the excel folder is used for storing the excel format file, and establishing a drl folder, and the drl folder is used for storing the drl format file;
s32: creating a set class in the memory, wherein a key of the set class is a file name of the excel format file, and a value of the set class is file modification time of the excel format file;
the collection class comprises a transit collection class and a contrast collection class;
the transfer set class is used for storing the file names and the file modification time of all the excel format files in the current excel folder;
the comparison set class is used for storing the file name and the file modification time of the excel format file existing in the excel folder before the excel folder imports the excel format file;
s33: creating an excel file scanning thread, scanning the excel folder by using the excel file scanning thread, and storing the file names and the file modification time of all the excel format files in the excel folder into the transfer set class in a key-value pair mode;
s34: comparing the transit set class with the comparison set class, and converting the newly added or modified excel format file into the drl format file;
s35: a timer is established and steps S33, S34 are repeated.
Further, the step of comparing the transit set class with the comparison set class and converting the newly added or modified excel format file into the drl format file includes the specific steps of:
s341: traversing the file names and the file modification times of all the excel format files in the transit aggregation class, and checking the situations of the file names and the file modification times of all the excel format files in the transit aggregation class in the comparison aggregation class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the comparison set class, copying the key value pair of the file name of the excel format file and the file modification time into the comparison set class, converting the excel format file into the drl format file at the same time, and storing the drl format file into the drl folder;
if the file name of the excel format file exists in the comparison set class, but the modification time of the excel format file is different from that of the excel format file in the comparison set class, deleting the data in the comparison set class, which is the same as the file name of the excel format file, copying the key value pair of the file name and the file modification time of the excel format file into the comparison set class, simultaneously converting the excel format file into the drl format file, storing the drl format file into the drl folder, and covering the file in the drl folder, which is the same as the file name;
if the file name of the excel format file exists in the comparison set class and the modification time of the excel format file is the same as that of the excel format file in the comparison set class, no operation is performed;
s342: traversing the file names and the file modification times of all the excel format files in the comparison set class, and checking the situations of the file names and the file modification times of all the excel format files in the comparison set class in the transfer set class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the transit aggregation class, deleting the data with the same file name as the excel format file in the comparison aggregation class, and deleting the file with the same file name in the drl folder;
and if the file name of the excel format file exists in the transit aggregation class and the modification time of the excel format file is the same as that of the excel format file in the transit aggregation class, no operation is performed.
Further, in step S5, the establishing of the guided search field and the field value according to the scientific and technological innovation policy is used as a guided search condition, and specifically includes:
according to the user role, establishing a field and a field value of the guided search required by the user role for searching the technological innovation policy as the guided search condition;
the user roles include organization, individual and team;
the guiding search condition of the unit comprises a registration place, registration time, unit attribute, industry, main subject field, total personnel number, qualification, scientific and technological achievement, unit input, unit output and unit income;
the guided search condition of the individual includes nationality, province/district of the individual, subject field, and research field.
Further, in step S6, the establishing of the priority relationship of the guided search condition may specifically be:
if the user role is the unit, establishing the priority relationship as follows: role > registry > type > annual income > industry;
if the user role is the individual, establishing the priority relationship as follows: role > nationality > registry > industry.
The invention aims at the method for rapidly matching the technological innovation policy based on Rete and drools rules, and also provides a system for rapidly matching the technological innovation policy based on Rete and drools rules, which is characterized by comprising a technological innovation policy rule establishing module, a technological innovation policy rule file loading module, a Rete tree generating module, a guided input element establishing module and a user retrieval module,
the scientific and technological innovation policy rule establishing module is used for generating corresponding scientific and technological innovation policy rules identified by a computer for each acquired scientific and technological innovation policy according to the corresponding name and the corresponding application condition of the acquired scientific and technological innovation policy;
the scientific and technological innovation policy rule file establishing module is used for loading the scientific and technological innovation policy rules to the corresponding scientific and technological innovation policy rule files;
the scientific and technological innovation policy rule file loading module is used for dynamically loading the scientific and technological innovation policy rule file into the memory;
the Rete tree generation module is used for generating a Rete tree corresponding to the technological innovation policy rule through a rule engine drools;
the guided input element establishing module is used for establishing a guided input element database, establishing fields and field values of guided search according to the technological innovation policy as guided search conditions, and storing the fields and the field values in the guided input element database;
the user retrieval module is used for establishing a priority relation of the guided search condition, guiding a user to search the technological innovation policy, and displaying the technological innovation policy corresponding to the endpoint of the Rete tree node to the user according to the selected node trend of the Rete tree corresponding to the guided search condition.
Further, the technical innovation policy rule file comprises a drl format file, and the technical innovation policy rule file loading module comprises a drl file loading unit, which is used for automatically loading the drl format file in the drl folder.
Further, the technical innovation policy rule file comprises an excel format file, the technical innovation policy rule file loading module further comprises a format conversion unit, and the format conversion unit converts the excel format file into a dri format file by executing the following steps:
s31: establishing an excel folder, wherein the excel folder is used for storing the excel format file, and establishing a drl folder, and the drl folder is used for storing the drl format file;
s32: creating a set class in the memory, wherein a key of the set class is a file name of the excel format file, and a value of the set class is file modification time of the excel format file;
the collection class comprises a transfer collection class and a contrast collection class;
the transfer set class is used for storing the file names and the file modification time of all the excel format files in the current excel folder;
the comparison set class is used for storing the file name and the file modification time of the excel format file existing in the excel folder before the excel folder imports the excel format file;
s33: creating an excel file scanning thread, scanning the excel folder by using the excel file scanning thread, and storing the file names and the file modification time of all the excel format files in the excel folder into the transit set class in a key-value pair mode;
s34: comparing the transit set class with the comparison set class, and converting the newly added or modified excel format file into the drl format file;
s35: a timer is established and steps S33, S34 are repeated.
Compared with the prior art, the invention has the beneficial effects that:
(1) Establishing fields and field values of guided search through a technological innovation policy, using the fields and field values as guided search conditions, establishing a priority relationship of the guided search conditions, guiding a user to search the technological innovation policy, and displaying the technological innovation policy with high matching degree with the user requirement to the user according to the node trend of the Rete tree, so that the problem that the search result is not the optimal result because no strategy with priority exists during retrieval in the prior art is solved;
(2) Through a mode of generating a Rete tree corresponding to the scientific and technological innovation policy rules by a rule engine drools, the technical problems that the rules of the application conditions of each scientific and technological policy are not fixed, the data is irregular, and specific structural rules cannot be established to process all scientific and technological policies in the prior art are solved.
Drawings
FIG. 1 is a flowchart illustrating a method for matching a technical innovation policy based on rete and drools rules according to the present invention;
FIG. 2 is a flowchart illustrating dynamic loading of a scientific and technological innovation policy rule file into a memory according to the present invention;
FIG. 3 is an overall structure diagram of a system for rapid configuration of a technical innovation policy based on rete and drools rules according to the present invention;
fig. 4 is a schematic structural diagram of a Rete tree generated in embodiment 3 of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and examples.
Example one
The invention provides a method for rapid configuration of a scientific and technological innovation policy based on rete and drools rules, which is characterized by comprising the following steps of:
s1: generating corresponding scientific and technological innovation policy rules identified by a computer for each acquired scientific and technological innovation policy according to the corresponding name and the corresponding application condition of the policy;
in step S1, the scientific and technological innovation policy rules, including attributes, conditions and results,
the attribute is used for defining the name of the current scientific and technological innovation policy rule;
the condition is used for setting application conditions of the scientific and technological innovation policy, establishing a constraint connection relationship, and expressing the application conditions of the scientific and technological innovation policy through the constraint connection relationship;
the constraint connection relation is formed by connecting the application conditions of the technological innovation policy by adopting connectors which are equal to, or greater than or less than;
and the result is used for outputting the technological innovation policy after the user meets the application conditions of all the technological innovation policies.
S2: loading the scientific and technological innovation policy rules to a corresponding scientific and technological innovation policy rule file;
in step S2, in the process of loading the scientific and technological innovation policy rules into the corresponding scientific and technological innovation policy rule file, the updating operation of the scientific and technological innovation policy rules in the scientific and technological innovation policy rule file is performed, and the updated scientific and technological innovation policy rule file is stored into the scientific and technological innovation policy rule file library, wherein the updating operation includes at least one of deletion, addition and modification of the scientific and technological innovation policy rules.
S3: dynamically loading the scientific and technological innovation policy rule file into a memory;
in step S3, the scientific and technological innovation policy rule file includes a drl format file, and the step S3 specifically includes: and automatically loading the drl format file into the memory through the function of dynamically loading the drl format file by the rule engine drools.
The scientific and technological innovation policy rule file further comprises an excel format file, and the step S3 specifically comprises the following steps:
and converting the excel format file into the drl format file through a file type conversion interface of the rule engine drools, and further automatically loading the drl format file into the memory through a function of dynamically loading the drl format file through the rule engine drools.
When the scientific and technological innovation policy rule file is an excel format file, the step S3 specifically includes the following steps:
s31: establishing an excel folder, wherein the excel folder is used for storing the excel format file, and establishing a drl folder, and the drl folder is used for storing the drl format file;
s32: creating a set class in the memory, wherein a key of the set class is a file name of the excel format file, and a value of the set class is file modification time of the excel format file;
the collection class comprises a transfer collection class and a contrast collection class;
the transfer set class is used for storing the file names and the file modification time of all the excel format files in the current excel folder;
the comparison set class is used for storing the file name and the file modification time of the excel format file existing in the excel folder before the excel folder imports the excel format file;
s33: creating an excel file scanning thread, scanning the excel folder by using the excel file scanning thread, and storing the file names and the file modification time of all the excel format files in the excel folder into the transfer set class in a key-value pair mode;
s34: comparing the transit set class with the comparison set class, and converting the newly added or modified excel format file into the drl format file, which specifically comprises the following steps:
s341: traversing the file names and the file modification times of all the excel format files in the transit aggregation class, and checking the situations of the file names and the file modification times of all the excel format files in the transit aggregation class in the comparison aggregation class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the comparison set class, copying the key value pair of the file name of the excel format file and the file modification time into the comparison set class, converting the excel format file into the drl format file at the same time, and storing the drl format file into the drl folder;
if the file name of the excel format file exists in the comparison set class, but the modification time of the excel format file is different from that of the excel format file in the comparison set class, deleting data in the comparison set class, which is the same as the file name of the excel format file, copying the key value pair of the file name and the file modification time of the excel format file into the comparison set class, simultaneously converting the excel format file into the drl format file, storing the drl format file into the drl folder, and covering the file in the drl folder, which is the same as the file name;
if the file name of the excel format file exists in the comparison set class and the modification time of the excel format file is the same as that of the excel format file in the comparison set class, no operation is performed;
s342: traversing the file names and the file modification times of all the excel format files in the comparison set class, and checking the situations of the file names and the file modification times of all the excel format files in the comparison set class in the transfer set class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the transit aggregation class, deleting the data with the same file name as the excel format file in the comparison aggregation class, and deleting the file with the same file name in the drl folder;
and if the file name of the excel format file exists in the transit aggregation class and the modification time of the excel format file is the same as that of the excel format file in the transit aggregation class, no operation is performed.
S35: a timer is established and steps S33, S34 are repeated.
S4: generating a Rete tree corresponding to the technological innovation policy rules through a rule engine drools;
s5: establishing a guided input element database, establishing a guided search field and a guided search field value as guided search conditions according to the technological innovation policy, and storing the guided search field and the guided search field value into the guided input element database;
in step S5, the establishing of the guided search field and the field value as the guided search condition according to the scientific and technological innovation policy specifically includes:
according to the user role, establishing a field and a field value of the guided search required by the user role for searching the technological innovation policy as the guided search condition;
the user roles include organization, individual and team;
the guide type search condition of the unit comprises a registration place, registration time, unit attribute, the industry, main subject field, total personnel number, qualification, scientific and technological achievement, unit investment, unit output and unit income;
the guided search criteria for the individual include nationality, province/district of the individual, subject area, research area.
S6: and establishing a priority relation of the guided search condition, guiding a user to search the technological innovation policy, and displaying the technological innovation policy corresponding to the endpoint of the node of the Rete tree to the user according to the node trend of the Rete tree corresponding to the selected guided search condition.
In step S6, the establishing of the priority relationship of the guided search condition may specifically be:
if the user role is the unit, establishing the priority relationship as follows: role > registry > type > annual income > industry;
if the user role is the individual, establishing the priority relationship as follows: role > nationality > registry > industry.
Example two
The invention provides a system for rapid configuration of a scientific and technological innovation policy based on Rete and drools rules, which is characterized by comprising a scientific and technological innovation policy rule establishing module, a scientific and technological innovation policy rule file loading module, a Rete tree generating module, a guided input element establishing module and a user retrieval module,
the scientific and technological innovation policy rule establishing module is used for generating scientific and technological innovation policy rules identified by a computer for each acquired scientific and technological innovation policy according to the corresponding name and the corresponding application condition of the acquired scientific and technological innovation policy;
the scientific and technological innovation policy rule file establishing module is used for loading the scientific and technological innovation policy rules to corresponding scientific and technological innovation policy rule files;
the scientific and technological innovation policy rule file loading module is used for dynamically loading the scientific and technological innovation policy rule file into the memory;
the technical innovation policy rule file comprises a drl format file, and the technical innovation policy rule file loading module comprises a drl file loading unit and is used for automatically loading the drl format file in the drl folder.
The technical innovation policy rule file comprises an excel format file, the technical innovation policy rule file loading module further comprises a format conversion unit, and the format conversion unit converts the excel format file into a drl format file by executing the following steps:
s31: establishing an excel folder, wherein the excel folder is used for storing the excel format file, and establishing a drl folder, and the drl folder is used for storing the drl format file;
s32: creating a set class in the memory, wherein a key of the set class is a file name of the excel format file, and a value of the set class is file modification time of the excel format file;
the collection class comprises a transit collection class and a contrast collection class;
the transfer set class is used for storing the file names and the file modification time of all the excel format files in the current excel folder;
the comparison set class is used for storing the file name and the file modification time of the excel format file existing in the excel folder before the excel folder imports the excel format file;
s33: creating an excel file scanning thread, scanning the excel folder by using the excel file scanning thread, and storing the file names and the file modification time of all the excel format files in the excel folder into the transfer set class in a key-value pair mode;
s34: comparing the transit set class with the comparison set class, and converting the newly added or modified excel format file into the dri format file;
s35: a timer is established and steps S33, S34 are repeated.
The Rete tree generation module is used for generating a Rete tree corresponding to the technological innovation policy rule through a rule engine drools;
the guided input element establishing module is used for establishing a guided input element database, establishing fields and field values of guided search according to the technological innovation policy as guided search conditions, and storing the fields and the field values into the guided input element database;
the user retrieval module is used for establishing a priority relation of the guided search condition, guiding a user to search the technological innovation policy, and displaying the technological innovation policy corresponding to the endpoint of the Rete tree node to the user according to the selected node trend of the Rete tree corresponding to the guided search condition.
EXAMPLE III
The embodiment provides a concrete application of the method and the system for rapid configuration of the technological innovation policy based on rete and drools rules.
Four technological innovation policies are collected:
1. conditions for application of "policy for introducing foreign talents in the construction of scientific institute of Injuries center
(1) Living in Shanghai
(2) non-Chinese nationality
(3) The annual income of the company exceeds 1 million
2. Application Condition of domestic talent introduction policy in scientific institute of technology center
(1) Living in Shanghai
(2) China nationality
(3) The annual income of the company exceeds 1 million
3. Application conditions of' Shanghai City talent development capital policy
(1) Living in Shanghai
(2) The place where the company is registered is Shanghai
4. Application conditions of Shanghai City science and technology innovation coupon policy
(1) Small and medium-sized enterprises registered in Shanghai
Or
(2) The rules for establishing the four technological innovation policies by a team who resides in the scientific server startup nursery of Shanghai city are as follows:
rule 1: the scientific and creative center builds the attributes of foreign talent introduction policy: construction of foreign talent introduction policy in scientific center
Conditions are as follows:
the company satisfies the conditions: company (last year income >1000& & registered place = "shanghai");
the individual satisfies the conditions: individual (individual at company = = company meets the condition & & nationality = "china" & & living place = = "shanghai");
as a result:
output "matching" policy of introducing talents overseas in construction of scientific center ";
rule 2: construction of domestic talent introduction policy in scientific and creative center
The attribute is as follows: construction of domestic talent introduction policy in scientific and creative center
Conditions are as follows:
the company satisfies the conditions: company (last year income >1000& & registered = = "shanghai");
the individual satisfies the conditions: person (person at company = = company meets the condition & & nationality = = "china" & & living place = = = "shanghai");
as a result:
output "matching" the policy of talent introduction in China in the center of scientific development ";
rule 3: policy for talent development in Shanghai city
The attributes are as follows: shanghai city talent development fund policy
Conditions are as follows:
the company satisfies the conditions: company (registered = = "shanghai");
the individual satisfies the conditions: person (person at company = = company meets the condition & & residence = = = "shanghai");
as a result:
output "matching" Shanghai City talent development capital policy ";
rule 4: shanghai city technological innovation ticket policy
The attribute is as follows: shanghai city technological innovation ticket policy
Conditions are as follows:
the company satisfies the conditions: a company (registered place = "shanghai" & & company type = "medium-small business");
as a result:
output ' matching ' Shanghai city science and technology innovation ticket policy ';
conditions are as follows:
the team meets the conditions: teams (onshore = = "shanghai");
as a result:
output "matching" Shanghai City science and technology innovation ticket policy ";
the four rules are arranged into a file, the format of the file can be a drl format aiming at technicians or an excel format aiming at other users, and the arranged file is saved into a set technological innovation policy rule file library.
Dynamically loading the file into an internal memory, loading the drl format file, and automatically loading the drl format file into the internal memory through the function of dynamically loading the drl format file by the rule engine drools;
loading the excel format file, and converting the excel format file into the dri format file through a file type conversion interface of the rule engine drools, which specifically comprises the following steps: the excel file stream is converted into a dri String object by org. Drools. Decision table. SpreadsheetCompiler class in drools, the dri String object is written into a dri file through a FileWriter interface, and further, the dri file is automatically loaded into the memory through the dynamic loading function of the rule engine drools.
The specific steps of converting the excel format file into the dri format file are as follows:
s31: establishing an excel folder, wherein the excel folder is used for storing the excel format file, and establishing a drl folder, and the drl folder is used for storing the drl format file;
s32: creating a set class in the memory, wherein a key of the set class is a file name of the excel format file, and a value of the set class is file modification time of the excel format file;
the collection class comprises a transfer collection class and a contrast collection class;
the transfer set class is used for storing the file names and the file modification time of all the excel format files in the current excel folder;
the comparison set class is used for storing the file name and the file modification time of the excel format file existing in the excel folder before the excel folder imports the excel format file;
s33: creating an excel file scanning thread, scanning the excel folder by using the excel file scanning thread, and storing the file names and the file modification time of all the excel format files in the excel folder into the transfer set class in a key-value pair mode;
s34: comparing the transit set class with the comparison set class, and converting the newly added or modified excel format file into the drl format file, specifically:
s341: traversing the file names and the file modification times of all the excel format files in the transit aggregation class, and checking the situations of the file names and the file modification times of all the excel format files in the transit aggregation class in the comparison aggregation class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the comparison set class, copying the key value pair of the file name of the excel format file and the file modification time into the comparison set class, converting the excel format file into the drl format file at the same time, and storing the drl format file into the drl folder;
if the file name of the excel format file exists in the comparison set class, but the modification time of the excel format file is different from that of the excel format file in the comparison set class, deleting the data in the comparison set class, which is the same as the file name of the excel format file, copying the key value pair of the file name and the file modification time of the excel format file into the comparison set class, simultaneously converting the excel format file into the drl format file, storing the drl format file into the drl folder, and covering the file in the drl folder, which is the same as the file name;
if the file name of the excel format file exists in the comparison set class and the modification time of the excel format file is the same as that of the excel format file in the comparison set class, no operation is performed;
s342: traversing the file names and the file modification times of all the excel format files in the comparison set class, and checking the condition that the file names and the file modification times of all the excel format files in the comparison set class are in the transfer set class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the transit aggregation class, deleting the data with the same file name as the excel format file in the comparison aggregation class, and deleting the file with the same file name in the drl folder;
and if the file name of the excel format file exists in the transit aggregation class and the modification time of the excel format file is the same as that of the excel format file in the transit aggregation class, no operation is performed.
S35: a timer is established and steps S33, S34 are repeated.
Through a rule engine drools, a Rete tree corresponding to the scientific and technological innovation policy rule is automatically generated, and the Rete tree finally generated in this embodiment is shown in fig. 4.
Establishing a guided input element:
dividing into the following steps according to user roles: units (companies), people and teams;
the fields of the unit guided search conditions can include a registration place, registration time, unit attributes, an industry to which the unit guided search conditions belong, a main subject field, a total number of people, qualification compliance, scientific and technological achievement, unit investment, unit output, unit income and the like, and the value of each field is set according to each field, and specifically can be in the form of a drop-down box;
fields of the individual guided search condition may include nationality, province/municipality, subject area, research area, etc., and a value of each field is set according to each field, and may be specifically in the form of a drop-down box;
the fields of the guided search condition of the team may include a presence, a presence time, a team attribute, etc., and the value of each field is set according to each field, which may be in the form of a drop-down box.
Dividing by roles, setting the priority of a guided search condition corresponding to each role, carrying out one-step search according to priority sequencing, if the roles are units, setting the roles as a role > a registration place > a type > an annual income > industry, if the roles are individuals, setting the roles as a role > a nationality > a registration place > the industry, and if the roles are teams, setting the roles as a role > a residence entrance > a residence time > a team attribute.
Four persons, three companies and two teams are set, and since the persons generally belong to the companies, the persons and the companies are related, and the persons and the companies can be searched by using the guiding search condition when the roles are the persons or the companies.
Four persons:
(1) Name: li Chade; nationality: USA; a residential area: shanghai;
(2) Name: wangbo; nationality: CHN; a residential area: shanghai;
(3) Name: sun Lisi; nationality: USA; a residential area: shanghai;
(4) Name: zhao Qi; nationality: CHN (CHN); a residence place: jiangsu;
three companies:
(1) Name: shanghai block chain science and technology, inc.; a registration place: shanghai; income in the last year: 3000A; company type: middle and small enterprises; the industry is as follows: software;
(2) The name is as follows: shanghai Internet of things science and technology Co., ltd; the registration place: shanghai; income in the last year: 500, a step of; company type: middle and small enterprises; the industry is as follows: an integrated circuit;
(3) The name is as follows: jiangsu heavy industry Co., ltd; a registration place: jiangsu; income in the last year: 10000; company type: a large enterprise; the industry is as follows: advanced manufacturing;
two teams:
(1) Name: an AI team; entering a residence: shanghai;
(2) Name: a Cloud team; entering a residence: an emblem;
li Chade, wangbo, a Shanghai block chain science and technology company; sun Lisi belongs to Shanghai Internet of things science and technology company; zhaoqi belongs to Jiangsu re-worker GmbH;
the people, the companies and the teams are guided to search according to the priority relation of the guided search conditions, and the final output results are as follows:
li Chade matches "policy for introducing talents overseas in the construction of scientific institute center";
wangbo matches policy of introduction of foreign talents in the construction of scientific center;
li Chade matches Shanghai City talent development fund policy;
wangbo matches the policy for talent development in Shanghai City;
sunlise matches Shanghai city talent development fund policy;
shanghai block chain science and technology Limited company matches the policy of Shanghai city science and technology innovation tickets;
AI team matching Shanghai city science and technology innovation ticket policy;
shanghai Internet of things science and technology Limited company matches the policy of science and technology innovation tickets of Shanghai city;
the AI team matches the policy for science and technology innovation tickets of Shanghai City.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to those skilled in the art without departing from the principles of the present invention should also be considered as within the scope of the present invention.

Claims (10)

1. A method for rapid matching of technological innovation policies based on rete and drools rules is characterized by comprising the following steps:
s1: generating corresponding scientific and technological innovation policy rules identified by a computer for each acquired scientific and technological innovation policy according to the corresponding name and the corresponding application condition of the policy;
s2: loading the scientific and technological innovation policy rules to corresponding scientific and technological innovation policy rule files;
s3: dynamically loading the scientific and technological innovation policy rule file into a memory;
s4: generating a Rete tree corresponding to the technological innovation policy rules through a rule engine drools;
s5: establishing a guided input element database, establishing a guided search field and a guided search field value as guided search conditions according to the technological innovation policy, and storing the guided search field and the guided search field value into the guided input element database;
s6: and establishing a priority relation of the guided search condition, guiding a user to search the technological innovation policy, and displaying the technological innovation policy corresponding to the endpoint of the node of the Rete tree to the user according to the selected node trend of the Rete tree corresponding to the guided search condition.
2. The method according to claim 1, wherein the loading of the technology innovation policy rules into the corresponding technology innovation policy rule file further comprises performing an update operation on the technology innovation policy rules in the technology innovation policy rule file, and storing the updated technology innovation policy rule file into a technology innovation policy rule file library, wherein the update operation includes at least one of deletion, addition, and modification of the technology innovation policy rules.
3. The method for rapid configuration of a technical innovation policy based on rete and drools rules as claimed in claim 1, wherein the technical innovation policy rule file comprises a dri format file, and the step S3 specifically comprises: and automatically loading the drl format file into the memory through the function of dynamically loading the drl format file by the rule engine drools.
4. The method for rapid configuration of a technical innovation policy based on rete and drools rules as claimed in claim 1, wherein the technical innovation policy rules file further comprises an excel format file, and the step S3 specifically comprises:
and converting the excel format file into a drl format file through a file type conversion interface of the rule engine drools, and further automatically loading the drl format file into the memory through a function of dynamically loading the drl format file by the rule engine drools.
5. The method according to claim 4, wherein the step S3 specifically comprises the following steps:
s31: establishing an excel folder, wherein the excel folder is used for storing the excel format file, and establishing a drl folder, and the drl folder is used for storing the drl format file;
s32: creating a set class in the memory, wherein a key of the set class is a file name of the excel format file, and a value of the set class is a file modification time of the excel format file;
the collection class comprises a transfer collection class and a contrast collection class;
the transfer set class is used for storing the file names and the file modification time of all the excel format files in the current excel folder;
the comparison set class is used for storing the file name and the file modification time of the excel format file existing in the excel folder before the excel folder imports the excel format file;
s33: creating an excel file scanning thread, scanning the excel folder by using the excel file scanning thread, and storing the file names and the file modification time of all the excel format files in the excel folder into the transit set class in a key-value pair mode;
s34: comparing the transit set class with the comparison set class, and converting the newly added or modified excel format file into the drl format file;
s35: a timer is established and steps S33, S34 are repeated.
6. The method according to claim 5, wherein the step of comparing the transit set class with the comparison set class and converting the newly added or modified excel format file into the dri format file comprises the following specific steps:
s341: traversing the file names and the file modification times of all the excel format files in the transit aggregation class, and checking the situations of the file names and the file modification times of all the excel format files in the transit aggregation class in the comparison aggregation class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the comparison set class, copying the key value pair of the file name of the excel format file and the file modification time into the comparison set class, converting the excel format file into the dri format file at the same time, and storing the dri format file into the dri folder;
if the file name of the excel format file exists in the comparison set class, but the modification time of the excel format file is different from that of the excel format file in the comparison set class, deleting data in the comparison set class, which is the same as the file name of the excel format file, copying the key value pair of the file name and the file modification time of the excel format file into the comparison set class, simultaneously converting the excel format file into the drl format file, storing the drl format file into the drl folder, and covering the file in the drl folder, which is the same as the file name;
if the file name of the excel format file exists in the comparison set class and the modification time of the excel format file is the same as that of the excel format file in the comparison set class, no operation is performed;
s342: traversing the file names and the file modification times of all the excel format files in the comparison set class, and checking the situations of the file names and the file modification times of all the excel format files in the comparison set class in the transfer set class, which specifically comprises the following steps:
if the file name of the excel format file does not exist in the transit aggregation class, deleting the data with the same file name as the excel format file in the comparison aggregation class, and deleting the file with the same file name in the drl folder;
and if the file name of the excel format file exists in the transit aggregation class and the modification time of the excel format file is the same as that of the excel format file in the transit aggregation class, no operation is performed.
7. The method according to claim 1, wherein the field and field value for guided search are established as guided search conditions according to the technical innovation policy, specifically:
according to the user role, establishing a field and a field value of the guided search required by the user role for searching the technological innovation policy as the guided search condition;
the user roles include organization, individual and team;
the guiding search condition of the unit comprises a registration place, registration time, unit attribute, industry, main subject field, total personnel number, qualification, scientific and technological achievement, unit input, unit output and unit income;
the guided search criteria for the individual include nationality, province/district of the individual, subject area, research area.
8. A system for rapid configuration of scientific and technological innovation policies based on Rete and drools rules is characterized by comprising a scientific and technological innovation policy rule establishing module, a scientific and technological innovation policy rule file loading module, a Rete tree generating module, a guided input element establishing module and a user retrieval module,
the scientific and technological innovation policy rule establishing module is used for generating scientific and technological innovation policy rules identified by a computer for each acquired scientific and technological innovation policy according to the corresponding name and the corresponding application condition of the acquired scientific and technological innovation policy;
the scientific and technological innovation policy rule file establishing module is used for loading the scientific and technological innovation policy rules to corresponding scientific and technological innovation policy rule files;
the scientific and technological innovation policy rule file loading module is used for dynamically loading the scientific and technological innovation policy rule file into the memory;
the Rete tree generation module is used for generating a Rete tree corresponding to the technological innovation policy rule through a rule engine drools;
the guided input element establishing module is used for establishing a guided input element database, establishing fields and field values of guided search according to the technological innovation policy as guided search conditions, and storing the fields and the field values into the guided input element database;
the user retrieval module is used for establishing a priority relation of the guided search condition, guiding a user to search the technological innovation policy, and displaying the technological innovation policy corresponding to the endpoint of the Rete tree node to the user according to the selected node trend of the Rete tree corresponding to the guided search condition.
9. The system for te and drools rule based scientific and technological innovation policy rapid prototyping according to claim 8, wherein the scientific and technological innovation policy rule file comprises a drl format file, and the scientific and technological innovation policy rule file loading module comprises a drl file loading unit for automatically loading the drl format file in the drl folder.
10. A system according to claim 8, wherein the scientific innovation policy rules file comprises an excel format file, the scientific innovation policy rules file loading module further comprises a format conversion unit, and the format conversion unit converts the excel format file into a dri format file by performing the following steps:
s31: establishing an excel folder, wherein the excel folder is used for storing the excel format file, and establishing a drl folder, and the drl folder is used for storing the drl format file;
s32: creating a set class in the memory, wherein a key of the set class is a file name of the excel format file, and a value of the set class is a file modification time of the excel format file;
the collection class comprises a transit collection class and a contrast collection class;
the transfer set class is used for storing the file names and the file modification time of all the excel format files in the current excel folder;
the comparison set class is used for storing the file name and the file modification time of the excel format file existing in the excel folder before the excel folder imports the excel format file;
s33: creating an excel file scanning thread, scanning the excel folder by using the excel file scanning thread, and storing the file names and the file modification time of all the excel format files in the excel folder into the transit set class in a key-value pair mode;
s34: comparing the transit set class with the comparison set class, and converting the newly added or modified excel format file into the dri format file;
s35: a timer is established and steps S33, S34 are repeated.
CN201911293516.9A 2019-12-16 2019-12-16 Method and system for rapid configuration of technological innovation policy based on rete and drools rules Active CN111061679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911293516.9A CN111061679B (en) 2019-12-16 2019-12-16 Method and system for rapid configuration of technological innovation policy based on rete and drools rules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911293516.9A CN111061679B (en) 2019-12-16 2019-12-16 Method and system for rapid configuration of technological innovation policy based on rete and drools rules

Publications (2)

Publication Number Publication Date
CN111061679A CN111061679A (en) 2020-04-24
CN111061679B true CN111061679B (en) 2023-03-14

Family

ID=70301930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911293516.9A Active CN111061679B (en) 2019-12-16 2019-12-16 Method and system for rapid configuration of technological innovation policy based on rete and drools rules

Country Status (1)

Country Link
CN (1) CN111061679B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112418599B (en) * 2020-10-15 2023-02-10 重庆市科学技术研究院 Enterprise growth path planning method and system based on index set
CN112632235A (en) * 2020-11-03 2021-04-09 招商银行股份有限公司佛山分行 Supporting information matching method, matching system and storage medium
CN112488588A (en) * 2020-12-21 2021-03-12 南京圣峰信息科技有限公司 Science and technology innovation policy information management system with timing updating function
CN115630080B (en) * 2022-10-26 2023-08-04 深圳市纵横云数信息科技有限公司 Guided talent policy welfare calculation method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8447722B1 (en) * 2009-03-25 2013-05-21 Mcafee, Inc. System and method for data mining and security policy management
CN108734402B (en) * 2018-05-23 2021-06-11 华中科技大学 Virtual case-based emergency management decision method and system for irregular emergency
CN109408683A (en) * 2018-10-31 2019-03-01 广州高企云信息科技有限公司 A kind of policy intelligent Matching system and method

Also Published As

Publication number Publication date
CN111061679A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
CN111061679B (en) Method and system for rapid configuration of technological innovation policy based on rete and drools rules
Lambrix et al. SAMBO—a system for aligning and merging biomedical ontologies
Goh et al. Case-based reasoning approach to construction safety hazard identification: Adaptation and utilization
US20160350823A1 (en) System and methods for automatically generating regulatory compliance manual using modularized and taxonomy-based classification of regulatory obligations
CN112036842B (en) Intelligent matching device for scientific and technological service
CN102308302A (en) Policy management apparatus, policy management system, and method and program used for the same
CN110727852A (en) Method, device and terminal for pushing recruitment recommendation service
Akinyemi et al. Data integration for offshore decommissioning waste management
CN112613611A (en) Tax knowledge base system based on knowledge graph
Polpinij et al. Mining business rules from business process model repositories
KR102192136B1 (en) System for providing congressional bill passing possibility prediction service
CN113919680A (en) Method for constructing management information system based on general tasks
CN115982429B (en) Knowledge management method and system based on flow control
Hinkelmann et al. ArchiMEO: A Standardized Enterprise Ontology based on the ArchiMate Conceptual Model.
CN112036841A (en) Policy analysis system and method based on intelligent semantic recognition
CN115827885A (en) Operation and maintenance knowledge graph construction method and device and electronic equipment
Avdeenko et al. The case-based decision support system in the field of IT-consulting
KR20080055279A (en) Sarps management and implementation system
Wyskwarski An attempt to determine the scope of duties of the business analyst–application of text mining analysis
Coupette et al. Law smells: Defining and detecting problematic patterns in legal drafting
Segev Mapping knowledge into a database model
Falci et al. Multimodal provenance-based analysis of collaboration in business processes
CN110134784B (en) Data conversion
Zhou et al. Construction method of tender document based on case-based reasoning
Khudori et al. Transforming epc aris markup language into bpmn metadata

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