Creation device, creation method, and creation program

The creation device addresses the inefficiency in creating examples for correcting regular expressions by selecting positive candidates and using an extension unit to generate correction examples, resulting in efficient and effective regular expression modification.

WO2025120771A1PCT designated stage expired Publication Date: 2025-06-12NT T INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/043665
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

Conventional techniques face challenges in efficiently creating examples for correcting regular expressions, requiring a large number of examples and failing to correct potential bugs unintended by the user.

Method used

A creation device that selects positive example candidates from generated examples and uses an extension unit to create positive examples for correction using an extended regular expression, enabling efficient example creation.

Benefits of technology

Enables efficient creation of examples for correcting regular expressions, effectively modifying regular expressions using a plurality of positive examples, and correcting potential bugs unintended by the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023043665_12062025_PF_FP_ABST
    Figure JP2023043665_12062025_PF_FP_ABST
Patent Text Reader

Abstract

A creation device (100) selects positive example candidates from examples generated in accordance with an input regular expression. The creation device (100) creates one or more positive examples for correction by using a regular expression for extension including a part that matches among the selected positive example candidates.
Need to check novelty before this filing date? Find Prior Art

Description

Creation device, creation method, and creation program

[0001] The present invention relates to a creating device, a creating method, and a creating program.

[0002] Regular expressions are used as a way to represent string patterns. However, it is known that it can be difficult to write regular expressions that express the intended pattern. For example, if a regular expression that does not express the intended pattern is incorporated into a program, the regular expression could become a bug or vulnerability in the program.

[0003] Therefore, a technique is known in which a regular expression is automatically corrected using an example in order to obtain an intended regular expression (see, for example, Non-Patent Document 1 and Non-Patent Document 2).

[0004] N. Chida and T. Terauchi, Repairing DoS Vulnerability of Real-World Regexes, In Proc. S&P'22. N. Chida and T. Terauchi, Repairing Regular Expressions for Extraction, In Proc. PLDI'23. India, 2015, pp. 1-6, doi: 10.1109 / INDICON.2015.7443752.

[0005] However, the above-described conventional techniques have problems in efficiently generating examples to be used for correcting regular expressions. For example, the conventional techniques require a large number of examples to accurately correct regular expressions, but generating a large number of examples requires a lot of man-hours and is not easy. Furthermore, the conventional techniques have problems such as being unable to correct potential bugs that are not intended by the user.

[0006] Therefore, in order to solve the above-mentioned problems and achieve the object, the creation device of the present invention is characterized by having a selection unit that selects positive example candidates from examples that are generated to correspond to an input regular expression, and an expansion unit that creates one or more positive examples for correction using an expansion regular expression that includes matching portions among the positive example candidates selected by the selection unit.

[0007] The present invention has the effect of enabling examples to be efficiently created for use in correcting regular expressions.

[0008] FIG. 1 is a diagram illustrating an overall view of processing by a creation device according to this embodiment. FIG. 2 is a diagram illustrating an example of processing by the creation device according to this embodiment. FIG. 3 is a diagram illustrating an example of the configuration of a creation device according to this embodiment. FIG. 4 is a table diagram illustrating an example of creation conditions according to this embodiment. FIG. 5 is a diagram illustrating an example of extraction processing according to this embodiment. FIG. 6 is a diagram illustrating an example of positive example extension processing according to this embodiment. FIG. 7 is a diagram illustrating an example of negative example extension processing according to this embodiment. FIG. 8 is a diagram illustrating an example of correction processing according to this embodiment. FIG. 9 is a flowchart illustrating an example of the procedure of creation processing according to this embodiment. FIG. 10 is a diagram illustrating an example of a computer that realizes the creation device according to this embodiment.

[0009] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. Note that the embodiments are not limited to the following description.

[0010] <Explanation of an Overall Picture of Processing by the Creation Device> Fig. 1 is a diagram illustrating an overall picture of processing by the creation device 100 according to this embodiment. The creation device 100 shown in Fig. 1 is an example of a computer that provides a technology for creating examples for correction using candidate examples selected from examples (hereinafter, sometimes simply referred to as "examples") including positive examples and negative examples generated by generation AI (Artificial Intelligence) or the like, as base data for extension processing.

