Target knowledge base construction method and device, electronic equipment, medium and product
By performing format conversion and pattern clustering on the set of symbolic expressions, a target knowledge base is constructed, which solves the problem of existing symbolic regression methods relying on explicit rules, improves the accuracy and efficiency of symbolic regression, and maintains interpretability and universality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF SEMICONDUCTORS - CHINESE ACAD OF SCI
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-26
AI Technical Summary
Existing symbolic regression methods rely on explicit manual rules and static templates, lacking systematic mining and modeling of the inherent modular structure and hierarchical decomposition patterns of expressions, resulting in insufficient efficiency and accuracy of symbolic regression.
By converting the format of the symbolic expression set, constructing a symbolic tree structure set, calculating subtree similarity, performing pattern clustering and decomposition, and forming a target knowledge base, the accuracy and efficiency of symbolic regression are improved.
It realizes structured format conversion and hierarchical analysis of symbolic expressions, improves the accuracy and solution efficiency of symbolic regression, and maintains the interpretability and universality of symbolic regression.
Smart Images

Figure CN122287805A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge base construction technology, and in particular to a method, apparatus, electronic device, medium and product for constructing a target knowledge base. Background Technology
[0002] Symbolic Regression (SR) is a technique designed to automatically discover interpretable mathematical expressions from data, widely used in scientific discovery, engineering modeling, and artificial intelligence. Current mainstream symbolic regression methods are primarily based on Genetic Programming (GP), deep learning-enhanced symbolic search (such as AI Feynman (an open-source Python project designed to automatically discover and derive mathematical formulas in physics using machine learning techniques), Dynamic Super Resolution (DSR), and syntactic constraint-based enumeration strategies. These methods typically generate candidate expressions by combining predefined function sets (such as addition, subtraction, multiplication, division, sin, log, etc.) and optimize the selection using metrics such as fitting error and complexity penalties.
[0003] Currently, in order to improve the efficiency and generalization ability of symbolic regression, some studies have attempted to introduce prior knowledge. For example, some works (such as AI Feynman) constrain the search space by manually injecting physical rules and decomposition patterns; however, most of these methods rely on explicit manual rules, static templates, or shallow structure matching, lacking systematic mining and modeling of the inherent modular structure and hierarchical decomposition patterns of the expression.
[0004] Therefore, there is an urgent need for a method to construct a target knowledge base, which can improve the accuracy and efficiency of downstream symbolic regression based on a defined target knowledge base. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, medium, and product for constructing a target knowledge base. It addresses the shortcomings of existing technologies that rely on explicit manual rules, static templates, or shallow structural matching, lacking systematic mining and modeling of the inherent modular structure and hierarchical decomposition patterns of expressions. The invention achieves structured format conversion of each symbolic expression in a set of symbolic expressions, performs hierarchical analysis based on the converted symbolic tree structure set, and finally determines the target knowledge base based on the symbolic expression pattern clustering results and the set of candidate decomposition patterns of symbolic expressions. This effectively improves the accuracy and efficiency of symbolic regression based on the determined target knowledge base.
[0006] This invention provides a method for constructing a target knowledge base, comprising the following steps.
[0007] Obtain a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions; The format of each symbolic expression in the symbolic expression set is converted to determine the symbolic tree structure set; wherein, the symbolic tree structure set includes the symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; Calculate the subtree similarity between any two symbol subtrees, and determine the symbol expression pattern clustering result based on the subtree similarity; Construct a set of candidate decomposition patterns for symbolic expressions based on the clustering results of symbolic expression patterns; The target knowledge base is determined based on the symbolic expression pattern clustering results and the set of candidate decomposition patterns for symbolic expressions.
[0008] According to a method for constructing a target knowledge base provided by the present invention, the format of each symbolic expression in a set of symbolic expressions is converted to determine a set of symbolic tree structures, including: For any symbolic expression in the set of symbolic expressions, determine the tree node symbols and symbol connection structure of the symbolic expression based on the symbolic expression; The symbolic expression is formatted based on the tree node symbols and symbol connection structure to determine the corresponding symbol tree structure. The symbol tree structure set is determined based on the symbol tree structure corresponding to each symbolic expression.
[0009] According to a method for constructing a target knowledge base provided by the present invention, determining the tree node symbols and symbol connection structure of symbolic expressions based on symbolic expressions includes: Retrieve the expression composition information from the symbolic expression; the expression composition information includes constants, operators, and variables; Define constants, operators, and variables as tree node symbols; Obtain the computational relation information in the symbolic expression and determine the computational relation information as a symbolic join structure.
[0010] According to a method for constructing a target knowledge base provided by the present invention, the symbolic expression pattern clustering result includes at least two sub-modules; constructing a set of candidate decomposition patterns for symbolic expressions based on the symbolic expression pattern clustering result includes: The pattern label and variable grouping label are determined based on the sub-modules included in the symbolic expression pattern clustering results; A set of candidate decomposition patterns for symbolic expressions is constructed based on pattern labels and variable grouping labels; wherein the set of candidate decomposition patterns for symbolic expressions includes at least one decomposition pattern, and each decomposition pattern corresponds to a pattern label and at least one variable grouping label.
[0011] According to a method for constructing a target knowledge base provided by the present invention, after determining the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set, the method further includes: Obtain the actual symbolic regression task; The symbolic expression pattern clustering results and the candidate decomposition pattern set of symbolic expressions in the target knowledge base are validated based on the actual symbolic regression task to determine the knowledge base validation results. The knowledge base validation results are used to evaluate the effectiveness of the symbolic expression pattern clustering results and the candidate decomposition patterns of symbolic expressions in improving the accuracy and solution efficiency of symbolic regression. According to the method for constructing a target knowledge base provided by the present invention, after determining the symbolic expression pattern clustering results based on subtree similarity, the method further includes: Submodules that appear more frequently than a preset frequency in the symbolic expression pattern clustering results are identified as target fixed submodules; these target fixed submodules are used by users to construct complex expressions.
[0012] The present invention also provides an apparatus for constructing a target knowledge base, comprising the following modules: The set retrieval module is used to retrieve a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions; The format conversion module is used to convert the format of each symbolic expression in the symbolic expression set and determine the symbol tree structure set; wherein, the symbol tree structure set includes the symbol tree structure corresponding to each symbolic expression, and each symbol tree structure includes at least one symbol subtree; The similarity calculation module is used to calculate the subtree similarity between any two symbol subtrees and determine the symbol expression pattern clustering result based on the subtree similarity. The set construction module is used to construct a set of candidate decomposition patterns for symbolic expressions based on the results of symbolic expression pattern clustering. The knowledge base determination module is used to determine the target knowledge base based on the symbolic expression pattern clustering results and the set of candidate decomposition patterns of symbolic expressions.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for constructing any of the target knowledge bases described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for constructing any of the target knowledge bases described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a method for constructing any of the target knowledge bases described above.
[0016] This invention provides a method, apparatus, electronic device, medium, and product for constructing a target knowledge base. The method involves: acquiring a set of symbolic expressions, wherein the set includes at least two symbolic expressions; performing format conversion on each symbolic expression in the set to determine a set of symbolic tree structures; wherein the set of symbolic tree structures includes the symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; calculating the subtree similarity between any two symbolic subtrees, and determining the symbolic expression pattern clustering result based on the subtree similarity; constructing a set of candidate decomposition patterns for symbolic expressions based on the symbolic expression pattern clustering result; and determining the target knowledge base based on the symbolic expression pattern clustering result and the set of candidate decomposition patterns for symbolic expressions. The technical solution of this invention addresses the shortcomings of existing technologies that rely on explicit manual rules, static templates, or shallow structural matching, lacking systematic mining and modeling of the inherent modular structure and hierarchical decomposition patterns of expressions. It achieves structured format conversion of each symbolic expression in a symbolic expression set, performs hierarchical analysis based on the converted symbolic tree structure set, and finally determines the target knowledge base based on the symbolic expression pattern clustering results and the candidate decomposition pattern set of symbolic expressions. This target knowledge base effectively improves the accuracy and efficiency of symbolic regression. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the method for constructing the target knowledge base provided by the present invention.
[0019] Figure 2 This is a schematic diagram of the symbolic expression provided by the present invention.
[0020] Figure 3 This is a schematic diagram of the structure of the target knowledge base construction device provided by the present invention.
[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0023] The following is combined Figure 1 The present invention describes a method for constructing a target knowledge base. This method is applicable to the construction of symbolic expression submodules and decomposition pattern knowledge bases based on multi-granularity graph clustering. The execution subject of this method can be an electronic device or a target knowledge base construction device installed in the electronic device. The target knowledge base construction device can be implemented by software, hardware, or a combination of both. Figure 1 This is a flowchart illustrating the method for constructing the target knowledge base provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps 101, 102, 103, 104 and 105.
[0024] Step 101: Obtain a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions.
[0025] Specifically, the symbolic expression set was mainly obtained by collecting published symbolic expressions from research materials, literature in scientific fields such as physics, biology, earth sciences, and social sciences, as well as relevant public datasets.
[0026] For example, the symbolic expressions included in the symbolic expression set may include, for example, the AI Feynman Physics Formula Dataset, chemical reaction kinetics, enzyme kinetics, Lotka-Volterra equations, etc., and this embodiment does not limit them.
[0027] Step 102: Perform format conversion on each symbolic expression in the symbolic expression set to determine the symbolic tree structure set; wherein, the symbolic tree structure set includes the symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree.
[0028] Specifically, the symbolic expressions in the symbolic expression set are uniformly formatted to obtain the symbolic tree structure corresponding to each symbolic expression, thus obtaining the symbolic tree structure set.
[0029] For example, the symbolic expression for the law of universal gravitation is shown in formula (1).
[0030] (1) In formula (1), The magnitude of the gravitational force between two objects (unit: Newton, N). This represents the gravitational constant, approximately 6.674 × 10⁻¹¹ N·m. 2 / kg 2 ; Indicates the mass of the first object (unit: kilogram, kg). Indicates the mass of the second object (unit: kilogram, kg); , , () represents the coordinate position of the first object in three-dimensional space; , , () represents the coordinate position of the second object in three-dimensional space, which is not limited in this embodiment.
[0031] The format of the symbolic expression of the law of universal gravitation is converted to determine the symbol tree structure corresponding to the symbolic expression of the law of universal gravitation. Figure 2 This is a schematic diagram of the symbolic expression provided by the present invention, such as... Figure 2 The diagram shows the symbol tree structure corresponding to the symbolic expression of the law of universal gravitation. Specifically, in the symbol tree structure corresponding to the symbolic expression of the law of universal gravitation after format conversion, the yellow circles represent the variables / constants (inputs) in the symbolic expression of the law of universal gravitation. Variables / constants can be, for example,... , , , , , , , and The green circle represents the unary operators in the symbolic expression of the law of universal gravitation. An example of a unary operator is ^. The blue circle represents the binary operators in the symbolic expression of the law of universal gravitation. For example, a binary operator could be... , Then, based on the computational relationship information of variables / constants (input), unary operators, binary operators, and the symbolic expression of the law of universal gravitation, the symbolic expression of the law of universal gravitation is formatted into a symbolic tree structure.
[0032] Each symbol tree structure includes at least one symbol subtree. The format of the symbolic expression for the law of universal gravitation is converted to a symbol tree structure containing symbol subtrees. , , , , , , This embodiment does not limit the scope of the embodiments.
[0033] In one specific embodiment, format conversion is performed on each symbolic expression in the symbolic expression set to determine the symbol tree structure set, including: for any symbolic expression in the symbolic expression set, determining the tree node symbols and symbol connection structure of the symbolic expression based on the symbolic expression; performing format conversion on the symbolic expression based on the tree node symbols and symbol connection structure to determine the symbol tree structure corresponding to the symbolic expression; and determining the symbol tree structure set based on the symbol tree structure corresponding to each symbolic expression.
[0034] In this step, the tree node symbol can be composed, for example, by obtaining information about the expression components in the symbolic expression, such as constants, operators, and variables. This embodiment does not limit this.
[0035] Specifically, for any symbolic expression in the set of symbolic expressions, the tree node symbols and symbol connection structure of the symbolic expression are determined based on the symbolic expression; the format of the symbolic expression is converted based on the tree node symbols and symbol connection structure to determine the symbol tree structure corresponding to the symbolic expression; and the set of symbol tree structures is determined based on the symbol tree structure corresponding to each symbolic expression.
[0036] In one specific embodiment, determining the tree node symbols and symbol connection structure of a symbolic expression based on the symbolic expression includes: obtaining expression composition information in the symbolic expression; wherein the expression composition information includes constants, operators, and variables; determining the constants, operators, and variables as tree node symbols; obtaining computational relationship information in the symbolic expression, and determining the computational relationship information as a symbol connection structure.
[0037] Specifically, the expression composition information in the symbolic expression is obtained; the expression composition information includes constants, operators, and variables; the constants, operators, and variables are identified as tree node symbols; the computational relationship information in the symbolic expression is obtained, and the computational relationship information is identified as a symbolic connection structure.
[0038] For example, the calculation relationship information for the symbolic expression of the law of universal gravitation is shown in formula (1). First, calculate... Then simultaneously calculate the molecular weight. And the + in the denominator, and then the ^ in the denominator Perform calculations, and finally calculate ^ The subtraction in the equation determines the computational relationship information of the symbolic expression of the law of universal gravitation through the order of these calculations.
[0039] Step 103: Calculate the subtree similarity between any two symbol subtrees, and determine the symbol expression pattern clustering result based on the subtree similarity.
[0040] In this step, the calculation of subtree similarity can be performed using metrics such as edit distance or shortest path distance, and this embodiment does not limit this to any particular method.
[0041] The symbolic expression pattern clustering result contains at least one submodule after clustering symbolic subtrees based on subtree similarity. Each submodule contains at least one symbolic subtree, but this embodiment does not limit this.
[0042] Specifically, after determining the symbol tree structure corresponding to each symbolic expression, for each symbol subtree in each symbol tree structure contained in the symbol tree structure set, the similarity between different symbol subtrees is calculated using metrics such as edit distance and shortest path distance to obtain subtree similarity. Then, it is determined whether the similarity of each subtree is greater than or equal to a preset similarity. Symbol subtrees with subtree similarity greater than or equal to the preset similarity are subjected to pattern clustering to determine the symbolic expression pattern clustering result.
[0043] In one specific embodiment, after determining the symbolic expression pattern clustering result based on subtree similarity, the method further includes: identifying sub-modules in the symbolic expression pattern clustering result that appear more frequently than a preset frequency as target fixed sub-modules; wherein, the target fixed sub-modules are used by the user to construct complex expressions.
[0044] In this step, the preset frequency is a pre-set frequency used to determine the occurrence frequency of sub-modules in the symbolic expression pattern clustering results. This embodiment does not limit this frequency.
[0045] Specifically, after determining the symbolic expression pattern clustering results based on subtree similarity, the sub-modules that appear more frequently than a preset frequency in the symbolic expression pattern clustering results are identified as target fixed sub-modules; among them, the target fixed sub-modules are used by users to construct complex expressions.
[0046] For example, the target-fixed submodule could be momentum: p=mv; Coulomb's law: F=kq1q2 / r 2 Electric field strength: E=F / q; potential difference: U=W / q, etc., this embodiment does not limit these.
[0047] The advantage of this setup is that it identifies a fixed target submodule for users to construct complex expressions, improving the efficiency of complex expression construction. Furthermore, once the fixed target submodule is identified, it is not necessary to search again during the construction of complex expressions. Moreover, guided by the set of candidate decomposition patterns for symbolic expressions, the high-dimensional complex symbolic regression problem is decomposed into multiple low-dimensional simple subproblems, reducing the search space by several orders of magnitude, thereby improving the ability to solve high-dimensional complex expressions.
[0048] Step 104: Construct a set of candidate decomposition patterns for symbolic expressions based on the clustering results of symbolic expression patterns.
[0049] Specifically, after determining each sub-module in the symbolic expression pattern clustering result, a candidate decomposition pattern set for symbolic expressions is constructed based on each sub-module. That is, each sub-module in the symbolic expression pattern clustering result is classified to obtain a candidate decomposition pattern set for symbolic expressions that is universal, complete, and mutually exclusive.
[0050] In one specific embodiment, the symbolic expression pattern clustering result includes at least two sub-modules; constructing a symbolic expression candidate decomposition pattern set based on the symbolic expression pattern clustering result includes: determining pattern labels and variable grouping labels based on each sub-module included in the symbolic expression pattern clustering result; constructing a symbolic expression candidate decomposition pattern set based on the pattern labels and variable grouping labels; wherein, the symbolic expression candidate decomposition pattern set includes at least one decomposition pattern, and each decomposition pattern corresponds to one pattern label and at least one variable grouping label.
[0051] Specifically, pattern labels and variable grouping labels are determined based on the sub-modules included in the symbolic expression pattern clustering results; a set of candidate decomposition patterns for symbolic expressions is constructed based on the pattern labels and variable grouping labels; wherein the set of candidate decomposition patterns for symbolic expressions includes at least one decomposition pattern, and each decomposition pattern corresponds to one pattern label and at least one variable grouping label.
[0052] For example, the set of candidate decomposition patterns for symbolic expressions may include addition separation patterns, multiplication separation patterns, and composite function patterns. The addition separation pattern may be, for example,... ,in, Indicates pattern label, and This represents a variable grouping label. Variable grouping labels can also be, for example,... and It can also be and It can also be and It can also be and It can also be and Multiplication separation mode can be, for example, ; Indicates pattern label, and This represents a variable grouping label; similarly, variable grouping labels can also be... and It can also be and It can also be and It can also be and It can also be and The composite function pattern can be, for example, In this embodiment, the composite function does not have variable grouping labels, and this is not a limitation.
[0053] Step 105: Determine the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set.
[0054] Specifically, after determining the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set, the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set are verified, and the target knowledge base is determined based on the knowledge base verification results.
[0055] The advantage of this setup is that the symbolic expression pattern clustering results included in the constructed target knowledge base have clear physical meanings and are easy to interpret. The set of candidate decomposition patterns for symbolic expressions ensures that the generated symbolic expressions have clear structures and are easy to understand, maintaining the interpretability advantage of symbolic regression. As a result, the target knowledge base can be constructed to cover multiple disciplines and has good versatility and transfer learning capabilities.
[0056] In one specific embodiment, after determining the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set, the method further includes: obtaining the actual symbolic regression task; verifying the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set in the target knowledge base based on the actual symbolic regression task, and determining the knowledge base verification result; wherein, the knowledge base verification result is used to evaluate the effectiveness of the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set in improving the accuracy and solution efficiency of symbolic regression.
[0057] In this step, the actual symbolic regression task is a pre-acquired symbolic regression task used to perform knowledge base verification on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set. This embodiment does not limit this task.
[0058] Specifically, after determining the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set, the actual symbolic regression task is obtained; the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set in the target knowledge base are verified based on the actual symbolic regression task to determine the knowledge base verification results; the knowledge base verification results are used to evaluate the effectiveness of the symbolic expression pattern clustering results and the symbolic expression candidate decomposition patterns in improving the accuracy and solution efficiency of symbolic regression.
[0059] The advantage of this setup is that it validates the symbolic expression pattern clustering results and the candidate decomposition pattern set in the target knowledge base through actual symbolic regression tasks. This effectively evaluates the symbolic expression pattern clustering results and the candidate decomposition pattern set in the target knowledge base, improving the accuracy and efficiency of symbolic regression. This invention provides a method, apparatus, electronic device, medium, and product for constructing a target knowledge base. The method involves: acquiring a set of symbolic expressions, wherein the set includes at least two symbolic expressions; performing format conversion on each symbolic expression in the set to determine a set of symbolic tree structures; wherein the set of symbolic tree structures includes the symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; calculating the subtree similarity between any two symbolic subtrees, and determining the symbolic expression pattern clustering result based on the subtree similarity; constructing a set of candidate decomposition patterns for symbolic expressions based on the symbolic expression pattern clustering result; and determining the target knowledge base based on the symbolic expression pattern clustering result and the set of candidate decomposition patterns for symbolic expressions. Based on the above embodiments, the technical solution of the present invention addresses the shortcomings of existing technologies that rely on explicit manual rules, static templates, or shallow structure matching, lacking systematic mining and modeling of the inherent modular structure and hierarchical decomposition patterns of expressions. It achieves structured format conversion of each symbolic expression in the symbolic expression set, performs hierarchical analysis based on the converted symbolic tree structure set, and finally determines the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set. Based on the determined target knowledge base, it improves the accuracy and efficiency of downstream symbolic regression.
[0060] The apparatus for constructing a target knowledge base provided by the present invention will be described below. The apparatus for constructing a target knowledge base described below can be referred to in correspondence with the method for constructing a target knowledge base described above.
[0061] Figure 3 This is a schematic diagram of the structure of the target knowledge base construction device provided by the present invention, with reference to... Figure 3As shown, the target knowledge base construction device 300 includes: a set acquisition module 301, a format conversion module 302, a similarity calculation module 303, a set construction module 304, and a knowledge base determination module 305; wherein, The set acquisition module 301 is used to acquire a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions.
[0062] The format conversion module 302 is used to perform format conversion on each symbolic expression in the symbolic expression set to determine the symbolic tree structure set; wherein, the symbolic tree structure set includes the symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree.
[0063] The similarity calculation module 303 is used to calculate the subtree similarity between any two symbol subtrees and determine the symbol expression pattern clustering result based on the subtree similarity.
[0064] The set construction module 304 is used to construct a set of candidate decomposition patterns for symbolic expressions based on the results of symbolic expression pattern clustering.
[0065] The knowledge base determination module 305 is used to determine the target knowledge base based on the symbolic expression pattern clustering results and the set of candidate decomposition patterns of symbolic expressions.
[0066] In one example embodiment, the format conversion module 302 is specifically used to: for any symbolic expression in the symbolic expression set, determine the tree node symbols and symbol connection structure of the symbolic expression based on the symbolic expression; perform format conversion on the symbolic expression based on the tree node symbols and symbol connection structure to determine the symbolic tree structure corresponding to the symbolic expression; and determine the symbolic tree structure set based on the symbolic tree structure corresponding to each symbolic expression.
[0067] In one example embodiment, the format conversion module 302 determines the tree node symbols and symbol connection structure of the symbolic expression based on the symbolic expression, specifically for: obtaining expression composition information in the symbolic expression; wherein the expression composition information includes constants, operators, and variables; determining the constants, operators, and variables as tree node symbols; obtaining computational relationship information in the symbolic expression, and determining the computational relationship information as a symbol connection structure.
[0068] In one example embodiment, the symbolic expression pattern clustering result includes at least two sub-modules.
[0069] In one example embodiment, the set construction module 304 is specifically used to: determine pattern labels and variable grouping labels based on the sub-modules included in the symbolic expression pattern clustering results; construct a set of candidate decomposition patterns for symbolic expressions based on the pattern labels and variable grouping labels; wherein the set of candidate decomposition patterns for symbolic expressions includes at least one decomposition pattern, and each decomposition pattern corresponds to one pattern label and at least one variable grouping label.
[0070] In one example embodiment, the apparatus further includes a knowledge base verification module. The knowledge base verification module is configured to: after determining the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set, obtain the actual symbolic regression task; verify the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set in the target knowledge base based on the actual symbolic regression task, and determine the knowledge base verification result; wherein the knowledge base verification result is used to evaluate the effectiveness of the symbolic expression pattern clustering results and the symbolic expression candidate decomposition patterns in improving the accuracy and solution efficiency of symbolic regression.
[0071] In one example embodiment, the device further includes a submodule determination module. The submodule determination module is configured to: after determining the symbolic expression pattern clustering results based on subtree similarity, determine the submodules in the symbolic expression pattern clustering results that appear more frequently than a preset frequency as target fixed submodules; wherein the target fixed submodules are used by the user to construct complex expressions.
[0072] The apparatus of this embodiment can be used to execute the method of any embodiment in the side embodiment of the target knowledge base construction method. Its specific implementation process and technical effects are similar to those in the side embodiment of the target knowledge base construction method. For details, please refer to the detailed description in the side embodiment of the target knowledge base construction method, which will not be repeated here.
[0073] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for constructing a target knowledge base. This method includes: obtaining a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions; performing format conversion on each symbolic expression in the set of symbolic expressions to determine a set of symbolic tree structures; wherein the set of symbolic tree structures includes the symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; calculating the subtree similarity between any two symbolic subtrees, and determining the symbolic expression pattern clustering result based on the subtree similarity; constructing a set of candidate decomposition patterns for symbolic expressions based on the symbolic expression pattern clustering result; and determining the target knowledge base based on the symbolic expression pattern clustering result and the set of candidate decomposition patterns for symbolic expressions.
[0074] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0075] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for constructing the target knowledge base provided by the above methods. The method includes: obtaining a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions; performing format conversion on each symbolic expression in the set of symbolic expressions to determine a set of symbolic tree structures; wherein the set of symbolic tree structures includes symbolic tree structures corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; calculating the subtree similarity between any two symbolic subtrees, and determining the symbolic expression pattern clustering result based on the subtree similarity; constructing a set of candidate decomposition patterns for symbolic expressions based on the symbolic expression pattern clustering result; and determining the target knowledge base based on the symbolic expression pattern clustering result and the set of candidate decomposition patterns for symbolic expressions.
[0076] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for constructing a target knowledge base provided by the methods described above. This method includes: obtaining a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions; performing format conversion on each symbolic expression in the set of symbolic expressions to determine a set of symbolic tree structures; wherein the set of symbolic tree structures includes symbolic tree structures corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; calculating the subtree similarity between any two symbolic subtrees, and determining a symbolic expression pattern clustering result based on the subtree similarity; constructing a set of candidate decomposition patterns for symbolic expressions based on the symbolic expression pattern clustering result; and determining a target knowledge base based on the symbolic expression pattern clustering result and the set of candidate decomposition patterns for symbolic expressions.
[0077] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0078] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a target knowledge base, characterized in that, include: Obtain a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions; The symbolic expressions in the symbolic expression set are format-converted to determine a symbolic tree structure set; wherein, the symbolic tree structure set includes the symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; Calculate the subtree similarity between any two symbol subtrees, and determine the symbol expression pattern clustering result based on the subtree similarity; Construct a set of candidate decomposition patterns for symbolic expressions based on the clustering results of the symbolic expression patterns; The target knowledge base is determined based on the symbolic expression pattern clustering results and the set of candidate decomposition patterns for symbolic expressions.
2. The method for constructing a target knowledge base according to claim 1, characterized in that, The step of performing format conversion on each symbolic expression in the symbolic expression set to determine the symbolic tree structure set includes: For any symbolic expression in the set of symbolic expressions, determine the tree node symbol and symbol connection structure of the symbolic expression based on the symbolic expression; The symbolic expression is format-converted based on the tree node symbols and the symbol connection structure to determine the symbolic tree structure corresponding to the symbolic expression; The symbol tree structure set is determined based on the symbol tree structure corresponding to each symbol expression.
3. The method for constructing a target knowledge base according to claim 2, characterized in that, The step of determining the tree node symbols and symbol connection structure of the symbolic expression based on the symbolic expression includes: Obtain the expression composition information in the symbolic expression; wherein, the expression composition information includes constants, operators, and variables; The constant, the operator, and the variable are defined as the tree node symbols; Obtain the computational relationship information in the symbolic expression, and determine the computational relationship information as the symbolic connection structure.
4. The method for constructing a target knowledge base according to claim 1, characterized in that, The symbolic expression pattern clustering result includes at least two sub-modules; the construction of a candidate decomposition pattern set for symbolic expressions based on the symbolic expression pattern clustering result includes: The pattern label and variable grouping label are determined based on each of the sub-modules included in the symbolic expression pattern clustering result; The symbolic expression candidate decomposition pattern set is constructed based on the pattern label and the variable grouping label; wherein the symbolic expression candidate decomposition pattern set includes at least one decomposition pattern, and each decomposition pattern corresponds to one pattern label and at least one variable grouping label.
5. The method for constructing a target knowledge base according to any one of claims 1-4, characterized in that, After determining the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set, the method further includes: Obtain the actual symbolic regression task; The symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set in the target knowledge base are verified based on the actual symbolic regression task to determine the knowledge base verification results; wherein, the knowledge base verification results are used to evaluate the effectiveness of the symbolic expression pattern clustering results and the symbolic expression candidate decomposition patterns in improving the accuracy and solution efficiency of symbolic regression.
6. The method for constructing a target knowledge base according to claim 4, characterized in that, After determining the symbolic expression pattern clustering result based on the subtree similarity, the method further includes: The sub-modules that appear more frequently than a preset frequency in the clustering results of the symbolic expression patterns are identified as target fixed sub-modules; wherein, the target fixed sub-modules are used by users to construct complex expressions.
7. An apparatus for constructing a target knowledge base, characterized in that, include: A set acquisition module is used to acquire a set of symbolic expressions; wherein the set of symbolic expressions includes at least two symbolic expressions; A format conversion module is used to perform format conversion on each symbolic expression in the symbolic expression set to determine a symbolic tree structure set; wherein, the symbolic tree structure set includes a symbolic tree structure corresponding to each symbolic expression, and each symbolic tree structure includes at least one symbolic subtree; The similarity calculation module is used to calculate the subtree similarity between any two symbol subtrees and determine the symbol expression pattern clustering result based on the subtree similarity. A set construction module is used to construct a set of candidate decomposition patterns for symbolic expressions based on the symbolic expression pattern clustering results. The knowledge base determination module is used to determine the target knowledge base based on the symbolic expression pattern clustering results and the symbolic expression candidate decomposition pattern set.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method for constructing the target knowledge base as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for constructing the target knowledge base as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for constructing the target knowledge base as described in any one of claims 1 to 6.