Method and apparatus for determining information

By iteratively identifying and calculating the functional formulas in the formula, the problems of low efficiency and waste of storage space in the prior art are solved, and efficient information determination is achieved.

CN113407177BActive Publication Date: 2024-12-10BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110816855.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-20
Publication Date
2024-12-10
Estimated Expiration
2041-07-20

AI Technical Summary

Technical Problem

Existing syntax tree-based construction methods used to calculate formulas edited by users have problems of inefficiency and waste of storage space.

Method used

Through iterative operations, the function formula in the formula is identified, the function's operation logic and input parameters are used to determine the function value, and the function formula is replaced in each iteration until the preset field is reached, thereby calculating the target information.

Benefits of technology

It improves the efficiency of calculating the formula group edited by users, avoids waste of storage space, and achieves more efficient information determination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113407177B_ABST
    Figure CN113407177B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for determining information, and relates to the field of computer technology. The method comprises: if a calculation request for a target formula group is received, an iterative operation is performed: the formula pointed to by the pointer is used as the current formula, and each functional formula in the expression in the current formula is identified; for each functional formula in the expression, the function value of the functional formula is determined by using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula, and the function value is used to replace the functional formula in the expression; the result of the expression is determined based on each function value, the pointer is pointed to the next formula of the current formula, and the result of the expression is used as the input parameter of the functional formula in the subsequent round of iterative operation; if it is determined that there is a preset field in the current formula, the iterative operation is stopped and the result of the expression determined in the last round of iterative operation is determined as the target information. The method can improve the efficiency of determining the target information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for determining information. Background Art

[0002] By inputting a formula edited by the user in the application and calculating the data in the application based on the formula edited by the user, information that meets the user's needs can be determined. The existing method of calculating the data in the application based on the formula edited by the user is: constructing a syntax tree based on the formula edited by the user, each node in the syntax tree is used to represent an operator, function value or numerical value, and performing corresponding calculations on each node when executing the syntax tree, and the value of the node will be passed to the parent node for recalculation until the root node calculation is completed.

[0003] However, the existing method of calculating the formula edited by the user by constructing a syntax tree has the problems of low efficiency and waste of storage space. Summary of the invention

[0004] The present disclosure provides a method, an apparatus, an electronic device, and a computer-readable storage medium for determining information.

[0005] According to a first aspect of the present disclosure, a method for determining information is provided, comprising: in response to receiving a calculation request for a target formula group, storing the target formula group in a target storage space, pointing a pointer to the first formula in the target storage space, and performing the following iterative operations: taking the formula pointed to by the pointer as the current formula, identifying each functional formula in the expression in the current formula; for each functional formula in the expression, using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula to determine the function value of the functional formula, and using the function value to replace the functional formula in the expression; based on each function value, determining the result of the expression, pointing the pointer to the next formula of the current formula, and using the result of the expression as the input parameter of the functional formula in the subsequent round of iterative operations; in response to determining that a preset field exists in the current formula, stopping the iterative operation, and determining the result of the expression determined in the last round of iterative operations as the target information.

[0006] In some embodiments, the method for determining information further includes: for each functional formula in the expression, in response to determining that the functional formula includes a sub-expression, identifying and obtaining the functional formula in the sub-expression.

[0007] In some embodiments, identifying each functional formula in the expression in the current formula includes: for the expression in the current formula, identifying characters in the expression; and determining the functional formula included in the expression based on a character string composed of the characters in the expression.

[0008] In some embodiments, the function value of the function formula is determined using the operation logic of the function indicated by the function formula and the input parameters in the function formula, including: identifying characters in the function formula and determining the parameters in the function formula based on the characters; determining the function value of the function formula using the operation logic of the function indicated by the function formula and the parameters in the function formula.

[0009] In some embodiments, the input parameters in the functional formula include data associated with the target item, and the target information includes attribute information of the target item.

[0010] According to a second aspect of the present disclosure, a device for determining information is provided, comprising: a receiving unit, configured to store the target formula group in a target storage space in response to receiving a calculation request for a target formula group, point a pointer to the first formula in the target storage space, and perform the following iterative operations: a first identification unit, configured to use the formula pointed to by the pointer as the current formula, and identify each functional formula in the expression in the current formula; a first calculation unit, configured to determine the function value of the functional formula for each functional formula in the expression, using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula, and use the function value to replace the functional formula in the expression; a second calculation unit, configured to determine the result of the expression based on each function value, point the pointer to the next formula of the current formula, and use the result of the expression as the input parameter of the functional formula in the subsequent round of iterative operations; a determination unit, configured to stop the iterative operation in response to determining that a preset field exists in the current formula, and determine the result of the expression determined in the last round of iterative operations as the target information.