[0011] Regular expressions are used as a method for expressing character string patterns, but they are difficult to write so as to express the intended pattern, and if a regular expression expressing an unintended pattern is incorporated into a program, etc., it can become a vulnerability. Therefore, a reference technique is known that automatically corrects a regular expression using positive examples, which are examples that satisfy the regular expression, and negative examples, which are examples that do not satisfy the regular expression, in order to obtain the regular expression intended by the user.

[0012] However, the reference technology has a problem in efficiently creating examples to be used for correcting regular expressions. For example, the reference technology requires a large number of examples to accurately correct regular expressions, but generating a large number of examples requires a lot of man-hours and is not easy. In addition, the reference technology has a problem in that it is not possible to create examples that are not intended by the user, and therefore it is not possible to correct potential bugs that are not intended by the user.

[0013] Therefore, in order to solve the above-mentioned problems, the creation device 100 according to this embodiment uses positive example candidates corresponding to the regular expression input by the user as base data for the extension process to create positive examples to be used for correcting the regular expression (hereinafter, these may be referred to as "positive examples for correction").

[0014] Here, a series of processing steps performed by the creation device 100 will be described with reference to Fig. 1. For example, the creation device 100 selects positive example candidates from examples generated to correspond to an input regular expression ((1) in Fig. 1).

[0015] The creation device 100 generates one or more corrective positive examples ((3) in FIG. 1) using an extended regular expression that includes matching portions among the selected positive example candidates ((2) in FIG. 1).

[0016] Therefore, the creation device 100 according to this embodiment has the effect of enabling efficient creation of examples to be used for correcting regular expressions, and as a result, the creation device 100 can efficiently and effectively correct regular expressions using multiple positive examples for correction.

[0017] <Description of Creation Device> Next, as an example of creation processing by the creation device 100 according to this embodiment, a flow of extraction processing of positive examples and negative examples from examples, selection processing and extension processing from the extracted positive examples and negative examples, correction processing using the created positive examples and negative examples used for correction, and output processing will be described. Figure 2 is a diagram illustrating an example of processing by the creation device 100 according to this embodiment.

[0018] First, the creating device 100 receives input of a regular expression from the user ((1) in FIG. 2).

[0019] The example generation unit 132 selects a generation tool such as a generation AI for generating examples corresponding to the input regular expression ((2-1) in FIG. 2). Next, the example generation unit 132 executes a generation command, such as inputting a prompt according to the generation tool, to the selected generation tool ((2-2) in FIG. 2). Next, the generation tool generates examples based on the input generation command ((2-3) in FIG. 2). Then, the example generation unit 132 accepts examples including positive examples and negative examples created by the generation tool ((2-4) in FIG. 2).

[0020] The extraction unit 133 extracts positive examples and negative examples to be used in the selection process from the examples generated by the generation tool ((3) in FIG. 2).

[0021] The selection unit 134 selects positive example candidates and negative example candidates to be used as base data in the extension process from the extracted positive examples and negative examples ((4-1) in FIG. 2). Specifically, the selection unit 134 accepts the selection of positive examples and negative examples from the user ((4-2) in FIG. 2).

[0022] The expansion unit 135 expands the positive examples and negative examples selected by the user ((5) in FIG. 2). For example, the expansion unit 135 uses an expansion regular expression created to satisfy all selected positive example candidates, retaining the matching portions between the positive example candidates and randomly changing the character strings of the remaining portions to create multiple positive examples for correction. The expansion unit 135 also randomly changes the character strings of selected negative example candidates to create multiple negative examples (hereinafter, sometimes referred to as "negative examples for correction") to use in correcting the regular expression.

[0023] The creation condition control unit 136 controls the execution of the selection process and extension process described in steps (4-1), (4-2), and (5) above so as to satisfy the creation conditions stored in the creation condition DB 121 ((6) in Figure 2).

[0024] The corrector 137 corrects the regular expression input by the user in cooperation with the automatic corrector 200 using the created positive and negative examples for correction ((7) in FIG. 2). The output unit 138 then outputs the corrected regular expression ((8) in FIG. 2).

[0025] In this way, the creation device 100 according to this embodiment can create multiple positive examples and negative examples for correction using examples created using the generation AI in accordance with a regular expression input by a user as base data. Therefore, the creation device 100 can output a regular expression desired by the user by efficiently and effectively correcting the regular expression.

