CN112989763A - Data acquisition method and device, computer equipment and storage medium - Google Patents

Data acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112989763A
CN112989763A CN202110280843.1A CN202110280843A CN112989763A CN 112989763 A CN112989763 A CN 112989763A CN 202110280843 A CN202110280843 A CN 202110280843A CN 112989763 A CN112989763 A CN 112989763A
Authority
CN
China
Prior art keywords
target
rule
dependency
tree
generate
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.)
Granted
Application number
CN202110280843.1A
Other languages
Chinese (zh)
Other versions
CN112989763B (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.)
Pingan Payment Technology Service Co Ltd
Original Assignee
Pingan Payment Technology Service Co Ltd
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 Pingan Payment Technology Service Co Ltd filed Critical Pingan Payment Technology Service Co Ltd
Priority to CN202110280843.1A priority Critical patent/CN112989763B/en
Publication of CN112989763A publication Critical patent/CN112989763A/en
Application granted granted Critical
Publication of CN112989763B publication Critical patent/CN112989763B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a data acquisition method, a data acquisition device, computer equipment and a storage medium. The method belongs to the technical field of data processing, and comprises the following steps: acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information; analyzing a plurality of target rules in the target rule set in sequence to generate a plurality of dependency trees corresponding to the plurality of target rules; merging and simplifying the plurality of dependency trees to generate a target dependency tree; each node in the target dependency tree is run to obtain target data from a predefined service configuration. According to the method and the device, the target rule set is screened out from the target rule set, then the multiple dependency relationship trees are generated and combined to generate the target dependency relationship tree, and finally the target data is obtained according to the target dependency relationship tree, so that the same target data is prevented from being obtained for multiple times, and the target data obtaining time and the memory occupation are reduced.

Description