[0011] In some embodiments, the apparatus for determining information further includes: a second identification unit configured to, for each functional formula in the expression, identify and obtain the functional formula in the sub-expression in response to determining that the functional formula includes a sub-expression.

[0012] In some embodiments, the first recognition unit includes: a first recognition module, configured to recognize characters in the expression in the current formula; a first determination module, configured to determine the function contained in the expression based on the character string composed of the characters in the expression.

[0013] In some embodiments, the first computing unit includes: a second recognition module, configured to recognize characters in the functional formula and determine parameters in the functional formula based on the characters; a second determination module, configured to use the operation logic of the function indicated by the functional formula and the parameters in the functional formula to determine the function value of the functional formula.

[0014] In some embodiments, the input parameters in the functional formula include data associated with the target item, and the target information includes attribute information of the target item.

[0015] According to the third aspect of the present disclosure, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining information provided in the first aspect.

[0016] According to a fourth aspect of the present disclosure, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for determining information provided in the first aspect is implemented.

[0017] The method and device for determining information provided by the present disclosure include: in response to receiving a calculation request for a target formula group, storing the target formula group in a target storage space, pointing a pointer to the first formula in the target storage space, and performing the following iterative operations: taking the formula pointed to by the pointer as the current formula, identifying each functional formula in the expression in the current formula; for each functional formula in the expression, using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula to determine the function value of the functional formula, and using the function value to replace the functional formula in the expression; based on each function value, determining the result of the expression, pointing the pointer to the next formula of the current formula, and using the result of the expression as the input parameter of the functional formula in the subsequent round of iterative operations; in response to determining that a preset field exists in the current formula, stopping the iterative operation, and determining the result of the expression determined in the last round of iterative operations as the target information, which can improve the efficiency of calculating the formula group edited by the user and avoid wasting storage space.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0020] Figure 1 is an exemplary system architecture diagram to which embodiments of the present application may be applied;

[0021] Figure 2 is a flow chart of an embodiment of a method for determining information according to the present application;

[0022] Figure 3 is an example of a group of formulas in a method for determining information according to the present application;

[0023] Figure 4is a flow chart of another embodiment of a method for determining information according to the present application;

[0024] Figure 5 is a schematic diagram of an application scenario of the method for determining information according to the present application;

[0025] Figure 6 is a flow chart of execution steps of an expression parsing module in a method for determining information according to the present application;

[0026] Figure 7 is a flow chart of execution steps of a functional parsing module in a method for determining information according to the present application;

[0027] Figure 8 is a schematic structural diagram of an embodiment of a device for determining information according to the present application;

[0028] Fig. 9 It is a block diagram of an electronic device used to implement the method for determining information in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0030] Figure 1 An exemplary system architecture 100 to which an embodiment of a business processing method or a business processing device of the present application can be applied is shown.

[0031] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0032] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. The terminal devices 101, 102, 103 can be user terminal devices, on which various client applications can be installed, such as formula editing applications, office software applications, image recognition applications, video recognition applications, playback applications, search applications, financial applications, etc.

[0033] The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting receiving server messages, including but not limited to smart phones, tablet computers, e-book readers, electronic players, laptop computers, desktop computers, and the like.

[0034] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules (for example, multiple software modules for providing distributed services), or they can be implemented as a single software or software module. No specific limitation is made here.

[0035] When the server 105 receives a calculation request for the target formula group, it stores the target formula group in the target storage space, points the pointer to the first formula in the target storage space, and performs the following iterative operations: use the formula pointed to by the pointer as the current formula, identify each functional formula in the expression in the current formula, and for each functional formula in the expression, use the operation logic of the function indicated by the functional formula and the input parameters in the functional formula to determine the function value of the functional formula, and use the function value to replace the formula in the expression, determine the result of the expression based on each function value, point the pointer to the next formula of the current formula, and use the result of the current expression as the input parameter of the functional formula in the subsequent round of iterative operations; if it is determined that there is a preset field in the current formula, stop the iterative operation, and determine the result of the expression determined in the last round of iterative operations as the target information.

