Spreadsheet device, spreadsheet method, spreadsheet program, and add-in program

JPWO2025158602A5Active Publication Date: 2025-12-23BGBEE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024523169
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2025-12-23
Estimated Expiration
2044-01-25

AI Technical Summary

Technical Problem

Existing spreadsheet devices require frequent server queries for recalculations, leading to increased communication traffic and potential costs.

Method used

A spreadsheet device that caches query information and answers, allowing retrieval from local storage during recalculations instead of re-sending queries to the server.

Benefits of technology

Reduces communication traffic and associated costs by storing query information and answers locally, enhancing efficiency and reducing operational expenses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000027_0000
    Figure 00000027_0000
  • Figure 00000027_0001
    Figure 00000027_0001
  • Figure 00000027_0002
    Figure 00000027_0002
Patent Text Reader

Abstract

When a spreadsheet device (100) executes a recalculation for a cell, if query information is stored in a cache sheet, instead of transmitting the query to an external server to obtain an answer, the spreadsheet device obtains the answer stored in the cache sheet in association with the query information as a value to be stored in the cell.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a spreadsheet device, a spreadsheet method, a spreadsheet program, and an add-in program. [Background technology]

[0002] 2. Description of the Related Art Conventionally, devices for performing spreadsheet calculations have been known (for example, Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Publication No. 08-235266 Summary of the Invention [Problem to be solved by the invention]

[0004] However, in the device of Patent Document 1, if a formula using a value obtained by querying a server is set in a cell in a table, a query is made to the server every time the cell is recalculated. Therefore, the device of Patent Document 1 has a problem in that it cannot suppress an increase in communication traffic.

[0005] The present invention has been made in consideration of the above-mentioned points, and an object of the present invention is to provide a spreadsheet device, a spreadsheet method, a spreadsheet program, and an add-in program that are capable of suppressing an increase in communication volume. [Means for solving the problem]

[0006] In order to achieve the above object, a spreadsheet device according to a first aspect of the present invention comprises: A spreadsheet device for processing work sheets and cash sheets, (1) when a formula is set in a cell in the worksheet that calls a query function that references an input value entered in another cell in the worksheet, (a) generating a query based on the entered values; (b) sending the query to an external server; (c) obtaining an answer from the external server; (d) storing, in the cache sheet, query information representing the query and the answer in association with each other; and (e) storing the obtained answer as a value of the cell; (2) when performing a recalculation on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, obtain the answer stored in the cache sheet in association with the query information as a value to be stored in the cell. It is characterized by:

[0007] In order to achieve the above object, an add-in program according to a second aspect of the present invention comprises: A computer of a spreadsheet device that includes a communication unit and executes a spreadsheet program, When a query based on a query argument obtained from the spreadsheet program or query information representing the query and an answer from a server to the query are associated and stored in a spreadsheet, (1) suppressing the communication unit from transmitting the query to the server; (2) obtaining the answer associated with the query or the query information from the spreadsheet; and (3) outputting the obtained answer as a return value to the spreadsheet program; To function as an inquiry section, It is characterized by: Effect of the Invention

[0008] According to the spreadsheet device, the spreadsheet method, the spreadsheet program, and the add-in program of the present invention, an increase in the amount of communication traffic can be suppressed. [Brief description of the drawings]

[0009] [Figure 1] 1 is a system configuration diagram illustrating an example of a configuration of a spreadsheet system according to an embodiment of the present invention. [Diagram 2] FIG. 1 is a hardware configuration diagram illustrating an example of a configuration of a spreadsheet device. [Diagram 3] FIG. 2 is a functional block diagram illustrating an example of functions of a spreadsheet device. [Figure 4] FIG. 2 is a diagram illustrating an example of a worksheet to be processed by the spreadsheet device. [Diagram 5] FIG. 13 is a diagram illustrating an example of a cash sheet processed by the spreadsheet apparatus according to the embodiment. [Figure 6] 1 is a flowchart illustrating an example of a spreadsheet process executed by a spreadsheet device. [Figure 7] 11 is a flowchart illustrating an example of a query process executed by the spreadsheet apparatus according to the embodiment. [Figure 8] FIG. 23 is a diagram illustrating an example of a cash sheet processed by the spreadsheet device according to the seventh modified example of the embodiment. [Figure 9] 13 is a flowchart illustrating an example of a query process executed by a spreadsheet device according to a ninth modified example of the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] <Example> Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings. A spreadsheet system 1 according to the embodiment of the present invention includes a spreadsheet device 100 as shown in Fig. 1, which executes a spreadsheet program to which an add-in program has been added. In this embodiment, the following description will be given assuming that the spreadsheet program is Excel, but the present invention is not limited to this.

[0011] The spreadsheet device 100 is connected to the server 900 via a network NT, which is, for example, the Internet, a local area network (LAN), or a wide area network (WAN). The server 900 is not included in the spreadsheet system 1 and is located outside the spreadsheet system 1, and is therefore also referred to as an external server. The server 900 is equipped with an interactive generation AI (Artificial Intelligence), which is, for example, a generative pre-trained transformer (ChatGPT). When the server 900 receives a query from the spreadsheet device 100, the server 900 generates an answer to the received query using the generation AI, and returns the generated answer to the spreadsheet device 100. For this reason, the server 900 is also referred to as an AI server.

[0012] 2, the spreadsheet device 100 includes one or more of a CPU (Central Processing Unit) 101, a RAM (Random Access Memory) 102, a ROM (Read Only Memory) 103a, a storage device 103b, a data communication circuit 104a, a video card 105a, a display device 105b, and an input device 105c. The CPU 101 executes a program stored in the ROM 103a or the storage device 103b. The RAM 102 temporarily stores data to be processed when the program is executed. The storage device 103b is, for example, a flash memory, which is a semiconductor memory, or a hard disk, and stores various types of data.

[0013] When the network NT is the Internet, the data communication circuit 104a of the spreadsheet device 100 performs data communication using radio waves with a base station (not shown) in accordance with a communication standard such as LTE (Long Term Evolution) and 5G (5th Generation). As a result, the data communication circuit 104a performs data communication with the server 900 via the network NT connected to the base station. On the other hand, when the network NT is a LAN or WAN, the data communication circuit 104a performs communication using radio waves with an access point (not shown) connected to the network NT in accordance with a communication standard such as "11ac".

[0014] The video card 105a of the spreadsheet device 100 outputs an image signal based on a signal output from the CPU 101. The display device 105b is, for example, a liquid crystal display (LCD), a plasma display panel (PDP), or an electroluminescence (EL) display, and displays an image according to the image signal output from the video card 105a. The input device 105c is, for example, at least one of a keyboard, a mouse, or a touch pad, and inputs a signal according to a user's operation.

[0015] When a user performs an operation on the input device 105c of the spreadsheet device 100 to start execution of the spreadsheet program, the input device 105c outputs a signal corresponding to the operation. When the signal is output from the input device 105c, the CPU 101 executes the spreadsheet program stored in the storage device 103b. In this embodiment, an add-in program is added to the spreadsheet program, so that the CPU 101 functions as a spreadsheet unit 130 as shown in FIG. 3 by executing both the spreadsheet program itself and the add-in program. The spreadsheet unit 130 includes a calculation unit 110 that is realized by the CPU 101 executing the spreadsheet program itself, and a query unit 120 that is realized by the CPU 101 executing the add-in program. The storage device 103b also functions as an information storage unit 190.

[0016] Next, when an operation is performed on the input device 105c to select an electronic file stored in advance in the information storage unit 190 and open a workbook (workbook or simply called a book) represented by the selected electronic file, the CPU 101 reads out the selected electronic file. Next, the CPU 101 opens the book represented by the read out electronic file and displays the opened book on the display device 105b.

[0017] In this embodiment, for simplicity, the following description will be given using as a specific example a case where an existing workbook that already has one spreadsheet (called a spreadsheet) is opened, but a new workbook may also be generated. A spreadsheet has multiple rows and multiple columns, each row has multiple cells arranged in the scanning direction, and each column has multiple cells arranged in the sub-scanning direction. In this embodiment, the following description will be given using as a specific example a case where the one spreadsheet in the existing workbook to be opened is a worksheet (also called a working sheet), not a cash sheet.

[0018] A worksheet is a spreadsheet in which values ​​are entered or formulas are set in cells according to user operations, and a cache sheet is a spreadsheet in which values ​​used to calculate formulas set in worksheet cells are entered into cells. For ease of explanation, hereinafter, entering a value into a cell and setting a formula in a cell are collectively referred to as editing a cell. Also, a cell in a worksheet is referred to as a work cell, and a cell in a cache sheet is referred to as a cache cell.

[0019] In this embodiment, the following description will be given by taking as a specific example a case where a character string "There is an opportunity to learn a skill" representing a response to a questionnaire as shown in Fig. 4 has already been input as a value in a cell in row 2, column A of one worksheet in an existing book. In addition, in this embodiment, the following description will be given by taking as a specific example a case where, after an existing book is opened, a formula that calls a query function that refers to a value (called an input value) input in a cell in row 2, column A of the same worksheet (called workcell 2A) is set by a user in a cell in row 2, column B of the worksheet (called workcell 2B). The formula that calls a query function means a formula that includes a query function, and the query function means a function that (1) receives an argument (called a query argument) and (2) returns an answer from the server 900 to a query generated based on the query argument.

