Conditional expression dynamic configuration method, accounting condition calculation method and device

By dynamically configuring conditional expressions and constructing them using the expression editing page and logical operators, the problem of existing tools being unable to dynamically adjust is solved, achieving fast and accurate calculation of accounting conditions and improving the efficiency of accounting entries.

CN116167882BActive Publication Date: 2026-05-12GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU PINWEI SOFTWARE CO LTD
Filing Date
2023-03-01
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

现有的计算工具无法提供可动态调整的条件计算,导致会计人员需要花费大量时间进行人工计算且容易出现错误。

Method used

A method for dynamically configuring conditional expressions is provided. By displaying an expression editing page, a single conditional expression is identified and constructed. Arithmetic operators, relational operators, and logical operators are used to dynamically configure the conditional expression, and the expression is saved to the expression database of the target application system.

Benefits of technology

实现了会计条件计算的准确快速完成,减少了人工干预,提高了会计分录的效率和准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116167882B_ABST
    Figure CN116167882B_ABST
Patent Text Reader

Abstract

The application provides a conditional expression dynamic configuration method, an accounting condition calculation method and device. The conditional expression dynamic configuration method comprises the following steps: in response to a conditional expression creation request, displaying an expression editing page and determining a target application system by analyzing the conditional expression creation request; identifying an editing item configured by a user through the expression editing page; creating a single conditional expression according to an internal operator, a source code of an object parameter, a condition value type and a condition value constant; if multiple single conditional expressions are identified, identifying a logical operator and a combination symbol configured by the user for connecting the single conditional expressions; constructing the single conditional expressions into a conditional expression according to the logical operator, the combination symbol and the order of the single conditional expressions; associating an identification code with the conditional expression; and saving the conditional expression to an expression database corresponding to the target application system. The application can dynamically configure a conditional expression according to the demand of accounting work to perform conditional calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method for dynamically configuring conditional expressions, a method for calculating accounting conditions, and an apparatus. Background Technology

[0002] Financial accounting entries require a large number of condition calculations, including accounting definitions, line types, account derivation rules, and journal line definitions, all of which require complex condition expression calculations. Existing calculation tools cannot provide dynamically adjustable condition calculations. Most condition calculations need to be performed manually by accountants before being entered into the system, which takes a lot of time and is prone to errors. Summary of the Invention

[0003] This application provides a method for dynamically configuring conditional expressions, an accounting condition method, and an apparatus, which can dynamically configure conditional expressions according to accounting work needs for conditional calculation, and accurately and quickly realize accounting conditional calculation.

[0004] Firstly, this application provides a method for dynamically configuring conditional expressions, including:

[0005] In response to a conditional expression creation request, an expression editing page is displayed, and the conditional expression creation request is parsed to determine the target application system;

[0006] Identify the internal operators, source code of object parameters, condition value type, and condition value constant in the singleton conditional expression configured by the user through the expression editing page, as well as the identification code of the conditional expression; the internal operators include arithmetic operators and / or relational operators;

[0007] Create a singleton conditional expression based on the source code of the internal operators, object parameters, condition value types, and condition value constants;

[0008] If multiple single-unit conditional expressions are identified, the logical operators and associative symbols configured by the user to connect the single-unit conditional expressions are identified.

[0009] The conditional expression is constructed by constructing the conditional expressions from the individual conditional expressions based on the logical operators, associative symbols, and the order of the individual conditional expressions.

[0010] Associate the identifier code with the conditional expression;

[0011] The conditional expression is saved to the expression database corresponding to the target application system.

[0012] In one embodiment, the method further includes:

[0013] If only one single-unit conditional expression is identified, then that single-unit conditional expression is used as the conditional expression.

[0014] Associate the identifier code with the conditional expression;

[0015] The conditional expression is saved to the expression database corresponding to the target application system.

[0016] In one embodiment, the method further includes:

[0017] Obtain a conditional expression editing request; the conditional expression editing request includes an identifier code for the conditional expression to be edited;

[0018] The conditional expression to be edited is obtained according to the identifier code of the conditional expression to be marked, and the editing items are displayed on the expression editing page; the editing items include the combination symbol, the internal operator, the source code of the object parameter, the condition value type, the condition value constant, and the logical operator;

[0019] If any editable item is modified, the conditional expression to be edited is updated based on the modified editable item.

[0020] In one embodiment, the method further includes:

[0021] Preview the conditional expression on the expression editing page;

[0022] In response to a user input simulation calculation request, based on the simulation object parameters and simulation condition value constants in the simulation calculation request, a postfix expression is constructed according to the condition expression to perform simulation calculation;

[0023] The conditional expression and simulation results are displayed on the expression editing page.

[0024] In one embodiment, the method further includes:

[0025] Obtain a conditional expression deletion request; the conditional expression deletion request includes an identification code of the conditional expression to be deleted;

[0026] The condition expression to be deleted is located based on its identifier code, and the deletion operation is performed.

[0027] Secondly, this application provides a method for calculating accounting conditions, the method comprising:

[0028] Obtain a condition calculation request; the condition calculation request includes an identifier code of a target condition expression and the identity information of the requester; wherein, the target condition expression is at least one condition expression pre-configured and generated according to the condition expression dynamic configuration method described in any of the above embodiments;

[0029] Based on the identity information and the identifier code of the target condition expression, determine whether the requester has the authority to invoke the target condition expression;

[0030] If the requester has the authority to invoke the target conditional expression, then the target conditional expression is invoked according to its identifier code.

[0031] The object parameters are obtained from the source code of the object parameters in the target condition expression;

[0032] The postfix expression is created based on the target condition expression and the object parameters to calculate the condition calculation result.

[0033] Thirdly, this application provides a dynamic configuration apparatus for conditional expressions, the apparatus comprising:

[0034] The page display module is used to respond to a conditional expression creation request, display an expression editing page, and parse the conditional expression creation request to determine the target application system;

[0035] The identification module is used to identify the internal operators, source code of object parameters, condition value types and condition value constants in the single-state conditional expressions configured by the user through the expression editing page, as well as the identification code of the conditional expressions; the internal operators include arithmetic operators and / or relational operators;

[0036] The conditional creation module is used to create singleton conditionals based on the source code of the internal operators, object parameters, condition value types, and condition value constants.

[0037] The first acquisition module is used to identify the logical operators and associative symbols configured by the user to connect the individual conditional expressions when multiple single-unit conditional expressions are identified.

[0038] An expression construction module is used to construct the conditional expression from each individual conditional expression based on logical operators, associative symbols, and the order of each individual conditional expression.

[0039] An association module is used to associate the identifier code with the conditional expression;

[0040] The saving module is used to save the conditional expression to the expression database corresponding to the target application system.

[0041] Fourthly, this application provides an accounting condition calculation device, comprising:

[0042] The second acquisition module is used to acquire a condition calculation request; the condition calculation request includes an identification code of a target condition expression and the identity information of the requester; wherein, the target condition expression is at least one condition expression pre-configured and generated according to the condition expression dynamic configuration method described in any of the above embodiments;

[0043] The permission identification module is used to determine whether the requester has the permission to call the target condition expression based on the identity information and the identification code of the target condition expression;

[0044] The calling module is used to call the target condition expression according to the identifier code of the target condition expression when the requester has the calling permission of the target condition expression;

[0045] The third acquisition module is used to acquire object parameters based on the source code of the object parameters in the target condition expression;

[0046] The calculation module is used to create a postfix expression based on the target conditional expression and the object parameters to calculate the conditional calculation result.

