Equivalent expression recognition method, recognition device and terminal device
By obtaining and comparing the operation results of the factors of expressions in the financial planning system and their associated data sets, the problem that the system cannot recognize equivalent expressions is solved, reducing the complexity of the system.
Patent Information
- Application Number
- CN202010763233.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-31
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2040-07-31
AI Technical Summary
The existing financial planning system cannot identify whether different expressions are equivalent, resulting in too many equivalent expressions and increasing system complexity.
By obtaining the first factor of the target expression and its associated data set, perform operations and compare them with the calculation results of the preset expression to determine whether the expression is equivalent.
The function of identifying whether two expressions are equivalent is realized, reducing system complexity and reducing the number of equivalent expressions.
Smart Images

Figure CN111986033B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to an equivalent expression recognition method, recognition device and terminal equipment. Background Art
[0002] With the development of science and technology and economy, people pay more and more attention to the management of money. For example, more and more people like financial investment. The channel to achieve financial investment is generally to buy various financial products. At present, users generally purchase various financial products by operating financial planning systems.
[0003] However, people are subject to certain rules when making financial investments, such as various rules set by the administrators of the financial planning system based on policies and laws regarding financial investments.
[0004] The existence of various constraint rules makes the financial planning system very complex. Therefore, in order to reduce the complexity of the financial planning system, the administrator of the financial planning system generally uses expressions to represent various rules and uses sets to represent various objects. For example, set A represents national debt, set B represents financial bonds, set C represents securities with a term of 3-5 years, and set D represents bonds traded in the interbank market. The rule "Securities traded in the interbank market are national debt and financial bonds with a term of 3-5 years" is expressed as (A∪B)∩C∩D.
[0005] However, in the same financial planning system, the styles of expressions set by different administrators may be different, but in fact the rules expressed by the expressions are the same. For example, the rule expressed by the expression (A∪B)∩C∩D is the same as the rule expressed by the expression (A∩C∩D)∪(B∩C∩D), that is, the two expressions are equivalent. However, the current financial planning system cannot identify whether two expressions are equivalent, resulting in an increasing number of equivalent expressions on the financial planning system. When there are more and more equivalent expressions on a financial planning system, the complexity of the financial planning system will also increase.
[0006] Therefore, current financial planning systems cannot recognize whether two expressions are equivalent. Summary of the invention
[0007] The embodiments of the present application provide an equivalent expression recognition method, recognition device and terminal device, which can solve the problem that the current financial planning system cannot recognize whether two expressions are equivalent.
[0008] In a first aspect, an embodiment of the present application provides a method for identifying equivalent expressions, comprising:
[0009] Obtain a target expression, wherein the target expression includes a first factor;
[0010] Obtaining the associated data sets corresponding to each of the above first factors;
[0011] Calculate the target expression according to each of the associated data sets to obtain a first calculation result;
[0012] Obtain a second operation result corresponding to a preset first expression;
[0013] If there is a second operation result that is the same as the first operation result, it is determined that there is a first expression equivalent to the target expression.
[0014] In a second aspect, an embodiment of the present application provides an equivalent expression recognition device, comprising:
[0015] An expression acquisition module, used for acquiring a target expression, wherein the target expression includes a first factor;
[0016] A data set acquisition module, used to acquire associated data sets corresponding to each of the above first factors;
[0017] A first operation module, used for operating the target expression according to each of the associated data sets to obtain a first operation result;
[0018] A second operation result acquisition module, used to acquire a second operation result corresponding to a preset first expression;
[0019] The determination module is used to determine whether there is a first expression equivalent to the target expression if there is a second operation result that is the same as the first operation result.
[0020] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0022] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the equivalent expression recognition method described in any one of the above-mentioned first aspects.
[0023] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0024] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0025] As can be seen from the above, the present application provides a method for identifying equivalent expressions. First, a target expression is obtained, and the target expression includes a first factor. Then, the associated data sets corresponding to each first factor are obtained. Then, the target expression is operated according to each associated data set to obtain a first operation result. Then, the second operation result corresponding to the preset first expression is obtained. If there is a second operation result that is the same as the first operation result, it is determined that there is a first expression equivalent to the target expression. That is, in the present application, the target expression is operated according to each associated data set to obtain a first operation result, and then it is determined whether there is a first expression equivalent to the target expression based on whether the first operation result is the same as the second operation result corresponding to the preset first expression. Therefore, in the present application, it can be identified whether two expressions are equivalent. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 It is a flowchart of an equivalent expression recognition method provided by an embodiment of the present application;
[0028] Figure 2 It is a structural diagram of an equivalent expression recognition device provided by an embodiment of the present application;
[0029] Figure 3 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0031] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0032] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0033] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0034] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0035] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0036] The equivalent expression recognition method provided in the embodiment of the present application can be applied to terminal devices such as mobile phones, tablet computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.
[0037] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0038] Embodiment 1
[0039] The following describes an equivalent expression recognition method provided in Example 1 of the present application. Figure 1 , the method comprising:
[0040] Step S101: Obtain a target expression, where the target expression includes a first factor.
[0041] In step S101, the target expression refers to a new expression input by the user. The first factor refers to the parameter that needs to be calculated in the target expression. For example, if the target expression is (A∪B)∩C, then the first factor is A, B and C.
[0042] Step S102: Obtain the associated data set corresponding to each first factor.
[0043] In step S102, the associated data set is a preset data set. The preset data sets are in a "non-completely orthogonal" relationship. The "non-completely orthogonal" relationship means that the data contained in each preset data set are not completely the same, but there is similarity in the bit dimension.
[0044] For example, the preset data sets are:
[0045] {0, 11, 12, 101, 102, 103, 1001, 1002, 1003, 1004},
[0046] {1, 12, 13, 102, 103, 104, 1002, 1003, 1004, 1005},
[0047] And {2, 13, 14, 103, 104, 101, 1003, 1004, 1005, 1001}.
[0048] The data included in the preset data set can be selected or designed according to actual needs, as long as the preset data sets are in a "non-completely orthogonal" relationship, and this application does not make any specific limitations here.
[0049] Step S103: operate the target expression according to each associated data set to obtain a first operation result.
[0050] In step S103, after obtaining the associated data sets corresponding to the first factors, the target expression is operated according to the associated data sets to obtain the first operation result. For example, assuming that the target expression is (A∪B)∩C, the associated data sets are:
[0051] A corresponds to the set {0, 11, 12, 101, 102, 103, 1001, 1002, 1003, 1004};
[0052] B corresponds to the set {1, 12, 13, 102, 103, 104, 1002, 1003, 1004, 1005};
[0053] And the corresponding set of C is {2, 13, 14, 103, 104, 101, 1003, 1004, 1005, 1001}.
[0054] At this time, the first operation result is {13, 101, 103, 104, 1001, 1003, 1004, 1005}.
[0055] Step S104: Obtain a second operation result corresponding to the preset first expression.
[0056] In step S104, the preset first expression is a pre-stored expression. If each factor in the preset first expression is pre-associated with an associated data set, the preset first expression can be calculated based on the associated data first, and then the second operation result corresponding to the obtained first expression can be stored. After the target expression is obtained, the second operation result corresponding to the preset first expression can be directly obtained. If each factor in the preset first expression is not first associated with an associated data set, after the target expression is obtained, the preset first expression must be calculated based on the associated data set, and then the second operation result corresponding to the first expression is obtained.
[0057] Step S105: If there is a second operation result that is the same as the first operation result, it is determined that there is a first expression equivalent to the target expression.
[0058] In step S105, if there is a second operation result that is the same as the first operation result, it means that the first expression corresponding to the second operation result that is the same as the first operation result is equivalent to the target expression. Therefore, at this time, it is determined that there is a first expression that is equivalent to the target expression.
[0059] In some embodiments, obtaining the associated data sets corresponding to each first factor includes: selecting a first set group from a preset set group according to a preset rule, the first set group including the associated data set, and the associated data set is in a one-to-one correspondence with the first factor. Accordingly, obtaining the second operation result corresponding to the preset first expression includes: calculating the preset first expression according to the first set group to obtain the second operation result corresponding to the preset first expression.
[0060] In this embodiment, the data sets included in each preset set group may be the same, in which case the data sets are arranged in different orders in each preset set group. After the data sets are set, the data sets are arranged and combined to obtain each preset set group. It should be understood that the data sets included in each preset set group may also be different.
[0061] According to a preset rule, a first set group is selected from a preset set group. The first set group includes an associated data set, and the associated data set and the first factor are in a one-to-one correspondence. For example, the first set group is (a, b, c), and the first factors are A, B, and C. Then the one-to-one correspondence between the associated data set and the first factor can be: the associated data set a corresponds to the first factor A, the associated data set b corresponds to the first factor B, and the associated data set c corresponds to the first factor C. Alternatively, the associated data set a can be corresponded to the first factor B, the associated data set b corresponds to the first factor C, and the associated data set c corresponds to the first factor A. The one-to-one correspondence between the associated data set and the first factor can be selected according to actual needs, and this application does not make specific limitations here.
[0062] After the first set group is selected, the preset first expression is calculated according to the first set group to obtain a second operation result corresponding to the preset first expression.
[0063] In other embodiments, if there is a second operation result that is the same as the first operation result, it is determined that there is a first expression equivalent to the target expression, including: if there is a second operation result that is the same as the first operation result, and there is a set group that has not been selected in the preset set group, then the expression corresponding to the second operation result that is the same as the first operation result is determined as a new first expression, and according to a preset rule, a new first set group is selected from the set group that has not been selected, and the operation of the target expression according to each associated data set is returned. If there is a second operation result that is the same as the first operation result, and there is no set group that has not been selected in the preset set group, it is determined that there is a first expression equivalent to the target expression.
[0064] In this embodiment, the target expression and the preset first expression can be operated multiple times, and then it can be determined based on the result of each operation whether there is a first expression equivalent to the target expression, so as to more accurately determine whether there is an expression equivalent to the target expression. Therefore, when there is a second operation result that is the same as the first operation result, it is not immediately determined whether there is a first expression equivalent to the target expression, but it is determined whether there is a collection group in the preset collection group that has not been selected.
[0065] If there is an unselected set group, the expression corresponding to the second operation result that is the same as the first operation result is determined as the new first expression. The expression corresponding to the second operation result that is the same as the first operation result is determined as the new first expression, that is, the expression corresponding to the second operation result that is different from the first operation result is filtered out, thereby reducing the amount of calculation for the next operation of the first expression. Then, according to the preset rules, a new first set group is selected from the unselected set group, and finally returns to execute the operation of the target expression according to each associated data set.
[0066] If there is a second operation result that is the same as the first operation result, and there is no unselected set group in the preset set groups, it is determined that there is a first expression equivalent to the target expression.
[0067] It should be noted that the data set included in the unselected set group and the data set included in the selected set group may be the same, in which case the arrangement order of the data set in the unselected set group and the selected set group is different. Alternatively, the data set included in the unselected set group and the data set included in the selected set group may also be different.
[0068] When the data set included in the unselected set group is the same as the data set included in the selected set group, the one-to-one correspondence between the associated data set in the first set group and the first factor can be set as follows: the associated data set at the same position in the first set group corresponds to the same first factor. In this case, even if the associated data sets included in each first set group are the same, the arrangement order of the associated data sets in each first set group is different, that is, the position of the associated data sets in each first set group is different, so that the associated data set corresponding to the same first factor is different each time.
[0069] For example, the first factor is A, B and C. Associated data sets a, b and c are set. The associated data set at the first position in the first set group is set to correspond to the first factor A, the associated data set at the second position in the first set group is set to correspond to the first factor B, and the associated data set at the third position in the first set group is set to correspond to the first factor C. When the first set group is (a, b, c), the associated data set a corresponds to the first factor A, the associated data set b corresponds to the first factor B, and the associated data set c corresponds to the third factor C. When the first set group is (b, a, c), the associated data set b corresponds to the first factor A, the associated data set a corresponds to the first factor B, and the associated data set c corresponds to the third factor C.
[0070] Therefore, in this embodiment, when it is necessary to perform multiple operations on the target expression and the preset first expression, and the number of associated data sets is limited, the associated data sets can be arranged and combined to obtain various preset set groups, and then the first set group is selected from each preset set group, and then the associated data sets at the same position in the first set group are set to correspond to the same first factor, thereby realizing multiple operations on the target expression and the preset first expression.
[0071] Therefore, in this embodiment, it is possible to set up to operate the target expression and the preset first expression according to multiple first set groups. When the first operation result and the second operation result obtained according to each first set group are the same, and there is a set group that has not been selected in the preset set group, the expression corresponding to the second operation result that is the same as the first operation result is determined as a new first expression, and according to the preset rules, a new first set group is selected from the set group that has not been selected, and the operation of the target expression according to each associated data set is returned and executed.
[0072] When the first operation result and the second operation result obtained according to each first set group are the same, and there is no set group that has not been selected in the preset set groups, it can be determined that there is a first expression equivalent to the target expression. That is, it is equivalent to traversing the target expression and the preset first expression through multiple first set groups. When the results of each traversal are the same and there are no first set groups that have not been traversed, it can be determined that there is a first expression equivalent to the target expression. Therefore, in this embodiment, the target expression and the preset first expression can be operated multiple times, and then it can be determined whether there is a first expression equivalent to the target expression based on the result of each operation, so as to more accurately determine whether there is an expression equivalent to the target expression.
[0073] In other embodiments, before obtaining the second operation result corresponding to the preset first expression, it includes: filtering expressions including the first factor from the preset expressions to obtain the second expression; obtaining the first type quantity of the first factor in the target expression, and obtaining the second type quantity of the second factor in the second expression, the second factor being the factor included in the second expression; and determining the second expression corresponding to the second type quantity consistent with the first type quantity as the preset first expression.
[0074] In this embodiment, before obtaining the second operation result corresponding to the preset first expression, the expression including the first factor is screened from the preset expression to obtain the second expression. It should be noted that when the preset expression includes the first factor, the expression including the first factor can be directly screened from the preset expression to obtain the second expression. When the preset expression does not include the first factor, the object represented by the first factor is parsed, and then the expression including the object represented by the first factor is screened from the preset expression to obtain the second expression.
[0075] After obtaining the second expression, obtain the first type number of the first factor in the target expression. For example, if the target expression is (A∪B)∩C, then the first type number of the first factor in the target expression is A, B, and C. And obtain the second type number of the second factor in the second expression, where the second factor is the factor included in the second expression. For example, if the second expression is (A∩C∩D)∪(A∩B∩D), the second type number of the second factor in the second expression is A, B, C, and D. Then determine the second expression corresponding to the second type number consistent with the first type number as the preset first expression. For example, the target expression is (A∪B)∩C, the second expression is (A∩C∩D)∪(A∩B∩D) and (A∩C)∪(B∩C), the second type quantities A, B and C of the second expression (A∩C)∪(B∩C) are the same as the first type data quantities A, B and C of the target expression (A∪B)∩C, then the second expression (A∩C)∪(B∩C) is determined as the preset first expression.
[0076] Therefore, in the present application, before obtaining the second operation result corresponding to the preset first expression, the preset expression is screened so that the number of factors and factor types included in the preset first expression are the same as those of the target expression, thereby reducing the amount of operations on the preset first expression.
[0077] In other embodiments, obtaining the target expression includes: obtaining an initial expression; and mapping an initial factor in the initial expression to a corresponding first factor according to a preset mapping rule to obtain the target expression.
[0078] In this embodiment, factors of the same type can be used to represent the same object, so as to facilitate calculations. That is, the factors in the target expression are replaced with preset factors. Therefore, after obtaining the initial expression, the object represented by the factors in the initial expression is parsed, and then the preset factor type of the object is checked. If the factor type in the initial expression is different from the preset factor type, the initial factor in the initial expression is mapped to the corresponding first factor according to the preset mapping rule. At this time, the first factor is the preset factor type, thereby obtaining the target expression. It should be noted that the preset factor type can also be modified to the factor type in the target expression. For the method of making the factor types representing the same object the same, the user can choose according to actual needs, as long as the factor types representing the same object are the same, and this application does not make specific restrictions here.
[0079] In other embodiments, after determining that there is a first expression equivalent to the target expression, the method includes: executing a preset prompt operation. In this embodiment, after determining that there is a first expression equivalent to the target expression, the terminal device may execute a preset prompt operation to inform the user that there is a first expression equivalent to the target expression, and use the first expression equivalent to the target expression.
[0080] Therefore, in this embodiment, when the target expression is obtained, the terminal device can identify whether the target expression is equivalent to the preset first expression. If the target expression is equivalent to the preset first expression, the terminal device performs a preset prompt operation to inform the user that there is a first expression equivalent to the target expression, and uses the first expression equivalent to the target expression.
[0081] In other embodiments, the present application further includes: if there is no second operation result identical to the first operation result, the target expression is stored in the database. In this embodiment, if there is no second operation result identical to the first operation result, it is determined that there is no first expression equivalent to the target expression, and the target expression is stored in the database.
[0082] That is, in the embodiment, the target expression is stored in the database only when there is no first expression equivalent to the target expression, so that any two expressions in the database are not equivalent, thereby reducing the amount of data of the expressions in the database and further reducing the complexity of the system.
[0083] In summary, the present application provides a method for identifying equivalent expressions. First, a target expression is obtained, and the target expression includes a first factor. Then, the associated data sets corresponding to each first factor are obtained. Then, the target expression is operated according to each associated data set to obtain a first operation result. Then, the second operation result corresponding to the preset first expression is obtained. If there is a second operation result that is the same as the first operation result, it is determined that there is a first expression equivalent to the target expression. That is, in the present application, the target expression is operated according to each associated data set to obtain a first operation result, and then it is determined whether there is a first expression equivalent to the target expression based on whether the first operation result is the same as the second operation result corresponding to the preset first expression. Therefore, in the present application, it is possible to identify whether two expressions are equivalent.
[0084] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0085] Embodiment 2
[0086] Figure 2 An example of an equivalent expression recognition device is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown. The device 200 includes:
[0087] The expression acquisition module 201 is used to acquire a target expression, where the target expression includes a first factor.
[0088] The data set acquisition module 202 is used to acquire the associated data set corresponding to each first factor.
[0089] The first operation module 203 is used to operate the target expression according to each associated data set to obtain a first operation result.
[0090] The second operation result obtaining module 204 is used to obtain a second operation result corresponding to the preset first expression.
[0091] The determination module 205 is configured to determine whether there is a first expression equivalent to the target expression if there is a second operation result that is the same as the first operation result.
[0092] Optionally, the data set acquisition module 202 is used to execute:
[0093] According to a preset rule, a first set group is selected from the preset set groups, the first set group includes an associated data set, and the associated data set is in a one-to-one correspondence with the first factor.
[0094] Accordingly, the second operation result acquisition module 204 is used to execute:
[0095] The preset first expression is calculated according to the first set group to obtain a second operation result corresponding to the preset first expression.
[0096] Optionally, the determination module 205 is used to execute:
[0097] If there is a second operation result that is the same as the first operation result, and there is a set group that has not been selected in the preset set group, then the expression corresponding to the second operation result that is the same as the first operation result is determined as the new first expression, and according to the preset rules, a new first set group is selected from the set group that has not been selected, and the operation of the target expression according to each associated data set is returned to be executed.
[0098] If there is a second operation result that is the same as the first operation result, and there is no unselected set group in the preset set groups, it is determined that there is a first expression equivalent to the target expression.
[0099] Optionally, the device 200 further includes:
[0100] The screening module is used to screen the expression including the first factor from the preset expressions to obtain the second expression.
[0101] The type quantity acquisition module is used to obtain the first type quantity of the first factor in the target expression, and to obtain the second type quantity of the second factor in the second expression, where the second factor is a factor included in the second expression.
[0102] The preset first expression determination module is used to determine the second expression corresponding to the second type quantity consistent with the first type quantity as the preset first expression.
[0103] Optionally, the expression acquisition module 201 includes:
[0104] Get unit, used to get the initial expression.
[0105] The mapping unit is used to map the initial factor in the initial expression to the corresponding first factor according to a preset mapping rule to obtain a target expression.
[0106] Optionally, the device 200 further includes:
[0107] The prompt module is used to execute preset prompt operations.
[0108] Optionally, the device 200 further includes:
[0109] The storage module is used to store the target expression in a database if there is no second operation result that is the same as the first operation result.
[0110] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the first embodiment of the method of the present application. Their specific functions and technical effects can be found in the part of the method embodiment and will not be repeated here.
[0111] Embodiment 3
[0112] Figure 3 Schematic diagram of the terminal device provided in the third embodiment of the present application. Figure 3 As shown, the terminal device 300 of this embodiment includes: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program 303, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 301 executes the computer program 303, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0113] Exemplarily, the computer program 303 may be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 303 in the terminal device 300. For example, the computer program 303 may be divided into an expression acquisition module, a data set acquisition module, a first operation module, a second operation result acquisition module, and a determination module, and the specific functions of each module are as follows:
[0114] Obtaining a target expression, wherein the target expression includes a first factor;
[0115] Obtaining a set of associated data corresponding to each of the first factors;
[0116] Calculate the target expression according to each of the associated data sets to obtain a first calculation result;
[0117] Obtain a second operation result corresponding to a preset first expression;
[0118] If there is a second operation result that is the same as the first operation result, it is determined that there is a first expression equivalent to the target expression.
[0119] The terminal device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3It is only an example of the terminal device 300 and does not constitute a limitation of the terminal device 300. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the above-mentioned terminal device may also include input and output devices, network access devices, buses, etc.
[0120] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware plug-ins, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0121] The memory 302 may be an internal storage unit of the terminal device 300, such as a hard disk or memory of the terminal device 300. The memory 302 may also be an external storage device of the terminal device 300, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 300. Further, the memory 302 may also include both an internal storage unit of the terminal device 300 and an external storage device. The memory 302 is used to store the computer program and other programs and data required by the terminal device. The memory 302 may also be used to temporarily store data that has been output or is to be output.
[0122] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0123] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0124] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0125] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or plug-ins can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0126] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0128] If the above-mentioned integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned various method embodiments, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0129] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for identifying equivalent expressions, It is characterized in that include: Obtaining a target expression, including: obtaining an initial expression, if a factor type in the initial expression is different from a preset factor type, mapping an initial factor in the initial expression to a corresponding first factor according to a preset mapping rule, to obtain a target expression, wherein the target expression includes the first factor; Obtaining associated data sets corresponding to each of the first factors, wherein the associated data sets are preset data sets, and the data contained in the preset data sets are not completely the same, but are similar in the dimension of the number of digits; Calculate the target expression according to each of the associated data sets to obtain a first calculation result; Obtain a second operation result corresponding to a preset first expression; If there is a second operation result that is the same as the first operation result, it is determined that there is a first expression equivalent to the target expression.
2. The equivalent expression recognition method as claimed in claim 1, It is characterized in that The acquiring of the associated data sets corresponding to the first factors includes: According to a preset rule, a first set group is selected from a preset set group, wherein the first set group includes an associated data set, and the associated data set is in a one-to-one correspondence with the first factor; Correspondingly, the obtaining of the second operation result corresponding to the preset first expression includes: The preset first expression is calculated according to the first set group to obtain a second operation result corresponding to the preset first expression.
3. The equivalent expression recognition method as claimed in claim 2, It is characterized in that If there is a second operation result that is the same as the first operation result, determining that there is a first expression equivalent to the target expression includes: If there is a second operation result that is the same as the first operation result, and there is a set group that has not been selected in the preset set group, then the expression corresponding to the second operation result that is the same as the first operation result is determined as a new first expression, and according to a preset rule, a new first set group is selected from the set group that has not been selected, and the operation of the target expression according to each of the associated data sets is returned to be executed; If there is a second operation result that is the same as the first operation result, and there is no unselected set group in the preset set groups, it is determined that there is a first expression equivalent to the target expression.
4. The equivalent expression recognition method as claimed in claim 1, It is characterized in that Before obtaining the second operation result corresponding to the preset first expression, the method includes: Filtering an expression including the first factor from preset expressions to obtain a second expression; Obtaining a first type quantity of a first factor in the target expression, and obtaining a second type quantity of a second factor in the second expression, where the second factor is a factor included in the second expression; A second expression corresponding to a second type quantity consistent with the first type quantity is determined as the preset first expression.
5. The equivalent expression recognition method as claimed in claim 1, It is characterized in that After determining that there is a first expression equivalent to the target expression, the method includes: Execute the preset prompt operation.
6. The equivalent expression recognition method as claimed in claim 1, It is characterized in that Also includes: If there is no second operation result that is the same as the first operation result, the target expression is stored in the database.
7. An equivalent expression recognition device, It is characterized in that include: An expression acquisition module, used to acquire a target expression, specifically to acquire an initial expression. If the factor type in the initial expression is different from the preset factor type, the initial factor in the initial expression is mapped to the corresponding first factor according to a preset mapping rule to obtain a target expression, wherein the target expression includes the first factor. A data set acquisition module, used to acquire associated data sets corresponding to each of the first factors, wherein the associated data sets are preset data sets, and the data contained in the preset data sets are not completely the same, but are similar in the dimension of the number of digits; A first operation module, used for operating the target expression according to each of the associated data sets to obtain a first operation result; A second operation result acquisition module, used to acquire a second operation result corresponding to a preset first expression; A determination module is used to determine whether there is a first expression equivalent to the target expression if there is a second operation result that is the same as the first operation result.
8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