[0020] In this embodiment, the query function is a function that takes as query arguments (1) (a) the input value to be referenced, and (b) (i) a character string included in a formula and (ii) a character string representing a plurality of classifications, and (2) returns an answer from the server 900 to a query inquiring which of the plurality of classifications the input value should be classified into. In addition, in this embodiment, a specific example will be given in which the plurality of classifications include "salary", "career planning", and "welfare". For these reasons, the query function called by the formula of the work cell 2B returns an answer representing the classification to which the server 900 has responded as the classification to which the answer to the questionnaire represented by the input value of the work cell 2A should be classified, among the classifications "salary", "career planning", and "welfare".

[0021] After the workbook is opened according to the user's operation, when the user performs an operation on the input device 105c of the spreadsheet device 100 to input a formula into the work cell 2B, the input device 105c outputs a signal corresponding to the operation. When the signal is output, the CPU 101 edits the work cell 2B according to the operation. After that, the CPU 101 acquires information representing the event that has occurred, for example, from an event handler. Next, when the CPU 101 determines that the event represented by the acquired information (called an acquired event) is an event that the cell has been edited (called an edit event), it performs calculations of the cells in the workbook. Performing calculations of the cells means calculating the formula set in the cells. In addition, calculating the formula set in the cells includes the first calculation and the second and subsequent calculations (called recalculation), counting from when the formula set in the cell was set or when the formula set in the cell was changed.

[0022] For this purpose, the CPU 101 of the spreadsheet device 100 executes a spreadsheet process as shown in Fig. 6, the processing contents of which are described in the spreadsheet program itself. When the execution of the spreadsheet process is started, the calculation unit 110 judges whether or not the subsequent processing including the following step S03 has been performed for all cells of all spreadsheets in the workbook (step S01). At this time, the calculation unit 110 judges that the processing has not been performed for all cells (step S01; No), and selects one of the unprocessed cells as the processing target (step S02). In this embodiment, the following description will first be given by taking as a concrete example a case in which the work cell 2A is the processing target.

[0023] Next, the calculation unit 110 of the spreadsheet device 100 determines that the work cell 2A to be processed contains a character string representing a questionnaire answer and that no formula has been set (step S03; No), and repeats the above process from step S01. Next, the calculation unit 110 executes the processes of steps S01 and S02 again to select one of the multiple cells in the book that is different from the work cell 2A that has already been selected as the processing target as the processing target. In this embodiment, the following description will be given using a specific example in which the work cell 2B is selected as the processing target.

[0024] After step S02 is executed, the calculation unit 110 of the spreadsheet device 100 determines that a formula is set in the work cell 2B to be processed (step S03; Yes). Next, the calculation unit 110 determines that the formula in the work cell 2B calls a query function (step S04; Yes). Then, the CPU 101 functioning as the calculation unit 110 reads out from the information storage unit 190 an add-in program for the spreadsheet program that is associated in advance with information representing the name of the query function, among one or more add-in programs added to the spreadsheet program. Next, the CPU 101 executes the read add-in program to execute a query process as shown in FIG. 7 (step S05). As a result, the CPU 101 functions as a query unit 120 as shown in FIG. 3.

[0025] When execution of the query process begins, the query unit 120 of the spreadsheet device 100 obtains (1) the entered value of the work cell 2A referenced by the work cell 2B, and (2) a string representing multiple classifications contained in the formula of the work cell 2B, as query arguments from the spreadsheet program itself (step S11).

[0026] Next, the inquiry unit 120 of the spreadsheet device 100 determines whether the workbook has a cache sheet. In this embodiment, the name of the cache sheet includes a predetermined character string (called a cache name string) that indicates that it is a cache sheet, but the name of the worksheet does not include the cache name string. For this reason, the inquiry unit 120 first acquires the cache name string from binary data that represents an add-in program, for example. Next, the inquiry unit 120 acquires the names of all spreadsheets that the workbook has, and determines whether or not there is a name that includes the cache name string among the acquired names, thereby determining whether or not the workbook has a cache sheet. In this embodiment, since there is no name that includes the cache name string, the inquiry unit 120 determines that the workbook does not have a cache sheet (step S12; No).

[0027] After that, the query unit 120 of the spreadsheet device 100 generates a new cash sheet in the book (step S13). In this embodiment, the following description will be given by taking as a concrete example a case where no value is input and no formula is set in the cell of the new cash sheet.

[0028] After generating the cache sheet, the query unit 120 of the spreadsheet device 100 determines whether or not information (called query information) representing a query generated based on the query arguments is stored in the generated cache sheet (step S14). Storing the query information in the cache sheet means that the query information is saved in the cache sheet, and saving the query information in the cache sheet means that the query information is input as a value in a cell of the cache sheet.

[0029] In this embodiment, a query is (1) data transmitted to the server 900, and (2) data including (a) information representing the URL (Uniform Resource Locator) of the server 900, and (b) text data. In this embodiment, the following description will be given by taking as a specific example a case where the text data is data representing text (referred to as structured text) structured according to a data format of JSON (JavaScript Object Notation). However, the text represented by the text data may be unstructured text, or may be text structured according to a format other than the JSON format.

[0030] The text represented by the text data includes (1) a character string generated based on the query argument, and (2) a character string representing the query to the server 900. Here, the query argument is a character string representing the input value of the work cell 2A, "There is an opportunity to learn skills," and a plurality of classifications, "salary," "career planning," and "welfare." For this reason, in this embodiment, the following description will be given by taking as a specific example a case in which the character string representing the query generated based on the query argument includes a character string representing the question, "Which of the following, "salary," "career planning," and "welfare," can classify the answer, "There is an opportunity to learn skills?" In addition, in this embodiment, the information representing the query is information for identifying the query, and the information for identifying the query is a hash value of the text data included in the query, by taking as a specific example a case in which the information for identifying the query is a hash value of the text data included in the query. However, the query information is not limited to a hash value, and may be any information as long as it is information for identifying the query.

[0031] In step S14, query unit 120 of spreadsheet device 100 generates structured text including a character string representing the content of a query to server 900, based on (1) the input value of work cell 2A and (2) character strings representing multiple classifications acquired as query arguments. Next, query unit 120 generates query information by calculating a hash value of the generated structured text. After that, query unit 120 attempts to acquire the generated query information from the cache sheet by searching the cache sheet based on the generated query information. Next, query unit 120 determines that the query information is not stored in the cache sheet because the query information is not acquired (step S14; No).

[0032] Next, the query unit 120 of the spreadsheet device 100 acquires information representing the URL of the server 900 from, for example, binary data representing an add-in program. Then, the query unit 120 generates a query including information representing the acquired URL and text data representing the generated structured text (step S15). Then, the query unit 120 outputs the generated query to the data communication circuit 104a of FIG. 2, and the data communication circuit 104a transmits the query to the server 900. In this manner, the query unit 120 controls the data communication circuit 104a to transmit the query to the server 900 (step S16). Then, when the data communication circuit 104a receives an answer to the query from the server 900, the query unit 120 acquires the answer from the data communication circuit 104a (step S17). In this embodiment, the following description will be given by taking as a specific example a case in which a character string representing a classification "career design" is acquired as an answer.

[0033] Thereafter, the query unit 120 of the spreadsheet device 100 associates the query information with the answer "carrier design" and stores them in the cache sheet (step S18). To this end, the query unit 120 inputs a cache value, which is the query information, as a value into the cache cell in row 3, column A shown in FIG. 5. The query unit 120 also inputs the answer "carrier design" as a value into the cache cell in row 3, column B. Thereafter, the query unit 120 of the spreadsheet device 100 outputs the answer "carrier design" to the spreadsheet program itself as a return value of the query function (step S19), and then ends the execution of the query process.

[0034] In step S05 of FIG. 6, after the query process is executed, the calculation unit 110 of the spreadsheet device 100 acquires the answer "career design" from the add-in program as a return value of the query function. Next, the calculation unit 110 uses the acquired answer to calculate the formula set in the work cell 2B (step S06). In this embodiment, since a formula with the return value of the query function as a calculation result is set in the work cell 2B, the calculation unit 110 stores the answer "career design" acquired as a return value in the work cell 2B as the value of the work cell 2B (step S07). Storing the answer "career design" in the cell as the cell value means changing or maintaining the calculation result of the formula displayed in the cell to the character string "career design" while maintaining the formula set in the cell. In this embodiment, the answer output as a return value is stored in the work cell 2B as a value, so outputting as a return value is also called outputting as a cell value.

[0035] After the answer "career design" is stored as a value in the work cell 2B, the calculation unit 110 of the spreadsheet device 100 returns to step S01 and repeats the execution of the processes from step S01 to step S03. As a result, the calculation unit 110 processes cells other than the work cells 2A and 2B in order among the multiple cells in the workbook, and determines that no formula is set. The reason for this determination is that the cells other than the work cells 2A and 2B (1) have not yet been edited, so no value has been input and no formula has been set, or (2) query information has been input as a value, but no formula has been set. After that, the calculation unit 110 determines that all cells have been processed (step S01; Yes), and ends the execution of the spreadsheet process.

