CN114911796A - Method and device for analyzing and executing form function, electronic equipment and storage medium - Google Patents

Method and device for analyzing and executing form function, electronic equipment and storage medium Download PDF

Info

Publication number
CN114911796A
CN114911796A CN202210457112.4A CN202210457112A CN114911796A CN 114911796 A CN114911796 A CN 114911796A CN 202210457112 A CN202210457112 A CN 202210457112A CN 114911796 A CN114911796 A CN 114911796A
Authority
CN
China
Prior art keywords
function
parsing
spreadsheet
analysis
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210457112.4A
Other languages
Chinese (zh)
Inventor
黎冠敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Taimei Medical Technology Co Ltd
Original Assignee
Zhejiang Taimei Medical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Taimei Medical Technology Co Ltd filed Critical Zhejiang Taimei Medical Technology Co Ltd
Priority to CN202210457112.4A priority Critical patent/CN114911796A/en
Publication of CN114911796A publication Critical patent/CN114911796A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Calculators And Similar Devices (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for analyzing and executing a form function, wherein the method for analyzing the form function comprises the following steps: creating an execution context and a scope for the spreadsheet function; traversing a function body of the analysis form function to obtain an analysis object, wherein the analysis object comprises at least one of an operator, a formula parameter and a function; an analytic function of the spreadsheet function is constructed based on the type of the analytic object. The analysis method of the form function enables the form function associated with a plurality of form items to be analyzed and executed, and improves the practical value of the dynamic form.

Description

Method and device for analyzing and executing form function, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of computer data processing, and particularly relates to a method and a device for analyzing and executing a form function, electronic equipment and a storage medium.
Background
With the continuous development of computer technology, more and more data are stored in the form of a form. In a form configuration system, the form dynamic capability is provided, but the conventional dynamic form cannot support data linkage between different form items, so that the dynamic form has limited practical value in a complex scene.
The information disclosed in this background section is only for enhancement of understanding of the general background of the application and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
The application aims to provide an analysis method of a form function, which is used for solving the problem that a conventional dynamic form cannot support data linkage between different form items.
In order to achieve the above object, the present application provides a method for parsing a spreadsheet function, where the method includes:
creating an execution context and a scope for the spreadsheet function;
traversing and analyzing a function body of the form function to obtain an analysis object, wherein the analysis object comprises at least one of an operator, a formula parameter and a function;
and constructing the analytical function of the spreadsheet function based on the type of the analytical object.
In an embodiment, constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically includes:
and when the analysis object is an operator, filling the character string of the analysis function body with the analysis object to construct the analysis function of the form function.
In an embodiment, constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically includes:
and when the analysis object is a formula parameter, filling the character string of the analysis function body, the execution context and the scope with the analysis object to construct an analysis function of the form function.
In an embodiment, constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically includes:
and when the analysis object is a function, distributing a function ID to the analysis object, and filling the character string of the analysis function body with the function ID to construct an analysis function of the form function.
In one embodiment, the method further comprises:
and when the analysis object is a function, creating a global mapping between the function ID and the analysis object.
In one embodiment, the method further comprises, when parsing the object into a function:
creating an execution context and a scope for the parse object;
traversing and analyzing a function body of the analysis object to obtain a sub analysis object, wherein the sub analysis object comprises at least one of an operator, a formula parameter and a function; and
constructing a sub-analytic function based on the type of the sub-analytic object.
In an embodiment, constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically includes:
when any one of the object non-operator, the formula parameter and the function is analyzed, the character string of the analysis function body is filled with the analysis object to construct the analysis function of the form function.
In one embodiment, the method further comprises:
and initializing the function body character string of the form function by using the parameter transfer function to obtain the function body of the form function.
The application also provides a method for executing the spreadsheet function, which comprises the following steps:
the method comprises the steps of showing a configuration page of a form function, wherein the configuration page comprises a first form item;
receiving a form function input by a user in a first form item of the configuration page for being stored by a server, wherein the form function is at least associated with a second form item;
displaying an execution page of a spreadsheet function, wherein the execution page comprises the first and second spreadsheet items;
responding to configuration parameters input in a second form item of the execution page, and displaying an execution result in a first form item of the execution page, wherein the execution result is obtained by the server responding to the configuration parameters, calling the form function analysis method to analyze the form function, and running the configuration parameters by using the obtained analysis function.
The present application further provides an apparatus for parsing a form function, where the apparatus for parsing a form function includes:
the creating module is used for creating an execution context and a scope for the form function;
the analysis module is used for analyzing the function body of the form function in a traversing way to obtain an analysis object, wherein the analysis object comprises at least one of an operator, a formula parameter and a function;
and the construction module is used for constructing the analytic function of the spreadsheet function based on the type of the analytic object.
The present application further provides an executing apparatus for a form function, where the executing apparatus for the form function includes:
the display module is used for displaying a configuration page of the form function, wherein the configuration page comprises a first form item;
the input module is used for receiving a form function input by a user in a first form item of the configuration page for being stored by the server, wherein the form function is at least associated with a second form item;
the display module is further used for displaying an execution page of the form function, wherein the execution page comprises the first form item and the second form item;
the presentation module is further configured to present an execution result in the first form item of the execution page in response to a configuration parameter input in the second form item of the execution page, where the execution result is obtained by the server responding to the configuration parameter, invoking the form function parsing method to parse the form function, and running the configuration parameter by using the obtained parsing function.
The present application further provides an electronic device, comprising:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform a method of parsing a spreadsheet function or a method of executing a spreadsheet function as described above.
The present application also provides a machine-readable storage medium having stored thereon executable instructions that, when executed, cause the machine to perform a method of parsing a spreadsheet function or a method of executing a spreadsheet function as described above.
Compared with the prior art, according to the analysis method of the form function, the function body of the form function is traversed and analyzed, and the analysis function is constructed according to the type of the analysis object, so that even the form function associated with a plurality of form data can be analyzed and executed, and the practical value of the dynamic form is improved.
Drawings
FIG. 1 is a schematic diagram of an application scenario of a method and an apparatus for parsing a spreadsheet function and a method and an apparatus for executing the spreadsheet function according to an embodiment of the present application;
FIG. 2 is an interaction diagram of a method of parsing and executing spreadsheet functions according to an embodiment of the present application;
FIG. 3 is a flow diagram of a method for parsing a spreadsheet function according to an embodiment of the present application;
FIG. 4 is a flow diagram of a method for parsing a spreadsheet function according to an embodiment of the present application;
FIG. 5 is a flow diagram of a method for performing spreadsheet functions according to an embodiment of the present application;
FIG. 6 is a diagram of a spreadsheet function configuration page in a method of executing a spreadsheet function according to an embodiment of the present application;
FIGS. 7 and 8 are diagrams of a spreadsheet function execution page in a method of executing a spreadsheet function according to an embodiment of the present application;
FIG. 9 is a block diagram of an apparatus for parsing a spreadsheet function according to an embodiment of the present application;
FIG. 10 is a block diagram of an apparatus for performing spreadsheet functions according to an embodiment of the present application;
fig. 11 is a hardware configuration diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to embodiments shown in the drawings. The embodiments are not intended to limit the present disclosure, and structural, methodological, or functional changes made by those skilled in the art according to the embodiments are included in the scope of the present disclosure.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
One use scenario for dynamic forms is contract management in a Property Management System (PMS). In a form template of the PMS, form items such as state, current time, next follow-up time, personnel, departments and the like can be configured. For example, the form item "next follow-up time" may be configured in association with the form item "state".
Referring to fig. 1 and 2, in a specific example scenario, a user may access a platform server through a terminal, and the platform server may be deployed with a PMS system, so that the terminal may access the PMS system provided by the platform server through a network, and the PMS system may provide a form configuration page and a form execution page.
On a form configuration page provided by the PMS system, a form item to be configured can be selected. For example, for a selected form item a, the user may call "form fields" and "functions" that need to be used to build and save the form function. The method comprises the steps that page data are loaded on a form execution page provided by a PMS, and form functions configured in fields of form items are analyzed, and at the moment, a server can execute the analysis method of the form functions provided by the application and construct analysis functions; then, the parsing function is executed based on the field configuration value of the form item to obtain the execution result of the form item a.
Referring to FIG. 3, an embodiment of the method for parsing the spreadsheet function of the present application is described. In this embodiment, the method includes:
s11, creating an execution context and a scope for the form function.
The dynamic form can be developed and configured based on JavaScript (js for short). JavaScript is an interpretive scripting language, and its interpreter is called JavaScript engine, which is a part of browser, and is widely used as a scripting language of client, and is originally used on HTML (an application under standard universal markup language) web pages to add dynamic functions to the HTML web pages.
Scope (scope) refers to the scope of a function or variable, and is divided into a global scope, a function scope, and a block scope. The scope functions to isolate variables, so that the same variables under different scopes do not conflict, which specifies how to find the variables and the access rights of the currently executed code block to the variables. Before the function code is executed, a corresponding Execution context (Execution Contexts) is created, and a context object represents the Execution environment of a function. Variables, function declarations, arguments, scope chains, this, etc. information in the current execution environment may be included in the execution context.
It can be seen that a scope is a partition of the execution context, which may be responsible for collecting and maintaining a series of queries consisting of all declared identifiers, and enforcing a strict set of rules to determine the access rights of currently executing code to these identifiers.
And S12, traversing and analyzing the function body of the form function to obtain an analysis object.
Specifically, the function body character string of the spreadsheet function may be initialized by using the parameter function param to obtain the function body of the spreadsheet function.
The analysis object may include at least one of an operator, a formula parameter, and a function, and the function body may be understood as a tree structure formed by these analysis objects as nodes.
Illustratively, operators may be comprised of "+", "-", "×", "+" and the like, formula parameters may be comprised of "time of this time", "status", and the like, and functions may be comprised of "EVERY", "REF", "SQRT", "ROUND", and the like.
S13, constructing the analytic function of the form function based on the type of the analytic object.
According to different types of the analysis objects, different operations are executed on the analysis objects to construct the analysis function of the form function. In the embodiment of the present application, each analysis object in the function body of the form function is spliced again to obtain an analysis function with a "chain" structure, so that the form function can be executed without changing the calculation logic of the original form function.
The following describes the way of constructing the spreadsheet function according to the specific type of the parsing object:
analyzing object as operational character
When the analysis object is an operator, the analysis object is directly used for filling the character string of the analysis function body. Based on the execution context and scope previously created for the spreadsheet function, the operator may find its corresponding operation scope and object.
② the analytic object is a formula parameter
When the analysis object is a formula parameter, two parts of operations need to be executed on the analysis object. First, as formula parameters, the created execution context and scope need to be further populated with them, and second, the parsing function body string needs to be populated with it.
Analysis object as function
Parsing an object for a function illustrates that the parsing object is a "sub-function" nested within a spreadsheet function. In order to resolve the spreadsheet function into a "chain" structure, a function ID corresponding to the parsing object is first assigned to the parsing object, and then the function ID is used to fill the parsing function string. The function ID is used for calling the function of the corresponding analysis object when the analysis function is executed. Here, a global mapping of function IDs and parse objects may be created, ensuring global callability of the parse objects.
Second, for the parsed object in the function format, it needs to be further parsed so that it can be executed when called. Here, the parsing process for the parsing object may be similar to the parsing process for the spreadsheet function in the above embodiment, that is, first, an execution context and a scope are created for the parsing object, then, a function body of the parsing object is traversed to obtain a sub-parsing object, and finally, a sub-parsing function is constructed based on the type of the sub-parsing object. Here, the process of constructing the sub-analysis function based on the type of the sub-analysis object is not described again, and it can be understood that, if the analysis object of the function type is further analyzed in the analysis object, the above analysis method may be similarly and repeatedly executed until the spreadsheet function is completely analyzed.
In a spreadsheet function, the parsing object may include, for example, a specific "value" in addition to the above-mentioned operators, formula parameters, and functions. Therefore, when it is determined that the analysis object is not any of the operator, the formula parameter, and the function, the analysis object may be directly filled in the analysis function body character string.
It should be noted that the execution context is divided into a global execution context and a function execution context. There is only one global execution context, and a function execution context is created each time a function is created. In the embodiment corresponding to the present application, in step S11, a corresponding function execution context is first created for the spreadsheet function, and when the parsing object of the spreadsheet function is a "sub-function", a corresponding function execution context is also created for the parsing object.
Since JavaScript is single threaded, only one thing can be executed at a time, and other things can be put in a designated context stack to be queued for execution. When initializing the code, the JavaScript interpreter first creates a new global execution context to the top of the execution context stack, then creates a new execution context with each function call and puts the new execution context into the top of the stack, and pops up the top of the execution context stack after the function execution is completed until the whole execution context is returned.
In the above embodiment, a case where there may be nested "subfunctions" in the function body parsing object of the spreadsheet function is shown. The "sub-functions" in the finally constructed function body of the parsing function are called by means of function ID mapping, and the following possible execution process of the parsing function is further explained here.
Specifically, taking an analytic function as a, and a sub-function B (function ID) is nested in the analytic function a as an example:
execution state 1: before creating an execution context for a parse function, the global execution context is in an active state;
execution state 2: when the analysis function A is called, the JavaScript engine stops executing the global execution context, creates the analysis function A execution context, and puts the analysis function A execution context on the top of the execution context stack;
execution state 3: since the sub-function B is called in the parsing function A, the parsing function A execution context is suspended, the sub-function B execution context is created, and the sub-function B execution context is placed at the top of the execution context stack. Here, the sub-function B calls a function by means of ID mapping.
Execution state 4: after the sub-function B is executed, the execution context of the sub-function B is popped from the stack top, and the sub-function B returns to the analysis function A to execute the context and continues to execute;
execution state 5: and after the analysis function A is executed, the execution context of the analysis function A is popped from the stack top and returns to the global execution context.
With reference to fig. 4, in the above embodiment, a specific process of constructing the parsing function is demonstrated according to different types of the parsing objects. In this process, the parsing function construction process of the above embodiment may also be performed based on a preset "parsing object type judgment flow".
Specifically, after an execution context and a scope are created for a form function, a parameter transfer function is used for initializing a form function body character string so as to obtain a function body of the form function; then, the function body of the parsing form function is traversed to obtain a parsing object.
Aiming at an analysis object, firstly judging whether the analysis object is an operational character, if so, directly filling an analysis function body character string; if not, further judging whether the formula parameters are formula parameters. If the analysis object is a formula parameter, filling the execution context and the scope of the form function and analyzing the function body character string; if not, further judging whether the function exists. If the analysis object is a function, distributing a function ID for the analysis object, filling the character string of the analysis function body with the function ID, and executing the analysis process of the form function to the analysis object in a circulating mode; if not, directly filling the character string of the analytic function body.
And after traversing and analyzing all the analysis objects in the form function, obtaining a final analysis function body character string, and creating an analysis function according to the analysis function body character string.
It can be understood that the "analysis object type determination process" may also perform exchange between each step according to different application environments, and is not described herein again.
Referring to FIG. 5, an embodiment of a method for performing the spreadsheet function of the present application is described. In this embodiment, the method includes:
s21, showing a configuration page of the form function, wherein the configuration page comprises a first form item.
Referring to FIG. 6, an exemplary spreadsheet function configuration page is shown. In this configuration page, the "next follow time" form item (i.e., the first form item) may be configured with the form function.
S22, receiving a form function input by a user in the first form item of the configuration page for storage by the server, wherein the form function is at least associated with the second form item.
After selecting the "next follow-up time" form item, the user can select the function and form field to be used. The spreadsheet function is here exemplarily configured as IF (AND (state a ═ 1, state B ═ 2), TIME (TIME of this TIME, 30), TIME (TIME of this TIME, 90))
The spreadsheet function represents: if the state A is '1' and the state B is '2', the next following time is 30 days after the current time, otherwise, the next following time is 90 days after the current time. It can be seen that the form function associates three form items "state a", "state B" and "this time" (i.e. the second form item).
S23, displaying an execution page of the form function, wherein the execution page comprises the first form item and the second form item.
S24, responding to the configuration parameters input in the second form item of the execution page, and displaying an execution result in the first form item of the execution page, wherein the execution result is obtained by the server responding to the configuration parameters, calling the form function analysis method to analyze the form function, and running the configuration parameters by using the obtained analysis function.
With reference to fig. 7 and 8, in the execution page of the form function, the configuration parameters input by the second form item may be actively input by the user, or the server monitors the content of the second form item in real time/regularly and performs updating.
Exemplarily, the user can select the form item of the current time to configure the parameters and configure the parameters as '2022-03-01'. At this time, if the server monitors that the form item of the state A is updated to 1 and the form item of the state B is updated to 2, executing to obtain the next follow-up time of 2022-03-31; similarly, if the "state A" form entry is updated to 1 and the "state B" form entry is updated to 4, execution gets the next follow-up time "2022-05-30".
Referring to fig. 9, an embodiment of the apparatus for parsing the spreadsheet function of the present application is described. In this embodiment, the parsing device of the spreadsheet function includes a creating module 31, a parsing module 32, and a constructing module 33.
A creating module 31, configured to create an execution context and a scope for the spreadsheet function; the first parsing module 32 is configured to traverse a function body of a parsing table function to obtain a parsing object, where the parsing object includes at least one of an operator, a formula parameter, and a function; and a construction module 33, configured to construct an analytic function of the spreadsheet function based on the type of the analytic object.
In an embodiment, the constructing module 33 is specifically configured to fill the character string of the parsing function body with the parsing object when the parsing object is an operator.
In an embodiment, the constructing module 33 is specifically configured to fill the parsing object with the parsing object, the execution context and the scope when the parsing object is a formula parameter.
In an embodiment, the constructing module 33 is specifically configured to assign a function ID to the analysis object when the analysis object is a function, and fill the character string of the analysis function body with the function ID.
In an embodiment, the constructing module 33 is specifically configured to create a global mapping between the function ID and the parsing object when the parsing object is a function.
In one embodiment, when parsing an object as a function: the creating module 31 is further configured to create an execution context and a scope for the parsing object; the parsing module 32 is further configured to traverse a function body of the parsing object to obtain a sub-parsing object, where the sub-parsing object includes at least one of an operator, a formula parameter, and a function; the construction module 33 is also used to construct the sub-analytic functions based on the type of the sub-analytic objects.
In an embodiment, the constructing module 33 is specifically configured to fill the character string of the parsing function body with the parsing object when the parsing object is not any one of the operator, the formula parameter, and the function.
In an embodiment, the constructing module 33 is specifically configured to initialize the function body character string of the spreadsheet function by using the parameter transfer function to obtain the function body of the spreadsheet function.
Referring to fig. 10, an embodiment of an apparatus for executing the spreadsheet function of the present application will be described. In this embodiment, the executing device of the spreadsheet function includes a presentation module 41 and an input module 42.
A presentation module 41, configured to present a configuration page of the spreadsheet function, where the configuration page includes a first spreadsheet item; the input module 42 is configured to receive a form function input by a user in a first form item of the configuration page, where the form function is stored by the server, and the form function is associated with at least a second form item; the presentation module 41 is further configured to present an execution page of the form function, where the execution page includes a first form item and a second form item; the displaying module 41 is further configured to display an execution result in the first form item of the execution page in response to the configuration parameter input in the second form item of the execution page, where the execution result is obtained by the server responding to the configuration parameter, invoking an analysis form function according to the above-mentioned form function analysis method, and running the configuration parameter by using the obtained analysis function.
As described above with reference to fig. 1 to 8, the parsing method and the execution method of the spreadsheet function according to the embodiment of the present specification are described. The details mentioned in the above description of the method embodiments are also applicable to the parsing apparatus and the executing apparatus of the spreadsheet function in the embodiments of the present specification. The above parsing device and executing device of the spreadsheet function can be implemented by hardware, or can be implemented by software, or by a combination of hardware and software.
Fig. 11 shows a hardware configuration diagram of an electronic device according to an embodiment of the present specification. As shown in fig. 11, the electronic device 50 may include at least one processor 51, a storage 52 (e.g., a non-volatile storage), a memory 53, and a communication interface 54, and the at least one processor 51, the storage 52, the memory 53, and the communication interface 54 are connected together via a bus 55. The at least one processor 51 executes at least one computer readable instruction stored or encoded in the memory 52.
It should be understood that the computer-executable instructions stored in the memory 52, when executed, cause the at least one processor 51 to perform the various operations and functions described above in connection with fig. 1-8 in the various embodiments of the present description.
In embodiments of the present description, the electronic device 50 may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile electronic devices, smart phones, tablet computers, cellular phones, Personal Digital Assistants (PDAs), handheld devices, messaging devices, wearable electronic devices, consumer electronic devices, and the like.
According to one embodiment, a program product, such as a machine-readable medium, is provided. A machine-readable medium may have instructions (i.e., elements described above as being implemented in software) that, when executed by a machine, cause the machine to perform various operations and functions described above in connection with fig. 1-8 in the various embodiments of the present specification. Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and causes a computer or processor of the system or apparatus to read out and execute instructions stored in the readable storage medium.
In this case, the program code itself read from the readable medium can realize the functions of any of the above-described embodiments, and thus the machine-readable code and the readable storage medium storing the machine-readable code form part of this specification.
Examples of the readable storage medium include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-R, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs), magnetic tapes, nonvolatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or from the cloud via a communications network.
It will be understood by those skilled in the art that various changes and modifications may be made in the above-disclosed embodiments without departing from the spirit of the invention. Accordingly, the scope of the present description should be limited only by the attached claims.
It should be noted that not all steps and units in the above flows and system structure diagrams are necessary, and some steps or units may be omitted according to actual needs. The execution order of the steps is not fixed, and can be determined as required. The apparatus structures described in the above embodiments may be physical structures or logical structures, that is, some units may be implemented by the same physical client, or some units may be implemented by multiple physical clients separately, or some units may be implemented by some components in multiple independent devices together.
In the above embodiments, the hardware units or modules may be implemented mechanically or electrically. For example, a hardware unit, module or processor may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware units or processors may also include programmable logic or circuitry (e.g., a general purpose processor or other programmable processor) that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
The detailed description set forth above in connection with the appended drawings describes exemplary embodiments but does not represent all embodiments that may be practiced or fall within the scope of the claims. The term "exemplary" used throughout this specification means "serving as an example, instance, or illustration," and does not mean "preferred" or "advantageous" over other embodiments. The detailed description includes specific details for the purpose of providing an understanding of the described technology. However, the techniques may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form in order to avoid obscuring the concepts of the described embodiments.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A method for parsing a spreadsheet function, the method comprising:
creating an execution context and a scope for the spreadsheet function;
traversing and analyzing a function body of the form function to obtain an analysis object, wherein the analysis object comprises at least one of an operator, a formula parameter and a function;
and constructing the analytical function of the spreadsheet function based on the type of the analytical object.
2. The method for parsing a spreadsheet function according to claim 1, wherein constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically comprises:
and when the analysis object is an operator, filling the character string of the analysis function body with the analysis object to construct the analysis function of the form function.
3. The method for parsing a spreadsheet function according to claim 1, wherein constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically comprises:
and when the analysis object is a formula parameter, filling the character string of the analysis function body, the execution context and the scope with the analysis object to construct an analysis function of the form function.
4. The method for parsing a spreadsheet function according to claim 1, wherein constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically comprises:
and when the analysis object is a function, distributing a function ID to the analysis object, and filling the character string of the analysis function body with the function ID to construct the analysis function of the form function.
5. The method of parsing spreadsheet functions of claim 4, said method further comprising:
and when the analysis object is a function, creating a global mapping between the function ID and the analysis object.
6. The method of parsing a spreadsheet function as claimed in claim 5, wherein said method further comprises when the parsing object is a function:
creating an execution context and a scope for the parse object;
traversing and analyzing a function body of the analysis object to obtain a sub analysis object, wherein the sub analysis object comprises at least one of an operator, a formula parameter and a function; and
constructing a sub-analytic function based on the type of the sub-analytic object.
7. The method for parsing a spreadsheet function according to claim 1, wherein constructing the parsing function of the spreadsheet function based on the type of the parsing object specifically comprises:
when any one of the object non-operator, the formula parameter and the function is analyzed, the character string of the analysis function body is filled with the analysis object to construct the analysis function of the form function.
8. The method of parsing a spreadsheet function as claimed in claim 1, said method further comprising:
and initializing the function body character string of the form function by using the parameter transfer function to obtain the function body of the form function.
9. A method for executing a spreadsheet function, the method comprising:
the method comprises the steps of showing a configuration page of a form function, wherein the configuration page comprises a first form item;
receiving a form function input by a user in a first form item of the configuration page for being stored by a server, wherein the form function is at least associated with a second form item;
displaying an execution page of a spreadsheet function, wherein the execution page comprises the first and second spreadsheet items;
responding to the configuration parameter input in the second form item of the execution page, displaying an execution result in the first form item of the execution page, wherein the execution result is obtained by the server responding to the configuration parameter, calling the method according to any one of claims 1 to 8 to analyze the form function, and running the configuration parameter by using the obtained analysis function.
10. An apparatus for parsing a spreadsheet function, the apparatus comprising:
the creating module is used for creating an execution context and a scope for the form function;
the first analysis module is used for analyzing a function body of the form function in a traversing manner to obtain an analysis object, wherein the analysis object comprises at least one of an operator, a formula parameter and a function;
and the construction module is used for constructing the analytic function of the spreadsheet function based on the type of the analytic object.
11. An apparatus for executing a spreadsheet function, the apparatus comprising:
the display module is used for displaying a configuration page of the form function, wherein the configuration page comprises a first form item;
the input module is used for receiving a form function input by a user in a first form item of the configuration page for being stored by the server, wherein the form function is at least associated with a second form item;
the display module is further used for displaying an execution page of the form function, wherein the execution page comprises the first form item and the second form item;
the presentation module is further configured to present, in response to a configuration parameter input in a second form item of the execution page, an execution result in the first form item of the execution page, where the execution result is obtained by the server responding to the configuration parameter, invoking the method according to any one of claims 1 to 8 to parse the form function, and running the configuration parameter using the obtained parsing function.
12. An electronic device, comprising:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform a method of parsing a spreadsheet function according to any of claims 1 to 8 or a method of executing a spreadsheet function according to claim 9.
13. A machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform a method of parsing a spreadsheet function as claimed in any one of claims 1 to 8 or a method of executing a spreadsheet function as claimed in claim 9.
CN202210457112.4A 2022-04-27 2022-04-27 Method and device for analyzing and executing form function, electronic equipment and storage medium Pending CN114911796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210457112.4A CN114911796A (en) 2022-04-27 2022-04-27 Method and device for analyzing and executing form function, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210457112.4A CN114911796A (en) 2022-04-27 2022-04-27 Method and device for analyzing and executing form function, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114911796A true CN114911796A (en) 2022-08-16