[0026] (Creating Device 100) Next, the configuration of the creating device 100 will be described. FIG. 3 is a diagram showing an example of the configuration of the creating device 100 according to this embodiment. As shown in FIG. 3, the creating device 100 has a communication unit 110, a storage unit 120, and a control unit 130. Although not shown in FIG. 3, the creating device 100 may also include an input unit such as a keyboard or a mouse for receiving input such as operations from a user or the like. The creating device 100 may also include a display unit such as a display for displaying to a user or the like information on the generated examples, information on the selected positive example candidates and negative example candidates, and information on the positive examples and negative examples for correction created by the extension process.

[0027] (Communication Unit 110) The communication unit 110 performs data communication related to input of regular expressions, instructions for correcting regular expressions, etc., and output of generated examples, selected positive example candidates and negative example candidates, created positive examples and negative examples for correction, corrected regular expressions, etc. Specifically, the communication unit 110 mediates transmission and reception of predetermined data by the reception unit 131 and the output unit 138, which will be described later.

[0028] The communication unit 110 is realized by a network interface card (NIC) or the like, and controls communication via a telecommunication line such as a local area network (LAN), the internet, etc. The communication unit 110 is connected to a network via a wired or wireless connection as necessary, and can transmit and receive information bidirectionally.

[0029] (Storage Unit 120) The storage unit 120 stores data and programs used for various processes by the control unit 130, and various data acquired by the operation of the control unit 130. The storage unit 120 is realized by a semiconductor memory element such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk. As shown in FIG. 3 , the storage unit 120 has a creation condition DB 121.

[0030] (Creation Condition DB 121) The creation condition DB 121 is a database that stores creation conditions for controlling the process of creating positive examples for correction and negative examples for correction by the creation condition control unit 136, which will be described later. Specifically, the creation condition DB 121 stores execution conditions, including repetition conditions and stop conditions for the selection process and the extension process, in association with identification information for identifying the creation conditions.

[0031] Here, an example of a creation condition stored in the creation condition DB 121 will be described. FIG. 4 is a table diagram showing an example of a creation condition according to this embodiment. As shown in FIG. 4, the creation condition DB 121 stores an execution condition "repeating the selection process of positive and negative examples and the extension process 10 times" in association with No. "1," which is identification information for identifying the creation condition. In other words, the execution condition means that "the selection process by the selection unit 134 and the extension process by the extension unit 135, which will be described later, are considered as one set, and the process is repeated 10 times."

[0032] Furthermore, the creation condition DB 121 stores an execution condition "repeatedly perform the selection process of positive and negative examples and the expansion process until a stop operation is received" in association with the identification information No. "2" for identifying the creation condition. In other words, the execution condition means that "the selection process by the selection unit 134 and the expansion process by the expansion unit 135 (described later) continue until a stop operation is received from the user."

[0033] (Control Unit 130) Now, returning to Fig. 3, the explanation will be continued. The control unit 130 has an internal memory for temporarily storing programs defining various processing procedures and the like of the creation device 100 and processing data, and is realized by electronic circuits such as a CPU (Central Processing Unit) and an MPU (Micro Processing Unit), and integrated circuits such as an ASIC (Application Specific Integrated Circuit) and an FPGA (Field Programmable Gate Array). As shown in Fig. 3, the control unit 130 has a reception unit 131, an example generation unit 132, an extraction unit 133, a selection unit 134, an expansion unit 135, a creation condition control unit 136, a correction unit 137, and an output unit 138.

[0034] (Receiving Unit 131) The receiving unit 131 receives information input related to the processing executed by the creating device 100 from the user via the input unit described above.

[0035] For example, the receiving unit 131 receives a regular expression input by a user. Furthermore, for example, the receiving unit 131 receives a selection by the user of a generation tool for creating examples related to the input regular expression. Furthermore, the receiving unit 131 receives a selection by the user of positive example candidates and negative example candidates from among examples presented to the user by a selection unit 134 (described later).

[0036] (Example Generation Unit 132) The example generation unit 132 generates an example corresponding to a regular expression input by a user. Specifically, the example generation unit 132 selects a generation tool corresponding to the input regular expression, and outputs a generation command to the generation tool to generate an example.

[0037] For example, the example generation unit 132 selects a generation AI realized by a generative model or the like in accordance with the input regular expression. Next, the example generation unit 132 outputs a prompt (generation command) to the selected generation AI, such as "Please create examples that include positive examples that satisfy (regular expression) and negative examples that do not satisfy (regular expression)." Then, the example generation unit 132 accepts examples that include positive examples and negative examples generated by the generation AI based on the input prompt.