Data acquisition method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data acquisition method and apparatus, a computer device, and a storage medium.
Background
The rule engine has wide application in numerous business scenes such as credit investigation, finance anti-fraud, bill swiping anti-cheating, anti-money laundering, credit card credit authorization, marketing activities, commodity recommendation, insurance claim settlement and the like, is embedded into an application program, separates business decision rules from application program codes, and expresses business decision logic by using a predefined script language to solve complex problems. Common rule engines in the industry include visual rules, fico, ilog rules, and open source drools, and they generally have rule expression, language parsing, and rule engine execution capabilities, but do not have a data acquisition function, i.e., an application program needs to first acquire data required by a rule before calling a rule engine component, and then call the rule engine component to execute the rule. In practical application, a plurality of rules are usually matched for service decision by one request, different rule scripts usually depend on the same data item, and a plurality of rule engines have the problem of obtaining the same data for multiple times, so that the data obtaining time is increased, and the program memory occupation is increased.
Disclosure of Invention
The embodiment of the invention provides a data acquisition method, a data acquisition device, computer equipment and a storage medium, and aims to solve the problem that the conventional data acquisition consumes a long time.
In a first aspect, an embodiment of the present invention provides a data acquisition method, including:
acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information;
analyzing a plurality of target rules in the target rule set in sequence to generate a plurality of dependency trees corresponding to the target rules;
merging and simplifying a plurality of dependency trees to generate a target dependency tree;
and running each node in the target dependency tree to acquire target data from a predefined service configuration.
In a second aspect, an embodiment of the present invention further provides a data obtaining apparatus, including:
the screening unit is used for acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information;
a first generating unit, configured to sequentially analyze multiple target rules in the target rule set to generate multiple dependency trees corresponding to the multiple target rules;
the second generation unit is used for merging and simplifying the plurality of dependency trees to generate a target dependency tree;
and the acquisition unit is used for operating each node in the target dependency relationship tree to acquire target data from a predefined service configuration.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the above method when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program, when executed by a processor, implements the above method.
The embodiment of the invention provides a data acquisition method, a data acquisition device, computer equipment and a storage medium. Wherein the method comprises the following steps: acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information; analyzing a plurality of target rules in the target rule set in sequence to generate a plurality of dependency trees corresponding to the target rules; merging and simplifying a plurality of dependency trees to generate a target dependency tree; and running each node in the target dependency tree to acquire target data from a predefined service configuration. According to the technical scheme of the embodiment of the invention, the target rule set is screened out from the target rule set, then the plurality of dependency trees are generated and combined to generate the target dependency tree, and finally the target data is acquired according to the target dependency tree, so that the repeated acquisition of the same target data is avoided, and the acquisition time and the memory occupation of the target data are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention;
fig. 2 is a schematic sub-flow diagram of a data acquisition method according to an embodiment of the present invention;
fig. 3 is a schematic sub-flow diagram of a data acquisition method according to an embodiment of the present invention;
fig. 4 is a schematic sub-flow chart of a data acquisition method according to an embodiment of the present invention;
fig. 5 is a schematic sub-flow chart of a data acquisition method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a data acquisition method according to another embodiment of the present invention;
fig. 7 is a schematic sub-flow chart of a data acquisition method according to another embodiment of the present invention;
FIG. 8 is a schematic block diagram of a data acquisition device according to an embodiment of the present invention;
fig. 9 is a schematic block diagram of a screening unit of the data acquisition apparatus according to the embodiment of the present invention;
fig. 10 is a schematic block diagram of a first generation unit of the data acquisition apparatus according to the embodiment of the present invention;
fig. 11 is a schematic block diagram of a second generation unit of the data acquisition apparatus provided by the embodiment of the present invention;
fig. 12 is a schematic block diagram of a third generation subunit of the data acquisition apparatus provided in the embodiment of the present invention;
FIG. 13 is a schematic block diagram of a data acquisition device according to another embodiment of the present invention;
fig. 14 is a schematic block diagram of an alternative unit of a data acquisition apparatus according to another embodiment of the present invention; and
fig. 15 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Referring to fig. 1, fig. 1 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention. The data acquisition method provided by the embodiment of the invention can be applied to terminals, such as intelligent terminal equipment such as a portable computer, a notebook computer and a desktop computer, and the data acquisition method is realized through an application program installed on the terminal, so that the target data acquisition time and the memory occupation are reduced. As shown in fig. 1, the method includes the following steps S100-S130.
S100, obtaining user request information and screening a target rule set from a preset rule set according to the obtained user request information.
In the embodiment of the invention, after the user request information is acquired, a decision service interface is called to input the user request information into a rule engine, and a target rule set is screened from a preset rule set according to the user request information in the rule engine, wherein the target rule set comprises a plurality of target rules corresponding to the user request information. Understandably, if the user request information is payment information, the payment information comprises a payment mode, payment time, amount, a payee, a payer and the like, and a target rule set can be screened out from a preset rule set according to the payment information, wherein the target rule set comprises a payment mode rule, an amount rule and the like. The preset rule set includes a plurality of preset rules, and the preset rules are pre-configured in the rule engine, such as payment method rules, collection rules, payment rules, and the like. The rule engine is a component nested in the application program, and realizes the separation of the business rules from the application program code.
Referring to fig. 2, in an embodiment, for example, in the embodiment of the present invention, the step S100 includes the following steps S101 to S102.
S101, obtaining user request information and converting the obtained user request information into label information;
s102, screening out a target rule set from preset rule sets according to the label information.
In the embodiment of the invention, user request information is obtained and the obtained user request information is converted into label information; and screening a target rule set from a preset rule set according to the label information. The label information may be a number, a character string, an interval, or the like. For example, when the user request information is WeChat payment in a payment mode, the tag information is a character string 'WeChat', a preset rule corresponding to the tag information 'WeChat' is screened out from a preset rule set according to the tag information 'WeChat', other target rules corresponding to the user request information can be screened out in the same way, and the target rule set is formed by a plurality of target rules.
S110, analyzing the target rules in the target rule set in sequence to generate a plurality of dependency trees corresponding to the target rules.
In the embodiment of the present invention, after a target rule set is screened from a preset rule set according to the obtained user request information, a plurality of target rules in the target rule set are sequentially analyzed to generate a plurality of dependency trees corresponding to the plurality of target rules. The dependency relationship tree is a dependency relationship which uses a tree structure to represent a plurality of rule functions. For example, the target rule set screened by the above steps includes target rules such as payment method, payment time, amount, payee, payer, and the like, each target rule corresponds to one dependency tree, each dependency tree corresponds to one rule script, and each rule script has a plurality of rule functions. Understandably, the rule function is a custom function, such as a func.a function.
Referring to fig. 3, in an embodiment, for example, in the embodiment of the present invention, the step S110 includes the following steps S111-S112.
S111, extracting a plurality of rule functions from a rule script corresponding to each target rule in the target set;
and S112, generating a plurality of dependency trees corresponding to the target rules based on the extracted rule functions and the nested calling relations of the rule functions.
In the embodiment of the invention, for each target rule in the target set, a plurality of rule functions are extracted from a rule script corresponding to the target rule; and generating a plurality of dependency relationship trees corresponding to the target rules based on the extracted rule functions and the nested calling relationship of the rule functions. Specifically, each target rule corresponds to one rule script, each rule script has a plurality of rule functions, nested call relations exist among the rule functions, and a dependency relation tree corresponding to the target rule can be generated according to the nested call relations among the rule functions and the rule functions. Understandably, multiple target rules can generate multiple dependency trees.
And S120, merging and simplifying the plurality of dependency trees to generate a target dependency tree.
In the embodiment of the present invention, after the target rules in the target set are sequentially analyzed to generate a plurality of dependency trees corresponding to the target rules, the dependency trees are merged and simplified to generate the target dependency tree. Understandably, the target dependency tree is a dependency tree. For example, after the above steps, all target rules in the target rule set generate a dependency tree corresponding to one of the target rules, for example, a plurality of dependency trees such as payment method, payment time, amount, payee, payer, and the like, and the plurality of dependency trees such as payment method, payment time, amount, payee, payer, and the like are combined to generate one dependency tree, that is, the target dependency tree is generated.
Referring to fig. 4, in an embodiment, for example, in the embodiment of the present invention, the step S120 includes the following steps S121 to S122.
S121, merging the dependency relationship trees to generate a first dependency relationship tree;
and S122, simplifying the first dependency relationship tree according to a preset condition to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
In the embodiment of the invention, a plurality of dependency trees are combined to generate a first dependency tree; specifically, one dependency tree is selected from the multiple dependency trees as a reference dependency tree a, after the reference dependency tree a is removed, one dependency tree B is selected from the remaining dependency trees and combined with the reference dependency tree a to generate a dependency tree C, and finally the dependency tree C is used as a new reference dependency tree a. After the first dependency relationship tree is generated, the first dependency relationship tree is simplified according to a preset condition to generate a second dependency relationship tree, and the second dependency relationship tree is a target dependency relationship tree. The preset condition is that the function name and the function parameter are the same.
Referring to FIG. 5, in one embodiment, such as in the present invention embodiment, the step S122 includes the following steps S1221-S1222.
S1221, sequentially traversing all rule functions in the rule script corresponding to the first dependency tree;
and S1222, merging the rule functions with the same function name and function parameter to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
In the embodiment of the present invention, all rule functions in the rule script corresponding to the first dependency tree are sequentially traversed, and the rule functions having the same function name and function parameter are combined to generate a second dependency tree, where the second dependency tree is a target dependency tree. Understandably, if only the function names of the regular functions are the same and the function parameters are different, the merging process is not performed.
S130, operating each node in the target dependency relationship tree to acquire target data from a predefined service configuration.
In the embodiment of the invention, after a plurality of dependency trees are merged and simplified to generate the target dependency tree, each node in the target dependency tree is operated to acquire target data from a predefined service configuration. Specifically, traversal is started from leaf nodes of a target dependency relationship tree, rule functions corresponding to the leaf nodes are operated, and data are obtained from predefined service configuration through the rule functions, wherein the predefined service configuration is distributed cache and RPC service; after each leaf node in the target dependency relationship tree acquires target data, the target data corresponding to the previous layer node can be acquired to the root node through the dependency relationship between each leaf node and the previous layer node. For example, if the target dependency tree is generated by combining a plurality of dependency trees such as payment method, payment time, amount, payee, payer, etc., the obtained target data includes target data such as specific payment method (WeChat payment, credit card payment, etc.), specific payment time, amount, payee name, and payer name.
It should be noted that, in the present application, the target dependency tree includes a plurality of leaf nodes, each leaf node corresponds to a path to the root node, and the rule function on each path can acquire data in parallel, which can shorten the data acquisition time compared with the serial data acquisition, thereby reducing the memory usage.
Fig. 6 is a schematic flow chart of a data acquisition method according to another embodiment of the present invention, as shown in fig. 6, in the present embodiment, the method includes steps S100 to S140. That is, in the present embodiment, after step S130 of the above embodiment, the method further includes step S140.
S140, replacing the rule function in the target set with the target data to obtain a decision result.
In the embodiment of the present invention, the reason why the rule function in the rule script corresponding to the target rule set is replaced with the target data is that the function can be prevented from being obtained by the same rule function for many times, so that the time for obtaining the target data can be saved, and the memory occupation can be reduced.
It should be noted that, in the embodiment of the present invention, only the screened target rule has a regular logical relationship, and only the dependency relationship of the rule function exists in the target dependency relationship tree.
Referring to fig. 7, in an embodiment, for example, in the embodiment of the present invention, the step S140 includes the following steps S141 to S142.
S141, for each target rule in the target rule set, replacing the rule function in the rule script corresponding to the target rule with the target data to obtain a plurality of target rule scripts;
and S142, operating the target rule scripts to generate a decision result corresponding to the user request information.
In the embodiment of the present invention, after each node in the target dependency tree is operated to obtain target data from a predefined service configuration, the rule function in the target set is replaced with the target data to obtain a decision result. Specifically, the rule functions in a plurality of rule scripts corresponding to a plurality of target rules are sequentially replaced by the target data to obtain a plurality of target rule scripts; and running the target rule scripts to generate a decision result corresponding to the user request information. Understandably, if the user request information is payment information, the target data is data such as a specific payment mode, specific payment time, amount, name of a payee, name of a payer and the like, a rule function in a rule script corresponding to the target rule is replaced by the corresponding target data, and then the replaced rule script is operated to obtain a decision result, wherein the decision result is payable or non-payable. In an actual application scenario, the rule engine returns the decision result to the application program, if the decision result is Y, the payment can be represented, otherwise, the payment cannot be represented.
Fig. 8 is a schematic block diagram of a data acquisition apparatus 200 according to an embodiment of the present invention. As shown in fig. 8, the present invention also provides a data acquisition apparatus 200 corresponding to the above data acquisition method. The data acquisition apparatus 200 includes means for performing the above-described data acquisition method, and the apparatus may be configured in a terminal. Specifically, referring to fig. 8, the data acquisition apparatus 200 includes a screening unit 201, a first generation unit 202, a second generation unit 203, and an acquisition unit 204.
The screening unit 201 is configured to obtain user request information and screen a target rule set from a preset rule set according to the obtained user request information; the first generating unit 202 is configured to sequentially analyze multiple target rules in the target rule set to generate multiple dependency trees corresponding to the multiple target rules; the second generating unit 203 is configured to merge and simplify the dependency trees to generate a target dependency tree; the obtaining unit 204 is configured to run each node in the target dependency tree to obtain target data from a predefined service configuration.
In some embodiments, for example, in the present embodiment, as shown in fig. 9, the screening unit 201 includes a converting unit 2011 and a screening subunit 2012.
The conversion unit 2011 is configured to obtain user request information and convert the obtained user request information into tag information; the screening subunit 2012 is configured to screen a target rule set from a preset rule set according to the tag information.
In some embodiments, for example, in the present embodiment, as shown in fig. 10, the first generating unit 202 includes an extracting unit 2021 and a first generating sub-unit 2022.
The extracting unit 2021 is configured to extract, for each target rule in the target set, a plurality of rule functions from a rule script corresponding to the target rule; the first generating subunit 2022 is configured to generate a plurality of dependency trees corresponding to the plurality of target rules based on the extracted plurality of rule functions and the nested call relationships of the plurality of rule functions.
In some embodiments, for example, in this embodiment, as shown in fig. 11, the second generating unit 203 includes a second generating subunit 2031 and a third generating subunit 2032.
The second generating subunit 2031 is configured to merge multiple dependency trees to generate a first dependency tree; the third generating subunit 2032 is configured to simplify the first dependency tree according to a preset condition to generate a second dependency tree, where the second dependency tree is a target dependency tree.
In some embodiments, for example, in this embodiment, as shown in fig. 12, the third generating subunit 2032 includes a traversing unit 20321 and a fourth generating subunit 20322.
The traversal unit 20321 is configured to sequentially traverse all rule functions in the rule script corresponding to the first dependency tree; the fourth generating subunit 20322 is configured to combine the rule functions with the same function name and function parameter to generate a second dependency tree, where the second dependency tree is a target dependency tree.
In some embodiments, such as this embodiment, the apparatus 200 further comprises a replacement unit 205, as shown in fig. 13.
Wherein the replacing unit 205 is configured to replace the rule function in the target set with the target data to obtain a decision result.
In some embodiments, for example, in this embodiment, as shown in fig. 14, the replacing unit 205 includes a replacing sub-unit 2051 and a fifth generating sub-unit 2052.
Wherein, the replacing subunit 2051 is configured to, for each target rule in the target rule set, replace the rule function in the rule script corresponding to the target rule with the target data to obtain a plurality of target rule scripts; the fifth generating sub-unit 2052 is configured to run the plurality of target rule scripts to generate a decision result corresponding to the user request information.
Referring to fig. 15, fig. 15 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 300 is a terminal, and the terminal may be an electronic device with a communication function, such as a tablet computer, a notebook computer, and a desktop computer.
Referring to fig. 15, the computer device 300 includes a processor 302, a memory, which may include a storage medium 303 and an internal memory 304, and a network interface 305 connected by a system bus 301.
The storage medium 303 may store an operating system 3031 and computer programs 3032. The computer program 3032, when executed, may cause the processor 302 to perform a data acquisition method.
The processor 302 is used to provide computing and control capabilities to support the operation of the overall computer device 300.
The internal memory 304 provides an environment for the running of the computer program 3032 in the storage medium 303, and when the computer program 3032 is executed by the processor 302, the processor 302 can be caused to execute a data acquisition method.
The network interface 305 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 15 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer apparatus 300 to which the present application is applied, and that a particular computer apparatus 300 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 302 is configured to run a computer program 3032 stored in the memory to implement the following steps: acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information; analyzing a plurality of target rules in the target rule set in sequence to generate a plurality of dependency trees corresponding to the target rules; merging and simplifying a plurality of dependency trees to generate a target dependency tree; and running each node in the target dependency tree to acquire target data from a predefined service configuration.
In some embodiments, for example, in this embodiment, when the processor 302 implements the steps of obtaining the user request information and screening the target rule set from the preset rule set according to the obtained user request information, the following steps are specifically implemented: acquiring user request information and converting the acquired user request information into label information; and screening a target rule set from a preset rule set according to the label information.
In some embodiments, for example, in this embodiment, when the processor 302 implements the step of sequentially parsing the target rules in the target rule set to generate a plurality of dependency trees corresponding to the target rules, the following steps are specifically implemented: for each target rule in the target set, extracting a plurality of rule functions from a rule script corresponding to the target rule; and generating a plurality of dependency relationship trees corresponding to the target rules based on the extracted rule functions and the nested calling relationship of the rule functions.
In some embodiments, for example, in this embodiment, when the step of merging and simplifying the plurality of dependency trees to generate the target dependency tree is implemented, the processor 302 specifically implements the following steps: merging a plurality of the dependency trees to generate a first dependency tree; and simplifying the first dependency relationship tree according to a preset condition to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
In some embodiments, for example, in this embodiment, when the processor 302 implements the step of simplifying the first dependency tree according to the preset condition to generate a second dependency tree, where the second dependency tree is a target dependency tree, the following steps are specifically implemented: sequentially traversing all rule functions in the rule script corresponding to the first dependency tree; and merging the rule functions with the same function name and function parameters to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
In some embodiments, for example, in this embodiment, after implementing the step of running each node in the target dependency tree to obtain the target data from the predefined service configuration, the processor 302 further specifically implements the following steps: and replacing the rule function in the target set with the target data to obtain a decision result.
In some embodiments, for example, in this embodiment, when the step of replacing the rule function in the target set with the target data to obtain the decision result is implemented by the processor 302, the following steps are specifically implemented: for each target rule in the target rule set, replacing the rule function in the rule script corresponding to the target rule with the target data to obtain a plurality of target rule scripts; and running the target rule scripts to generate a decision result corresponding to the user request information.
It should be understood that, in the embodiment of the present Application, the Processor 302 may be a Central Processing Unit (CPU), and the Processor 302 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above. Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. The computer program, when executed by a processor, causes the processor to perform the steps of: acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information; analyzing a plurality of target rules in the target rule set in sequence to generate a plurality of dependency trees corresponding to the target rules; merging and simplifying a plurality of dependency trees to generate a target dependency tree; and running each node in the target dependency tree to acquire target data from a predefined service configuration.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the steps of obtaining user request information and screening a target rule set from a preset rule set according to the obtained user request information, the following steps are specifically implemented: acquiring user request information and converting the acquired user request information into label information; and screening a target rule set from a preset rule set according to the label information.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the step of sequentially parsing a plurality of target rules in the target rule set to generate a plurality of dependency trees corresponding to the plurality of target rules, the following steps are specifically implemented: for each target rule in the target set, extracting a plurality of rule functions from a rule script corresponding to the target rule; and generating a plurality of dependency relationship trees corresponding to the target rules based on the extracted rule functions and the nested calling relationship of the rule functions.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the step of merging and simplifying the plurality of dependency trees to generate the target dependency tree, the following steps are specifically implemented: merging a plurality of the dependency trees to generate a first dependency tree; and simplifying the first dependency relationship tree according to a preset condition to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the step of simplifying the first dependency tree according to a preset condition to generate a second dependency tree, where the second dependency tree is a target dependency tree, the following steps are specifically implemented: sequentially traversing all rule functions in the rule script corresponding to the first dependency tree; and merging the rule functions with the same function name and function parameters to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
In some embodiments, for example, in this embodiment, after the processor executes the computer program to implement the step of running each node in the target dependency tree to obtain the target data from the predefined service configuration, the specific implementation further includes the following steps: and replacing the rule function in the target set with the target data to obtain a decision result.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the step of replacing the rule function in the target set with the target data to obtain the decision result, the following steps are specifically implemented: for each target rule in the target rule set, replacing the rule function in the rule script corresponding to the target rule with the target data to obtain a plurality of target rule scripts; and running the target rule scripts to generate a decision result corresponding to the user request information.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, while the invention has been described with respect to the above-described embodiments, it will be understood that the invention is not limited thereto but may be embodied with various modifications and changes.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of data acquisition, comprising:
acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information;
analyzing a plurality of target rules in the target rule set in sequence to generate a plurality of dependency trees corresponding to the target rules;
merging and simplifying a plurality of dependency trees to generate a target dependency tree;
and running each node in the target dependency tree to acquire target data from a predefined service configuration.
2. The method of claim 1, wherein the obtaining user request information and screening a target rule set from a preset rule set according to the obtained user request information comprises:
acquiring user request information and converting the acquired user request information into label information;
and screening a target rule set from a preset rule set according to the label information.
3. The method according to claim 1, wherein the sequentially parsing the target rules in the target rule set to generate a plurality of dependency trees corresponding to the target rules comprises:
for each target rule in the target set, extracting a plurality of rule functions from a rule script corresponding to the target rule;
and generating a plurality of dependency relationship trees corresponding to the target rules based on the extracted rule functions and the nested calling relationship of the rule functions.
4. The method according to claim 1, wherein merging and simplifying the plurality of dependency trees to generate the target dependency tree comprises:
merging a plurality of the dependency trees to generate a first dependency tree;
and simplifying the first dependency relationship tree according to a preset condition to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
5. The method according to claim 4, wherein the simplifying the first dependency tree according to a preset condition to generate a second dependency tree, wherein the second dependency tree is a target dependency tree, and comprises:
sequentially traversing all rule functions in the rule script corresponding to the first dependency tree;
and merging the rule functions with the same function name and function parameters to generate a second dependency relationship tree, wherein the second dependency relationship tree is a target dependency relationship tree.
6. The method of claim 1, wherein after the step of running each node in the target dependency tree to obtain target data from a predefined service configuration, further comprising:
and replacing the rule function in the target set with the target data to obtain a decision result.
7. The method of claim 6, wherein the replacing the rule function in the target set with the target data to obtain a decision result comprises:
for each target rule in the target rule set, replacing the rule function in the rule script corresponding to the target rule with the target data to obtain a plurality of target rule scripts;
and running the target rule scripts to generate a decision result corresponding to the user request information.
8. A data acquisition apparatus, comprising:
the screening unit is used for acquiring user request information and screening a target rule set from a preset rule set according to the acquired user request information;
a first generating unit, configured to sequentially analyze multiple target rules in the target rule set to generate multiple dependency trees corresponding to the multiple target rules;
the second generation unit is used for merging and simplifying the plurality of dependency trees to generate a target dependency tree;
and the acquisition unit is used for operating each node in the target dependency relationship tree to acquire target data from a predefined service configuration.
9. A computer arrangement, characterized in that the computer arrangement comprises a memory having stored thereon a computer program and a processor implementing the method according to any of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN202110280843.1A 2021-03-16 2021-03-16 Data acquisition method, device, computer equipment and storage medium Active CN112989763B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110280843.1A CN112989763B (en) 2021-03-16 2021-03-16 Data acquisition method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110280843.1A CN112989763B (en) 2021-03-16 2021-03-16 Data acquisition method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112989763A true CN112989763A (en) 2021-06-18
CN112989763B CN112989763B (en) 2023-04-28