[0036] It should be noted that the business processing method provided in the embodiments of the present disclosure can be executed by the terminal devices 101, 102, 103 or by the server 105. Accordingly, the business processing device can be set in the terminal devices 101, 102, 103 or in the server 105.

[0037] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0038] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for determining information according to the present disclosure, comprising the following steps:

[0039] Step 201, in response to receiving a calculation request for a target formula group, storing the target formula group in a target storage space, pointing a pointer to the first formula in the target storage space, and performing an iterative operation.

[0040] In this embodiment, when the execution subject of the method for determining information (for example Figure 1 After receiving the calculation request for the target formula group, the server 105) stores the target formula group in the target storage space and points the pointer for extracting data / information to the first formula in the target storage space.

[0041] The iterative operation includes step 2021, step 2022 and step 2023.

[0042] Step 2021, taking the formula pointed to by the pointer as the current formula, and identifying each function in the expression in the current formula.

[0043] In this embodiment, the formula pointed to by the pointer is used as the current formula, and each function in the expression in the current formula is identified. The formula group refers to the complete calculation process edited by the user, and each formula in the formula group is each assignment statement in the calculation process; the expression refers to the statement / content / information on the right side of the equal sign in each assignment statement; the function includes a function identifier and parameters, and the execution subject can call the function corresponding to the function identifier and calculate the result of the function based on the parameters. For example, in Figure 3 In the formula group shown, each line is an assignment statement, that is, each line is a formula, and the content on the right side of the equal sign in each formula is an expression, that is: "(f(a), h(b), g(c), ....)", "trimean(y, 2 / 8)" and "k(y, z)+l(3)" are all expressions, and each expression contains a function formula, that is: "f(a)", "h(b)", "g(c)", "trimean(y, 2 / 8)", "k(y, z)" and "l(3)" are all function formulas. In the function formula, the information outside the brackets represents the function name or function identifier, and the information inside the brackets represents the input parameters of the function formula. It can be understood that the parameters in the function formula can also be an expression, and an expression can include multiple function formulas. The operation logic of each function formula can be pre-stored in the execution subject, or it can be pre-stored in other devices that are communicatively connected to the execution subject.

[0044] Step 2022, for each functional formula in the expression, use the operation logic of the function indicated by the functional formula and the input parameters in the functional formula to determine the function value of the functional formula, and use the function value to replace the functional formula in the expression.

[0045] In this embodiment, for the expression in the formula pointed to by the pointer in the current iteration round, for each functional formula in the expression, the operation logic of the function indicated by the functional formula and the input parameters in the functional formula are used to determine the function value of the functional formula, and the function value is used to replace the functional formula in the expression.

[0046] Step 2023, based on each function value, determine the result of the expression, point the pointer to the next formula of the current formula, and use the result of the expression as the input parameter of the function in the subsequent round of iterative operations.

[0047] In this embodiment, in the expressions in the formulas in the current iteration round, all functional expressions have been replaced by function values ​​corresponding to the functional expressions, and the calculation result of the expression, that is, the calculation result of the formula in the current iteration round, is calculated according to each function value and the operation logic between the function values ​​in the expression, and the result is used as the input parameter of the functional expression in the subsequent iteration operation.

[0048] Step 203, in response to determining that the preset field exists in the current formula, the iteration operation is stopped, and the result of the expression determined in the last round of iteration operation is determined as the target information.

[0049] In this embodiment, when it is determined that the formula pointed to by the pointer in the current iteration round has a preset field, the iteration operation is stopped, and the result of the expression determined in the last iteration operation is determined as the target information. The preset field can exist on the left side of the equal sign in the formula, that is, the label of the current formula calculation result, such as Figure 3 The preset label can also exist on the right side of the equal sign in the formula, such as marking the end of the expression on the right side with the preset symbol "." or the preset marker "End".