[0047] The method and apparatus for dynamically configuring conditional expressions provided in this application trigger the creation of conditional expressions when a user initiates a conditional expression creation request, displaying an expression editing page. Users configure individual conditional expressions through this page, using arithmetic and relational operators to configure individual conditional expressions that use object parameters as calculation objects and perform conditional calculations with conditional value constants of various conditional value types. Multiple individual conditional expressions can be combined by configuring logical operators and associative symbols. When multiple individual conditional expressions exist, they are combined according to the order of the individual conditional expressions and the logical operators configured by the user to construct the conditional expression required by the user. The user-configured identifier code is associated with the conditional expression and saved to the target application system to which the conditional expression belongs when the user initiates the conditional expression creation request. This facilitates subsequent management and use of conditional expressions and enables dynamic configuration of conditional expressions as needed to help accountants perform conditional calculations.

[0048] On the other hand, the accounting condition calculation method and apparatus provided in this application triggers condition calculation based on a condition calculation request initiated by the requester. The condition calculation request includes the identifier code of the target condition expression to be used by the requester and the requester's identity information. The target condition expression is pre-configured and generated by the user based on the dynamic configuration method of condition expressions as needed. When the condition calculation request is received, the requester's identity information is used to verify whether the requester has the right to call the target condition expression. If the requester has the right to call, the target condition expression is called. The object parameters are obtained from the source code of the object parameters in the target condition expression, and a postfix expression is created for calculation to obtain the condition calculation result. It can quickly realize condition calculation according to different calculation needs, is convenient to use and accurate, and can improve the efficiency of accounting entries. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application 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 only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart illustrating the dynamic configuration method for conditional expressions in one embodiment.

[0051] Figure 2 As shown in the flowchart of one embodiment, the dynamic configuration method for conditional expressions also includes steps.

[0052] Figure 3 This is a flowchart illustrating the accounting condition calculation method in one embodiment;

[0053] Figure 4 This is a structural block diagram of a conditional expression dynamic configuration device in one embodiment;

[0054] Figure 5 This is a structural block diagram of an accounting condition calculation device in one embodiment;

[0055] Figure 6 This is a diagram of the internal structure of a computer device in one embodiment. Detailed Implementation

[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] like Figure 1 As shown in the figure, this application provides a method for dynamically configuring conditional expressions, including:

[0058] Step S101: In response to the conditional expression creation request, display the expression editing page and parse the conditional expression creation request to determine the target application system.

[0059] When a user needs to create a new conditional expression, a conditional expression creation request is initiated. This request includes information about the target application system selected by the user. The target application system refers to the application system to which the conditional expression created will be used. The conditional expression is bound to the target application system during creation for easier subsequent management and use. The expression editing page is used for users to configure conditional expressions.

[0060] Step S102: Identify the source code of the internal operators, object parameters, condition value types, and condition value constants in the singleton conditional expression configured by the user through the expression editing page, as well as the identification code of the conditional expression.

[0061] The internal operators include arithmetic operators and / or relational operators. Arithmetic operators include, but are not limited to, "+", "-", "*", and " / ", while relational operators include, but are not limited to, ">", "<", "=", "≠", "≥", "≤", "in", "not in", "like", and "not like". A single-conditional expression is a calculation expression that includes only one condition. Each single-conditional expression can be edited by configuring the source code, internal operators, condition value type, and condition value constants in the object parameters. The condition value is a pre-configured reference constant used for condition calculation. Condition value types include constants, constant lists, and constant maps. The identifier code of a conditional expression is a unique identifier defined by the user for that conditional expression. Subsequent operations such as searching, calling, and editing can be performed using the identifier code.

[0062] Step S103: Create a singleton conditional expression based on the source code of the internal operator, the object parameter, the condition value type, and the condition value constant.

[0063] The construction of a single-unit conditional expression is completed based on the user-configured internal operators, source code of object parameters, condition value type, and condition value constant.