Family

ID=76335896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110280843.1A Active CN112989763B (en) 2021-03-16 2021-03-16 Data acquisition method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112989763B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115862882A (en) * 2022-12-02 2023-03-28 北京百度网讯科技有限公司 Data extraction method, device, equipment and storage medium
CN117038002A (en) * 2023-10-08 2023-11-10 之江实验室 Method and device for generating observation variable in drug evaluation research

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103827853A (en) * 2011-09-29 2014-05-28 国际商业机器公司 Minimizing rule sets in rule management system
CN109597606A (en) * 2018-10-24 2019-04-09 中国平安人寿保险股份有限公司 Method, equipment and the storage medium of operational decision making are carried out using regulation engine
CN110795455A (en) * 2019-09-06 2020-02-14 中国平安财产保险股份有限公司 Dependency relationship analysis method, electronic device, computer device and readable storage medium
CN111209301A (en) * 2019-12-29 2020-05-29 南京云帐房网络科技有限公司 Method and system for improving operation performance based on dependency tree splitting
US20210026756A1 (en) * 2019-07-26 2021-01-28 Red Hat, Inc. Deriving software application dependency trees for white-box testing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103827853A (en) * 2011-09-29 2014-05-28 国际商业机器公司 Minimizing rule sets in rule management system
CN109597606A (en) * 2018-10-24 2019-04-09 中国平安人寿保险股份有限公司 Method, equipment and the storage medium of operational decision making are carried out using regulation engine
US20210026756A1 (en) * 2019-07-26 2021-01-28 Red Hat, Inc. Deriving software application dependency trees for white-box testing
CN110795455A (en) * 2019-09-06 2020-02-14 中国平安财产保险股份有限公司 Dependency relationship analysis method, electronic device, computer device and readable storage medium
CN111209301A (en) * 2019-12-29 2020-05-29 南京云帐房网络科技有限公司 Method and system for improving operation performance based on dependency tree splitting

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115862882A (en) * 2022-12-02 2023-03-28 北京百度网讯科技有限公司 Data extraction method, device, equipment and storage medium
CN115862882B (en) * 2022-12-02 2024-02-13 北京百度网讯科技有限公司 Data extraction method, device, equipment and storage medium
CN117038002A (en) * 2023-10-08 2023-11-10 之江实验室 Method and device for generating observation variable in drug evaluation research
CN117038002B (en) * 2023-10-08 2024-02-13 之江实验室 Method and device for generating observation variable in drug evaluation research