[0036] Next, we will explain the case where the string "The employee benefits are insufficient", which represents a response to a questionnaire, is entered as a value into the work cell in row 3, column A (referred to as work cell 3A) shown in Figure 4.

[0037] When an operation for inputting a character string into the work cell 3A is performed, the CPU 101 edits the work cell 3A according to the operation, and executes the spreadsheet process shown in Fig. 6 for the second time, counting from when the book was opened. Next, the calculation unit 110 of the spreadsheet device 100 executes the processes of steps S01 to S03, making the work cell 2A the processing target, and determines that no formula is set in the work cell 2A. After that, the calculation unit 110 returns to step S01, and executes the processes of steps S01 to S03 again, making the work cell 2B the processing target, and determines that a formula is set in the work cell 2B (step S03; Yes). Next, the calculation unit 110 executes the processes of steps S04 and S05, determining that the formula in the work cell 2B calls a query function, and executes the query process shown in Fig. 7 for the second time, counting from when the book was opened.

[0038] After that, the query unit 120 of the spreadsheet device 100 executes the process of step S11 and determines that among the names of all spreadsheets in the workbook, there is a name that includes the cache name character string. Therefore, the query unit 120 determines that the workbook has a cache sheet (step S12; Yes). Next, the query unit 120 determines whether the query information is stored in the cache sheet (step S14) without executing the process of step S13 to generate a new cache sheet. At this time, the query unit 120 attempts to acquire the query information from the cache sheet, and acquires the query information stored in the cache sheet at the time of the first execution of the query process. Therefore, the query unit 120 determines that the query information is stored in the cache sheet (step S14; Yes).

[0039] Next, the query unit 120 of the spreadsheet device 100 does not execute the processes of steps S15 to S18, and acquires the answer "carrier design" associated with the query information from the cache sheet (step S20). That is, instead of generating a query, controlling the data communication circuit 104a to transmit the query, and acquiring the answer from the data communication circuit 104a, the query unit 120 acquires the answer from the cache sheet. After that, the query unit 120 outputs the answer "carrier design" acquired from the cache sheet to the spreadsheet program as a return value of the query function (step S19), and then ends the execution of the query process.

[0040] 6, after the query process is executed for the second time, the calculation unit 110 of the spreadsheet device 100 executes the processes of steps S06 and S07 to store the answer "carrier design" obtained from the cache sheet as a value in the work cell 2B. In this embodiment, the answer obtained from the cache sheet is output as a return value, and the answer output as the return value is stored as a value in the work cell 2B, so obtaining the answer from the cache sheet is also referred to as obtaining the answer as a value to be stored in the work cell 2B.

[0041] After storing the answer as a value in the work cell 2B, the calculation unit 110 of the spreadsheet device 100 returns to step S01 and repeats the processes from step S01 to step S03. As a result, the calculation unit 110 processes cells other than the work cells 2A and 2B in order among the multiple cells in the workbook, and determines that no formula is set in the cells. After that, the calculation unit 110 determines that the processes have been performed on all the cells (step S01; Yes), and ends the execution of the spreadsheet process.

[0042] Finally, the following description will be given by taking as a specific example a case where an operation to instruct saving of a workbook is performed on the input device 105c of the spreadsheet device 100. When the input device 105c outputs a signal corresponding to the operation, the calculation unit 110 of the spreadsheet device 100 rewrites the electronic file stored in the information storage unit 190 to an electronic file representing the edited workbook. As a result, the calculation unit 110 saves, in the same electronic file, the worksheet edited by the spreadsheet program and the cache sheet generated by the add-in program and storing the query information.

[0043] According to these configurations, when query information is stored in a cache sheet, the spreadsheet device 100 acquires the answer "carrier design" stored in the cache sheet in association with the query information as a value to be stored in the work cell 2B, instead of transmitting the query to the server 900 to acquire the answer. Therefore, the spreadsheet device 100 can suppress an increase in the amount of communication. Here, when the usage fee for the server 900 is determined according to at least one of the amount of communication between the server 900 and the spreadsheet device 100 or the amount of calculation of the server 900 required to generate the answer, the spreadsheet device 100 can suppress an increase in the usage fee for the server 900.

[0044] In addition, since the query information and the answer are stored in the cache sheet, a cache server operated by a third party can be eliminated. In other words, it is not necessary to store the query information and the answer in a cache server operated by a third party. Therefore, it is not necessary to pay the usage fee for the cache server operated by a third party, and an increase in the operating cost of the spreadsheet device 100 can be suppressed.

[0045] Furthermore, the spreadsheet device 100 can eliminate the need to store query information and answers in a third-party cache server, thereby suppressing information leakage. That is, for example, it is possible to prevent the contents of a query to the server 900 from being leaked from a third-party cache server. Furthermore, since a cache server operated by the company is no longer necessary, it is possible to suppress an increase in operational costs. The company includes, for example, a natural person or legal entity that operates the spreadsheet system 1, but is not limited to this.

[0046] Furthermore, according to these configurations, when a cash sheet does not exist in a workbook, the query unit 120 of the spreadsheet device 100 generates a cash sheet in the workbook and stores the query information and the answer in the generated cash sheet. Furthermore, the calculation unit 110 of the spreadsheet device 100 saves the worksheet and the cash sheet in the same electronic file. Therefore, the user can easily compare the query information and the answer stored in the cash sheet with the values ​​displayed in the worksheet.

[0047] <Modification 1 of the embodiment> In the embodiment, a case where one piece of query information is stored in the cache sheet has been described, but multiple pieces of query information may be stored in the cache sheet. In this case, the query unit 120 may acquire one or more pieces of query information already stored in the cache sheet, and then sort the one piece of query information to be newly stored in the cache sheet and the acquired one or more pieces of query information according to a predetermined rule including ascending order or descending order. The algorithm used for sorting may be, for example, a known sorting algorithm including quick sort. Thereafter, the query unit 120 may delete one or more pieces of query information already stored in the cache sheet, and then store the sorted pieces of query information in the cache sheet in order according to the sorting result. In addition, the query unit 120 may search for desired query information from the multiple pieces of query information stored in the cache sheet using a known search algorithm including binary search. According to this configuration, the spreadsheet device 100 can suppress an increase in the amount of calculation required to search for query information.

[0048] <Modification 2 of the embodiment> In the embodiment, the query function is described as taking an input value representing a questionnaire answer as a query argument. Also, in the embodiment, the query function is described as a function that returns an answer from the server 900 in response to a query inquiring whether the answer represented by the query argument is classified into a plurality of categories including "career planning". However, the query function may be a function that takes an input value representing a questionnaire answer as a query argument and returns an answer from the server 900 in response to a query inquiring whether the answer represented by the query argument is classified into a plurality of categories including "positive content", "negative content", and "neutral content" that is neither positive nor negative.

[0049] Furthermore, the query argument including the input value may be any data including a character, a character string, or a numerical value, and the query content represented by the query and the answer of the server 900 represented by the answer may be any content. For this reason, the query function may be, for example, a function that takes a character string to be translated as a query argument, and returns an answer from the server 900 to a query inquiring about a result of translating the character string to be translated into a language specified in advance. Furthermore, the query function may be a function that takes a character string to be translated and information indicating a language specified by a user as query arguments, and returns an answer from the server 900 to a query inquiring about a result of translating the character string to be translated into a language specified by the user.

[0050] <Modification 3 of the embodiment> In the embodiment, it has been explained that when the CPU 101 of the spreadsheet device 100 determines that the obtained event is an edit event, it executes the spreadsheet process of Fig. 6. However, when the CPU 101 determines that the obtained event is at least one of (1) an edit event, (2) a delete event, (3) a calculation instruction operation event, (4) a save event, (5) an open event, or (6) a print event, it may also perform calculations on the cells by executing the spreadsheet process.

[0051] The edit event is an event that a cell of a worksheet including workcell 2A, 2B, or 3A, or a cell of a cashsheet is edited, and the delete event is an event that a row or column of a worksheet or a cashsheet is deleted. The calculation instruction operation event is an event that an operation is performed to instruct the calculation of a formula set in a cell. The operation to instruct the calculation includes, for example, the operation of pressing the "F9" key and the operation of pressing the "Shift" key and the "F9" key simultaneously. The formula to be instructed to be calculated includes formulas set in all cells in the active spreadsheet or in all spreadsheets included in the workbook, or in cells included in a range selected by the user.

[0052] A save event is an event in which a book is saved, and occurs between a timing a predetermined time before the save timing, which is the timing when saving of the book starts, and the save timing. An open event is an event in which a book is opened, and occurs between an open timing, which is the timing when opening of the book is completed, and a timing a predetermined time after the open timing. A print event is an event in which at least one spreadsheet in a book is printed, and occurs between a print timing, which is the timing when printing of at least one spreadsheet starts, and a timing a predetermined time before the print timing.