[0050] The method for determining information provided by the present embodiment, in response to receiving a calculation request for a target formula group, stores the target formula group in a target storage space, points a pointer to the first formula in the target storage space, and performs the following iterative operations: taking the formula pointed to by the pointer as the current formula, identifying each functional formula in the expression in the current formula; for each functional formula in the expression, using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula, determining the function value of the functional formula, and using the function value to replace the functional formula in the expression; based on each function value, determining the result of the expression, pointing the pointer to the next formula of the current formula, and using the result of the expression as the input parameter of the functional formula in the subsequent round of iterative operations; in response to determining that there is a preset field in the current formula, stopping the iterative operation, and determining the result of the expression determined in the last round of iterative operations as the target information, identifying the formula group edited by the user as three models of formula, expression and functional formula, in the process of formula calculation, the formula execution triggers the expression execution, and the expression execution triggers the functional formula execution, and the functional formula execution continues to trigger the expression execution and the functional formula execution, and a recursive iterative execution logic is formed between the three, which can improve the efficiency of determining the target information according to the formula group edited by the user.

[0051] Continue to refer Figure 4 , shows a process 400 of another embodiment of a method for determining information according to the present disclosure, comprising the following steps:

[0052] Step 401, in response to receiving a calculation request for a target formula group, storing the target formula group in a target storage space, pointing a pointer to the first formula in the target storage space, and performing the following iterative operation.

[0053] Step 4021, taking the formula pointed to by the pointer as the current formula, and identifying each function in the expression in the current formula.

[0054] Step 4022, for each functional formula in the expression, in response to determining that the functional formula includes a sub-expression, identifying and obtaining the functional formula in the sub-expression.

[0055] In this embodiment, for each functional formula in the expression, if the functional formula includes other sub-expressions (an expression nested in a functional formula may be referred to as a sub-expression), the functional formula in the sub-expression is identified and obtained.

[0056] Step 4023, for each functional formula in the expression, use the operation logic of the function indicated by the functional formula and the input parameters in the functional formula to determine the function value of the functional formula, and use the function value to replace the functional formula in the expression.

[0057] Step 4024, based on each function value, determine the result of the expression, point the pointer to the next formula of the current formula, and use the result of the expression as the input parameter of the function in the subsequent round of iteration operation.

[0058] Step 403, in response to determining that the preset field exists in the current formula, the iteration operation is stopped, and the result of the expression determined in the last round of iteration operation is determined as the target information.

[0059] The descriptions of step 401, step 4021, step 4023, step 4024, and step 403 in this embodiment are consistent with the descriptions of step 201, step 2021, step 2022, step 2023, and step 203, and are not repeated here.

[0060] In some application scenarios, such as Figure 5 As shown, the execution body of the method for determining information may include a formula parsing module, an expression parsing module and a functional parsing module, and the method for determining information may include:

[0061] After the execution entity receives the calculation request for the target formula group, the formulas in the target formula group are stored row by row in the target storage space. The formula parsing module scans the formula group row by row, and determines the right side of the equal sign of the formula in each row as an expression, and sends the expression to the expression parsing module for parsing and execution.

[0062] After receiving the expression sent by the formula parsing module, the expression parsing module identifies the functional formula in the expression and sends the parsed functional formulas one by one to the functional formula parsing module for parsing and calculation.

[0063] After receiving the function formula sent by the expression formula parsing module, the function formula parsing module identifies the parameters in the function formula and detects each parameter one by one to detect the type of each parameter. The type of the parameter in the function formula can be an expression, a function formula, a value or a text. If the parameter in the function formula is an expression, the expression is sent to the expression parsing module for parsing and calculation; if the parameter is a function formula, it is parsed and calculated in this function formula parsing module; if the parameter is a value or text, the value or text is used as an input parameter and input into the operation logic of the loaded / called function to participate in the calculation of the function formula.

[0064] After the functional analysis module obtains the parameters contained in all functional expressions, it implements the calculation of the functional expression based on the operation logic of the called function, and returns the calculation result / function value to the expression analysis module. The expression analysis module uses the function value corresponding to each functional expression to replace the functional expression in the expression, and then completes the calculation of the expression result based on the dynamic operation mechanism of the expression, and returns the result to the formula analysis module. The formula analysis module assigns the value of the expression to the variable on the left side of the equal sign.

[0065] If the variable name of a formula in a row is a preset field, it means that the formula is the last row of formulas in the formula group. The result of the formula is the target information required by the user, and the target information can be fed back to the user.

[0066] The method for determining information provided in this embodiment is compared with Figure 2 The described embodiment adds a step of identifying and obtaining the functional formula in the sub-expression when the functional formula includes a sub-expression, which can improve the recognition efficiency of the expression or functional formula when the expression is nested in the functional formula.