[0038] (Extraction Unit 133) The extraction unit 133 extracts positive examples and negative examples from examples including positive examples and negative examples generated by the example generation unit 132. The extraction process by the extraction unit 133 will now be described with reference to the drawings. Fig. 5 is a diagram showing an example of the extraction process according to this embodiment.

[0039] 5, the extraction unit 133 extracts examples that satisfy a predetermined condition, such as "examples that correspond to an input regular expression," from output data such as examples generated by the example generation unit 132 using the generation AI. For example, the extraction unit 133 extracts "positive examples," which are examples that satisfy the regular expression input by the user, and "negative examples," which are examples that do not satisfy the regular expression input by the user, from output data from the generation AI ((1) in FIG. 5).

[0040] (Selection Unit 134) The selection unit 134 uses the positive examples and negative examples extracted by the extraction unit 133 to select positive example candidates and negative example candidates that are used in the expansion process by the expansion unit 135, which will be described later.

[0041] Specifically, the selection unit 134 accepts a selection of a positive example candidate designated by the user for the positive examples and negative examples extracted from examples generated to correspond to the regular expression. For example, the selection unit 134 outputs the positive examples and negative examples extracted by the extraction unit 133 to the user. Here, the selection unit 134 accepts a positive example selected by the user from the output positive examples and negative examples as a "positive example candidate."

[0042] Furthermore, the selection unit 134 excludes the specified positive example candidates from the above-mentioned examples and selects the remaining examples as negative example candidates. For example, the selection unit 134 excludes the positive example candidates selected by the user from the extracted positive examples and negative examples and accepts the remaining examples as "negative example candidates."

[0043] On the other hand, the selection unit 134 uses all of the positive examples and negative examples generated to correspond to the regular expressions to select them as positive example candidates and negative example candidates, respectively. For example, the selection unit 134 can use all of the extracted positive examples and negative examples as positive example candidates and negative example candidates without performing a selection process by the user for the positive examples and negative examples extracted by the extraction unit 133.

[0044] (Expansion Unit 135) The expansion unit 135 uses the selected positive example candidates and negative example candidates as base data to perform expansion processing to generate multiple positive examples and negative examples. That is, the expansion unit 135 uses the positive example candidates and negative example candidates selected by the selection unit 134 to create multiple positive examples for correction and multiple negative examples for correction.

[0045] An example of creating positive examples for correction and negative examples for correction using positive example candidates and negative example candidates will now be described with reference to Figures 6 and 7. First, an example of a method for creating positive example candidates will be described with reference to Figure 6. Figure 6 is a diagram showing an example of a positive example expansion process according to this embodiment.

[0046] The expansion unit 135 extracts matching portions between multiple positive example candidates, such as "~~~@~~~.~~~" from the positive example candidates shown in (1) of Fig. 6 ((2) of Fig. 6). Note that in this item, "@" and "." represent matching portions of the positive example candidates, and "~" represents the insertion of an arbitrary character string.

[0047] The expansion unit 135 creates an expanded regular expression that satisfies the positive example candidate so as to include a portion that matches the extracted positive example candidate. For example, as shown in (3) of FIG. 6, the expansion unit 135 creates a regular expression that means "[a-z.]{4,7}[@][a-z]{6,7}[.][a-z]{3,4}". Note that the above-mentioned regular expression indicates a character string that includes "four or seven character strings including a to z and <.>", "@", "six or seven character strings including a to z", and ".", and "three or four character strings including a to z".

[0048] The expansion unit 135 randomly selects characters (alphabetical letters, numbers, symbols, etc.) belonging to the character types included in the input pattern expressed by the expansion regular expression from the portions other than the matching portion, to create multiple positive examples for correction. The length of the output string is between the minimum and maximum lengths of the original input. For example, as shown in (4) of FIG. 6, the expansion unit 135 creates "aa.a.a@aaaaaa.aaaa," "bb.bbb@bbbbbb.bbb," "cccc@cccccccc.ccc," and the like as examples that satisfy the expansion regular expression.

[0049] Next, an example of a method for generating negative example candidates will be described with reference to Fig. 7. Fig. 7 is a diagram showing an example of a negative example expansion process according to this embodiment.