[0053] <Modification 4 of the embodiment> In the embodiment, a specific example was given in which the character string "You will have an opportunity to learn a skill" is input as a value into the work cell 2A in Fig. 4, and a formula referencing the input value of the work cell 2A is set in the work cell 2B. However, in this modified example, the following description will be given in which a specific example is given in which the character string "You will have an opportunity to learn a skill" is input as a value into one or more work cells (referred to as one or more input value cells) including the work cell 2A. Also, in this modified example, the following description will be given in which a specific example is given in which a formula is set in multiple work cells (referred to as multiple formula cells) that are different from the one or more input value cells and that include the work cell 2B, and the formula is a formula that calls a query function that refers to the input value of the one or more input value cells.

[0054] In addition, in this modified example, a case will be described below as a specific example in which a user who visually recognizes the character string "Career Design" stored in the cache cell at row 3, column B shown in Fig. 5 (referred to as cache cell 3B) performs an operation on the input device 105c of the spreadsheet device 100 to change the character string stored in cache cell 3B to "Employee Benefits." At this time, the CPU 101 of the spreadsheet device 100 edits the cache cell 3B based on a signal output from the input device 105c. Thereafter, the CPU 101 acquires information representing an event, and when it is determined that the acquired event represented by the acquired information is an edit event, it executes the spreadsheet process of Fig. 6 and the query process of Fig. 7.

[0055] At this time, the query unit 120 of the spreadsheet device 100 executes steps S20 and S19 in Fig. 7 in order to suppress execution of control for transmitting a query based on the input values ​​of one or more input value cells to the server 900. The query unit 120 also acquires the changed answer "welfare benefits" stored in the cache cell 3B, and outputs the acquired changed answer "welfare benefits". After that, the calculation unit 110 executes steps S06 and S07 in Fig. 6 in order to store the output changed answer "welfare benefits" as a value in multiple formula cells.

[0056] According to these configurations, when the spreadsheet device 100 executes recalculation for a plurality of formula cells after changing the AI's answer "career planning" stored in the cache cell 3B to "welfare benefits" according to the user's operation, the spreadsheet device 100 stores the changed answer "welfare benefits" stored in the cache cell 3B as a value in the plurality of formula cells. Therefore, for example, when the AI's answer differs from the answer that the user considers correct, the user can change the answer stored in the cache sheet to change the values ​​stored in the plurality of formula cells of the worksheet to the answer that the user considers correct, thereby improving user convenience.

[0057] <Modification 5 of the embodiment> In the embodiment, the character string representing the inquiry content included in the query includes a character string representing a question. However, the character string representing the inquiry content is not limited to this, and may include (a) a character string representing a question, as well as (b) a character string that relaxes a restriction imposed on an answer by a question. For this purpose, the query unit 120 of the spreadsheet device 100 may generate a structured text including a character string representing the inquiry content in step S14 of FIG. 7, and then, for example, obtain a character string that relaxes the restriction from binary data representing an add-in program, and add the obtained character string to the generated structured text.

[0058] In the embodiment, a specific example is given of a character string representing a question, "To which of the following categories can you classify the answer "There is an opportunity to learn skills": "Salary," "Career planning," and "Employee benefits." Therefore, the restriction imposed on the answer by the question is that the answer must be a character string representing that the answer "There is an opportunity to learn skills" is classified into one of the multiple categories "Salary," "Career planning," and "Employee benefits."

[0059] For this reason, in this modified example, the string that relaxes the restrictions is (1) a string that includes a string (called a non-classified string) that indicates that the answer to the questionnaire is not classified into any of multiple categories, and (2) a string that relaxes the restrictions imposed on answers, such that a non-classified string is used as the answer when the answer to the questionnaire is not classified into any of multiple categories. This will be explained below as a specific example.

[0060] An answer that is not classified into any of the multiple categories means at least one of the following: (1) it is impossible or inappropriate to classify the answer into any of the multiple categories, (2) it is more appropriate to classify the answer into a category other than any of the multiple categories rather than into any of the multiple categories, or (3) it is impossible or inappropriate to classify the answer. An answer that is impossible or inappropriate to classify includes, for example, an answer that has no semantic relationship to any of the multiple categories, and an answer that has no semantic relationship to any of the multiple categories includes, for example, the answers "Nothing in particular" and "I have nothing in particular to say."

[0061] In addition, in this modified example, the non-classified character string will be described by taking a specific example of the character string "unclassifiable". For this reason, the following description will be given by taking a specific example of the character string for which the restriction is relaxed, "If you cannot classify, please answer 'unclassifiable'". However, the non-classified character string is not limited to this, and may be the character string "not applicable" or "not applicable", or "no classification" or "no classification". In other words, these character strings for which the restriction is relaxed relax the restriction that the answer must be a character string indicating that the answer to the questionnaire is classified into one of a plurality of classifications, to the restriction that the answer must be (1) one of a plurality of classifications, or (2) the character string (a) "unclassifiable", (b) "not applicable", (c) "not applicable", (d) "no classification", or (e) "no classification".

[0062] According to these configurations, even if a user who is not familiar with generating queries sets multiple categories that do not include non-categorization strings as query arguments, the spreadsheet device 100 can relax the restriction imposed on the answer from the restriction that the answer must be one of the multiple categories to the restriction that the answer must be one of the multiple categories or a non-categorization string. Therefore, when an answer is not classified into any of the multiple categories, the spreadsheet device 100 can suppress the AI ​​of the server 900 from outputting an answer that the answer is classified into any of the multiple categories. Therefore, the spreadsheet device 100 can suppress a decrease in the accuracy of the answer output by the query function.

[0063] <Modification 6 of the embodiment> In the fifth modified example of the embodiment, the character string representing the inquiry content included in the query includes (a) a character string representing the question, and (b) a character string for relaxing the restriction imposed on the answer by the question, but is not limited thereto. The character string representing the inquiry content may include (c) a character string representing a restriction imposed on the expression format of the answer (referred to as an expression restriction character string) in addition to (a) a character string representing the question, and (b) a character string for relaxing the restriction imposed on the answer by the question. For this purpose, the inquiry unit 120 of the spreadsheet device 100 may generate a structured text including a character string representing the inquiry content and a character string for relaxing the restriction in step S14 of FIG. 7, and then, for example, obtain an expression restriction character string from binary data representing an add-in program, and add the obtained character string to the generated structured text. In this modified example, the expression restriction character string is a character string that indicates a restriction that an answer must be expressed with a specified number of words, rather than with a sentence or paragraph, and the following description will be given using, as a specific example, the character string "Please answer in one word." However, the expression restriction character string is not limited to this, and may be, for example, the character string "Please answer in one word" or "Please answer in one noun."

[0064] In this case, if the acquired answer is one of the multiple categories or a non-categorised character string, the query unit 120 of the spreadsheet device 100 may determine that the answer does not violate the restriction and output the answer to the spreadsheet program. The reason for this determination is that in this modified example, each of the multiple categories and the non-categorised character string is a single word and therefore follows the restriction expressed by the expression restricted character string. In contrast, if the acquired answer is neither one of the multiple categories nor a non-categorised character string, the query unit 120 may determine that the answer violates the relaxed restriction imposed by the question or the restriction of the expression format. If the query unit 120 determines that the answer violates the restriction, it may change the answer to “uncategorised”, which is a non-categorised character string, store the changed answer in association with the query information, and output the changed answer as a return value to the spreadsheet program.

[0065] According to these configurations, when an acquired answer is expressed, for example, as a sentence or a paragraph, the query unit 120 of the spreadsheet device 100 performs an analysis including at least one of morphological analysis, syntactic analysis, semantic analysis, and contextual analysis, and can accurately restrict the expression format of the answer output by the query function as a return value with less calculation amount than when the query unit 120 changes the expression format of the answer based on the analysis result and outputs the answer. Also, according to these configurations, the spreadsheet device 100 can accurately restrict the return value output by the query function to one of multiple classifications set by the user or a non-classified character string with less calculation amount.

[0066] In this modified example, the case where the number of specified words is one, and the number of words in each of the multiple categories and the non-categorization string is one, is described as an example, but is not limited to this. The number of specified words, and the number of words in each of the multiple categories and the non-categorization string may be two or more. In addition, in this modified example, the case where the character string representing the inquiry content includes (a) a character string representing a question, (b) a character string representing a restriction imposed on the expression format of the answer, and (c) a character string that relaxes the restriction imposed on the answer by the question has been described. However, the character string representing the inquiry content may include (a) a character string representing a question, and (b) a character string representing a restriction imposed on the expression format of the answer, but may not include (c) a character string that relaxes the restriction imposed on the answer by the question.

[0067] <Seventh Modification of the Example> In the embodiment, it has been described that the query unit 120 of the spreadsheet device 100 stores the query information and the answer in a cache sheet in association with each other. However, in this modified example, as shown in FIG. 8, the query unit 120 stores the query information, the query auxiliary information, and the answer in a cache sheet in association with each other. The query auxiliary information is information that assists the user of the spreadsheet device 100 in identifying a query. In this modified example, the query auxiliary information includes information representing the name of the query function and a query argument. For this reason, in step S18 of FIG. 7, the query unit 120 acquires, for example, a character string representing the name of the query function from binary data representing an add-in program. In this modified example, the following description will be given using a specific example in which the name of the query function is "BB.CATEGORIZE".