[0067] In the above combination Figure 2 and Figure 4 In some optional implementations of the described embodiment, identifying each functional formula in the expression in the current formula includes: for the expression in the current formula, identifying the characters in the expression; and determining the functional formula included in the expression based on the character string composed of the characters in the expression.

[0068] In this embodiment, for an expression in the current formula, characters in the expression are identified, and the functional formula included in the expression is determined according to a character string composed of the characters in the expression.

[0069] Specifically, the recognized characters may be arranged according to the order of the characters in the expression to form a character string, and the character string is determined as the function formula included in the expression.

[0070] Specifically, Figure 6 As shown, firstly, the expression parsing step is performed to identify the characters in the expression, determine the record item status according to the character recognition result, and determine the operation to be performed according to the record item status. Among them, the record item refers to a temporary string formed by concatenating the currently scanned characters.

[0071] First, the characters in the expression are identified from left to right to determine what kind of characters they are.

[0072] Secondly, in the process of sequentially recognizing characters from left to right, the content of the current record item is determined according to the currently recognized characters, and corresponding operations are performed according to the record item status / record item content.

[0073] Among them, the characters may include: operators (such as +, -, *, / , =, >, > =, <, < =, ! =, etc.), punctuation marks (such as commas, periods), brackets (divided into left brackets and right brackets), etc. The record item status includes: whether the current record item is a function, whether the current record item is empty, and whether the bracket bias of the current record item is equal to 0. The bracket skewness is used to describe the symmetric state of the left and right brackets. If the skewness is 1 (or other preset identifier), it means that there is one more left bracket than right bracket in the record item. If the skewness is -1 (or other preset identifier), it means that there is one more right bracket than left bracket in the record item. If the skewness is 0 (or other preset identifier), it means that the number of left and right brackets in the record item is equal. The execution operations corresponding to the record item status include: splicing the current scanned character to the record item, splicing the current scanned character to the parameter item, marking the record item as a function, the record item bracket bias +1, the record item bracket bias -1, constructing a function object and caching, clearing the record item, and clearing the parameter item. The parameter item is a string consisting of the parameter part of the function, for example, the parameter item of the function "average((a,medin(b))" is "a,medin(b)".

[0074] After the expression is parsed and all functions are obtained, the execution steps are performed to perform calculation operations on the expression: First, the calculation results of the expressions calculated in the formula are obtained. It should be noted that the formula is calculated in the order of the expressions. The results of the previously calculated expressions have been assigned to related variables. These variables will be passed as parameters to the subsequent expression objects for use. The subsequent expressions may not use all these variables, which depends on whether these variables are referenced in the subsequent expressions.

[0075] Secondly, the function formulas cached in the expression parsing process are parsed and calculated one by one, that is, the function formula parsing module is called to parse and calculate the function. After obtaining the function values ​​of all the function formulas in the expression, the function values ​​are used to replace the corresponding function formulas in the expression.

[0076] Finally, the expression dynamic operation mechanism is used to calculate the result of the expression, and the result is returned to the formula parsing module. At this point, the calculation of the expression is completed.

[0077] This embodiment uses character recognition, record item status recognition, and execution of operations corresponding to the record item status to process the expression during the expression parsing process, which can improve the efficiency of expression parsing and reduce operation and maintenance costs. In addition, based on the calculation results of the expression dynamic operation mechanism, it can avoid the generation of temporary object instances and reduce the waste of system storage resources.

[0078] In the above combination Figure 2 and Figure 4 In some optional implementations of the described embodiments, the operation logic of the function indicated by the functional formula and the input parameters in the functional formula are used to determine the function value of the functional formula, including: identifying characters in the functional formula and determining the parameters in the functional formula based on the characters; using the operation logic of the function indicated by the functional formula and the parameters in the functional formula to determine the function value of the functional formula.

[0079] In this embodiment, characters in the function formula can be identified, and parameters in the function formula can be determined according to the characters. The function value of the function formula is determined using the operation logic of the function indicated by the function formula and the parameters in the function formula.

[0080] Specifically, Figure 7 As shown, the functional parsing step is first performed to identify characters in the expression, determine the state of the record item according to the character recognition result, and determine the execution operation according to the state of the record item.