[0050] The expansion unit 135 randomly converts a portion of a character string included in a negative example candidate into a different character to create multiple negative examples for correction. For example, the expansion unit 135 changes the character type of the negative example candidate "hxupj242rz2tdw.v" shown in (1) of FIG. 7 to different character types such as "iq63uw.ttuigtrfq," "7der.gjrbcht628r," and "u6ic.n4dggwfpf74" shown in (2) of FIG. 7. In other words, the expansion unit 135 uses a negative example selected as a negative example candidate as base data for the expansion process and randomly changes the character type of the negative example candidate to create multiple negative examples for correction.

[0051] In addition, the expansion unit 135 inputs a prompt to a predetermined generation AI to instruct it to generate positive examples for correction and negative examples for correction using the selected positive example candidates and negative example candidates as base data for the expansion process, thereby creating them as positive examples for correction and negative examples for correction.

[0052] For example, the extension unit 135 can input a prompt such as, "Please tell us examples that match (regular expression) and examples that do not match. As an example, <positive example candidate> is a match, and <negative example candidate> is an example that does not match" into the generation AI, and the output data can be used as positive examples for correction and negative examples for correction.

[0053] (Creation Condition Control Unit 136) The creation condition control unit 136 controls execution conditions for the selection process by the selection unit 134 (described later) and the example creation process based on the extension process by the extension unit 135 (described later). For example, the creation condition control unit 136 ends the generation of positive examples for correction and negative examples for correction when a predetermined number of times or a predetermined termination condition is satisfied.

[0054] As a specific example, the creation condition control unit 136 controls the above-mentioned selection process and extension process based on the execution condition "repeating the selection process of positive examples and negative examples and the extension process 10 times," which is the execution condition corresponding to No. "1" among the creation conditions stored in the creation condition DB 121 shown in Fig. 4. In other words, the creation condition control unit 136 executes control such as "repeating 10 sets of the selection process by the selection unit 134 and the extension process by the extension unit 135, which will be described later, as one set."

[0055] The creation condition control unit 136 also controls the above-described selection process and extension process based on the execution condition corresponding to No. "2" among the creation conditions stored in the creation condition DB 121 shown in Fig. 4, which is "repeated selection process of positive examples and negative examples and extension process until a stop operation is received." In other words, the creation condition control unit 136 executes control such as "repeated selection process by the selection unit 134 and extension process by the extension unit 135, which will be described later, until a termination command is received from the user."

[0056] (Correction Unit 137) The correction unit 137 corrects the regular expression using the positive examples for correction and the negative examples for correction created by the expansion unit 135. Here, an example of the correction process by the correction unit 137 will be described with reference to the drawings. Fig. 8 is a diagram showing an example of the correction process according to this embodiment.

[0057] The correction unit 137 receives positive examples and negative examples for correction, which are the positive examples and negative examples expanded by the expansion unit 135 ((1) in FIG. 8).

[0058] The correction unit 137 starts the correction process ((2-1) in FIG. 8). First, the correction unit 137 assigns a correction tool selection symbol that identifies a correction tool to the regular expression of the correction candidate (hereinafter, this may be referred to as "correction candidate + correction tool selection symbol") ((2-2) in FIG. 8).

[0059] The corrector 137 selects a correction tool to be used to correct the regular expression of the correction candidate based on the correction candidate and the correction tool selection symbol ((3-1) in FIG. 8). Specifically, the corrector 137 checks the status of the automatic corrector 200 in which the correction tool is stored ((3-2) in FIG. 8). Here, the automatic corrector 200 has various correction tools, such as a ReDOS (Regular Expressions DoS) correction tool ((3-3) in FIG. 8), an error correction tool ((3-4) in FIG. 8), and other correction tools ((3-5) in FIG. 8).

[0060] The correction unit 137 links the correction tool to be used, the status of which has been checked, based on the information of the correction candidate and the correction tool selection symbol, and determines a command for executing the correction process for the correction tool ((3-6) in FIG. 8).

[0061] The correction unit 137 starts correcting the regular expression of the correction candidate ((4-1) in FIG. 8). Specifically, the correction unit 137 executes the correction by inputting a command to execute the correction process to the selected correction tool ((4-2) in FIG. 8).

[0062] The correcting unit 137 outputs the regular expression corrected by performing the above-described processing, and ends the correction processing ((5) in FIG. 8).

[0063] In this way, the corrector 137 can correct the regular expression input by the user using the positive examples for correction and the negative examples for correction created by the expansion process.

[0064] (Output Unit 138) The output unit 138 outputs to the user the regular expression corrected by the correction unit 137. Note that if it is determined that correction processing is not necessary, the output unit 138 can output the uncorrected regular expression to the user.

