Formula editing processing method, formula syntax calculation method, and related device
By calculating the formula syntax on the server side and decoupling the user input function from the formula syntax calculation, the problem of formula editor browser lag is solved, and the user editing experience and ease of use are improved.
Patent Information
- Application Number
- PCT/CN2024/076180
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-14
- Filing Date
- 2024-02-05
- Publication Date
- 2025-09-11
AI Technical Summary
The existing formula editor causes browser lag due to the coupling of formula syntax-related functions with database tables, affecting user experience and ease of use.
Decouple user input functions from formula syntax calculations, calculate formula syntax on the server, and use the C/S architecture to converge formula syntax-related functions on the server to avoid browser lag.
It achieves the universality and reusability of formula syntax-related functions, improves the user experience of editing formulas, and avoids browser lag issues.
Smart Images

Figure CN2024076180_12092025_PF_FP_ABST
Abstract
Description
Formula editing and processing method, formula syntax calculation method and related equipment
[0001] This application claims priority to the Chinese invention patent application entitled “Formula editing and processing method, formula grammar calculation method and related equipment” and application number 202310148880.6, filed on February 14, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer data processing technology, and in particular to a formula editing and processing method, device, electronic device and storage medium. Background Art
[0003] In order to improve the user experience of formula editing and the usability of the formula editor, some functions related to formula syntax are often added to the formula editor.
[0004] The implementation of these functions is directly coupled with the database table where the formula editor is located, which may cause the browser where the formula editor is located to freeze due to the complex calculation of the formula syntax.
[0005] Summary of the Invention
[0006] In view of this, the purpose of this application is to propose a formula editing and processing method, a formula grammar calculation method and related equipment to solve or partially solve the above technical problems.
[0007] Based on the above objectives, the first aspect of the present application provides a formula editing method, comprising:
[0008] Receiving input formula parameter information in a formula editing area of a database table, and generating a formula syntax calculation instruction corresponding to the formula parameter information;
[0009] Sending the formula grammar calculation instruction to the server, so that the server performs formula grammar calculation according to the initial formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information;
[0010] Receive the at least one formula grammar sent by the server, and display the formula grammar.
[0011] Based on the same inventive concept, the second aspect of the present application provides a formula grammar calculation method, including:
[0012] Receive formula syntax calculation instructions sent by the client;
[0013] Formula grammar calculation is performed according to the formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information, and the at least one formula grammar is sent to the client.
[0014] Based on the same inventive concept, the third aspect of the present application provides a formula editing and processing device, comprising:
[0015] An instruction generation module is configured to receive formula parameter information input in a formula editing area of a database table and generate a formula syntax calculation instruction corresponding to the formula parameter information;
[0016] an instruction sending module configured to send the formula grammar calculation instruction to the server, so that the server performs formula grammar calculation according to the initial formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information;
[0017] The display module is configured to receive the at least one formula grammar sent by the server and display the formula grammar.
[0018] Based on the same inventive concept, a fourth aspect of the present application provides a formula grammar calculation device, comprising:
[0019] An instruction receiving module is configured to receive a formula grammar calculation instruction sent by a client;
[0020] The formula grammar calculation module is configured to perform formula grammar calculation according to the formula grammar calculation instruction, obtain at least one formula grammar corresponding to the formula parameter information, and send the at least one formula grammar to the client.
[0021] Based on the same inventive concept, the fifth aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the method described in the first aspect or the second aspect is implemented.
[0022] Based on the same inventive concept, the sixth aspect of this application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method described in the first aspect or the second aspect.
[0023] From the above, it can be seen that the formula editing processing method, formula grammar calculation method and related equipment provided by this application receive the input formula parameter information in the formula editing area of the database table, generate a formula grammar calculation instruction corresponding to the formula parameter information, and then send the formula grammar calculation instruction to the server, so that the server performs the formula grammar calculation according to the initial formula grammar calculation instruction, and obtains at least one formula grammar corresponding to the formula parameter information. In this way, the function of user input and the function of formula grammar calculation are decoupled and implemented, and the versatility and reusability of formula grammar-related functions are achieved by calculating the formula grammar on the server, and the problem of the browser where the formula editor is located being stuck due to the complex calculation of the formula grammar can be avoided. Finally, at least one formula grammar sent by the server is received and the formula grammar is displayed, which greatly improves the user's experience in editing formulas. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are merely embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0025] FIG1 is a schematic diagram of an application scenario of an embodiment of the present application;
[0026] FIG2 is a flow chart of a formula editing method according to an embodiment of the present application;
[0027] FIG3 is a flow chart of a formula grammar calculation method according to an embodiment of the present application;
[0028] FIG4 is a structural block diagram of a formula editing and processing device according to an embodiment of the present application;
[0029] FIG5 is a structural block diagram of a formula grammar calculation device according to an embodiment of the present application;
[0030] FIG6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0032] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. Rather, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0033] In the present application, it should be understood that any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning.
[0034] Based on the description of the above background technology, the following situations also exist in the related art:
[0035] Some formula editor features related to formula syntax, such as function completion, function parameter hints, and bracket matching, are directly coupled to the online database table where the formula editor resides. These features are designed and implemented specifically for online database tables and are not universal or reusable. Furthermore, complex calculations in the main page thread can cause browser lag in the formula editor.
[0036] Based on the above description, the principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.
[0037] The present application provides a formula editing and processing method, a formula grammar calculation method and related equipment, which decouple the user input function and the formula grammar calculation function, and use the method of calculating the formula grammar on the server side to achieve the universality and reusability of formula grammar related functions, and can avoid the problem of browser freeze where the formula editor is located due to the complex calculation of the formula grammar.
[0038] With reference to Figure 1, it is a schematic diagram of an application scenario of the formula editing processing method and the formula grammar calculation method provided in an embodiment of the present application. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. Among them, the terminal device 101, the server 102 and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA) or other electronic devices capable of realizing the above functions. The server 102 and the data storage system 103 can both be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0039] A user enters formula parameter information into terminal device 101, generates a formula grammar calculation instruction corresponding to the formula parameter information, and sends the formula grammar calculation instruction to server 102. Server 102 performs formula grammar calculation according to the initial formula grammar calculation instruction, obtains at least one formula grammar corresponding to the formula parameter information, and feeds the at least one formula grammar back to terminal device 101, which then displays the fed-back formula grammar. Data storage system 103 provides data storage support for the operation of server 102, for example, for storing program code that implements the aforementioned formula grammar calculation process according to the initial formula grammar calculation instruction.
[0040] The following describes the formula editing processing method and formula grammar calculation method according to the exemplary embodiment of the present application in conjunction with the application scenario of Figure 1. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0041] The present application embodiment provides a formula editing processing method, as shown in FIG2 , including:
[0042] Step 201: receiving input formula parameter information in a formula editing area of a database table, and generating a formula syntax calculation instruction corresponding to the formula parameter information.
[0043] In some embodiments, formula parameter information represents relevant information of the formula, including but not limited to functions, operation symbols used for calculation (addition, subtraction, multiplication, division), auxiliary operation symbols (various types of brackets in the formula), and data used for calculation.
[0044] As shown in Figure 4A, the formula editor on the client side is divided into two modules: the editor and the formula grammar. The editor responds to formula parameter information input by the user. The formula grammar module then monitors changes in the editor, monitors changes in formula parameter information input by the user in the editor, and / or changes in the cursor, and generates formula grammar calculation instructions corresponding to the formula parameter information.
[0045] In some embodiments, in step 201, generating a formula syntax calculation instruction corresponding to the formula parameter information includes:
[0046] Step A1, obtaining formula parameter information in the formula editing area through the formula grammar function, and determining the formula grammar function information corresponding to the formula parameter information.
[0047] Step A2: Generate the formula grammar calculation instruction according to the formula parameter information and the formula grammar function information.
[0048] In some embodiments, the formula syntax function information indicates the type of function that needs to be calculated for the formula syntax, including but not limited to function completion, function parameter prompts, and bracket matching.
[0049] Formula syntax function information corresponding to the formula parameter information is determined. For example, if the formula parameter information entered by the user is part of a function, the formula syntax function information is function completion; if the formula parameter information entered by the user is a bracket in a formula, the formula syntax function information is bracket matching. A formula syntax calculation instruction is then generated based on the formula parameter information and the formula syntax function information, where the formula syntax calculation instruction includes but is not limited to the formula parameter information and the formula syntax function information.
[0050] In some embodiments, in response to determining that the formula parameter information is a function to be completed;
[0051] In step 201, generating a formula syntax calculation instruction corresponding to the formula parameter information includes:
[0052] Step B1: Obtain function completion information corresponding to the function to be completed.
[0053] Step B2: Generate the formula syntax calculation instruction according to the function to be completed and the function completion information.
[0054] In some embodiments, when the formula parameter information is a function to be completed, for example, the function to be completed is S, the function completion information is obtained so that the server can know what type of function type of formula syntax to respond to, so as to find all functions containing S through the server.
[0055] Generate a formula syntax calculation instruction based on the function to be completed and the function completion information, where the formula syntax calculation instruction includes but is not limited to the function to be completed and the function completion information.
[0056] In some embodiments, in response to determining that the formula parameter information is various operation auxiliary symbols;
[0057] In step 201, generating a formula syntax calculation instruction corresponding to the formula parameter information includes:
[0058] Step C1: receiving a target operation auxiliary symbol selection instruction, and obtaining operation auxiliary symbol matching information corresponding to the target operation auxiliary symbol, wherein the target operation auxiliary symbol is any operation auxiliary symbol among the various operation auxiliary symbols.
[0059] Step C2: Obtain the position of the target operation auxiliary symbol.
[0060] Step C3: generating the formula syntax calculation instruction according to the target operation auxiliary symbol, the position of the target operation auxiliary symbol and the operation auxiliary symbol matching information.
[0061] In some embodiments, various operation auxiliary symbols represent various types of brackets in the formula, such as "()", "{}", "[]", where the same type of brackets may include multiple pairs, such as multiple pairs of "()".
[0062] When the formula parameter information is each auxiliary operation symbol in the formula, a target auxiliary operation symbol selection instruction is received. For example, if the target auxiliary operation symbol selection instruction is to select "(" as the target auxiliary operation symbol, bracket matching information (i.e., auxiliary operation symbol matching information) is obtained to enable the server to know what type of formula syntax function to respond to, so as to accurately match the auxiliary operation symbol ")" corresponding to the target auxiliary operation symbol "(" through the server.
[0063] The position of the target auxiliary operation symbol "(" or the cursor position corresponding to the target auxiliary operation symbol "(" is obtained, and a formula syntax calculation instruction is generated according to the target auxiliary operation symbol, the position of the target auxiliary operation symbol and the auxiliary operation symbol matching information. Here, the formula syntax calculation instruction includes but is not limited to the target auxiliary operation symbol, the position of the target auxiliary operation symbol and the auxiliary operation symbol matching information.
[0064] Step 202: Send the formula grammar calculation instruction to the server, so that the server performs formula grammar calculation according to the initial formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information.
[0065] In some embodiments, a formula grammar calculation instruction is sent to a server, enabling the server to perform formula grammar calculations in response to the instruction, thereby obtaining at least one formula grammar corresponding to the formula parameter information on the server. This allows the implementation of formula grammar-related functions to be integrated into the server-side calculations, successfully decoupling the editor and formula grammar modules. Furthermore, by calculating the formula grammar on the server, the versatility and reusability of formula grammar-related functions can be achieved, and the browser freeze caused by the complex calculation of the formula grammar can be avoided.
[0066] Step 203: Receive the at least one formula grammar sent by the server, and display the formula grammar.
[0067] In some embodiments, the formula grammar module receives at least one formula grammar returned by the server and displays the formula grammar. For example, if the formula parameter information is S, the formula grammar returned by the server is all functions containing S, such as SUM (sum function), SUMIF (single condition sum function), and SUMPRODUCT (sum statistical function).
[0068] In some embodiments, receiving a plurality of formula grammars sent by the server;
[0069] In step 203, after displaying the formula grammar, the following steps are further included:
[0070] Step D1: receiving a target formula grammar selection instruction, wherein the target formula grammar is any one of the multiple formula grammars.
[0071] Step D2: display the target formula grammar and hide other formula grammars except the target formula grammar.
[0072] In some embodiments, the server sends multiple formula syntaxes and, after receiving the multiple formula syntaxes, receives a target formula syntax selection instruction. For example, if the multiple formula syntaxes are SUM, SUMIF, and SUMPRODUCT, and the target formula syntax is SUMIF according to the target formula syntax selection instruction, only the target formula syntax SUMIF is displayed, and SUM and SUMPRODUCT are hidden.
[0073] Based on the same inventive concept, an embodiment of the present application proposes a formula grammar calculation method, as shown in FIG3 , including:
[0074] Step 301: Receive a formula grammar calculation instruction sent by a client.
[0075] Step 302: perform formula grammar calculation according to the formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information, and send the at least one formula grammar to the client.
[0076] In some embodiments, a formula grammar calculation instruction sent by a client is received. In order to enable the server to know what type of formula grammar function to respond to based on the formula grammar calculation instruction, a formula grammar calculation is performed according to the formula grammar instruction to obtain at least one formula grammar corresponding to the formula parameter information, and the at least one formula grammar calculated by the server is fed back to the client.
[0077] By consolidating the implementation of formula syntax-related functions to server-side calculations, the editor and formula syntax modules are successfully decoupled. This server-side calculation of formula syntax also allows for universal and reusable functions, while also preventing browser lag caused by complex formula syntax calculations.
[0078] In some embodiments, in response to determining that the formula parameter information is a function to be completed;
[0079] In step 302, the formula grammar calculation is performed according to the formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information, including:
[0080] A function corresponding to the function to be completed is selected from a database pre-stored in the server, and at least one completion function corresponding to the function to be completed is obtained, and the completion function is used as the formula grammar.
[0081] In some embodiments, a database pre-stored in the server includes multiple completion functions. For example, if the function to be completed is S, a completion function including the function to be completed S is searched from the multiple completion functions included in the database. For example, the completion functions including S found are SUM, SUMIF, and SUMPRODUCT, and SUM, SUMIF, and SUMPRODUCT are used as formula syntax.
[0082] In some embodiments, in response to determining that the formula parameter information is various operation auxiliary symbols, the formula syntax calculation instruction includes at least one of the following:
[0083] a target operation auxiliary symbol and a position of the target operation auxiliary symbol, wherein the target operation auxiliary symbol is any one of the various operation auxiliary symbols;
[0084] In step 302, the formula grammar calculation is performed according to the formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information, including:
[0085] Step E1: performing operation auxiliary symbol matching on the target operation auxiliary symbol and each operation auxiliary symbol according to the target operation auxiliary symbol and the position of the target auxiliary symbol to obtain at least one matching operation auxiliary symbol corresponding to the target operation auxiliary symbol.
[0086] Step E2: Obtain the position of the matching operation auxiliary symbol, and use the matching operation auxiliary symbol and the position of the matching operation auxiliary symbol as the formula grammar.
[0087] In some embodiments, when the formula parameter information is various operation auxiliary symbols, for example, the formula parameter information is various types of brackets, such as "()", "{}", "[]", where the same type of brackets may include multiple pairs, such as multiple pairs of "()".
[0088] The formula syntax instruction includes but is not limited to the target operation auxiliary symbol and the position of the target operation auxiliary symbol, for example, the target operation auxiliary symbol is “)”.
[0089] According to the position of the target operation auxiliary symbol ")" and the target auxiliary symbol ")", the operation auxiliary symbol is matched with each operation auxiliary symbol, and the operation auxiliary symbol "(" corresponding to the target operation auxiliary symbol ")" is accurately matched through the server.
[0090] The position of the auxiliary operation symbol "(" is obtained, and the auxiliary operation symbol "(" and the position of the auxiliary operation symbol "(" are used as formula syntax to achieve highlighting of the auxiliary operation symbol "(" on the client.
[0091] Through the above scheme, the input formula parameter information is received in the formula editing area of the database table, and a formula grammar calculation instruction corresponding to the formula parameter information is generated. Then the formula grammar calculation instruction is sent to the server, so that the server performs the formula grammar calculation according to the initial formula grammar calculation instruction, and obtains at least one formula grammar corresponding to the formula parameter information. In this way, the function of user input and the function of formula grammar calculation are decoupled and implemented, and the versatility and reusability of formula grammar-related functions are achieved by calculating the formula grammar on the server, and the problem of the browser where the formula editor is located being stuck due to the complex calculation of the formula grammar can be avoided. Finally, at least one formula grammar sent by the server is received, and the formula grammar is displayed, which greatly improves the user's experience in editing formulas.
[0092] This application describes the process of formula editing in detail using an embodiment, which is described as follows:
[0093] Initialize the formula grammar service and connect the client and server: By initializing the formula grammar service, a connection is established between the client and the server, and the grammar service functions that need to be enabled (i.e., formula grammar function information) are declared.
[0094] 1. Initialize the formula grammar service (i.e. the server).
[0095] 2. Initialize the formula editor (i.e. client).
[0096] 3. Connect the server and client.
[0097] 4. After connecting, the client sends initialization information (i.e., formula syntax calculation instructions) and declares the formula syntax function that needs to be enabled (i.e., formula syntax function information).
[0098] Requests for formula syntax services are made according to the LSP (Layered Service Provider) protocol. The formula syntax function module responds to cursor or content changes (i.e., formula parameter information), determines the formula syntax function to be requested (i.e., formula syntax function information), generates the corresponding request data (i.e., formula syntax calculation instructions), and sends it to the server.
[0099] For example, the user enters S (i.e., the function to be completed), and the formula editor responds to the text and cursor changes.
[0100] The formula grammar function module monitors text and cursor changes, and needs to perform function completion (i.e. function completion information) to generate the data required for the function completion grammar service request (function completion request data, declared function content and cursor position) (i.e. formula grammar calculation instructions).
[0101] The client formula editor (ie, the client) sends the request data to the grammar service server (ie, the server).
[0102] Asynchronous request data completed, response data changed:
[0103] After the formula syntax is calculated, the data (ie, the formula syntax) is returned to the formula editor client (ie, the client).
[0104] Update the formula editor (get completion information, expand the completion suggestion list in the formula editor) (i.e., completion function) according to the response data (i.e., formula syntax).
[0105] A C / S (Client-Serve) architecture is introduced into the formula editor, and the implementation of functions related to formula syntax is converged on the server-side calculation. At the same time, the front-end formula editor is transformed into a client to respond to user interactions and send requests to the server. After the server-side calculation, the client asynchronously obtains the returned response data to update the formula editor.
[0106] By using a client-server architecture in the formula editor, we can not only successfully decouple the editor and the formula syntax module, but also enable asynchronous operation to avoid blocking the browser UI (the main thread of application execution), reducing browser lag and greatly improving the user experience of editing formulas.
[0107] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and performed by multiple devices working together. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the method.
[0108] It should be noted that the above description is limited to some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0109] Based on the same inventive concept, corresponding to the formula editing and processing method of any of the above embodiments, the present application also provides a formula editing and processing device.
[0110] Referring to FIG4 , the formula editing and processing device includes:
[0111] The instruction generation module 401 is configured to receive formula parameter information input in the formula editing area of the database table and generate a formula syntax calculation instruction corresponding to the formula parameter information;
[0112] An instruction sending module 402 is configured to send the formula grammar calculation instruction to the server, so that the server performs formula grammar calculation according to the initial formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information;
[0113] The display module 403 is configured to receive the at least one formula grammar sent by the server and display the formula grammar.
[0114] In some embodiments, the instruction generation module 401 is specifically configured to:
[0115] Acquire formula parameter information in the formula editing area through the formula grammar function, and determine the formula grammar function information corresponding to the formula parameter information;
[0116] The formula grammar calculation instruction is generated according to the formula parameter information and the formula grammar function information.
[0117] In some embodiments, in response to determining that the formula parameter information is a function to be completed;
[0118] The instruction generation module 401 is specifically configured to:
[0119] Obtaining function completion information corresponding to the function to be completed;
[0120] The formula grammar calculation instruction is generated according to the function to be completed and the function completion information.
[0121] In some embodiments, in response to determining that the formula parameter information is various operation auxiliary symbols;
[0122] The instruction generation module 401 is specifically configured to:
[0123] receiving a target operation auxiliary symbol selection instruction, and acquiring operation auxiliary symbol matching information corresponding to the target operation auxiliary symbol, wherein the target operation auxiliary symbol is any one of the operation auxiliary symbols;
[0124] Obtaining the position of the target operation auxiliary symbol;
[0125] The formula syntax calculation instruction is generated according to the target operation auxiliary symbol, the position of the target operation auxiliary symbol and the operation auxiliary symbol matching information.
[0126] In some embodiments, receiving a plurality of formula grammars sent by the server;
[0127] The formula editing and processing device further includes a hidden module, which is specifically configured to:
[0128] receiving a target formula grammar selection instruction, wherein the target formula grammar is any one of the multiple formula grammars;
[0129] The target formula grammar is displayed, and other formula grammars except the target formula grammar are hidden.
[0130] Based on the same inventive concept, a formula grammar calculation device corresponding to the formula grammar calculation method of the above embodiment, as shown in FIG5 , includes:
[0131] The instruction receiving module 501 is configured to receive a formula grammar calculation instruction sent by a client;
[0132] The formula grammar calculation module 502 is configured to perform formula grammar calculation according to the formula grammar calculation instruction, obtain at least one formula grammar corresponding to the formula parameter information, and send the at least one formula grammar to the client.
[0133] In some embodiments, in response to determining that the formula parameter information is a function to be completed;
[0134] The formula grammar calculation module 502 is specifically configured to:
[0135] A function corresponding to the function to be completed is selected from a database pre-stored in the server, and at least one completion function corresponding to the function to be completed is obtained, and the completion function is used as the formula grammar.
[0136] In some embodiments, in response to determining that the formula parameter information is various operation auxiliary symbols, the formula syntax calculation instruction includes at least one of the following:
[0137] a target operation auxiliary symbol and a position of the target operation auxiliary symbol, wherein the target operation auxiliary symbol is any one of the various operation auxiliary symbols;
[0138] The formula grammar calculation module 502 is specifically configured to:
[0139] Performing operation auxiliary symbol matching on the target operation auxiliary symbol and each operation auxiliary symbol according to the target operation auxiliary symbol and the position of the target auxiliary symbol to obtain at least one matching operation auxiliary symbol corresponding to the target operation auxiliary symbol;
[0140] The position of the matching operation auxiliary symbol is obtained, and the matching operation auxiliary symbol and the position of the matching operation auxiliary symbol are used as the formula grammar.
[0141] For the convenience of description, the above device is described as being divided into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0142] The apparatus of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0143] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any of the above embodiments when executing the program.
[0144] FIG6 shows a more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment. The device may include: a processor 601, a memory 602, an input / output interface 603, a communication interface 604, and a bus 605. The processor 601, the memory 602, the input / output interface 603, and the communication interface 604 are communicatively connected to each other within the device via the bus 605.
[0145] The processor 601 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0146] The memory 602 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 602 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 602 and called and executed by the processor 601.
[0147] The input / output interface 603 is used to connect to input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0148] The communication interface 604 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WIFI, Bluetooth, etc.).
[0149] The bus 605 comprises a pathway for transmitting information between the various components of the device (eg, the processor 601 , the memory 602 , the input / output interface 603 , and the communication interface 604 ).
[0150] It should be noted that although the above device only shows the processor 601, the memory 602, the input / output interface 603, the communication interface 604, and the bus 605, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0151] The electronic device of the above embodiment is used to implement the corresponding formula editing and processing method or formula grammar calculation method in any of the above embodiments, and has the beneficial effects of the corresponding formula editing and processing method or formula grammar calculation method embodiment, which will not be repeated here.
[0152] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in any of the above embodiments.
[0153] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0154] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0155] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. Within the scope of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0156] In addition, for simplicity of description and discussion, and in order not to make the embodiment of the application difficult to understand, the known power supply / ground connection with integrated circuit (IC) chip and other components may or may not be shown in the accompanying drawings provided. In addition, the device can be shown in the form of a block diagram to avoid making the embodiment of the application difficult to understand, and this also takes into account the following fact, that is, the details of the embodiment of these block diagram devices are highly dependent on the platform to be implemented in the embodiment of the application (that is, these details should be fully within the scope of understanding of those skilled in the art). When specific details (for example, circuit) are set forth to describe exemplary embodiments of the application, it will be apparent to those skilled in the art that the embodiment of the application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0157] Although the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may utilize the embodiments discussed.
[0158] The embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of this application.
Claims
1. A formula editing method, characterized in that: The method comprises: Receiving input formula parameter information in a formula editing area of a database table, and generating a formula syntax calculation instruction corresponding to the formula parameter information; Sending the formula grammar calculation instruction to the server, so that the server performs formula grammar calculation according to the initial formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information; Receive the at least one formula grammar sent by the server, and display the formula grammar.
2. The method according to claim 1, characterized in that The generating of a formula grammar calculation instruction corresponding to the formula parameter information includes: Acquire formula parameter information in the formula editing area through the formula grammar function, and determine the formula grammar function information corresponding to the formula parameter information; The formula grammar calculation instruction is generated according to the formula parameter information and the formula grammar function information.
3. The method according to claim 2, characterized in that In response to determining that the formula parameter information is a function to be completed; The generating of a formula grammar calculation instruction corresponding to the formula parameter information includes: Obtaining function completion information corresponding to the function to be completed; The formula grammar calculation instruction is generated according to the function to be completed and the function completion information.
4. The method according to claim 2, characterized in that In response to determining that the formula parameter information is each operation auxiliary symbol; The generating of a formula grammar calculation instruction corresponding to the formula parameter information includes: receiving a target operation auxiliary symbol selection instruction, and acquiring operation auxiliary symbol matching information corresponding to the target operation auxiliary symbol, wherein the target operation auxiliary symbol is any one of the operation auxiliary symbols; Obtaining the position of the target operation auxiliary symbol; The formula syntax calculation instruction is generated according to the target operation auxiliary symbol, the position of the target operation auxiliary symbol and the operation auxiliary symbol matching information.
5. The method according to claim 1, wherein Receiving multiple formula grammars sent by the server; After displaying the formula syntax, it also includes: receiving a target formula grammar selection instruction, wherein the target formula grammar is any one of the multiple formula grammars; The target formula grammar is displayed, and other formula grammars except the target formula grammar are hidden.
6. A formula grammar calculation method, characterized in that: include: Receive formula syntax calculation instructions sent by the client; Formula grammar calculation is performed according to the formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information, and the at least one formula grammar is sent to the client.
7. The method according to claim 6, characterized in that In response to determining that the formula parameter information is a function to be completed; The performing formula grammar calculation according to the formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information includes: A function corresponding to the function to be completed is selected from a database pre-stored in the server, and at least one completion function corresponding to the function to be completed is obtained, and the completion function is used as the formula grammar.
8. The method according to claim 6, characterized in that In response to determining that the formula parameter information is various operation auxiliary symbols, the formula syntax calculation instruction includes at least one of the following: a target operation auxiliary symbol and a position of the target operation auxiliary symbol, wherein the target operation auxiliary symbol is any one of the various operation auxiliary symbols; The performing formula grammar calculation according to the formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information includes: Performing operation auxiliary symbol matching on the target operation auxiliary symbol and each operation auxiliary symbol according to the target operation auxiliary symbol and the position of the target auxiliary symbol to obtain at least one matching operation auxiliary symbol corresponding to the target operation auxiliary symbol; The position of the matching operation auxiliary symbol is obtained, and the matching operation auxiliary symbol and the position of the matching operation auxiliary symbol are used as the formula grammar.
9. A formula editing and processing device, characterized in that: include: An instruction generation module is configured to receive formula parameter information input in a formula editing area of a database table and generate a formula syntax calculation instruction corresponding to the formula parameter information; The instruction sending module is configured to send the formula grammar calculation instruction to the server so that the The server performs formula grammar calculation according to the initial formula grammar calculation instruction to obtain at least one formula grammar corresponding to the formula parameter information; The display module is configured to receive the at least one formula grammar sent by the server and display the formula grammar.
10. A formula grammar calculation device, characterized in that: include: An instruction receiving module is configured to receive a formula grammar calculation instruction sent by a client; The formula grammar calculation module is configured to perform formula grammar calculation according to the formula grammar calculation instruction, obtain at least one formula grammar corresponding to the formula parameter information, and send the at least one formula grammar to the client.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.