[0081] First, the characters in the function are identified from left to right to determine what kind of characters they are.

[0082] Secondly, in the process of sequentially recognizing characters from left to right, the content of the current record item is determined according to the currently recognized characters, and corresponding operations are performed according to the record item status / record item content.

[0083] Compared with the previous embodiment, this embodiment adds a state that the record item is a parameter. It should be noted that the same record item can be marked as a function and a parameter at the same time. When it is marked as a parameter, it means that the currently scanned character belongs to the parameter part of the function. Otherwise, the currently scanned character belongs to the name part of the function.

[0084] In this embodiment, the execution operations corresponding to the record item status also include: splicing characters onto the parameter item, and the parameter item is used as a cached string to store function parameters; constructing an expression object and caching it; marking the record item as a text parameter and caching it; unmarking the record item and simultaneously unmarking all marks on the record item, including expression marks, function marks, or parameter marks.

[0085] When the function parsing is completed, the execution steps are as follows: loop all cached parameter items, if the parameter item is an expression object or a function object, parse and calculate the value of the expression or function, and pass the result as a parameter to the function; if the parameter item is the result of the expression calculated in the formula, get the value corresponding to the result and pass it to the function; if the parameter item is a text parameter, pass it directly to the function. After that, calculate the function based on the operation logic indicated by the function and return the result to the expression.

[0086] This embodiment uses character recognition, record item status recognition, and execution of operation processing expressions corresponding to the record item status in the functional parsing process, which can improve the efficiency of parsing expressions and reduce operation and maintenance costs. In addition, based on the calculation results of the expression dynamic operation mechanism, it can avoid the generation of temporary object instances and reduce the waste of system storage resources.

[0087] In the above combination Figure 2 and Figure 4 In some optional implementations of the described embodiments, the input parameters in the functional formula include data associated with the target item, and the target information includes attribute information of the target item.

[0088] In this embodiment, the input parameters in the function include data associated with the target item, for example, the number of clicks on the target item on an e-commerce platform by users within a period of time, the sales quantity of the target item, or the sales amount of the target item, etc. The target information can be attribute information of the target item determined based on the formula group edited by the user, such as statistical data of the number of clicks on the target item (average value, probability distribution value, etc.), changes in the sales volume / sales amount of the target item, etc.

[0089] Further references Figure 8 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for determining information, and the device embodiment is Figure 2 and Figure 4 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0090] like Figure 8As shown, the device for determining information in this embodiment includes: a receiving unit 801, a first identification unit 8021, a first calculation unit 8022, a second calculation unit 8023, and a determination unit 803. The receiving unit is configured to store the target formula group in the target storage space in response to receiving a calculation request for the target formula group, point the pointer to the first formula in the target storage space, and perform the following iterative operations: the first identification unit is configured to use the formula pointed to by the pointer as the current formula to identify each functional formula in the expression in the current formula; the first calculation unit is configured to use the operation logic of the function indicated by the functional formula and the input parameters in the functional formula for each functional formula in the expression, determine the function value of the functional formula, and use the function value to replace the functional formula in the expression; the second calculation unit is configured to determine the result of the expression based on each function value, point the pointer to the next formula of the current formula, and use the result of the expression as the input parameter of the functional formula in the next round of iterative operations; the determination unit is configured to stop the iterative operation in response to determining that there is a preset field in the current formula, and determine the result of the expression determined in the last round of iterative operations as the target information.

[0091] In some embodiments, the apparatus for determining information further includes: a second identification unit configured to, for each functional formula in the expression, identify and obtain the functional formula in the sub-expression in response to determining that the functional formula includes a sub-expression.

[0092] In some embodiments, the first recognition unit includes: a first recognition module, configured to recognize characters in the expression in the current formula; a first determination module, configured to determine the function contained in the expression based on the character string composed of the characters in the expression.

[0093] In some embodiments, the first computing unit includes: a second recognition module, configured to recognize characters in the functional formula and determine parameters in the functional formula based on the characters; a second determination module, configured to use the operation logic of the function indicated by the functional formula and the parameters in the functional formula to determine the function value of the functional formula.

[0094] In some embodiments, the input parameters in the functional formula include data associated with the target item, and the target information includes attribute information of the target item.

[0095] Each unit in the above device 800 is similar to the reference Figure 2 and Figure 4 Therefore, the operations, features and technical effects described above for the method for generating information are also applicable to the device 800 and the units included therein, and will not be described in detail here.