Also Published As

Publication number Publication date
CN112989763B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
AU2019216644B2 (en) Automation and digitizalization of document processing systems
EP3989131A1 (en) Method and system for realizing machine learning modeling process
US20200273570A1 (en) Predictive analysis platform
US9652513B2 (en) Generating data pattern information
JP2019502979A (en) Automatic interpretation of structured multi-field file layouts
CN112989763B (en) Data acquisition method, device, computer equipment and storage medium
US11392919B2 (en) Credit data analysis
US11601390B2 (en) System and method for tagging data
Cechich et al. Early detection of COTS component functional suitability
CN113515440A (en) Test case distribution method and device, computer equipment and storage medium
CN111553803A (en) Claims processing method and device
CN115983902B (en) Information pushing method and system based on user real-time event
US9098613B2 (en) Logging of application messages
CN113657817A (en) Transaction processing method and device, electronic equipment and readable storage medium
CN113094595A (en) Object recognition method, device, computer system and readable storage medium
JP6870454B2 (en) Analytical equipment, analytical programs and analytical methods
CN114584616B (en) Message pushing method and device, electronic equipment and storage medium
CN117851473A (en) List fuzzy screening method and device based on large language model
US20230222579A1 (en) Method and Apparatus for Iterating Credit Scorecard Model, Electronic Device and Storage Medium
CN117032789A (en) Business rule configuration and execution method, system, computer equipment and storage medium
Ebbers et al. Real-Time Fraud Detection Analytics on IBM System Z
CN113127689A (en) Data processing method, device, equipment and storage medium
CN117008908A (en) Business rule processing method, device, storage medium and equipment
CN116611923A (en) Knowledge graph-based risk data acquisition method, system, equipment and storage medium
CN111427883A (en) Data processing method and device based on AeroPike, computer equipment and storage medium

Legal Events

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