[0068] Next, the query unit 120 of the spreadsheet device 100 inputs the cache value, which is the query information, as a value into the cache cell in row 3, column A shown in FIG. 8. After that, the query unit 120 inputs a character string representing the name of the query function "BB.CATEGORIZE" as a value into the cache cell in row 3, column B. The query unit 120 also inputs a character string representing the answer to the questionnaire "There is an opportunity to learn skills", which is the input value of the work cell 2A and is acquired as a query argument, into the cache cell in row 3, column C, as a value. Furthermore, the query unit 120 inputs a character string representing the multiple classifications "Salary", "Career Planning", and "Employee Benefits" acquired as a query argument into the cache cell in row 3, column D, as a value. The query unit 120 also inputs the answer "Career Planning" into the cache cell in row 3, column E, as a value. According to these configurations, the spreadsheet device 100 associates the query support information with the answers and stores them in the cache sheet, so that the user can easily guess or confirm the history of queries made to the server 900 by visually checking the cache sheet.

[0069] <Modification 8 of the embodiment> In the embodiment, the structured text has been described as including a character string representing the content of a query to server 900, but the structured text according to this modified example further includes arguments (called AI arguments) that are passed to the generation AI provided in server 900. In this modified example, the AI ​​arguments include, for example, at least one of (1) a model specification argument, (2) a same expression suppression argument, (3) a general expression suppression argument, or (4) a randomness control argument, but the AI ​​arguments are not limited to these.

[0070] The model specification argument is an argument that specifies a set of processing systems including trained data used by the generation AI of the server 900. The set of processing systems used by the generation AI may further include a language model used by the generation AI. The model specification argument may be, for example, the argument "model" used in ChatGPT, or may be an argument that specifies "GPT3.5" or "GPT4". The model specification argument may be an argument used to specify a set of processing systems in Google Gemini (simply referred to as Gemini), or may be an argument used in a generation AI other than ChatGPT and Gemini.

[0071] The expression suppression argument is an argument for suppressing the use of the same expression in an answer, and may be, for example, the argument "frequency_penalty" used in ChatGPT. The general expression suppression argument is an argument for suppressing the use of common expressions in an answer, and may be, for example, the argument "presence_penalty" used in ChatGPT. The randomness control argument is an argument for controlling the randomness of the answer output by the generation AI, and may be, for example, at least one of the arguments "temperature" or "TOP_P" used in ChatGPT. In addition, at least one of the expression suppression argument, the general expression suppression argument, or the randomness control argument may be an argument used in Gemini, or may be an argument used in a generation AI other than ChatGPT and Gemini.

[0072] When the AI ​​argument is included in, for example, a formula set in the work cell 2B, the query unit 120 of the spreadsheet device 100 may acquire the AI ​​argument as a query argument in addition to the input value of the work cell 2A and the character strings representing the multiple categories in step S11 of FIG. 7. When the AI ​​argument is not included in the formula and the AI ​​argument is not acquired as a query argument, the query unit 120 may acquire a default value of the AI ​​argument that is determined in advance from binary data representing an add-in program, for example, and set the acquired default value as the AI ​​argument. After that, in step S14, the query unit 120 generates a structured text including the AI ​​argument based on (1) the input value of the work cell 2A and (b) the character strings representing the multiple categories acquired as query arguments, and (2) the AI ​​argument acquired as a query argument or set to a default value. Next, the query unit 120 generates query information by calculating a hash value of the generated structured text.

[0073] Thereafter, if the query unit 120 of the spreadsheet device 100 determines that the query information is not stored in the cache sheet, then in step S15, it generates a query including an AI argument, and in step S16 performs control to transmit the generated query to the server 900. The generating AI of the server 900 generates an answer according to the AI ​​argument included in the query, and returns the generated answer to the spreadsheet device 100.

[0074] <Modification 9 of the embodiment> In the embodiment, it has been explained that the query unit 120 of the spreadsheet device 100 acquires an answer from the cache sheet with a probability of "100%" when query information is saved in the cache sheet (referred to as a saved case) by executing the query process of Fig. 7. However, in this modified example, the query unit 120 acquires an answer from the cache sheet with a cache hit rate (simply referred to as a hit rate) set based on the randomness control argument by executing the query process as shown in Fig. 9 when the query information is saved in the cache sheet.

[0075] The hit rate is the probability that the query unit 120 of the spreadsheet device 100 retrieves an answer from the cash sheet when it has been saved. In this modified example, the following description will be given by taking as a specific example a case where the randomness control argument is included in the formula set in the work cell 2B. For this reason, when starting execution of the query process shown in FIG. 9, the query unit 120 of the spreadsheet device 100 retrieves, as query arguments, from the spreadsheet program (step S11), (1) the input value of the work cell 2A referenced by the work cell 2B, and (2) (a) character strings representing multiple classifications and (b) the randomness control argument, which are included in the formula of the work cell 2B.

[0076] Next, the query unit 120 of the spreadsheet device 100 determines whether or not the query information is stored in the cache sheet after executing the process of step S12 or the processes of steps S12 and S13 described in the embodiment (step S14). At this time, if the query unit 120 determines that the query information is not stored in the cache sheet (step S14; No), it executes the processes of steps S15 to S19 and then ends the execution of the query process. The processes of steps S15 to S19 that are executed when the query information is not saved in the cache sheet (referred to as the case where the query information is not saved) are the same as the processes described in the embodiment.

[0077] In response to this, when the query unit 120 of the spreadsheet device 100 determines that the query information is stored in the cache sheet (step S14; Yes), it sets the hit rate based on the randomness control argument acquired in step S11 (step S21). In this modified example, since the randomness control argument is "temperature" used in ChatGPT, a specific example will be described in which a value equal to or greater than "0.0", which controls randomness to the lowest, and equal to or less than "2.0", which controls randomness to the highest, is set for the randomness control argument "temperature". For this reason, the query unit 120 sets the hit rate to a value calculated using, for example, the following formula (1). That is, for example, if the randomness control argument "temperature" is a value "0.0", the query unit 120 sets the hit rate to a value "100%", and if the randomness control argument "temperature" is a value "1.0" or a value "2.0", the query unit 120 sets the hit rate to a value "50%" or a value "0%". However, the method of setting the hit rate is not limited to the method using formula (1), and any method may be used as long as the hit rate is set to a lower value the more the randomness control argument "temperature" controls the randomness of the answers generated by the generation AI.

[0078] Hit rate = (1 - randomness control argument "temperature" / 2) × 100% (1)

[0079] Next, the query unit 120 of the spreadsheet device 100 generates a software random number that is equal to or greater than "0" and equal to or less than "100" (step S22), and determines whether or not to acquire an answer from the cache sheet based on the value of the generated software random number and the set hit rate value. The hit rate value means a numerical value used with a percent sign when expressing a hit rate using a percentage, and for example, if the hit rate is "50%, it means the value "50". At this time, when the query unit 120 determines that the value of the software random number is equal to or less than the hit rate value (step S23; Yes), it determines to acquire an answer from the cache sheet. Thereafter, the query unit 120 acquires an answer associated with the query information from the cache sheet (step S20), outputs the acquired answer to the spreadsheet program (step S19), and then ends the execution of the query process. In this way, the query unit 120 acquires an answer from the cache sheet at the hit rate (also called the probability of an event), and outputs the acquired answer.

[0080] In response to this, when the interrogation unit 120 of the spreadsheet device 100 determines that the value of the software random number is greater than the value of the hit rate (step S23; No), it decides to obtain a new answer from the generation AI of the server 900. Next, the interrogation unit 120 generates a query including a randomness control argument (referred to as a base randomness control argument) that is the basis for calculating the hit rate (step S15), and controls the data communication circuit 104a to transmit the generated query to the server 900 (step S16). After that, the interrogation unit 120 obtains a new answer from the data communication circuit 104a (step S17), and overwrites the answer stored in the cache sheet in association with the query information with the obtained new answer (step S18). After that, the interrogation unit 120 outputs the new answer to the spreadsheet program (step S19), and then ends the execution of the query process. That is, the inquiry unit 120 obtains a new answer from the generating AI with a probability (called the probability of the complementary event) obtained by subtracting the probability of the event, which is the hit rate, from the probability of 100%, and outputs the obtained answer.

[0081] According to these configurations, when the query has been saved, the query unit 120 of the spreadsheet device 100 (1) suppresses control to send a query to the server 900 with the probability of an event that is the hit rate, and (2) outputs an answer acquired from the cache sheet to the spreadsheet program. Furthermore, when the query has been saved, the query unit 120 (1) controls to send a query to the server 900 with the probability of a complementary event, and (2) outputs a new answer acquired from the server 900. Therefore, the query unit 120 can suppress a decrease in randomness of the answer to be output while suppressing an increase in the amount of communication between the spreadsheet device 100 and the server 900.

[0082] Furthermore, according to these configurations, the query unit 120 of the spreadsheet device 100 sets the probability of an event, which is a hit rate, lower as the randomness control argument is an argument that controls randomness more highly, and therefore sets the probability of a complementary event higher. That is, the query unit 120 sets the probability of acquiring an answer without randomness from the cash sheet lower and sets the probability of acquiring a new answer with randomness from the server 900 higher as the randomness control argument is an argument that controls randomness more highly. Therefore, the query unit 120 can suppress an increase in the difference between the randomness of the answer output by the generation AI controlled by the randomness control argument and the randomness of the answer output by the query unit 120.