[0064] For example, if the source code of the object parameter of the configured singleton conditional expression is yy, the internal operator is >, the condition value type is a constant, and the condition value constant is 22, then the singleton conditional expression is yy>22. Based on the source code, if the object parameter corresponding to yy is 30, then the output result of this singleton conditional expression is true; if the object parameter corresponding to yy is 10, then the output result of this singleton conditional expression is true.

[0065] Step S104: Identify whether there are multiple singleton conditional expressions.

[0066] Step S105: If only one single-unit conditional expression is identified, then the single-unit conditional expression is used as the conditional expression.

[0067] If the user has created only one single conditional expression, it is assumed that the conditional expression the user wants to create consists of only one single conditional expression. Therefore, this single conditional expression is directly used as the conditional expression for subsequent processing.

[0068] Step S106: If multiple single-unit conditional expressions are identified, then the logical operators and associative symbols configured by the user for connecting each single-unit conditional expression are identified.

[0069] If a user has created multiple single-item conditional expressions, it is assumed that the user needs to create a conditional expression composed of multiple single-item conditional expressions. In this case, it is necessary to identify the logical operators and associative symbols configured by the user. The logical operators include "and" and "or", and the associative symbols are operators used to change the precedence of each single-item conditional expression, including but not limited to "(" and ")".

[0070] Step S107: Construct the conditional expression by combining the logical operators, associative symbols, and the order of the individual conditional expressions.

[0071] The sorting of single-unit conditional expressions can be configured by the user. If not configured, they are sorted according to their creation order, from front to back, and adjacent single-unit conditional expressions are connected by the logical operators configured by the user.

[0072] For example, as shown in Table 1, the user configured the following two singleton conditional expressions:

[0073]

[0074] Table 1

[0075] The conditional expression formed by combining the above two single-item conditional expressions is as follows:

[0076] (yy = 11 and rt > 22)

[0077] Different conditional expressions can also be combined with each other. When the above conditional expression is combined with other conditional expressions, the combination symbol is used to calculate the conditional expression as a whole to avoid calculation errors when combined with other conditional expressions.

[0078] Step S108: Associate the identifier code with the constructed conditional expression.

[0079] Each created conditional expression has a unique identifier code. By associating the user-defined identifier code with the conditional expression during creation, the conditional expression can be managed through the identifier code.

[0080] Step S109: Save the conditional expression to the expression database corresponding to the target application system.

[0081] To facilitate the management and use of conditional expressions, the expressions belonging to each application system are saved separately. After creating a conditional expression, it is saved to the expression database corresponding to the target application system selected by the user.

[0082] In this embodiment, when a user initiates a conditional expression creation request, the creation of the conditional expression is triggered, and an expression editing page is displayed. The user configures individual conditional expressions through the expression editing page, using arithmetic and relational operators to configure individual conditional expressions that use object parameters as calculation objects and perform conditional calculations with conditional value constants of various conditional value types. Multiple individual conditional expressions can be combined by configuring logical operators and associative symbols. When multiple individual conditional expressions exist, they are combined according to the order of the individual conditional expressions and the logical operators configured by the user to construct the conditional expression required by the user. The user-configured identifier code is associated with the conditional expression and saved to the target application system to which the conditional expression belongs when the user initiated the conditional expression creation request. This facilitates subsequent management and use of conditional expressions, enabling dynamic configuration of conditional expressions as needed to help accountants perform conditional calculations.

[0083] like Figure 2 As shown, in one embodiment, the method further includes:

[0084] Step S201: Obtain the conditional expression editing request.

[0085] Among them, the conditional expression editing request is an operation request initiated by the user to edit an existing conditional expression. The conditional expression editing request includes the identification code of the conditional expression to be edited. The user can generate the conditional expression editing request automatically by selecting the conditional expression to be edited in the expression management directory and obtaining the identification code based on the selected conditional expression, or by manually entering the identification code of the conditional expression to be edited.

[0086] Step S202: Obtain the conditional expression to be edited according to the identifier code of the conditional expression to be marked, and display the edit item on the expression editing page.