[0065] (Processing Procedure by Creating Device 100) Hereinafter, a processing procedure realized by the creating device 100 according to this embodiment will be described. Fig. 9 is a flowchart showing an example of the procedure of the creating process according to this embodiment.

[0066] The receiving unit 131 receives information about regular expressions (S101). The information about regular expressions includes "regular expressions," "instructions to create examples based on regular expressions," and "created examples."

[0067] If an example is to be generated (Yes in S102), the example generating unit 132 selects an example generation method (S103). Then, the example generating unit 132 generates an example based on the selected generation method (S104). On the other hand, if an example is not to be generated (No in S102), the creating device 100 skips steps S103 and S104.

[0068] The extraction unit 133 extracts positive examples and negative examples to be used in the selection process from the examples (S105). The selection unit 134 selects candidates from the positive examples and negative examples (S106). The expansion unit 135 then performs expansion processing on the selected positive example candidates and negative example candidates (S107).

[0069] If the predetermined termination condition for the creation process is not met (No in S108), the creation device 100 returns to the previous step and continues the process. On the other hand, if the predetermined termination condition for the creation process is met (Yes in S108), the correction unit 137 corrects the received regular expression using the positive examples and negative examples (S109).

[0070] The output unit 138 outputs the corrected regular expression (S110), and the creating device 100 ends the process.

[0071] (Effects) The effects achieved by the creation device 100 according to this embodiment will now be described. The selection unit 134 of the creation device 100 according to this embodiment selects positive example candidates from examples generated to correspond to an input regular expression. The expansion unit 135 of the creation device 100 generates one or more positive examples for correction using a regular expression for expansion that includes a matching portion among the selected positive example candidates. Therefore, the creation device 100 according to this embodiment has the effect of enabling efficient creation of examples to be used for correcting regular expressions.

[0072] Specifically, the selection unit 134 accepts a user-specified selection of positive example candidates from among examples generated in accordance with the regular expression, and selects the remaining examples as negative example candidates after excluding the specified positive example candidates from the examples. Alternatively, the selection unit 134 uses all positive examples and negative examples generated to correspond to the regular expression and selects them as positive example candidates and negative example candidates, respectively.

[0073] Furthermore, the expansion unit 135 extracts matching portions among the multiple positive example candidates. The expansion unit 135 creates an expanded regular expression that satisfies the positive example candidates so as to include the extracted matching portions. The expansion unit 135 randomly selects characters belonging to character types included in the input pattern expressed by the expanded regular expression, other than the matching portions, to create multiple positive examples for correction. The expansion unit 135 randomly converts parts of character strings included in the negative example candidates into different characters to create multiple negative examples for correction.

[0074] As described above, the creation device 100 creates positive examples and negative examples for correction using, as templates, positive examples and negative examples selected by the user from among the positive examples and negative examples extracted from examples generated to correspond to the input regular expression. This allows the creation device 100 to accurately create a large number of positive examples and negative examples for correction.

[0075] The expansion unit 135 uses the selected positive example candidates and negative example candidates as base data for the expansion process and inputs a prompt to a predetermined generation AI to instruct it to generate positive examples for correction and negative examples for correction, thereby creating positive examples for correction and negative examples for correction.

[0076] As described above, the creation device 100 inputs prompts to the generation AI designed to create positive and negative examples for correction using positive and negative examples selected by the user as templates. The creation device 100 then causes the generation AI to create positive and negative examples for correction. This allows the creation device 100 to create a large number of positive and negative examples for correction with high accuracy and a wide variety.

[0077] The creation condition control unit 136 terminates the generation of positive examples and negative examples for correction when a predetermined number of times or a termination condition is satisfied. As described above, the creation device 100 controls the execution conditions for the process of creating positive examples and negative examples for correction using positive examples and negative examples selected by the user as templates from among the positive examples and negative examples extracted from examples generated to correspond to the input regular expression. Therefore, the creation device 100 achieves the effect of being able to create a large number of highly accurate positive examples and negative examples for correction by repeating the process of selecting and expanding positive examples and negative examples.

[0078] As described above, the creation device 100 according to this embodiment creates another example based on an example created by a user, a generation AI, etc., by retaining the parts that match in multiple examples and filling in the other parts with random character strings, thereby achieving the effect of efficiently increasing the number of examples used in the regular expression automatic correction technology.