[0096] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0097] like Fig. 9 , is a block diagram of an electronic device 900 for determining information according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0098] like Fig. 9 As shown, the electronic device includes: one or more processors 901, a memory 902, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 901 is taken as an example.

[0099] The memory 902 is a non-transient computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the method for determining information provided in the present application. The non-transient computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the method for determining information provided in the present application.

[0100] The memory 902 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the method for determining information in the embodiment of the present application (for example, the attached Figure 8The processor 901 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 902, that is, implements the method for determining information in the above method embodiment.

[0101] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the electronic device for extracting video clips, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 902 may optionally include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the electronic device for extracting video clips via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0102] The electronic device for determining information may further include: an input device 903, an output device 904, and a bus 905. The processor 901, the memory 902, the input device 903, and the output device 904 may be connected via the bus 905 or in other ways. Fig. 9 The connection via bus 905 is taken as an example.

[0103] The input device 903 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device for extracting video clips, such as input devices such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 904 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0104] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0105] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0106] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0107] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0108] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0109] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0110] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for determining information, comprising: In response to receiving a calculation request for a target formula group, the target formula group is stored in a target storage space, a pointer is pointed to the first formula in the target storage space, and the following iterative operations are performed: The formula pointed to by the pointer is used as the current formula, and each functional formula in the expression in the current formula is identified, including: for the expression in the current formula, identifying the characters in the expression; determining the functional formula included in the expression according to the character string composed of the characters in the expression; For each functional expression in the expression, using the operation logic of the function indicated by the functional expression and the input parameters in the functional expression, determine the function value of the functional expression, and use the function value to replace the functional expression in the expression; Based on each function value, determine the result of the expression, point the pointer to the next formula of the current formula, and use the result of the expression as an input parameter of the function in the subsequent round of iterative operations; In response to determining that a preset field exists in the current formula, the iteration operation is stopped, and the result of the expression determined in the last round of iteration operation is determined as the target information.

2. The method according to claim 1, wherein: The method further comprises: For each functional formula in the expression, in response to determining that the functional formula includes a sub-expression, the functional formula in the sub-expression is identified and obtained.

3. The method according to claim 1, wherein: The step of using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula to determine the function value of the functional formula includes: Recognize characters in the functional formula, and determine input parameters in the functional formula according to the characters; The function value of the functional formula is determined by using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula.

4. The method according to any one of claims 1 to 3, wherein: The input parameters in the functional formula include data associated with a target item, and the target information includes attribute information of the target item.

5. A device for determining information, comprising: The receiving unit is configured to, in response to receiving a calculation request for a target formula group, store the target formula group in a target storage space, point a pointer to a first formula in the target storage space, and perform the following iterative operations: A first recognition unit is configured to take the formula pointed to by the pointer as a current formula and recognize each functional expression in the expression in the current formula; a first calculation unit configured to determine, for each functional expression in the expression, a function value of the functional expression by using the operation logic of the function indicated by the functional expression and an input parameter in the functional expression, and to replace the functional expression in the expression with the function value; A second calculation unit is configured to determine the result of the expression based on each function value, point the pointer to the next formula of the current formula, and use the result of the expression as an input parameter of the functional formula in a subsequent round of iterative operations; a determination unit configured to, in response to determining that a preset field exists in the current formula, stop the iteration operation, and determine the result of the expression determined in the last round of iteration operation as the target information; Wherein, the first identification unit includes: A first recognition module is configured to recognize characters in an expression in the current formula; The first determination module is configured to determine the function included in the expression according to a character string composed of characters in the expression.

6. The device according to claim 5, wherein: The device also includes: The second identification unit is configured to, for each functional formula in the expression, identify and obtain the functional formula in the sub-expression in response to determining that the functional formula includes a sub-expression.

7. The device according to claim 5, wherein: The first computing unit comprises: A second recognition module is configured to recognize characters in the functional formula and determine input parameters in the functional formula according to the characters; The second determination module is configured to determine the function value of the functional formula by using the operation logic of the function indicated by the functional formula and the input parameters in the functional formula.

8. The device according to any one of claims 5 to 7, wherein: The input parameters in the functional formula include data associated with a target item, and the target information includes attribute information of the target item.

9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.