[0083] <Modification 10 of the embodiment> In the ninth modified example of the embodiment, the query unit 120 of the spreadsheet device 100 is described as acquiring the randomness control argument included in the formula of the work cell 2B as a query argument from the spreadsheet program, but this is not limited to this. The randomness control argument does not have to be included in the formula set in the work cell 2B. In this case, the query unit 120 may not acquire the randomness control argument as a query argument, but may acquire a predetermined default value of the randomness control argument from binary data representing an add-in program, and set the hit rate based on the acquired default value of the randomness control argument.

[0084] Furthermore, the formula set in the work cell 2B based on the user's operation on the input device 105c of the spreadsheet device 100 may not include a randomness control argument, but may include a hit rate. In this case, the query unit 120 may not obtain the randomness control argument as a query argument, may not set a hit rate based on the randomness control argument, and may obtain the hit rate set based on the user's operation as a query argument. According to these configurations, the user can set the hit rate to the probability that the communication amount reduced by the spreadsheet device 100 will be close to the amount desired by the user, simply by operating the input device 105c of the spreadsheet device 100. According to these configurations, the user can set the hit rate to the probability that the randomness of the answer output by the query unit 120 will be close to the randomness desired by the user, simply by operating the input device 105c of the spreadsheet device 100. For these reasons, the convenience of the user is improved.

[0085] <Modification 11 of the embodiment> In the ninth modified example of the embodiment, the randomness control argument is described as "temperature" used in ChatGPT, but it may be "TOP_P". In this case, the randomness control argument "TOP_P" is set to a value equal to or greater than "0.0", which controls randomness to the lowest, and equal to or less than "1.0", which controls randomness to the highest. For this reason, the query unit 120 of the spreadsheet device 100 sets the hit rate to a value calculated using the following formula (2), for example. However, the method of setting the hit rate is not limited to the method using formula (2), and any method may be used as long as the randomness control argument "TOP_P" is an argument that controls randomness to a higher value and sets the hit rate to a lower value. In addition, the randomness control argument used to set the hit rate is not limited to the AI ​​argument used in ChatGPT, and may be, for example, an AI argument used to control randomness in Gemini, or an argument used in a generation AI other than ChatGPT and Gemini.

[0086] Hit rate = (1 - randomness control argument "TOP_P") x 100% (2)

[0087] <Modification 12 of the embodiment> In the ninth modified example of the embodiment, it was explained that the query unit 120 of the spreadsheet device 100 controls the transmission of a query including a randomness control argument (i.e., a base randomness control argument) that is the basis for calculating the hit rate, using the probability of a complementary event, when the query information is stored in the cache sheet (i.e., when it has been stored). However, in this modified example, the query unit 120 corrects the base randomness control argument to an argument that controls randomness so that the value is higher than when it is controlled by the base randomness control argument. Next, the query unit 120 controls the data communication circuit 104a to transmit a query including the corrected randomness control argument to the server 900.

[0088] In this modified example, the query unit 120 of the spreadsheet device 100 corrects the base randomness control argument "temperature" so that the corrected randomness control argument "temperature" becomes the value "2.0" that controls the randomness most highly. Such a correction is performed in order to suppress the decrease in the randomness of the answer that occurs when the answer is obtained from the cash sheet. As a specific example, the reason why the randomness of the answer is lost will be explained by taking a case where the generation AI is controlled so that the randomness of the generated answer is "50%" by the randomness control argument "temperature" of the value "1.0" and the generation AI is controlled so that the randomness of the generated answer is "100%" by the randomness control argument "temperature" of the value "2.0". In this case, if an answer is not obtained from the cash sheet, and a query including a basic randomness control argument "temperature" with a value of "1.0" with a probability of "100%" is sent to server 900 (referred to as a case in which a randomness control argument with a value of "1.0" with a probability of "100%" is used), an answer with randomness of "50%" will be obtained from the generation AI of server 900 with a probability of "100%".

[0089] In contrast, when the hit rate (i.e., the probability of an event) is set to "50%" based on the randomness control argument "temperature" of the value "1.0", an answer with randomness "0%" is obtained from the cache sheet with a probability of the event of "50%" as described in the ninth modified example of the embodiment. In this case, when a query including the basic randomness control argument "temperature" of the value "1.0" is sent to the server 900 with a probability of the complementary event of "50%, an answer with randomness "50%" is merely obtained with a probability of the complementary event of "50%". In this way, when a randomness control argument of the value "1.0" is used with a probability of "50%" and an answer is obtained from the cache sheet with a probability of "50%," the randomness of the obtained answer is "25%," so that the randomness is reduced by "25%" compared to the randomness of "50%" when a randomness control argument of the value "1.0" is used with a probability of "100%".

[0090] In contrast, in this modified example, control is performed with a complementary probability of 50% to send a new query including a randomness control argument "temperature" corrected to a value of "2.0" higher than the value "1.0" of the basic randomness control argument "temperature". As a result, an answer with randomness of "100%" is obtained with a complementary probability of 50%. In other words, in this modified example, even if an answer is obtained from a cash sheet with a probability of 50%, because a randomness control argument with a value of "2.0" is used with a probability of 50%, the randomness of the obtained answer is equal to the randomness of "50%" of the answer obtained when a randomness control argument with a value of "1.0" is used with a probability of 100%.

[0091] In this modified example, the basic randomness control argument "temperature" is corrected so that the corrected randomness control argument "temperature" has a value of "2.0", but the correction method is not limited to this. The correction method of the basic randomness control argument may be any method as long as the value of the corrected randomness control argument is greater than the value of the basic randomness control argument. In addition, in this modified example, the generation AI is controlled so that the randomness of the generated answer is "50%" by the randomness control argument "temperature" of the value "1.0", and the generation AI is controlled so that the randomness of the generated answer is "100%" by the randomness control argument "temperature" of the value "2.0", and the reason why the randomness of the answer is lost is explained. However, the relationship between the value of the randomness control argument included in the query and the randomness of the answer to the query is not limited to this, and any relationship may be used as long as there is a correlation between the value of the randomness control argument and the randomness of the answer.

[0092] According to these configurations, the query unit 120 of the spreadsheet device 100 corrects the base randomness control argument to an argument that controls randomness so that the value is higher than when it is controlled by the base randomness control argument. Furthermore, the query unit 120 (1) causes the data communication circuit 104a of FIG. 2 to transmit a new query including the corrected randomness control argument to the server 900 with the probability of the complementary event, and then (2) outputs a new answer acquired from the generation AI of the server 900. Furthermore, the query unit 120 outputs the answer acquired from the cash sheet with the probability of the event. For these reasons, the query unit 120 can suppress a decrease in randomness of the answer to be output while suppressing an increase in the amount of communication between the spreadsheet device 100 and the server 900.

[0093] <Modification 13 of the embodiment> In the embodiment, the server 900 is described as being equipped with a generation AI that is ChatGPT, but the generation AI is not limited to this. The generation AI may be Gemini or other AIs. In the embodiment, the spreadsheet program is described as being Excel, but the generation AI is not limited to this. The spreadsheet program may be Google Spreadsheets, WPS Office Spreadsheets, or Numbers, or other programs. In the embodiment, the CPU 101 of the spreadsheet device 100 is described as functioning as the query unit 120 by executing an add-in program added to the spreadsheet program itself, but the CPU 101 may function as the query unit 120 by executing the spreadsheet program itself.

[0094] Further, in the embodiment, the query unit 120 of the spreadsheet device 100 generates one cash sheet in the workbook, but may generate two or more cash sheets. Also, in the embodiment, the name of the cash sheet includes a cache name string, but the name of the worksheet does not include a name string, but this is not limited to this. For example, the cache name string is input as a value in the type input cell of the cash sheet, but the cache name string may not be input as a value in the type input cell of the worksheet. The type input cell means a cell that is predetermined as a cell into which a string representing the type of spreadsheet is input. Also, the type input cell may be, for example, a cell in a predetermined row and a predetermined column, or a cell in which a name representing that it is a type input cell is defined. In this case, the query unit 120 may acquire values ​​input into the type input cells from all spreadsheets that the workbook has, and determine that the workbook has a cash sheet if a value that is a cache name string exists among the acquired values, and determine that the workbook does not have a cash sheet if such a value does not exist.

[0095] Although the book opened by the spreadsheet device 100 has been described as having one worksheet, it may have multiple worksheets, and the spreadsheet device 100 may open a book having one worksheet and then add one or more worksheets to the opened book. Furthermore, the spreadsheet device 100 may generate a book having one or more worksheets, and may add one or more worksheets to the generated book. Furthermore, in the embodiment, the spreadsheet device 100 has been described as opening a book without a cache sheet, but it may also open a book with a cache sheet. Furthermore, the spreadsheet device 100 may generate a book without a cache sheet, and may also generate a book with a cache sheet.