[0087] The editable items include combination symbols, internal operators, source code of object parameters, condition value types, condition value constants, and logical operators.

[0088] The system identifies each editable item in the conditional expression to be edited and displays them on the expression editing page in an editable state, allowing users to edit part or all of the conditional expression. For example, users can modify only the internal operators or all editable items.

[0089] Step S203: If any editable item is modified, update the conditional expression to be edited based on the modified editable item.

[0090] If it is detected that the user has modified any one or more editable items in the conditional expression to be edited, the original corresponding editable item will be replaced with the modified editable item when the user confirms the modification, the conditional expression to be edited will be updated and then saved.

[0091] In this embodiment, users can dynamically modify existing conditional expressions as needed. When the calculation rules change or errors are found in the conditional expressions that need to be modified, modifications can be made directly on the already created conditional expressions without having to recreate and manually delete the original conditional expressions. This approach offers high flexibility and ease of use.

[0092] In one embodiment, the method further includes:

[0093] Preview the conditional expression on the expression editing page;

[0094] In response to a user input simulation calculation request, based on the simulation object parameters and simulation condition value constants in the simulation calculation request, a postfix expression is constructed according to the condition expression to perform simulation calculation;

[0095] The conditional expression and simulation results are displayed on the expression editing page.

[0096] In this embodiment, the conditional expression being created or modified can be previewed. Users can check the previewed conditional expression on the expression editing page and correct any errors promptly. Furthermore, users can initiate a simulation calculation request, which triggers a simulation calculation of the currently previewed conditional expression. The user-initiated simulation calculation request includes user-configured simulation object parameters and simulation condition value constants. That is, the simulation calculation does not call the object parameters and condition value constants; instead, it uses the simulation object parameters and simulation condition value constants as operands for the calculation. A postfix expression is constructed based on the currently previewed conditional expression, the simulation object parameters, and the simulation condition value constants for calculation.

[0097] The calculation process for the conditional expression is as follows: the postfix expression is traversed from beginning to end, and calculations are performed by pushing values ​​onto the constant stack and the operator stack. If a space is encountered, it is skipped. If an operand is encountered, it is pushed onto the operand stack. If an internal operator, associative symbol, or logical operator is encountered, it is pushed onto the operator stack. If the operator in the stack has a higher or equal priority than the currently encountered operator, the operand is popped from the constant stack for calculation, and the result is pushed onto the constant stack. The traversal continues until the result is obtained and then output.

[0098] In one embodiment, the method further includes:

[0099] Obtain a conditional expression deletion request; the conditional expression deletion request includes an identification code of the conditional expression to be deleted;

[0100] The condition expression to be deleted is located based on its identifier code, and the deletion operation is performed.

[0101] In this embodiment, the user initiates a conditional expression deletion request to perform a deletion operation on the conditional expression to be deleted. The user can select the conditional expression to be deleted in the expression management directory, and the deletion request is automatically generated based on the identification code of the selected conditional expression, or manually enter the identification code of the conditional expression to be deleted to generate a deletion request. Based on the identification code of the conditional expression to be deleted in the deletion request, the user finds the conditional expression to be deleted in the database and performs the deletion operation.

[0102] like Figure 3 As shown in the embodiment of this application, an accounting condition calculation method is provided, the method comprising:

[0103] Step S301: Obtain the condition calculation request.

[0104] The condition calculation request includes an identifier code for the target condition expression and the identity information of the requester; the target condition expression is at least one condition expression pre-configured and generated according to the condition expression dynamic configuration method described in any of the above embodiments.

[0105] When a requester initiates a conditional calculation request, it will include its identity information, which is the requester's account or identity ID. Administrators can use this identity information to assign access permissions for calling conditional expressions to each user.