[0079] Furthermore, the creation device 100 according to this embodiment can reduce the man-hours required for creating positive examples and negative examples and the computer processing required compared to conventional methods by creating a large number of positive examples and negative examples for correction using positive examples and negative examples selected from examples created by the generation AI as templates.

[0080] <Modifications> Modifications realized by the creating device 100 according to this embodiment will be described below.

[0081] (Data, etc.) The regular expressions, positive examples and negative examples, candidate positive examples and candidate negative examples, positive examples for correction and negative examples for correction, names of functional parts of the creation device 100, steps, processes, names of steps or processes, etc. used in the description of the above-mentioned embodiments are merely examples and can be changed as desired.

[0082] For example, the creation condition DB 121 stores execution conditions including a repeat condition and a stop condition for the selection process and the extension process in association with identification information for identifying the extension condition, but is not limited to this.

[0083] (Acceptance of Predetermined Information) In the above embodiment, the acceptance unit 131 has been described as accepting predetermined information input via an input unit included in the creation device 100, but this is not limiting. For example, the acceptance unit 131 can accept predetermined information input from an information processing device operated by a user via the communication unit 110. Furthermore, the acceptance unit 131 can accept the input of the predetermined information via a storage medium in which the predetermined information is stored.

[0084] (Accepting Selection of Positive Example Candidates and Negative Example Candidates) In the above-described embodiment, the selection unit 134 can accept the selection by inputting identification information of the positive example candidates and negative example candidates selected by the user from the extracted positive examples and negative examples.

[0085] Although the selection unit 134 has been described as selecting the remaining candidates after excluding the accepted positive example candidates as negative example candidates, this is not limiting. For example, the selection unit 134 can accept user selection of negative example candidates in addition to the positive example candidates.

[0086] (Example Generation Process by Generation AI) In the above embodiment, the example generator 132 selects a generation tool corresponding to the input regular expression and causes the generation tool to create an example, but this is not limited to this. For example, the example generator 132 can generate an example corresponding to a regular expression based on a generation tool, based on the selection of the generation tool input by the user and prompts input to the generation tool, etc.

[0087] Furthermore, the negative examples generated by the above-described generation AI are not particularly limited as long as they are strings that do not satisfy the regular expressions. On the other hand, the negative examples may have a predetermined degree of relevance to the positive examples. For example, if a positive example is composed of "alphabetical characters and symbols" such as "user@example.com", the negative examples may also have a common feature, such as being composed of "alphabetical characters and symbols".

[0088] (Flowcharts, etc.) The steps in a flowchart, etc. may be interchanged and performed as long as there is no contradiction, and some steps may not be performed. In addition, conjunctions such as "next," "continue," "further," "at this time," and "on this occasion" used in the description of a flowchart do not limit the order or timing of performing the processes in the flowchart.

[0089] (System) The information including the processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be changed as desired unless otherwise specified.

[0090] Furthermore, the components of each device shown in the figure are conceptual functional components and do not necessarily have to be physically configured as shown. In other words, the specific form of distribution and integration of each device is not limited to that shown. In other words, all or part of the devices can be functionally or physically distributed or integrated in any unit depending on various loads, usage conditions, etc.

[0091] For example, in the above-described embodiment, the description has been given on the assumption that the generation AI and the automatic correction device 200 are realized by an information processing device different from the creation device 100. However, this is not limited to this. In other words, the creation device 100 may be an information processing device that includes the functions realized by the generation AI and the automatic correction device 200.

[0092] <Hardware Configuration> The components of each device shown in the figure are conceptual functional components and do not necessarily have to be physically configured as shown. In other words, the specific form of distribution and integration of each device is not limited to that shown, and all or part of them can be functionally or physically distributed and integrated in any unit depending on various loads, usage conditions, etc. Furthermore, all or any part of the processing functions performed by each device can be realized by a CPU and a program analyzed and executed by the CPU, or can be realized as hardware using wired logic.

[0093] Furthermore, among the processes described in this embodiment, all or part of the processes described as being performed automatically can also be performed manually using known methods. In addition, the information including the processing procedures, control procedures, specific names, various data, and parameters shown in the drawings can be changed as desired unless otherwise specified.

[0094] <Program> In one embodiment, the various devices constituting the creation device 100 can be implemented by installing a creation program as package software or online software on a desired computer. For example, by executing the creation program on an information processing device, the various devices constituting the creation device 100 can function. The information processing device referred to here includes desktop and notebook personal computers. In addition, the information processing device also includes mobile communication terminals such as smartphones and mobile phones, and even slate terminals such as PDAs (Personal Digital Assistants).