[0096] Furthermore, in the embodiment, it has been described that the query function called by the formula set in the work cell 2B refers to the input value of the work cell 2A, and that the worksheet having the work cell 2A (referred to as work sheet A) and the worksheet having the work cell 2B (referred to as work sheet B) are the same sheet. However, the work sheet A and the work sheet B may be different sheets. Also, the book having the work sheet A (referred to as book A) and the book having the work sheet B (referred to as book B) may be the same book or may be different books. Also, when the book A and the book B are different books, the query unit 120 of the spreadsheet device 100 may generate a cache sheet in the book B and store the query information used in the calculation of the work sheet B in the generated cache sheet. Furthermore, in the embodiment, it has been described that the query function of the work cell 2B uses the input value of the work cell 2A as a query argument, but the query function of the work cell 2B may use a value included in the formula set in the work cell 2B as a query argument.

[0097] In the embodiment, the work cell 2B is set with a formula that calculates the return value of the query function. However, the work cell 2B may be set with a formula that calculates the result of performing some processing on the return value of the query function. The processing may include at least one of adding a predetermined character or character string to the return value, deleting a predetermined character or character string from the return value, or converting a predetermined character or character string included in the return value into a character or character string different from the character or character string.

[0098] In the embodiment, the work cells 2B and 3A are edited in order, but the work cells may be edited in any order. In the embodiment, the work cells 2A, 2B, and 3A are edited in order, but the work cells may be edited in any order. In the embodiment, the work cells 2A, 2B, and 3A are edited in order, but the work cells may be edited in any order.

[0099] In the embodiment, it has been described that it is determined that the formula of work cell 2B calls the query function in step S04 of Fig. 6. However, if it is determined that the formula of work cell 2B does not call the query function (step S04; No), the calculation unit 110 of the spreadsheet device 100 may calculate the formula of work cell 2B without using the query function (step S08), and store the calculation result in the cell as the value of work cell 2B (step S07).

[0100] In the embodiment, it has been described that the calculation unit 110 of the spreadsheet device 100 saves the worksheet and the cache sheet in the same electronic file by saving the book. However, the query unit 120 may save the worksheet and the cache sheet in the same electronic file by saving the book. The timing at which the query unit 120 saves the book may include at least one of the timing at which the cache sheet is generated in the book, the timing at which query information is stored in the cache sheet, and the timing at which the answer is output as a return value to the spreadsheet program.

[0101] In the embodiment, it has been explained that if the query information representing a query and the answer of the server 900 to the query are not stored in the cache sheet in a corresponding manner, the query unit 120 of the spreadsheet device 100 causes the data communication circuit 104a to transmit the query to the server 900, acquires the answer from the server 900 from the data communication circuit 104a, and stores the query information and the answer in the cache sheet in a corresponding manner. However, if the query and the answer are not stored in the cache sheet in a corresponding manner, the query unit 120 may cause the data communication circuit 104a to transmit the query to the server 900, acquire the answer from the server 900 from the data communication circuit 104a, and store the query and the answer in the cache sheet in a corresponding manner. In this case, if the query and the answer are stored in the cache sheet in a corresponding manner, the query unit 120 may suppress the data communication circuit 104a from transmitting the query to the server 900, and may acquire the answer associated with the query from the cache sheet.

[0102] In the embodiment, a specific example has been given in which the worksheet and the cash sheet are different spreadsheets, but the worksheet and the cash sheet may be the same spreadsheet.

[0103] In the embodiment, the query information is described as a hash value of text data included in the query, but is not limited thereto. The query information may be a hash value of the query, or may be the same information as the query auxiliary information. In the seventh modified example of the embodiment, the query auxiliary information is described as including information representing the name of a query function and a query argument, but is not limited thereto. The query auxiliary information may include a query argument, but may not include information representing the name of a query function.

[0104] The embodiment and the first to thirteenth modifications of the embodiment can be combined with each other. The embodiment can be provided as a spreadsheet device 100 having a configuration for realizing the function according to any of the embodiment and the first to thirteenth modifications of the embodiment, and can also be provided as a system composed of a plurality of devices, which has a configuration for realizing the function according to any of the embodiment and the first to thirteenth modifications of the embodiment as a whole. The spreadsheet program and the add-in program for the spreadsheet program according to any of the embodiment and the first to thirteenth modifications of the embodiment can be distributed in any manner, and can be distributed by storing them in a non-transitory recording medium such as a memory card, a CD (Compact Disc)-ROM, or a DVD (Digital Versatile Disk)-ROM, or can be distributed via a communication medium such as the Internet. The method according to the present invention can be implemented using the spreadsheet system 1 or the spreadsheet device 100 according to any of the embodiment and the first to thirteenth modifications of the embodiment. Although the preferred embodiment of the present invention has been described above in detail, the present invention is not limited to the specific embodiment, and various modifications and changes are possible within the scope of the gist of the present invention described in the claims.

[0105] (Additional Note) (Appendix 1) A spreadsheet device for processing work sheets and cash sheets, (1) when a formula is set in a cell in the worksheet that calls a query function that references an input value entered in another cell in the worksheet, (a) generating a query based on the entered values; (b) sending the query to an external server; (c) obtaining an answer from the external server; (d) storing, in the cache sheet, query information representing the query and the answer in association with each other; and (e) storing the obtained answer as a value of the cell; (2) when performing a recalculation on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, obtain the answer stored in the cache sheet in association with the query information as a value to be stored in the cell. 1. A spreadsheet device comprising:

[0106] (Appendix 2) (1) performing the recalculation on the cell when at least one of the following occurs: (1) a first cell that is the cell, a second cell that is the other cell, or a third cell different from the first cell and the second cell is edited; (2) a column or row that includes the third cell is deleted; (3) an operation that instructs a calculation is performed; (4) a workbook that includes the worksheet is saved; (5) the workbook is opened; or (6) at least one of the worksheet or the cashsheet is printed. 2. A spreadsheet device according to claim 1,

[0107] (Appendix 3) The query includes (1) a query as to which of a plurality of classifications the input value is classified, or (2) a query as to the result of translating the input value into a specified language, and Transmitting the query to the external server equipped with a generating AI (Artificial Intelligence); 3. The spreadsheet device according to claim 1 or 2.

[0108] (Appendix 4) 1. A method implemented by a spreadsheet device for processing worksheets and cashsheets, comprising: (1) When a formula that calls a query function that references an input value entered in another cell in the worksheet is set in a cell in the worksheet, (a) generating a query based on the entered values; (b) sending the query to an external server; (c) obtaining an answer from the external server; (d) storing, in the cache sheet, query information representing the query and the answer in association with each other; and (e) storing the obtained answer as a value of the cell; and (2) when performing a recalculation on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, obtain the answer stored in the cache sheet in association with the query information as a value to be stored in the cell; having 2. A spreadsheet calculation method comprising:

[0109] (Appendix 5) A computer of a spreadsheet device that has a communication unit and processes a work sheet and a cash sheet, (1) when a formula is set in a cell in the worksheet that calls a query function that references an input value entered in another cell in the worksheet, (a) generating a query based on the entered values; (b) causing the communication unit to transmit the query to an external server; (c) acquiring an answer from the external server through the communication unit; (d) storing, in the cache sheet, query information representing the query and the answer in association with each other; and (e) storing the obtained answer as a value of the cell; (2) when performing a recalculation on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, the answer stored in the cache sheet in association with the query information is obtained as a value to be stored in the cell. Function as a spreadsheet, A spreadsheet program characterized by:

[0110] (Appendix 6) 1. An add-in program for a spreadsheet program, comprising: A computer of a spreadsheet device that has a communication unit and processes a work sheet and a cash sheet, (1) when a formula is set in a cell in the worksheet that calls a query function that references an input value entered in another cell in the worksheet, (a) generating a query based on the entered values; (b) causing the communication unit to transmit the query to an external server; (c) acquiring an answer from the external server through the communication unit; (d) storing, in the cache sheet, query information representing the query and the answer in association with each other; and (e) outputting the obtained answer as a value of the cell; (2) when performing a recalculation on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, the answer stored in the cache sheet in association with the query information is obtained as a value to be stored in the cell. To function as an inquiry section, An add-in program characterized by:

[0111] (Appendix 7) the query unit generates the cache sheet in a workbook having the work sheet when the cache sheet does not exist, and stores the query information and the answer in the generated cache sheet; 7. The add-in program according to claim 6,

[0112] (Appendix 8) The work sheet and the cash sheet are each stored in the same electronic file. 8. The add-in program according to claim 6 or 7.

[0113] (Appendix 9) The external server is equipped with a generating AI (Artificial Intelligence), The query includes a randomness control argument that controls the randomness of the answer generated by the generation AI; When the query information is stored in the cache sheet, the query unit: (1) acquiring the answer stored in the cache sheet in association with the query information at a cache hit rate set based on the randomness control argument or set based on an operation performed on an input unit of the spreadsheet device; (2) causing the communication unit to transmit a new query based on the input value to the external server with a probability obtained by subtracting the cache hit rate from a probability of 100%, and obtaining a new answer from the external server from the communication unit; 9. An add-in program according to any one of claims 6 to 8.

[0114] (Appendix 10) A computer of a spreadsheet device that includes a communication unit and executes a spreadsheet program, When a query based on a query argument obtained from the spreadsheet program or query information representing the query and an answer from a server to the query are associated and stored in a spreadsheet, (1) suppressing the communication unit from transmitting the query to the server; (2) obtaining the answer associated with the query or the query information from the spreadsheet; and (3) outputting the obtained answer as a return value to the spreadsheet program; To function as an inquiry section, An add-in program characterized by:

[0115] (Appendix 11) The server is equipped with a generating AI (Artificial Intelligence), the query includes an AI argument that is an argument of the generated AI; The AI ​​arguments include a randomness control argument that controls the randomness of the answer generated by the generation AI, The interrogation unit is (1) setting a cache hit rate, which is the probability that the query or the answer associated with the query information will be retrieved from the spreadsheet when the query or the answer has been stored, based on the randomness control argument or an operation performed on an input unit of the spreadsheet device; (2) in the case where the data has been stored, at the set cache hit rate, (a) suppressing the communication unit from transmitting the query to the server; (b) retrieving the answer associated with the query or the query information from the spreadsheet; and (c) outputting the obtained answer as the return value; 11. An add-in program according to any one of claims 6 to 10.

[0116] (Appendix 12) the query unit sets the cache hit rate lower as the randomness control argument controls the randomness to a higher degree; 12. An add-in program according to any one of claims 6 to 11.

[0117] (Appendix 13) The query unit, when the stored state is reached, determines a probability of a complementary event obtained by subtracting the cache hit rate from a probability of 100%, (1) causing the communication unit to transmit a new query based on the query argument to the server; (2) acquiring a new answer from the server through the communication unit; (3) outputting the obtained new answer as the return value; 13. An add-in program according to any one of claims 6 to 12.

[0118] (Appendix 14) the query unit causes the communication unit to transmit the new query, including a randomness control argument that controls the randomness so that the value is higher than that controlled by the randomness control argument on which the cache hit rate is set, with the probability of the complementary event when the query has been stored; 14. An add-in program according to any one of claims 6 to 13.

[0119] (Appendix 15) The query argument includes a plurality of categories and a category target string to be classified; the query includes a character string expressing a question as to which of the plurality of classifications the classification target character string is classified into, and a character string for relaxing a restriction imposed on the answer by the question; causing the communication unit to transmit the query to the server equipped with the generation AI; 15. An add-in program according to any one of claims 6 to 14.

[0120] (Appendix 16) the restrictions imposed on the answer by the question include a restriction that the answer must be one of the plurality of classifications; The string for relaxing the restriction relaxes the restriction imposed on the answer by the question to a restriction that the answer must be one of the multiple classifications or a non-classification string representing that the classification target string is not classified into any of the multiple classifications. 16. An add-in program according to any one of claims 6 to 15.

[0121] (Appendix 17) The generating AI is an interactive AI, the query further includes a string representing a constraint placed on the representation of the answer; the representation of each of the plurality of classifications and the representation of the non-classified strings are subject to restrictions imposed on the representation; If the answer is not the non-classification character string and is not one of the plurality of classifications, the inquiry unit changes the answer to the non-classification character string and outputs the changed answer as the return value. 17. An add-in program according to any one of claims 6 to 16.

[0122] (Appendix 18) the restriction imposed on the expression format of the answer is that the answer must be expressed in a predetermined number of words; 18. An add-in program according to any one of claims 6 to 17.

[0123] (Appendix 19) When the query or the query information and the answer are not stored in the spreadsheet in a corresponding manner, the query unit: (1) causing the communication unit to transmit the query to the server; (2) acquiring the answer from the server through the communication unit; (3) outputting the obtained answer as the return value; and (4) storing the query or the query information and the answer in the spreadsheet in association with each other; 19. An add-in program according to any one of appendices 6 to 18,

[0124] (Appendix 20) When the formula is set in a plurality of cells in the worksheet including the cell, and the answer stored in the cache sheet is changed, when recalculating the plurality of cells, instead of transmitting the query to the external server to obtain the answer, the changed answer stored in the cache sheet is stored as a value in the plurality of cells. 4. A spreadsheet device according to claim 1, [Explanation of symbols]

[0125] 1: spreadsheet system, 100: spreadsheet device, 101: CPU, 102: RAM, 103a: ROM, 103b: storage device, 104a: data communication circuit, 105a: video card, 105b: display device, 105c: input device, 110: calculation unit, 120: inquiry unit, 130: spreadsheet unit, 190: information storage unit, 900: server, NT: network

Claims

1. A spreadsheet device for processing worksheets and cashsheets, (1) When a formula is set in a cell in the worksheet that calls a query function that references an input value entered in another cell in the worksheet, (a) generating a query based on the entered values; (b) sending the query to an external server; (c) obtaining an answer from the external server; (d) storing query information representing the query and the answer in the cache sheet in association with each other; and (e) storing the obtained answer as a value of the cell; (2) When recalculation is performed on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, the answer stored in the cache sheet in association with the query information is obtained as a value to be stored in the cell. A spreadsheet device characterized by:

2. (1) performing the recalculation on the cell at least one of the following times: (1) when a first cell that is the cell, a second cell that is the other cell, or a third cell different from the first cell and the second cell is edited; (2) when a column or row that includes the third cell is deleted; (3) when an operation that instructs calculation is performed; (4) when a workbook that includes the worksheet is saved; (5) when the workbook is opened; or (6) when at least one of the worksheet or the cashsheet is printed.

2. The spreadsheet device according to claim 1.

3. The query includes (1) a query asking which of a plurality of categories the input value falls into, or (2) a query asking for a result of translating the input value into a specified language, and Sending the query to the external server equipped with a generating AI (Artificial Intelligence); 3. The spreadsheet device according to claim 1 or 2.

4. 1. A method implemented by a spreadsheet device for processing worksheets and cashsheets, comprising: (1) When a formula that calls a query function that references an input value entered in another cell in the worksheet is set in a cell in the worksheet, (a) generating a query based on the entered values; (b) sending the query to an external server; (c) obtaining an answer from the external server; (d) storing query information representing the query and the answer in the cache sheet in association with each other; and (e) storing the obtained answer as a value of the cell; and (2) When recalculating the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, obtain the answer stored in the cache sheet in association with the query information as a value to be stored in the cell. having A spreadsheet calculation method characterized by:

5. A computer of a spreadsheet device that has a communication unit and processes work sheets and cash sheets, (1) When a formula is set in a cell in the worksheet that calls a query function that references an input value entered in another cell in the worksheet, (a) generating a query based on the entered values; (b) causing the communication unit to transmit the query to an external server; (c) acquiring an answer from the external server from the communication unit; (d) storing query information representing the query and the answer in the cache sheet in association with each other; and (e) storing the obtained answer as a value of the cell; (2) When recalculation is performed on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, the answer stored in the cache sheet in association with the query information is obtained as a value to be stored in the cell. Functioning as a spreadsheet, A spreadsheet program characterized by:

6. An add-in program for a spreadsheet program, A computer of a spreadsheet device that has a communication unit and processes work sheets and cash sheets, (1) When a formula is set in a cell in the worksheet that calls a query function that references an input value entered in another cell in the worksheet, (a) generating a query based on the entered values; (b) causing the communication unit to transmit the query to an external server; (c) acquiring an answer from the external server from the communication unit; (d) storing query information representing the query and the answer in the cache sheet in association with each other; and (e) outputting the obtained answer as the value of the cell; (2) When recalculation is performed on the cell, if the query information representing the query is stored in the cache sheet, instead of transmitting the query to the external server to obtain the answer, the answer stored in the cache sheet in association with the query information is obtained as a value to be stored in the cell. Functioning as an inquiry section, An add-in program characterized by:

7. the query unit generates the cache sheet in a workbook having the work sheet when the cache sheet does not exist, and stores the query information and the answer in the generated cache sheet; 7. The add-in program according to claim 6.

8. The work sheet and the cash sheet are each stored in the same electronic file.

8. The add-in program according to claim 6 or 7.

9. The external server is equipped with a generating AI (Artificial Intelligence), The query includes a randomness control argument that controls the randomness of the answer generated by the generation AI, When the query information is stored in the cache sheet, the query unit (1) acquiring the answer stored in the cache sheet in association with the query information at a cache hit rate set based on the randomness control argument or set based on an operation performed on an input unit provided in the spreadsheet device; (2) causing the communication unit to transmit a new query based on the input value to the external server at a probability obtained by subtracting the cache hit rate from a probability of 100%, and obtaining a new answer from the external server from the communication unit; 8. The add-in program according to claim 6 or 7.

10. A computer of a spreadsheet device that has a communication unit and processes a spreadsheet by executing a spreadsheet program, When a query based on a query argument acquired from the spreadsheet program or query information representing the query and an answer from the server to the query are associated and stored in the spreadsheet, (1) suppressing the communication unit from transmitting the query to the server; (2) obtaining the answer associated with the query or the query information from the spreadsheet; and (3) outputting the acquired answer as a return value to the spreadsheet program; Functioning as an inquiry section, An add-in program characterized by:

11. The query unit, after the spreadsheet device changes the answer stored in the spreadsheet in accordance with a user operation, each time it acquires the query argument from the spreadsheet program, (1) suppressing the communication unit from transmitting the query to the server; (2) obtaining a modified answer associated with the query or the query information from the spreadsheet; and (3) outputting the obtained changed answer as a return value to the spreadsheet program; 11. The add-in program according to claim 10.