Family

ID=82764974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210457112.4A Pending CN114911796A (en) 2022-04-27 2022-04-27 Method and device for analyzing and executing form function, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114911796A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115794043A (en) * 2023-01-31 2023-03-14 帆软软件有限公司帆软南京分公司 Calculation system and calculation method for table data aggregation processing of BI tool

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115794043A (en) * 2023-01-31 2023-03-14 帆软软件有限公司帆软南京分公司 Calculation system and calculation method for table data aggregation processing of BI tool

Similar Documents

Publication Publication Date Title
US10628132B2 (en) Inversion of control framework for multiple behaviors of a process
US7380237B2 (en) System and method for extending capabilities and execution efficiency of script based applications
CN107844324A (en) Customer terminal webpage redirects treating method and apparatus
US8863075B2 (en) Automated support for distributed platform development
CN113010827B (en) Page rendering method and device, electronic equipment and storage medium
US9680715B2 (en) Assessing a service offering in a networked computing environment
US10216513B2 (en) Plugin for multi-module web applications
CN105554085B (en) A kind of dynamic timeout treatment method and apparatus based on server connection
CN106775862A (en) Using loading method and device
CN105183890A (en) Webpage loading method based on browser and browser device
CN112631649A (en) Intelligent contract management method, device, terminal equipment and medium
CN114911796A (en) Method and device for analyzing and executing form function, electronic equipment and storage medium
CN114443076A (en) Mirror image construction method, device, equipment and storage medium
US11275567B1 (en) Making communication interfaces pluggable by using mechanisms comprising of exchange/broker for communication interfaces
CN108845864A (en) A kind of JVM rubbish recovering method and device based on spring frame
CN108959294B (en) Method and device for accessing search engine
CN111666074B (en) Web application customization method, related device and system
US9916391B2 (en) Method, apparatus and terminal for webpage content browsing
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN113239328B (en) Service function acquisition method and device, electronic equipment and storage medium
CN114064176A (en) View interaction method and device, electronic equipment and computer readable medium
US11163622B1 (en) Web application implementing a shared set of identifiers for handling links to web application plugins
CN113535188A (en) Privatization deployment method and device
CN113760262A (en) Task processing method, device, computer system and computer readable storage medium
CN115687815A (en) Page information display method, device, equipment and medium

Legal Events

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