[0095] 10 is a diagram showing an example of a computer that realizes the creation device 100 according to this embodiment. The computer 1000 includes, for example, a memory 1010 and a CPU 1020. The computer 1000 also includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.

[0096] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to a hard disk drive 1090. The disk drive interface 1040 is connected to a disk drive 1100. A removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to a display 1130, for example.

[0097] The hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an application program 1092, a program module 1093, and program data 1094. That is, the programs that define the processes of the various devices that make up the creation device 100 are implemented as program modules 1093 in which computer-executable code is written. The program modules 1093 are stored, for example, in the hard disk drive 1090. For example, the program modules 1093 for executing processes similar to those of the functional configurations of the various devices that make up the creation device 100 are stored in the hard disk drive 1090. Note that the hard disk drive 1090 may be replaced with an SSD (Solid State Drive).

[0098] Furthermore, setting data used in the processing of the above-described embodiment is stored as program data 1094, for example, in the memory 1010 or the hard disk drive 1090. The CPU 1020 then reads the program module 1093 or the program data 1094 stored in the memory 1010 or the hard disk drive 1090 into the RAM 1012 as necessary, and executes the processing of the above-described embodiment.

[0099] The program module 1093 and program data 1094 are not limited to being stored in the hard disk drive 1090, but may also be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and program data 1094 may be stored in another computer connected via a network (such as a LAN or a WAN (Wide Area Network)). The program module 1093 and program data 1094 may then be read by the CPU 1020 from the other computer via the network interface 1070.

[0100] Although the present embodiment has been described above, the present embodiment is not limited by the descriptions and drawings that form a part of the disclosure. In other words, other embodiments, examples, operational techniques, etc. that are made by those skilled in the art based on the present embodiment are all included in the scope of the present embodiment.

[0101] REFERENCE SIGNS LIST 100 Creation device 110 Communication unit 120 Storage unit 121 Creation condition DB 130 Control unit 131 Reception unit 132 Example generation unit 133 Extraction unit 134 Selection unit 135 Expansion unit 136 Creation condition control unit 137 Correction unit 138 Output unit 200 Automatic correction device

Claims

1. A creation device, comprising: a selection unit that selects candidate positive examples from examples generated to correspond to an input regular expression; and an extension unit that creates one or more corrected positive examples using an extended regular expression that includes a matching part among the candidate positive examples selected by the selection unit.

2. The creation device according to claim 1, wherein the selection unit: receives a selection of the candidate positive examples specified by a user from among the examples generated according to the regular expression, and selects the remaining examples excluding the specified candidate positive examples from among the examples as candidate negative examples; or selects all of the positive examples and negative examples generated to correspond to the regular expression as the candidate positive examples and the candidate negative examples, respectively.

3. The creation device according to claim 1 or 2, wherein the extension unit: extracts a matching part among a plurality of the candidate positive examples; creates an extended regular expression that satisfies the candidate positive examples so as to include the extracted matching part; randomly selects characters belonging to a character type included in an input pattern represented by the extended regular expression for parts other than the matching part to create a plurality of the corrected positive examples; and creates a plurality of the corrected negative examples by randomly converting a part of a character string included in the candidate negative examples into different characters.

4. The creation device according to claim 1 or 2, wherein the extension unit inputs a prompt for instructing generation of the corrected positive examples and the corrected negative examples using the selected candidate positive examples and candidate negative examples as basic data for extension processing to a predetermined generation AI to create the corrected positive examples and the corrected negative examples.

5. The creation device according to claim 1, further comprising a creation condition control unit that ends generation of the corrected positive examples and the corrected negative examples when a preset specified number of times or an end condition is satisfied.

6. A creation method for causing a creation device to execute, the method including: a selection step of selecting candidate positive examples from examples generated to correspond to an input regular expression; and an extension step of creating one or more corrected positive examples using an extended regular expression that includes a matching part among the candidate positive examples selected in the selection step.

7. A creation program characterized by causing a computer to execute a selection step of selecting a positive example candidate from examples generated to correspond to an input regular expression, and an extension step of creating one or more corrected positive examples using a regular expression for extension including a matching part among the positive example candidates selected in the selection step.

Citation Information

Patent Citations

  • Rule generation device and rule generation program

    WO2021106172A1

  • Modification device, modification method, and modification program

    WO2022113308A1