[0106] In one embodiment, the administrator can directly assign access permissions to individual conditional expressions. In another embodiment, the administrator can assign permissions based on the conditional expressions contained in each application system. That is, if a user is assigned access to conditional expressions of any application system, the user can invoke all conditional expressions contained in that application system. Here, "all expressions" includes conditional expressions added after the permission is assigned; that is, the user can invoke all conditional expressions belonging to that application system at any given time.

[0107] Step S302: Determine whether the requester has the authority to invoke the target conditional expression based on the identity information and the identifier code of the target conditional expression.

[0108] Permission verification is performed based on the calling permissions assigned by the administrator. The target conditional expression is located according to its identifier code, and the requester's identity information is used to verify whether they have been granted the right to call the target conditional expression. In one embodiment, if the corresponding conditional expression cannot be found based on the identifier code, a call failure result is returned directly.

[0109] Step S303: If the requester has the authority to invoke the target conditional expression, then the target conditional expression is invoked according to the identifier code of the target conditional expression.

[0110] Step S304: Obtain the object parameter from the source code of the object parameter in the target condition expression.

[0111] Step S305: Based on the target condition expression and the object parameters, create a postfix expression and perform calculation to obtain the condition calculation result.

[0112] In this embodiment, condition calculation is triggered based on a condition calculation request initiated by the requester. The condition calculation request includes the identifier code of the target condition expression to be used by the requester and the requester's identity information. The target condition expression is pre-configured and generated by the user based on the dynamic configuration method of condition expressions as needed. When the condition calculation request is received, the requester's identity information is used to verify whether the requester has the right to call the target condition expression. If the requester has the right to call, the target condition expression is called. The object parameters are obtained from the source code of the object parameters in the target condition expression, and a postfix expression is created for calculation to obtain the condition calculation result. This method can quickly realize condition calculation according to different calculation needs, is convenient to use and accurate, and can improve the efficiency of accounting entries.

[0113] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0114] The following describes the conditional expression dynamic configuration device provided in the embodiments of this application. The conditional expression dynamic configuration device described below can be referred to in correspondence with the conditional expression dynamic configuration method described above.

[0115] like Figure 4 As shown, this application provides a dynamic configuration device 400 for conditional expressions, the device comprising:

[0116] The page display module 401 is used to respond to the conditional expression creation request, display the expression editing page, and parse the conditional expression creation request to determine the target application system;

[0117] The identification module 402 is used to identify the internal operators, source code of object parameters, condition value type and condition value constant in the single-state conditional expression configured by the user through the expression editing page, as well as the identification code of the conditional expression; the internal operators include arithmetic operators and / or relational operators;

[0118] The conditional expression creation module 403 is used to create singleton conditional expressions based on the source code of the internal operators, object parameters, condition value types, and condition value constants.

[0119] The first acquisition module 404 is used to identify the logical operators and associativity symbols configured by the user to connect the individual conditional expressions when multiple single-unit conditional expressions are identified.

[0120] The expression construction module 405 is used to construct the conditional expression by combining the individual conditional expressions according to the logical operators, the associative symbols and the order of the individual conditional expressions.

[0121] The association module 406 is used to associate the identification code with the conditional expression;

[0122] The storage module 407 is used to save the conditional expression to the expression database corresponding to the target application system.

[0123] In one embodiment, the expression building module is further configured to use the singleton condition as the condition expression when only one singleton condition is identified.

[0124] In one embodiment, the device further includes:

[0125] The fourth acquisition module is used to acquire a conditional expression editing request; the conditional expression editing request includes an identification code of the conditional expression to be edited;

[0126] The conditional editing module is used to obtain the conditional expression to be edited based on the identifier code of the conditional expression to be marked, and to display the editing items on the expression editing page; the editing items include the combination symbol, internal operators, source code of object parameters, condition value type, condition value constant, and logical operators;

[0127] The conditional update module is used to update the conditional expression to be edited based on the modified edited item when any edited item is modified.

[0128] In one embodiment, the device further includes:

[0129] The preview module is used to preview the conditional expression on the expression editing page;

[0130] The simulation calculation module is used to respond to a user input simulation calculation request, and to construct a postfix expression based on the simulation object parameters and simulation condition value constants in the simulation calculation request to perform simulation calculation;

[0131] The display module is used to display the conditional expression and the simulation calculation results on the expression editing page.

[0132] In one embodiment, the device further includes:

[0133] The fifth acquisition module is used to acquire conditional expression deletion requests; the conditional expression deletion request includes the identification code of the conditional expression to be deleted;

[0134] The expression deletion module is used to locate the condition expression to be deleted based on its identifier code and perform the deletion operation.

[0135] The accounting condition calculation device provided in the embodiments of this application is described below. The accounting condition calculation device described below and the accounting condition calculation method described above can be referred to and correspond to each other.

[0136] like Figure 5 As shown, this application embodiment provides an accounting condition calculation device 500, including:

[0137] The second acquisition module 501 is used to acquire a condition calculation request; the condition calculation request includes an identification code of a target condition expression and the identity information of the requester; wherein, the target condition expression is at least one condition expression pre-configured and generated according to the condition expression dynamic configuration method described in any of the above embodiments;

[0138] The permission identification module 502 is used to determine whether the requester has the permission to call the target condition expression based on the identity information and the identification code of the target condition expression;

[0139] The calling module 503 is used to call the target condition expression according to the identifier code of the target condition expression when the requester has the calling permission of the target condition expression;

[0140] The third acquisition module 504 is used to acquire object parameters based on the source code of the object parameters in the target condition expression;

[0141] The calculation module 505 is used to create a postfix expression based on the target condition expression and the object parameters to calculate the condition calculation result.

[0142] The division of modules in the aforementioned dynamic configuration device for conditional expressions and accounting condition calculation device is merely illustrative. In other embodiments, the dynamic configuration device for conditional expressions and the accounting condition calculation device can be divided into different modules as needed to complete all or part of their functions. Each module in the aforementioned dynamic configuration device for conditional expressions and the accounting condition calculation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0143] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the conditional expression dynamic configuration method or accounting condition calculation method as described in any of the foregoing embodiments.

[0144] In one embodiment, this application also provides a computer device storing computer-readable instructions, wherein when the one or more processors execute the computer-readable instructions, they perform the steps of the conditional expression dynamic configuration method or accounting condition calculation method as described in any of the foregoing embodiments.

[0145] In one embodiment, schematically, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a dynamic configuration method for conditional expressions or an accounting condition calculation method.

[0146] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0147] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0148] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0149] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise expressly specified. Meanwhile, the term "and / or" as used in this specification includes any and all combinations of the associated listed items.

[0150] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0151] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for dynamically configuring conditional expressions, characterized in that, include: In response to a conditional expression creation request, an expression editing page is displayed, and the conditional expression creation request is parsed to determine the target application system; Identify the internal operators, source code of object parameters, condition value type, and condition value constant in the singleton conditional expression configured by the user through the expression editing page, as well as the identification code of the conditional expression; the internal operators include arithmetic operators and / or relational operators; Create a singleton conditional expression based on the source code of the internal operators, object parameters, condition value types, and condition value constants; If multiple single-unit conditional expressions are identified, the logical operators and associativity symbols configured by the user to connect the single-unit conditional expressions are identified. The conditional expression is constructed by constructing the conditional expressions from the individual conditional expressions based on the logical operators, associative symbols, and the order of the individual conditional expressions. Associate the identifier code with the conditional expression; The conditional expression is saved to the expression database corresponding to the target application system.

2. The dynamic configuration method for conditional expressions according to claim 1, characterized in that, The method further includes: If only one single-unit conditional expression is identified, then that single-unit conditional expression is used as the conditional expression. Associate the identifier code with the conditional expression; The conditional expression is saved to the expression database corresponding to the target application system.

