Program, information processing device, and information processing method
The information processing device simplifies SQL statement generation by acquiring user input and utilizing conversion information to derive and convert item values, enabling efficient and adaptable SQL statement creation.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
- Filing Date
- 2024-12-26
- Publication Date
- 2026-07-08
AI Technical Summary
Existing technologies require extensive user preparation of information to automatically generate SQL statements, making it difficult to create them efficiently.
An information processing device that acquires first item information from a user and generates SQL statements to retrieve item values from a database, utilizing conversion information to derive and convert item values, and includes functionality to update SQL statements without user editing.
Facilitates easier generation of SQL statements by deriving and converting item values, allowing for dynamic updates without user intervention, thus simplifying the process.
Smart Images

Figure 2026113801000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a program, an information processing apparatus, and an information processing method.
Background Art
[0002] There is a technology in which an information processing apparatus automatically generates an SQL (Structured Query Language) statement according to a given specification (see, for example, Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In the technology of automatically generating an SQL statement, a lot of information may need to be prepared in advance. In that case, it is not easy to automatically generate an SQL statement.
[0005] The present invention provides a program and the like that contribute to more easily generating an SQL statement.
Means for Solving the Problems
[0006] A program according to an aspect of the present invention is a program that causes an information processing apparatus to execute information processing, where the information processing includes acquiring, from a user, first item information indicating one or more first items to be output by the information processing apparatus, and generating an SQL statement for acquiring item values of the one or more first items indicated by the first item information from a database storing item values of one or more second items provided from facilities, where the item values of the one or more second items can be used to derive the item values of the one or more first items.
[0007] These comprehensive or specific embodiments may be implemented as a system, device, integrated circuit, computer program, or recording medium such as a computer-readable CD-ROM, or as any combination of a system, device, integrated circuit, computer program, and recording medium. [Effects of the Invention]
[0008] The program of this invention contributes to easier generation of SQL statements. [Brief explanation of the drawing]
[0009] [Figure 1] Figure 1 is a schematic diagram showing an example of the configuration of an information processing system in an embodiment. [Figure 2] Figure 2 is a block diagram showing an example of the configuration of an information processing device in an embodiment. [Figure 3] Figure 3 is a flowchart showing a first example of the processing performed by the information processing device in the embodiment. [Figure 4] Figure 4 is an explanatory diagram showing an example of a table that displays table information in the embodiment. [Figure 5] Figure 5 is an explanatory diagram showing an example of a table that displays conversion information in the embodiment. [Figure 6] Figure 6 is an explanatory diagram showing an example of a table stored in the database in the embodiment. [Figure 7] Figure 7 is an explanatory diagram showing an example of a GUI in the embodiment. [Figure 8] Figure 8 is a flowchart showing a second example of the processing performed by the information processing device in the embodiment. [Figure 9] Figure 9 is an explanatory diagram showing an example of production information items in the embodiment. [Figure 10] Figure 10 is an explanatory diagram showing an example of an SQL statement generated by the information processing device in the embodiment. [Figure 11]Figure 11 is an explanatory diagram showing an example of an SQL statement that outputs a lot table in the embodiment. [Figure 12] Figure 12 is an explanatory diagram showing an example of production information used by the information processing device according to Comparative Example 1. [Figure 13] Figure 13 is an explanatory diagram showing an example of output request items used by the information processing device according to Comparative Example 1. [Figure 14] Figure 14 is an explanatory diagram showing an example of conditional information used by the information processing device according to Comparative Example 1. [Figure 15] Figure 15 is an explanatory diagram showing an example of an SQL statement generated by the information processing device according to Comparative Example 1. [Figure 16] Figure 16 is an explanatory diagram showing the first example of an SQL statement used by the information processing device according to Comparative Example 2. [Figure 17] Figure 17 is an explanatory diagram showing a second example of an SQL statement used by the information processing device according to Comparative Example 2. [Modes for carrying out the invention]
[0010] (Knowledge that formed the basis of this invention) Using a technology that automatically generates SQL statements according to given specifications (see, for example, Patent Document 1), it is possible to generate SQL statements that conform to the above specifications. When generating SQL statements using the above technology, a lot of information necessary for generating the SQL statements must be prepared in advance. For example, a user who tries to generate SQL statements using the above technology needs to collect a lot of information necessary for generating the SQL statements and make that information available to the information processing device. However, it is difficult for a user to perform the task of making a lot of information available to the information processing device, and as a result, it may not be easy to generate SQL statements using the above technology.
[0011] In addition, in the above technology, functions that can be used in SQL statements may be specified by information unique to the technology. For example, in the technology described in Patent Document 1, functions that can be used in SQL statements are expressed by numerical values with the name "extraction format classification". Therefore, when it is assumed that functions are used in SQL statements, the program that generates the SQL statements needs to be individually designed and implemented according to the unique information that specifies the functions.
[0012] Thus, there is a problem that it is not easy to automatically generate SQL statements.
[0013] Therefore, the present invention provides a program or the like that contributes to more easily generating SQL statements.
[0014] Therefore, the present invention provides an information processing apparatus or the like that more appropriately identifies the cause of product defects.
[0015] Hereinafter, the invention obtained from the disclosure of this specification will be exemplified, and the effects and the like obtained from the invention will be explained.
[0016] (1) A program for causing an information processing apparatus to execute information processing, the information processing including: obtaining, from a user, first item information indicating one or more first items to be output by the information processing apparatus; and generating an SQL statement for obtaining item values of the one or more first items indicated by the first item information from a database storing item values of one or more second items provided from equipment, where the item values of the one or more second items can be used to derive the item values of the one or more first items.
[0017] According to the above embodiment, the information processing device generates an SQL statement to retrieve the item value of the first item information specified by the user, based on the item value of the second item stored in the database. By utilizing the characteristic that the item value of the first item can be derived using the item value of the second item, the information processing device can easily generate an SQL statement that retrieves the item value of the first item while deriving it from the item value of the second item stored in the database. Then, the information processing device can easily obtain the item value of the first item information from the database using the generated SQL statement. In this way, the above program contributes to generating SQL statements more easily.
[0018] (2) The information processing device has conversion information that converts the item values of one or more second items to the item values of one or more first items, and the program according to (1) wherein generating the SQL statement includes generating a SELECT clause that extracts the item values of one or more second items stored in the database, converting them to the item values of one or more first items using the conversion information.
[0019] According to the above embodiment, the information processing device generates a SELECT clause that extracts the item value of the second item while converting it to the item value of the first item using conversion information. This contributes to more easily obtaining the item value of the first item information from the database using an SQL statement containing the generated SELECT clause. In this way, the above program contributes to more easily generating SQL statements.
[0020] (3) The program according to (2), wherein the information processing further includes obtaining condition information from a user indicating the conditions that the item values of one or more first items must satisfy, and generating the SQL statement includes generating a WHERE clause using the condition information indicating the conditions that at least one of the one or more first items extracted using the SELECT clause must satisfy.
[0021] According to the above embodiment, the information processing device generates a WHERE clause that indicates a condition that at least one of the first items must satisfy. This makes it easier to obtain the item values of the first item information that satisfy the condition from the database using an SQL statement containing the generated WHERE clause. In this way, the program contributes to easier generation of SQL statements.
[0022] (4) The program described in (2), wherein the conversion information includes a formula, the formula being a formula that converts one second item value, which is a numerical value, from among the item values of one or more second items, to one first item value from among the item values of one or more first items.
[0023] According to the above embodiment, the information processing device uses a function that converts the numerical value of the second item to the value of the first item as conversion information, thereby generating a SELECT clause that more easily converts the item value of the second item to the item value of the first item. This contributes to more easily obtaining the item value of the first item information from the database using an SQL statement containing the generated SELECT clause. In this way, the above program contributes to more easily generating SQL statements.
[0024] (5) The program as described in (2), wherein the conversion information includes a function, the function converts one second item value, which is a number or string, from among the item values of one or more second items, to one first item value from among the item values of one or more first items.
[0025] According to the above embodiment, the information processing device uses a function that converts a second item value, which is a number or string, to a first item value as conversion information to generate a SELECT clause that more easily converts the item value of the second item to the item value of the first item. This contributes to more easily obtaining the item value of the first item information from the database using an SQL statement containing the generated SELECT clause. In this way, the above program contributes to more easily generating SQL statements.
[0026] (6) The program described in (1), wherein the information processing further includes obtaining new first item information from a user that is different from the first item information, and, if the new first item information is obtained, generating a new SQL statement that uses the obtained new first item information to obtain one or more new first item values indicated in the new first item information from the database.
[0027] According to the above embodiment, when the information processing device acquires new first item information, it generates a new SQL statement based on the new first item information, and contributes to easily obtaining the item value of the first item information from the database using the generated new SQL statement. The user can obtain the first item indicated in the new first item information by providing the new first item information to the information processing device, and at this time, the user does not need to create or modify an SQL statement, nor does the user need to edit the information stored in the information processing device, making it easy. In this way, the above program contributes to easier generation of SQL statements.
[0028] (7) The program described in (2), wherein the information processing further includes obtaining new conversion information from a user that is different from the conversion information, and if the new conversion information is obtained, generating a new SELECT clause that extracts the item values of one or more second items stored in the database by converting them to the item values of one or more first items using the new conversion information.
[0029] According to the above embodiment, when the information processing device acquires new conversion information, it generates a new SQL statement based on the new conversion information, and contributes to easily obtaining the item value of the first item information from the database using the generated new SQL statement. The user can obtain the first item indicated in the new first item information by providing the new conversion information to the information processing device, and at this time, the user does not need to create or modify an SQL statement, nor does the user need to edit the information stored in the information processing device, making it easy. In this way, the above program contributes to generating SQL statements more easily.
[0030] (8) The program according to (1), wherein the information processing further includes obtaining the item values of one or more first items from the database using the generated SQL statement and outputting the obtained item values of one or more first items.
[0031] According to the above embodiment, the information processing device uses the generated SQL statement to retrieve the item value of the first item from the database and output it. In this way, the above program contributes to easier generation of SQL statements and can further provide the item value of the first item retrieved using that SQL statement.
[0032] (9) An information processing device for performing information processing, comprising: an acquisition unit that acquires first item information from a user indicating one or more first items to be output by the information processing device; and a generation unit that generates an SQL statement to acquire the one or more first item values indicated in the first item information from a database which stores one or more second item values provided by equipment, wherein the one or more second item values can be used to derive the one or more first item values.
[0033] According to the above embodiment, the same effect as the above program is achieved.
[0034] (10) An information processing method to be executed by an information processing device, comprising: obtaining first item information from a user indicating one or more first items to be output by the information processing device; and generating an SQL statement from a database which stores one or more item values of second items provided by equipment, the item values of the one or more second items from which the item values of the one or more first items can be derived, to obtain the item values of the one or more first items indicated in the first item information.
[0035] According to the above embodiment, the same effect as the above program is achieved.
[0036] These comprehensive or specific embodiments may be implemented as a system, device, integrated circuit, computer program, or recording medium such as a computer-readable CD-ROM, or as any combination of a system, device, integrated circuit, computer program, or recording medium.
[0037] The embodiments will be described below with reference to the drawings.
[0038] (Embodiment) In this embodiment, an information processing device, an information processing method, and a program that contribute to more easily generating SQL statements will be described.
[0039] Figure 1 is a schematic diagram showing an example of the configuration of the information processing system 1 in this embodiment.
[0040] As shown in Figure 1, the information processing system 1 comprises an information processing device 10 and a database 20. The information processing system 1 is connected to the production line 5.
[0041] Production line 5 is equipped with equipment 6A, 6B, and 6C (also referred to as equipment 6A, etc.). Production line 5 may be a production line that produces products.
[0042] Equipment 6A, etc., are pieces of equipment used in the production of products, and specifically may include processing equipment, measuring equipment, or cleaning equipment. Equipment 6A, etc., outputs data related to product production. This data may include, for example, the lot number of the product being produced, measurements taken of the product, the temperature at which the product was produced, and information about the personnel involved in the production of the product. The lot number is an identification number uniquely assigned to each lot. A lot is a group of products or materials produced under the same conditions.
[0043] The information processing device 10 corresponds to an information processing device that contributes to easier generation of SQL statements. The information processing device 10 comprises a processor, memory, and user interface devices (such as a display screen and input devices).
[0044] The information processing device 10 generates and outputs report data 30 containing information requested by the user. When generating the report data 30, the information processing device 10 generates an SQL statement to retrieve the item values of the items to be output in the report data 30, based on the information stored in the database 20. Then, the information processing device 10 uses the generated SQL statement to retrieve the information requested by the user from the database 20 and generates the report data 30. The information processing device 10 may also be called a generation device that generates SQL statements, or a report output device that outputs reports.
[0045] Database 20 is a database connected to equipment 6A, etc. Database 20 stores data output by equipment 6A, etc., as production information.
[0046] Figure 2 is a block diagram showing an example of the configuration of the information processing device 10 in this embodiment.
[0047] As shown in Figure 2, the information processing device 10 includes an acquisition unit 11, a generation unit 12, a storage unit 13, a data acquisition unit 14, and an output unit 15 as functional units. The functional units of the information processing device 10 can be realized by the processor (CPU (Central Processing Unit), etc.) of the information processing device 10 executing a program using memory.
[0048] The acquisition unit 11 acquires output request information from the user. The output request information is information related to production by the production line 5 (in other words, production by equipment 6A, etc.), which the user requests the information processing device 10 to output, and which is information specified by the user. The output request information indicates output request items, which are one or more items that the information processing device 10 should output. The item values of one or more output request items can be derived using the item values of one or more production information items. The output request information corresponds to the first item information. The output request items correspond to the first item. The production information items correspond to the second item.
[0049] When the acquisition unit 11 acquires output request information from the user, it presents a GUI (Graphical User Interface) for accepting input of output request information to the user by displaying it on the display screen, and can accept input of output request information via the GUI.
[0050] Furthermore, the acquisition unit 11 acquires condition information from the user. The condition information is information that indicates the conditions that the item values of the output request items must satisfy.
[0051] The generation unit 12 generates an SQL statement. The SQL statement generated by the generation unit 12 retrieves the item values of the output request items from the database 20. The SQL statement generated by the generation unit 12 is used by the data retrieval unit 14 when retrieving the output request items from the database 20.
[0052] When generating the above SQL statement, the generation unit 12 can generate a SELECT clause that extracts the output request items by converting the item values of the production information items stored in the database 20 to the item values of the output request items using conversion information.
[0053] Furthermore, when generating the above SQL statement, the generation unit 12 can generate a WHERE clause using condition information that indicates a condition that at least one of the output request items extracted using the SELECT clause must satisfy.
[0054] The memory unit 13 is a memory device that stores information. The memory unit 13 stores conversion information, which is information for converting the item values of production information items to the item values of output request items.
[0055] Conversion information can include mathematical formulas. These formulas convert numerical values from production information items to the values of output request items. Furthermore, conversion information can include functions. These functions convert numerical or string values from production information items to the values of output request items.
[0056] Furthermore, the memory unit 13 may store the SQL statements generated by the generation unit 12. These SQL statements are read out by the data acquisition unit 14.
[0057] The storage unit 13 can store information using semiconductor memory or magnetic disks, and specifically, it may be a volatile storage device such as RAM (Random Access Memory) or a non-volatile storage device such as HDD (Hard Disk Drive) or SSD (Solid State Drive).
[0058] The data acquisition unit 14 connects to the database 20 and uses the SQL statement generated by the generation unit 12 to obtain the item values of the output request items from the database 20. The data acquisition unit 14 can obtain the SQL statement generated by the generation unit 12 stored in the storage unit 13 and use the obtained SQL statement to obtain the item values of the output request items from the database 20. When the data acquisition unit 14 obtains the item values of the output request items, it is assumed that the database 20 contains production information output by equipment 6A, etc. The data acquisition unit 14 reads the production information stored in the database 20 and obtains the item values of the output request items from the item values of one or more production information items contained in the production information. The information processing device 10 includes an interface for connecting to the database 20 and uses this interface when reading production information from the database 20.
[0059] The output unit 15 outputs the item values of the output request items that the data acquisition unit 14 has obtained from the database 20. The data output by the output unit 15, which includes the item values of the output request items, corresponds to the report data 30.
[0060] The output unit 15 can output the item value of an output request item by displaying an image containing the item value of the output request item on the display screen. Alternatively, the output unit 15 may output the item value of an output request item by transmitting information containing the item value of the output request item to another communication device (not shown) via a network.
[0061] Furthermore, if the information processing device 10 obtains output request information from a user and then obtains output request information different from the previously obtained output request information (also called new output request information), it can generate a new SQL statement using the new output request information. In this case, the acquisition unit 11 obtains the new output request information from the user. When the acquisition unit 11 obtains the new output request information, the data acquisition unit 14 uses the acquired new output request information to generate a new SQL statement that retrieves the item values of the new output request items indicated in the new output request information from the database 20.
[0062] In other words, the information processing device 10 is operating by generating SQL statements using the output request information initially acquired. When updated output request information is acquired, it can generate SQL statements using the updated output request information and output the item values of the new output request items. In this case, the user does not need to edit the SQL statement. This has the advantage that the output request information used by the information processing device 10 can be easily updated during operation.
[0063] Furthermore, if the information processing device 10 obtains conversion information different from the conversion information stored in the memory unit 13 (also called new conversion information), it can generate a new SQL statement using the new conversion information. In this case, the acquisition unit 11 obtains the new conversion information from the user. The data acquisition unit 14 uses the new conversion information obtained by the acquisition unit 11 to generate a new SELECT clause that extracts the item values of production information items stored in the database 20, converting them to the item values of output request items using the new conversion information.
[0064] In other words, the information processing device 10 operates by generating SQL statements using initially acquired conversion information. When updated conversion information is acquired, it can generate SQL statements using the updated conversion information and output the item values of the new output request items. In this case, the user does not need to edit the SQL statement. This has the advantage that the conversion information used by the information processing device 10 can be easily updated during operation.
[0065] In the following sections, the processes executed by the information processing device 10 will be explained with reference to Figures 3 to 7.
[0066] Figure 3 is a flowchart showing a first example of the processing performed by the information processing device 10 in this embodiment. The processing shown in Figure 3 can be described as an information processing method that contributes to generating SQL statements more easily.
[0067] First, let's describe the tables T1 (see Figure 4), T2 (see Figure 5), and T3 (see Figure 6) stored in the database 20 at the time the process shown in Figure 3 is executed.
[0068] Figure 4 is an explanatory diagram showing Table T1, which is an example of a table that shows table information in this embodiment.
[0069] As shown in Figure 4, each entry (each row) in table T1 includes the equipment name and the table name.
[0070] The equipment name is information that indicates the name of the equipment related to the entry. For example, the equipment name could be "Equipment A" for Equipment 6A, "Equipment B" for Equipment 6B, or "Equipment C" for Equipment 6C.
[0071] The table name indicates the table name of the table stored in database 20 that contains the data output by the equipment related to that entry.
[0072] Table T1, shown in Figure 4, indicates that data output by equipment A (i.e., equipment 6A) is stored in Table A, and data output by equipment B (i.e., equipment 6B) is stored in Table B.
[0073] Figure 5 is an explanatory diagram showing Table T2, which is an example of a table showing conversion information in this embodiment. Table T2 contains the details of the process that converts production information items into output request items.
[0074] As shown in Figure 5, each entry (each row) in table T2 includes the table name, the item name, and the conversion details.
[0075] The table name is information that indicates the table containing the items that are subject to the conversion related to that entry.
[0076] The item name is information indicating the converted item name related to the entry in question.
[0077] The conversion details are information that indicates the content of the conversion related to the entry in question, and more specifically, information that shows how the converted item (i.e., the output request item) is calculated using the item before conversion (i.e., the production information item). The conversion details are expressed using the name of the item before conversion and the name of the item after conversion. Note that the item before conversion can also be used as the converted item without any changes.
[0078] In the conversion information shown in Figure 5, for example, the item "Lot Number" included in Table A is used as the converted item "Lot Number".
[0079] Furthermore, it is shown that the converted item "Measurement Length [mm]" is calculated by using the item "Measurement Length [cm]" included in Table A and the formula "Measurement Length [cm] × 10".
[0080] Furthermore, it is shown that the converted item "Employee Name" is calculated by using the "Employee Number" item included in Table A and performing a function operation in the form of "Employee Number To Name Function (Employee Number)".
[0081] The function "Employee Number To Name Function (Employee Number)" is a function that outputs the name of the employee corresponding to the employee number given as an argument, and may be a function that was created using a pre-established mapping between employee numbers and employee names.
[0082] In addition to the above, a function called "First Character Extraction Function (Lot Number)" can also be used. The "First Character Extraction Function (Lot Number)" function extracts the string corresponding to the color contained in the lot number given as an argument.
[0083] Additionally, a function such as "TextToColorFunction(ColorName)" can also be used. The function "TextToColorFunction(ColorName)" replaces the color name given as an argument with the Japanese name of the color.
[0084] Figure 6 is an explanatory diagram showing table T3, which is an example of a table stored in the database 20 in this embodiment. The values contained in table T3 are the item values of production information items included in the production information output by equipment A (corresponding to equipment 6A). Table T3 corresponds to table A. The values contained in table T3 can be read by the data acquisition unit 14.
[0085] As shown in Figure 6, each entry in table T3 includes the date and time, lot number, measured length [cm], sensor value, employee number, and processing time [sec]. Each entry in table T3 may represent a set of data from equipment 6A (for example, a set of data acquired at a certain point in time).
[0086] The date and time indicates the date and time when the data related to the entry was output. Alternatively, the date and time may indicate the date and time when the product related to the data was produced. For example, the date and time could be "August 10, 2024, 10:12:01 AM".
[0087] The lot number is information that indicates the lot number of the product related to the data in that entry. The lot number may be, for example, "RED123".
[0088] The measured length [cm] is information indicating the dimensions measured for the product related to the data in that entry, in units of centimeters (cm). The measured length [cm] could be, for example, "0.5".
[0089] The sensor value may be a value output by a sensor that senses the product related to the data in that entry (also called the sensor value). The sensor value may be, for example, 47000.
[0090] The employee number is an identifier that uniquely identifies the person (specifically, the employee) involved in the production of the product related to the data in that entry. For example, the employee number could be "777".
[0091] The processing time [sec] is information indicating the time required to process the product related to the data in that entry, in units of seconds. The processing time [sec] could be, for example, "30".
[0092] The process shown in Figure 3 will be explained below.
[0093] In step S101, the acquisition unit 11 displays an image of a GUI that accepts search information. The search information includes at least the period to be searched, the equipment to be searched, the extraction conditions, and the output request items. An example of the GUI will be described below.
[0094] Figure 7 is an explanatory diagram showing an example of a GUI in this embodiment.
[0095] The GUI image shown in Figure 7 includes regions 41, 42, 43, and 44, and a button image 45.
[0096] Area 41 is the area where the user enters the period to be searched. More specifically, the search period can be specified by its start and end dates. For example, area 41 may contain a period starting at "October 2, 2024, 8:00:00 AM" and ending at "October 3, 2024, 8:00:00 AM".
[0097] Area 42 is the area where the equipment specified by the user as the equipment to be searched is entered. For example, "Equipment A" is entered in Area 42. Note that multiple pieces of equipment may be entered in Area 42, such as "Equipment A, Equipment B".
[0098] Area 43 is where the user enters the conditions they specify as extraction criteria. For example, the extraction condition "All data within the specified period, temperature [°C] > 10" may be entered in Area 43. Alternatively, the extraction condition "Inspection result = Fail" may also be entered.
[0099] Area 44 is the area where the user enters items specified as output request items (also simply referred to as output items). For example, Area 44 may contain the following items: "Lot Number," "Measured Length [mm]," "Temperature [°C]," "Employee Name," and "Product Color." The Lot Number is information indicating the lot number of the product. The Measured Length [mm] is information indicating the dimensions of the product, or a part of the product, in millimeters (mm), obtained by measurement. The Temperature [°C] is information indicating the temperature at which the product was manufactured, in degrees Celsius (°C). The Employee Name is the name of the person in charge of the production of the product. The Product Color is the color applied to the product.
[0100] Button image 45 is a button image that accepts a user's operation to initiate a search. When button image 45 is operated, the information processing device 10 starts a search process using the information entered in areas 41, 42, 43, and 44. The operation of button image 45 can take various forms, such as clicking, tapping, or touching the button image 45.
[0101] In step S102 (see Figure 3), the acquisition unit 11 acquires search information from the user via the GUI displayed in step S101. Specifically, the acquisition unit 11 accepts user input into areas 41, 42, 43, and 44.
[0102] In step S103, the acquisition unit 11 determines whether or not it has received a search start operation from the user for the button image 45. If it determines that it has received a search start operation (Yes in step S103), it proceeds to step S104; otherwise (No in step S103), it executes step S103 again. In other words, the acquisition unit 11 remains in a waiting state in step S103 until it receives a search start operation from the user for the button image 45.
[0103] In step S104, the generation unit 12 generates an SQL statement to retrieve output information from the database 20 that matches the search information obtained in step S102. The detailed processing included in step S104 will be explained in detail later.
[0104] In step S105, the data acquisition unit 14 uses the SQL statement generated in step S104 to acquire and output output information from the database 20 that matches the search information acquired in step S102.
[0105] Through the series of processes shown in Figure 3, the information processing device 10 can appropriately generate an SQL statement to obtain output information that matches the search information received from the user, and then appropriately retrieve it from the database 20 using the generated SQL statement.
[0106] Figure 8 is a flowchart showing a second example of the processing performed by the information processing device 10 in this embodiment. The processing shown in Figure 8 is a detailed representation of the processing included in step S104 in Figure 3.
[0107] In step S201, the generation unit 12 acquires production information items. Production information items are information that indicates items included in the production information output by the search equipment specified by the user. The generation unit 12 identifies the table in which the production information output by the search equipment specified by the user is stored by referring to table T1. Specifically, if the search equipment specified by the user is "equipment A", then "table A", which is associated with "equipment A" in table T1, is identified as the table in which the production information is stored.
[0108] Note that "Table A" may be a synonym. In that case, the generation unit 12 traces the synonym to identify the actual table. In this way, the generation unit 12 can identify the table in which the production information is stored.
[0109] Figure 9 is an explanatory diagram showing an example of production information items in this embodiment.
[0110] As shown in Figure 9, the production information items include date and time, lot number, measurement length [cm], sensor value, employee number, and processing time [sec]. Since the production information items are the same as those included in Table T3 shown in Figure 6, a detailed explanation is omitted.
[0111] In step S202 (see Figure 8), the generation unit 12 acquires conversion information corresponding to each output request item. The output request items are included in the search information acquired in step S102 (see Figure 3). When acquiring conversion information corresponding to the output request items, the generation unit 12 can use table T2 which shows the conversion information.
[0112] Specifically, for each output request item, the generation unit 12 searches for an item name in the "item name" column of table T2 that matches the output request item, and obtains the conversion content associated with the matching item name as conversion information corresponding to the output request item.
[0113] For example, the generation unit 12 obtains the conversion content "Lot Number" which is associated with the item name "Lot Number" in table T2, as conversion information for the output request item "Lot Number".
[0114] Furthermore, for example, the generation unit 12 obtains the conversion content "Measurement length [cm] × 10" which is associated with the item name "Measurement length [mm]" in table T2, as conversion information for the output request item "Measurement length [mm]".
[0115] Furthermore, for example, the generation unit 12 obtains the conversion content "Employee Number To Name Function (Employee Number)" which is associated with the item name "Employee Name" in table T2, as conversion information for the output request item "Employee Name".
[0116] In step S203 (see Figure 8), the generation unit 12 identifies the strings (also called corresponding strings) that correspond to the production information items included in the conversion information obtained in step S202. An example of how to identify the corresponding strings is described below.
[0117] The generation unit 12 determines whether each of the one or more conversion information obtained in step S202 contains a string corresponding to a production information item. Specifically, the generation unit 12 sequentially examines each of the one or more conversion information obtained in step S202. The conversion information being examined is also referred to as the conversion information. The generation unit 12 determines whether each of the production information items contains a string corresponding to that production information item, and if it determines that the string is contained in the conversion information, it identifies the "string corresponding to the production information item" contained in the conversion information as the corresponding string.
[0118] In the above determination, if it can be determined that the above string is included in the conversion information, for example, this may be because the conversion information contains a string that matches the production information item. The generation unit 12 determines whether or not a string that matches the production information item is included in the conversion information, and if it determines that a string that matches the production information item is included in the conversion information, it can determine that the string corresponding to the production information item is included in the conversion information.
[0119] Specifically, for example, the generation unit 12 can determine if a string matching the production information item "sensor value" is included in the conversion information "5 + sensor value / 10000". Based on this determination, the unit can identify the string "sensor value" included in the conversion information "5 + sensor value / 10000" as the string corresponding to the production information item "sensor value".
[0120] Furthermore, if the conversion information contains multiple candidates that can be identified as corresponding strings (also called candidate strings), the generation unit 12 may prioritize identifying candidate strings enclosed in parentheses (for example, "()", "「」", or "[]") as corresponding strings.
[0121] For example, the generation unit 12 determines that the two strings "Employee Number" contained in the conversion information "Employee Number To Name Function (Employee Number)" (that is, "Employee Number" contained in the function name "Employee Number To Name Function" and "Employee Number" which is the name of the function argument) are identical to the production information item "Employee Number," and thus designates the two strings "Employee Number" as candidate strings. Subsequently, the generation unit 12 identifies the string "Employee Number" enclosed in parentheses (that is, "Employee Number" which is the name of the function argument) as the corresponding string, and based on this, it can identify the string enclosed in parentheses of the two strings "Employee Number" contained in the conversion information "Employee Number To Name Function (Employee Number)" as the string corresponding to the production information item "Employee Number."
[0122] In steps S204 to S209, described later, the generation unit 12 generates an SQL statement using the information prepared in steps S201 to S203. An example of a generated SQL statement is shown in Figure 10. The SQL statement shown in Figure 10 includes an internal SELECT clause 51, an internal FROM clause 52, an external SELECT clause 53, an external FROM clause 54, a WHERE clause 55, and an ORDER BY clause 56.
[0123] In step S204 (see Figure 8), the generation unit 12 generates a clause 51, which is an internal SELECT clause. The generation unit 12 generates the clause 51 by concatenating the production information items that were determined to correspond to the conversion information in step S203 with the string "SELECT". At this time, the generation unit 12 may include the date and time as production information items regardless of the output request information specified by the user. If there are duplicate production information items, the generation unit 12 resolves the duplicates, or in other words, combines the duplicated production information items into a single production information item.
[0124] Specifically, the generation unit 12 uses the production information items date and time, lot number, measurement length [cm], sensor value, and employee number to generate the clause 51 "SELECT date and time, lot number, measurement length [cm], sensor value, employee number" (see Figure 10).
[0125] In step S205, the generation unit 12 generates a clause 52, which is an internal FROM clause. The generation unit 12 generates the clause 52 by concatenating the string "FROM" with information indicating the equipment to be searched.
[0126] Specifically, the generation unit 12 uses the string "Table A" which indicates the table in which the data output by equipment A is stored, to generate the clause "FROM Table A" as the clause 52.
[0127] In step S206, the generation unit 12 generates a clause 53, which is an external SELECT clause. The generation unit 12 generates the clause 53 by concatenating the output request items to the string "SELECT".
[0128] Specifically, the generation unit 12 uses the lot number, measurement length [mm], temperature [°C], employee name, and product color, which are output request items, to represent the conversion information and generate the clause 53 as "SELECT date and time, lot number, measurement length [cm] * 10, 5 + sensor value / 10000, employee number To name function (employee number), character To color function (first character extraction function (lot number))" (see Figure 10).
[0129] In step S207, the generation unit 12 generates a clause 54, which is an external FROM clause. The generation unit 12 generates the clause 54 by concatenating the string "FROM", "Lot Table L", and the internal SQL statement.
[0130] Here, lot table L is a hypothetical table that shows a list of lot numbers to be extracted. Lot table L may be a table output by, for example, the SQL statement shown in Figure 11.
[0131] Furthermore, the internal SQL statement is a statement formed by concatenating clause 51, which is an internal SELECT clause generated in step S204, and clause 52, which is an internal FROM clause generated in step S205.
[0132] In step S208, the generation unit 12 generates a WHERE clause, which is clause 55. The generation unit 12 generates a string by concatenating the string "WHERE" with the fixed phrase "L.Lot Number = X.Lot Number" which links the lot table and the table to be searched, and "and". The generation unit 12 then concatenates the extraction condition string to the generated string to create clause 55. Here, the extraction condition string is a string obtained by the generation unit 12 by converting the extraction conditions entered by the user (in other words, the extraction conditions expressed using output request items) into an expression using production information items, using processing information.
[0133] Specifically, the generation unit 12 generates clause 55 by concatenating the extraction condition string "5+sensor value / 10000>10" with the string "WHERE L.lot number=X.lot number and" (see Figure 10). The above extraction condition string "5+sensor value / 10000>10" is a string obtained by converting "temperature[°C]" included in the extraction condition "temperature[°C]>10" entered by the user into the string "5+sensor value / 10000" using the production information item "sensor value".
[0134] In step S209, the generation unit 12 generates a clause 56, which is an ORDER BY clause. The generation unit 12 generates the clause 56 by concatenating the string "Date and Time" to the string "ORDER BY".
[0135] Through the series of processes shown in Figure 8, the generation unit 12 can generate an SQL statement to retrieve output information from the database 20 that matches the search information received from the user, and this contributes to the proper execution of the process in step S105 (Figure 3) using that SQL statement.
[0136] Furthermore, the user can specify data for some or all of the defective products manufactured by production line 5 as an output request item. In this case, it is assumed that "inspection result" is included as a production information item. The item value of the production information item "inspection result" is either "good product" indicating that the product is good, or "defective product" indicating that the product is defective. The information processing device 10 can then output data for some or all of the defective products when the user inputs "inspection result = failed" as a search condition.
[0137] (Comparative example) In the following, the information processing device 10 in this embodiment will be described in comparison with the first comparative information processing device. The first comparative information processing device (also referred to as the information processing device relating to Comparative Example 1) differs from the information processing device 10 in that it does not have conversion information and therefore does not convert production information items using conversion information.
[0138] Figure 12 is an explanatory diagram showing an example of production information used by the information processing device according to Comparative Example 1.
[0139] The production information shown in Figure 12 includes the following information: Equipment ID: "Equipment A", Date and Time: "August 10, 2024, 10:12:01 AM", Lot Number: "RED123", Measurement Value 1: "0.05", Measurement Value 2: "47000", and Employee Number: "777".
[0140] Figure 13 is an explanatory diagram showing an example of output request items used by the information processing device according to Comparative Example 1.
[0141] The output request items shown in Figure 13 are the items that the user requests to be output, and include, for example, the date and time, lot number, measurement value 1, measurement value 2, and employee number.
[0142] Since the information processing device in Comparative Example 1 does not have conversion information, some or all of the production information items must be specified by the user as output request items.
[0143] Figure 14 is an explanatory diagram showing an example of conditional information used by the information processing device according to Comparative Example 1.
[0144] The condition information shown in Figure 14 represents the search criteria specified by the user, and includes, for example, "all items in the output request," "measured value 2 > 0," and "August data for equipment A."
[0145] Figure 15 is an explanatory diagram showing an example of an SQL statement generated by the information processing device according to Comparative Example 1.
[0146] The SQL statement shown in Figure 15 includes an inner SELECT clause (clause 91), an inner FROM clause (clause 92), an outer SELECT clause (clause 93), an outer FROM clause (clause 94), and a WHERE clause (clause 95).
[0147] Clause 91 is a clause generated by concatenating production information items to the string "SELECT".
[0148] Phrase 92 is generated by concatenating the string "FROM" with information indicating the table to be searched.
[0149] Clause 93 is generated by concatenating the string "SELECT" with the output request items specified by the user.
[0150] Clause 94 is generated by concatenating the string "FROM", "Lot Table L", and an internal SQL statement. Lot Table L is the same as the Lot Table L used by the information processing device 10. The internal SQL statement is a statement formed by concatenating Clauses 91 and 92.
[0151] Clause 95 is generated by concatenating the string "WHERE" with the standard phrase "L.Lot Number = X.Lot Number" which links the lot table and the target table for the search, and "and", and then concatenating the extraction conditions entered by the user.
[0152] Here, the output request items included in clause 93 must be some or all of the production information items; in other words, it is impossible to use information that is not included in the production information items.
[0153] Thus, since the information processing device according to Comparative Example 1 does not have conversion information, the user must specify production information items as output request items included in the search conditions. In other words, the user cannot specify information different from production information items as output request items, resulting in low convenience.
[0154] In contrast, the information processing device 10 described in the above embodiment has conversion information and can appropriately convert output request items specified by the user as search conditions into production information items, generate SQL using the converted production information items, and use it to retrieve data from the database 20. Therefore, the user can specify information different from the production information items as output request items, which has the advantage of being highly convenient.
[0155] In the following, the information processing device 10 in this embodiment will be described in comparison with a second comparative information processing device. The second comparative information processing device (also referred to as the information processing device relating to Comparative Example 2) differs from the information processing device 10 in that it uses a pseudo-table generated using an SQL view (also simply referred to as a view).
[0156] Figures 16 and 17 are explanatory diagrams showing the first and second examples of SQL statements used by the information processing device according to Comparative Example 2.
[0157] The SQL statements shown in Figures 16 and 17 are examples of SQL statements that use views to retrieve information equivalent to the information retrieved by the information processing device 10 using the SQL statements generated by the information processing device 10 (see Figure 10).
[0158] Specifically, the SQL statement shown in Figure 16 is an example of an SQL statement that describes a view (also called View 1) that retrieves information from database 20. Furthermore, the SQL statement shown in Figure 17 is an example of an SQL statement that retrieves output request items using View 1, which is based on the SQL statement shown in Figure 16.
[0159] Here, it is standard practice to include parts of the search criteria that are expected to change frequently in the SQL statement that retrieves information using the view, rather than in the SQL statement that describes the view. Following this standard, the string "Temperature [°C]>10", which corresponds to the search criteria, is not included in the SQL statement that describes the view (i.e., the SQL statement shown in Figure 16), but is included in the SQL statement that retrieves information using the view (i.e., the SQL statement shown in Figure 17).
[0160] The information processing device according to Comparative Example 2 can acquire information equivalent to that of the information processing device 10 by using the view shown in Figure 16.
[0161] However, the information processing device according to Comparative Example 2 has a problem in that the processing load when acquiring information equivalent to that of the information processing device 10 using the view shown in Figure 16 is greater than the processing load when the information processing device 10 acquires information.
[0162] For example, if database 20 contains 100 entries, the information processing method according to Comparative Example 2, when referring to view 1, performs arithmetic operations and functions on each of the 100 entries, and then extracts entries that satisfy the search condition "temperature [°C] > 10". Even if only 50 out of the 100 entries satisfy the search condition "temperature [°C] > 10", the information processing device according to Comparative Example 2 still needs to perform arithmetic operations and functions on all 100 entries.
[0163] On the other hand, the information processing device 10 described in the above embodiment performs arithmetic operations and functions on data in Table A where the temperature [°C] exceeds 10°C. If, for example, only 50 out of 100 entries satisfy the search condition "temperature [°C] > 10", the information processing device 10 only needs to perform arithmetic operations and functions on those 50 entries. Thus, the information processing device 10 has the advantage of lower processing load and lower power consumption compared to using a view.
[0164] Furthermore, the information processing device in Comparative Example 2 requires that the SQL statement shown in Figure 16 be pre-stored in the information processing device. Generally, it is difficult for a user to modify an SQL statement that is pre-stored in an information processing device. This is because, if a user attempts to modify an SQL statement stored in an information processing device, the user must be familiar with the notation of SQL statements, understand the configuration of the information processing device, and create the modified SQL statement without errors in accordance with the notation of SQL statements.
[0165] On the other hand, the information processing device 10 described in the above embodiment can generate an SQL statement corresponding to the change in search conditions when the search conditions received from the user via the GUI are changed, and output appropriate output request items. When using the information processing device 10 described in the above embodiment, the user can change the output results of the information processing device 10 by changing the search conditions specified via the GUI, which is highly convenient.
[0166] In the above embodiment, each component may be implemented by dedicated hardware or by executing a software program suitable for each component. Each component may also be implemented by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory.
[0167] Although the present invention has been described above based on embodiments of one or more information processing devices, the present invention is not limited to these embodiments. Without departing from the spirit of the present invention, various modifications that a person skilled in the art can conceive of may be applied to these embodiments, and forms constructed by combining components from different embodiments may also be included within the scope of one or more embodiments. [Industrial applicability]
[0168] This invention can be used in a system that appropriately retrieves data from a database containing information about products. [Explanation of symbols]
[0169] 1. Information Processing System 5 Production Line 6A, 6B, 6C equipment 10 Information Processing Devices 11 Acquisition Department 12 Generation part 13 Storage section 14. Data Acquisition Unit 15 Output section 20 Databases 30. Document Data 41, 42, 43, 44 areas 45 Button Images 51, 52, 53, 54, 55, 56, 91, 92, 93, 94, 95 phrases T1, T2, T3 Tables
Claims
1. A program that causes an information processing device to perform information processing, The aforementioned information processing is, The information processing device obtains from the user first item information indicating one or more first items to be output, This includes generating an SQL statement to retrieve the item values of one or more first items shown in the first item information from a database that stores the item values of one or more second items provided by the equipment, the item values of one or more second items from which the item values of one or more first items can be derived. program.
2. The information processing device has conversion information that converts the item values of one or more second items to the item values of one or more first items. Generating the aforementioned SQL statement is This includes generating a SELECT clause that extracts the item values of one or more second items stored in the database, while converting them to the item values of one or more first items using the conversion information. The program according to claim 1.
3. The aforementioned information processing further includes: This includes obtaining condition information from the user that indicates the conditions that the item values of one or more of the aforementioned first items must satisfy, Generating the aforementioned SQL statement is This includes generating a WHERE clause using the condition information, which indicates a condition that at least one of the one or more first items extracted using the SELECT clause must satisfy. The program according to claim 2.
4. The aforementioned conversion information includes a mathematical formula, The above formula is a formula that converts one numerical second item value from among the item values of one or more second items into one first item value from among the item values of one or more first items. The program according to claim 2.
5. The aforementioned conversion information includes a function, The function described above is a function that converts one of the item values of the one or more second items, which is a numerical value or a string, into one of the item values of the one or more first items. The program according to claim 2.
6. The aforementioned information processing further includes: To obtain new first item information from the user that is different from the aforementioned first item information, If the aforementioned new first item information is obtained, the process includes generating a new SQL statement that uses the obtained new first item information to retrieve one or more new first item values indicated in the new first item information from the database. The program according to claim 1.
7. The aforementioned information processing further includes: To obtain new conversion information from the user that is different from the aforementioned conversion information. When the new conversion information is obtained, the process includes generating a new SELECT clause that uses the obtained new conversion information to extract the item values of one or more second items stored in the database, converting them to the item values of one or more first items using the new conversion information. The program according to claim 2.
8. The aforementioned information processing further includes: This includes using the generated SQL statement to retrieve the item values of one or more first items from the database, and outputting the retrieved item values of one or more first items. The program according to claim 1.
9. An information processing device that performs information processing, An acquisition unit that acquires first item information from a user, which indicates one or more first items that the information processing device should output, The system includes a generation unit that generates an SQL statement to retrieve the one or more first item values shown in the first item information from a database containing one or more second item values provided by the equipment, the one or more second item values from which the one or more first item values can be derived. Information processing device.
10. An information processing method performed by an information processing device, The information processing device obtains from the user first item information indicating one or more first items to be output, This includes generating an SQL statement to retrieve the item values of one or more first items shown in the first item information from a database that stores the item values of one or more second items provided by the equipment, the item values of one or more second items from which the item values of one or more first items can be derived. Information processing methods.