3. The dynamic configuration method for conditional expressions according to claim 1, characterized in that, The method further includes: Obtain a conditional expression editing request; the conditional expression editing request includes an identifier code for the conditional expression to be edited; The conditional expression to be edited is obtained according to the identifier code of the conditional expression to be edited, and the editing items are displayed on the expression editing page; the editing items include the combination symbol, the internal operator, the source code of the object parameter, the condition value type, the condition value constant, and the logical operator; If any editable item is modified, the conditional expression to be edited is updated based on the modified editable item.

4. The method for dynamically configuring conditional expressions according to any one of claims 1 to 3, characterized in that, The method further includes: Preview the conditional expression on the expression editing page; In response to a user input simulation calculation request, based on the simulation object parameters and simulation condition value constants in the simulation calculation request, a postfix expression is constructed according to the condition expression to perform simulation calculation; The conditional expression and simulation results are displayed on the expression editing page.

5. The dynamic configuration method for conditional expressions according to claim 1, characterized in that, The method further includes: Obtain a conditional expression deletion request; the conditional expression deletion request includes an identification code of the conditional expression to be deleted; The condition expression to be deleted is located based on its identifier code, and the deletion operation is performed.

6. A method for calculating accounting conditions, characterized in that, The method includes: Obtain a condition calculation request; the condition calculation request includes an identifier code of a target condition expression and the identity information of the requester; wherein, the target condition expression is at least one condition expression pre-configured and generated according to the condition expression dynamic configuration method as described in any one of claims 1 to 5; Based on the identity information and the identifier code of the target condition expression, determine whether the requester has the authority to invoke the target condition expression; If the requester has the authority to invoke the target conditional expression, then the target conditional expression is invoked according to its identifier code. The object parameters are obtained from the source code of the object parameters in the target condition expression; The postfix expression is created based on the target condition expression and the object parameters to calculate the condition calculation result.

7. A dynamic configuration device for conditional expressions, characterized in that, include: The page display module is used to respond to a conditional expression creation request, display an expression editing page, and parse the conditional expression creation request to determine the target application system; The identification module is used to identify the internal operators, source code of object parameters, condition value types and condition value constants in the single-state conditional expressions configured by the user through the expression editing page, as well as the identification code of the conditional expressions; the internal operators include arithmetic operators and / or relational operators; The conditional creation module is used to create singleton conditionals based on the source code of the internal operators, object parameters, condition value types, and condition value constants. The first acquisition module is used to identify the logical operators and associative symbols configured by the user to connect the individual conditional expressions when multiple single-unit conditional expressions are identified. An expression construction module is used to construct the conditional expression from each individual conditional expression based on logical operators, associative symbols, and the order of each individual conditional expression. An association module is used to associate the identifier code with the conditional expression; The saving module is used to save the conditional expression to the expression database corresponding to the target application system.

8. An accounting condition calculation device, characterized in that, include: The second acquisition module is used to acquire condition calculation requests; The condition calculation request includes an identification code for the target condition expression and the identity information of the requester; wherein, the target condition expression is at least one condition expression pre-configured and generated according to the condition expression dynamic configuration method as described in any one of claims 1 to 5; The permission identification module is used to determine whether the requester has the permission to call the target condition expression based on the identity information and the identification code of the target condition expression; The calling module is used to call the target condition expression according to the identifier code of the target condition expression when the requester has the calling permission of the target condition expression; The third acquisition module is used to acquire object parameters based on the source code of the object parameters in the target condition expression; The calculation module is used to create a postfix expression based on the target conditional expression and the object parameters to calculate the conditional calculation result.

9. A storage medium, characterized in that: The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the conditional expression dynamic configuration method as described in any one of claims 1 to 5 or the accounting condition calculation method as described in claim 6.

10. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, they perform the steps of the conditional expression dynamic configuration method as described in any one of claims 1 to 5 or the accounting condition calculation method as described in claim 6.