Method, apparatus, and program for automatically changing names of functions and parameters
The method automates the naming of functions and parameters in software coding by using a function-name matching score calculation model to provide contextually relevant suggestions, addressing the inefficiencies and inconsistencies in manual naming processes and improving collaboration and maintenance.
Patent Information
- Application Number
- PCT/KR2023/008239
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-02
- Filing Date
- 2023-06-15
- Publication Date
- 2024-12-05
AI Technical Summary
The challenge in software coding is the manual and time-consuming process of naming functions and parameters, which can lead to inconsistencies and difficulties in collaboration and maintenance, as there is no standard for naming and it relies heavily on individual subjective opinions, often resulting in inefficient work processes.
A method and device that utilize a function-name matching score calculation model to provide recommended names for undefined identifiers in source code, allowing for real-time suggestions and updates based on user selections, and retraining the model for improved accuracy, integrating context-based dynamic code analysis and neural network learning to assist in naming tasks.
This approach automates the naming process, increasing efficiency and consistency in coding work by providing accurate and contextually relevant suggestions, reducing the effort required for naming functions and parameters, and enhancing collaboration by ensuring names align with coding conventions.
Smart Images

Figure KR2023008239_05122024_PF_FP_ABST
Abstract
Description
Method, device and program for automatically changing the names of functions and parameters
[0001] The present invention relates to a method, device and program for automatically changing the names of functions and parameters, and more particularly, to a method, device and program for automatically changing the names of functions and parameters included in source code.
[0002]
[0003] Coding is essential for implementing software used in various industries. This coding work is often performed collaboratively. Because coding is collaborative, the names of functions, parameters, and various variables included in the source code can be a crucial element in ensuring smooth collaboration.
[0004] As the importance of function and parameter names increases, naming functions, parameters, and various variables is emerging as a pain point for workers.
[0005] Naming functions, parameters, and various variables is not simply about choosing the words you want, but rather about writing them intuitively and concisely so that other developers can easily understand them and maintain them later.
[0006] For example, functions and parameters are among the most labor-intensive coding tasks, particularly when it comes to naming. Because there's no definitive answer to the names (or definitions) of functions and parameters, relying solely on the individual's subjective judgment, naming them requires significant time and effort. Furthermore, because the typical naming process is entirely manual, it often relies on the individual's preferences. Furthermore, if the development timeline is limited, temporary names may become permanent, with no opportunity for revision.
[0007] For example, after deciding on a name for a function, a developer might use development documentation or a series of processes to verify that the name conforms to the conventions of the developer's organization. However, if the function's functionality isn't clearly defined, this can lead to a mismatch between the function's name and its function, as well as the function's intended functionality. Furthermore, if the function name isn't changed to a more appropriate name after implementation is complete, a mismatch between the name and the function can occur.
[0008] The aforementioned issues can create maintenance difficulties and hinder collaboration. Furthermore, while changing the variable name "A" to "B" doesn't affect functionality due to the nature of the source code, it can reduce work efficiency, as it requires significant time and effort to rename the variable.
[0009] Therefore, there is a demand in the art for a method for automatically renaming functions and parameters. In this regard, Republic of Korea Patent Publication No. 10-2017-0042896 discloses a Java automatic identifier renaming technique.
[0010]
[0011] The present invention has been conceived in response to the aforementioned background technology, and is intended to provide a method, device and program for automatically changing the names of functions and parameters.
[0012] The technical problems of the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the description below.
[0013]
[0014] According to one embodiment of the present invention for solving the above-described problem, a method for automatically changing the names of functions and parameters is disclosed. The method comprises: a step of recognizing in real time a first source code including at least one undefined identifier input from a user terminal; a step of inputting the first source code into a function-name matching score calculation model, thereby providing a recommended parameter name and a recommended variable name related to the at least one undefined identifier to the user terminal; a step of receiving a first selection input from the user terminal for selecting one of the recommended parameter name and the recommended variable name, and generating a second source code in which the at least one identifier is defined based on the first selection input; a step of inputting the second source code into the function-name matching score calculation model, thereby providing a recommended function name related to the at least one identifier to the user terminal; And a step of receiving a second selection input for selecting one of the recommended function names from the user terminal, and generating a third source code in which at least one identifier and a function name related to the at least one identifier are defined based on the second selection input; wherein the function-name matching score calculation model can be retrained based on at least one of the first selection input and the second selection input.
[0015] In an alternative embodiment, the function-name matching score calculation model may be trained using training data labeled with identifiers that include functions of the code and meanings corresponding to the functions, based on a context-based dynamic code analysis technique that analyzes the context and flow of the input code to understand the function of the input code.
[0016] In an alternative embodiment, the function-name matching score calculation model outputs a function-name matching score, and the function-name matching score may be a numeric value that is calculated together with an identifier that includes a function and a meaning corresponding to the function, as the function-name matching score calculation model analyzes the input code by converting it into a code that only has a function, excluding the identifier.
[0017] In an alternative embodiment, the step of inputting the first source code into the function-name matching score calculation model and providing the recommended parameter name and the recommended variable name related to the at least one undefined identifier to the user terminal includes the steps of: providing the function-name matching score corresponding to each of the recommended parameter name and the recommended variable name; and providing the number of selections of each of the recommended parameter name and the recommended variable name selected to date for each of the at least one undefined identifier; wherein the number of selections can be updated based on the first selection input.
[0018] In an alternative embodiment, the method may further include a step of recognizing whether a variable or parameter that must exist in a specific function included in the first source code does not exist based on the function-name matching score calculation model; and a step of recommending an identifier corresponding to the missing variable or missing parameter if it is recognized that the variable or parameter that must exist in the specific function does not exist.
[0019] In an alternative embodiment, the method may further include, when the first selection input for selecting one of the recommended parameter name and the recommended variable name is not received and a manually entered identifier is received, evaluating the manually entered identifier; and labeling the function of the code corresponding to the manually entered identifier and the manually entered identifier to retrain the function-name matching score calculation model.
[0020] According to one embodiment of the present invention for solving the above-described problem, a device is disclosed. The device includes: a memory storing one or more instructions; and a processor executing the one or more instructions stored in the memory, wherein the processor can perform the above-described methods by executing the one or more instructions.
[0021] According to one embodiment of the present invention for solving the above-described problem, a computer program stored in a computer-readable recording medium is disclosed, which is combined with a computer as hardware and can perform the above-described methods.
[0022] Other specific details of the present invention are included in the detailed description and drawings.
[0023]
[0024] The present invention can increase work efficiency by automatically processing the naming task for functions and parameters that require high difficulty during coding work.
[0025] The effects of the present invention are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the description below.
[0026]
[0027] FIG. 1 is a diagram illustrating a system according to one embodiment of the present invention.
[0028] Figure 2 is a hardware configuration diagram of a server according to one embodiment of the present invention.
[0029] FIG. 3 is a schematic diagram illustrating a method for automatically changing the names of functions and parameters according to one embodiment of the present invention.
[0030] FIG. 4 is a flowchart illustrating an example of a method for automatically changing the names of functions and parameters according to one embodiment of the present invention.
[0031] FIGS. 5, 6 and 7 are flowcharts illustrating an example of a method for automatically changing names of functions and parameters according to various embodiments of the present invention.
[0032] Figure 8 is a flowchart illustrating an example of a method for training a neural network model according to one embodiment of the present invention.
[0033] FIG. 9 is a schematic diagram illustrating one or more activation functions related to one embodiment of the present invention.
[0034]
[0035] Various embodiments are now described with reference to the drawings. In this specification, various descriptions are provided to facilitate an understanding of the present invention. However, it will be apparent that these embodiments may be practiced without these specific details.
[0036] As used herein, the terms "component," "module," "system," and the like refer to computer-related entities, hardware, firmware, software, a combination of software and hardware, or an execution of software. For example, a component may be, but is not limited to, a procedure running on a processor, a processor, an object, a thread of execution, a program, and / or a computer. For example, both an application running on a computing device and the computing device may be a component. One or more components may reside within a processor and / or a thread of execution. A component may be localized within a single computer. A component may be distributed between two or more computers. Furthermore, these components may execute from various computer-readable media having various data structures stored therein. Components may communicate via local and / or remote processes, for example, by signals comprising one or more data packets (e.g., data from one component interacting with another component in a local system, a distributed system, and / or data transmitted to another system via a network such as the Internet via signals).
[0037] Furthermore, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or." That is, unless otherwise specified or clear from context, "X employs A or B" is intended to mean either of the natural inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, "X employs A or B" can apply to any of these cases. Furthermore, the term "and / or" as used herein should be understood to refer to and include all possible combinations of one or more of the associated items listed.
[0038] Additionally, the terms "comprises" and / or "comprising" should be understood to imply the presence of the features and / or components in question. However, it should be understood that the terms "comprises" and / or "comprising" do not exclude the presence or addition of one or more other features, components, and / or groups thereof. Furthermore, unless otherwise specified or clear from the context to refer to the singular form, the singular in the specification and claims should generally be construed to mean "one or more."
[0039] Those skilled in the art should further recognize that the various illustrative logical blocks, components, modules, circuits, means, logics, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, blocks, components, means, logics, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application. However, such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
[0040] The description of the disclosed embodiments is provided to enable those skilled in the art to make or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art. The general principles defined herein may be applied to other embodiments without departing from the scope of the present invention. Therefore, the present invention is not limited to the disclosed embodiments. The present invention is to be construed in the widest scope consistent with the principles and novel features disclosed herein.
[0041] In this specification, the term "computer" refers to any type of hardware device including at least one processor, and may also be understood to encompass software components operating on the hardware device, depending on the embodiment. For example, the term "computer" may be understood to encompass, but is not limited to, smartphones, tablet PCs, desktops, laptops, and all user clients and applications running on each device.
[0042] Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings.
[0043] Although each step described in this specification is described as being performed by a computer, the subject of each step is not limited thereto, and at least some of each step may be performed by different devices depending on the embodiment.
[0044]
[0045] FIG. 1 is a diagram illustrating a system according to one embodiment of the present invention.
[0046] Referring to FIG. 1, a system according to one embodiment of the present invention may include a server (100), a terminal (200), and an external server (300). The system illustrated in FIG. 1 is according to one embodiment, and its components are not limited to the embodiment illustrated in FIG. 1, and may be added, changed, or deleted as needed.
[0047] In one embodiment, the server (100) can perform a method for automatically changing the names of functions and parameters. In addition, the server (100) can provide a service for automatically changing the names of functions and parameters to a user terminal (200).
[0048] For example, when the server (100) receives source code in which the names of functions and parameters have not been changed from the user terminal (200), the server (100) can transmit the source code in which the function names and parameter names have been changed to the user terminal (200).
[0049] For example, a worker performing coding work can write source code consisting of arbitrary function name identifiers such as “method_1, method_2” and arbitrary parameter name identifiers such as “param_1, param_2” in an Integrated Development Environment (IDE), and implement the function of the corresponding function. The worker can select the function whose implementation has been completed (e.g., by dragging) and execute the “service for automatically changing the names of functions and parameters” of the present invention, which is installed as an extension program (e.g., extension) in the Integrated Development Environment. At this time, the server (100) of the present invention can suggest a parameter name to the worker. In this case, the worker can select the suggested parameter name or directly input it if there is no name deemed appropriate. In addition, the server (100) can suggest a function name to the worker based on the modified code after the modification of the parameter name is completed. In this case, the worker can select the suggested function name or directly input it if there is no name deemed appropriate. Furthermore, the worker can obtain source code with both the function name and parameter name modified. Meanwhile, the modified code can be stored on the server (100) for later relearning.
[0050] In one embodiment, the server (100) can recognize in real time a first source code including at least one undefined identifier input from a user terminal (200).
[0051] When the server (100) recognizes the first source code in real time, it can determine recommended parameter names and recommended variable names related to at least one undefined identifier using a function-name matching score calculation model that receives the first source code. Furthermore, the server (100) can provide the recommended parameter names and recommended variable names to the user terminal (200).
[0052] The server (100) may receive a first selection input from the user terminal (200) that selects either a recommended parameter name or a recommended variable name. In this case, the server (100) may generate a second source code in which at least one identifier is defined based on the first selection input. In addition, the server (100) may retrain the function-name matching score calculation model based on the first selection input.
[0053] When the server (100) generates a second source code, it can determine a recommended function name associated with at least one identifier using a function-name matching score calculation model that receives the second source code. Furthermore, the server (100) can provide the recommended function name to the user terminal (200).
[0054] The server (100) may receive a second selection input from the user terminal (200) that selects one of the recommended function names. In this case, the server (100) may generate a third source code in which at least one identifier and a function name associated with at least one identifier are defined based on the second selection input. In addition, the server (100) may retrain the function-name matching score calculation model based on the second selection input.
[0055] That is, the server (100) can define an identifier in source code including at least one undefined identifier input from a user terminal (200) and generate source code in which a function name related to the defined identifier is defined. Accordingly, the server (100) can provide assistance in naming functions and parameters, thereby increasing the efficiency of coding work.
[0056] In various embodiments, the server (100) may receive source code from the user terminal (200) in which the names of functions and parameters remain unchanged. In this case, the server (100) may input the source code into a pre-trained neural network model to determine the parameter name of each of at least one parameter included in the source code and the function name of each of at least one function included in the source code. Here, the neural network model may be a function-name matching score calculation model.
[0057] Specifically, the server (100) can obtain candidate names of at least one parameter and at least one function from a pre-trained neural network that has received the source code as input, and transmit them to the user terminal (200). In this case, the user terminal (200) can transmit selection information for selecting one of the candidate names or directly input information to the server (100). Meanwhile, the server (100) can determine the name of at least one parameter and at least one function included in the source code based on the selection information or user input information directly input by the user.
[0058] In addition, the server (100) can change at least one parameter included in the source code to a parameter name determined in the above-described manner, and can change at least one function to a function name determined in the above-described manner. In addition, the server (100) can provide the source code with changed parameter names and function names to the user terminal (200).
[0059] Accordingly, the server (100) of the present invention can provide assistance in naming functions and parameters, thereby increasing the efficiency of coding work.
[0060] Below, an example of a method in which a server (100) automatically changes the names of functions and parameters is described with reference to FIGS. 3 to 8.
[0061] In various embodiments, the server (100) may provide web- or application-based services, but is not limited thereto.
[0062] The server (100) may include any type of computer system or computer device, such as, but not limited to, a microprocessor, a mainframe computer, a digital processor, a portable device, and a device controller.
[0063] Below, a description of the hardware configuration of the server (100) will be provided with reference to FIG. 2.
[0064] Meanwhile, the user terminal (200) may be connected to the server (100) via a network (400) and may be a terminal of a user who uses a service that automatically changes the names of functions and parameters provided by the server (100). For example, the user terminal (200) may be a terminal of a worker or developer performing coding work.
[0065] Here, the user terminal (200) may include, for example, various types of computer devices. For example, the user terminal (200) may refer to various terminal devices such as a smartphone, tablet PC, desktop, or laptop.
[0066] The user terminal (200) includes a display on at least a portion of the terminal, and may include an operating system for driving an application or extension program-based service provided from the server (100). For example, the user terminal (200) may be a smart phone, but is not limited thereto, and the user terminal (200) may include all types of handheld-based wireless communication devices such as navigation, PCS (Personal Communication System), GSM (Global System for Mobile communications), PDC (Personal Digital Cellular), PHS (Personal Handyphone System), PDA (Personal Digital Assistant), IMT (International Mobile Telecommunication)-2000, CDMA (Code Division Multiple Access)-2000, W-CDMA (W-Code Division Multiple Access), Wibro (Wireless Broadband Internet) terminals, smart pads, tablet PCs, etc., as a wireless communication device that ensures portability and mobility.
[0067] An external server (300) can be connected to a server (100) via a network (400), and can transmit and receive various information / data necessary for the server (100) to provide a service for automatically changing the names of functions and parameters, and can store and manage various information / data generated as the server (100) provides a service for automatically changing the names of functions and parameters.
[0068] For example, the external server (300) may be a database server that stores information used in a service that automatically changes the names of functions and parameters. As another example, the external server (300) may be a server that provides information used in a service that automatically changes the names of functions and parameters.
[0069] A network (400) may refer to a connection structure that enables information exchange between each node, such as a computing device, multiple terminals, and servers. For example, the network (400) includes a local area network (LAN), a wide area network (WAN), the Internet (WWW), a wired and wireless data communication network, a telephone network, a wired and wireless television communication network, etc.
[0070] Wireless data communication networks include, but are not limited to, 3G, 4G, 5G, 3GPP (3rd Generation Partnership Project), 5GPP (5th Generation Partnership Project), LTE (Long Term Evolution), WIMAX (World Interoperability for Microwave Access), Wi-Fi, the Internet, LAN (Local Area Network), Wireless LAN (Wireless Local Area Network), WAN (Wide Area Network), PAN (Personal Area Network), RF (Radio Frequency), Bluetooth network, NFC (Near-Field Communication) network, satellite broadcasting network, analog broadcasting network, and DMB (Digital Multimedia Broadcasting) network.
[0071]
[0072] Figure 2 is a hardware configuration diagram of a server according to one embodiment of the present invention.
[0073] Referring to FIG. 2, a server (100) according to one embodiment of the present invention may include one or more processors (110), a memory (120) for loading a computer program (151) executed by the processor (110), a bus (130), a communication interface (140), and a storage (150) for storing the computer program (151). Here, only components related to the embodiment of the present invention are illustrated in FIG. 2. Therefore, a person skilled in the art to which the present invention pertains will understand that other general components may be included in addition to the components illustrated in FIG. 2.
[0074] The processor (110) controls the overall operation of each component of the server (100). The processor (110) may be configured with one or more cores, and may include a processor for data analysis and deep learning, such as a central processing unit (CPU), a general purpose graphics processing unit (GPGPU), or a tensor processing unit (TPU) of a computing device. Alternatively, the processor may be configured to include any type of processor well known in the technical field of the present invention.
[0075] Additionally, the processor (110) can perform operations for at least one application or program for executing a method according to embodiments of the present invention, and the server (100) can have one or more processors.
[0076] In various embodiments, the processor (110) may further include a Random Access Memory (RAM, not shown) and a Read-Only Memory (ROM, not shown) that temporarily and / or permanently store signals (or data) processed within the processor (110). In addition, the processor (110) may be implemented in the form of a system on chip (SoC) that includes at least one of a graphics processing unit, RAM, and ROM.
[0077] The memory (120) stores various data, commands, and / or information. The memory (120) can load a computer program (151) from the storage (150) to execute methods / operations according to various embodiments of the present invention. When the computer program (151) is loaded into the memory (120), the processor (110) can perform the method / operation by executing one or more instructions constituting the computer program (151). The memory (120) may be implemented as a volatile memory such as RAM, but the technical scope of the present invention is not limited thereto.
[0078] The bus (130) provides communication functions between components of the server (100). The bus (130) can be implemented as various types of buses, such as an address bus, a data bus, and a control bus.
[0079] The communication interface (140) supports wired and wireless Internet communication of the server (100). Furthermore, the communication interface (140) may support various communication methods other than Internet communication. To this end, the communication interface (140) may be configured to include a communication module well known in the technical field of the present invention. In some embodiments, the communication interface (140) may be omitted.
[0080] Storage (150) can non-temporarily store a computer program (151). When performing a process according to an embodiment of the present invention through the server (100), storage (150) can store various information necessary to perform an analysis according to the disclosed embodiment.
[0081] Storage (150) may be configured to include non-volatile memory such as ROM (Read Only Memory), EPROM (Erasable Programmable ROM), EEPROM (Electrically Erasable Programmable ROM), flash memory, a hard disk, a removable disk, or any type of computer-readable recording medium well known in the art to which the present invention pertains.
[0082] The computer program (151) may include one or more instructions that cause the processor (110) to perform a method / operation according to various embodiments of the present invention when loaded into the memory (120). That is, the processor (110) may perform the method / operation according to various embodiments of the present invention by executing the one or more instructions.
[0083] In one embodiment, the computer program (151) may include one or more instructions for performing various methods associated with various tasks related to learning a neural network model.
[0084] The steps of a method or algorithm described in connection with an embodiment of the present invention may be implemented directly in hardware, implemented as a software module executed by hardware, or implemented by a combination thereof. The software module may reside in a random access memory (RAM), a read only memory (ROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, a hard disk, a removable disk, a CD-ROM, or any other form of computer-readable recording medium well known in the art to which the present invention pertains.
[0085] The components of the present invention may be implemented as programs (or applications) and stored on a medium to be executed in conjunction with a computer, which is hardware. The components of the present invention may be implemented as software programs or software elements. Similarly, the embodiments may be implemented in a programming or scripting language such as C, C++, Java, or an assembler, including various algorithms implemented as a combination of data structures, processes, routines, or other programming components. Functional aspects may be implemented as algorithms that are executed on one or more processors.
[0086]
[0087] FIG. 3 is a schematic diagram illustrating a method for automatically changing the names of functions and parameters according to one embodiment of the present invention.
[0088] According to one embodiment of the present invention, the server (100) may provide a service that supports a user's coding work. Specifically, the server (100) may provide a service that supports naming functions and parameters that coders find difficult.
[0089] Referring to FIG. 3, the user terminal (200) can transmit the first source code to the server (100). Here, the first source code may be a source code in which the names of functions and parameters have not been changed.
[0090] The server (100) can obtain a candidate name for each of at least one parameter included in the first source code through a learned neural network model. In addition, the server (100) can provide a selection interface to the user terminal (200), obtain selection information for selecting a parameter name from among the candidate names or user input information directly input by the user, and determine a parameter name for each of at least one parameter. In this case, the server (100) can change the name of each of at least one parameter included in the first source code to the determined parameter name to generate a second source code. Here, the second source code may be a source code in which only the names of the parameters are changed without changing the names of the functions.
[0091] After generating the second source code, the server (100) can obtain a candidate name for each of at least one function included in the second source code through a trained neural network model. In addition, the server (100) can provide a selection interface to the user terminal (200) to obtain selection information for selecting a function name from among the candidate names or user input information directly input by the user, and determine a function name for each of at least one function. In this case, the server (100) can change the name of each of at least one function included in the second source code to the determined function name to generate a third source code. In addition, the server (100) can transmit the third source code to the user terminal (200).
[0092] Accordingly, the server (100) of the present invention provides an immediate editing function for the names of functions and parameters included in the source code, thereby ensuring consistency in the names of functions and parameters. Furthermore, the server (100) can reduce the difficulty of naming tasks for workers, thereby increasing work efficiency.
[0093] Meanwhile, the second and third source codes, each modified based on selection information or user input information received through the selection interface, can be used to retrain the neural network model. That is, the neural network model of the present invention is updated as the user uses it, providing the user with increasingly accurate candidate names.
[0094] Hereinafter, a specific embodiment of a method for automatically changing the names of the above-described functions and parameters will be described with reference to FIGS. 4 to 7.
[0095]
[0096] FIG. 4 is a flowchart illustrating an example of a method for automatically changing the names of functions and parameters according to one embodiment of the present invention.
[0097] According to one embodiment of the present invention, the server (100) can recognize in real time that a user is writing source code using a meaningless identifier (i.e., an undefined identifier) on a user terminal (200). In addition, the server (100) can complete the source code by providing recommended parameter names, recommended variable names, and recommended function names for the meaningless identifiers included in the source code.
[0098] Specifically, referring to FIG. 4, the server (100) can recognize in real time a first source code including at least one undefined identifier input from a user terminal (200) (S1). Then, the server (100) can input the first source code into a function-name matching score calculation model and provide the user terminal with recommended parameter names and recommended variable names related to at least one undefined identifier (S2).
[0099] The function-name matching score calculation model of the present invention can be retrained based on a first selection input that selects either a recommended parameter name or a recommended variable name. Furthermore, the function-name matching score calculation model can be retrained based on a second selection input that selects either a recommended function name.
[0100] Accordingly, the function-name matching score calculation model of the present invention can be updated to output a result closer to the user's choice (i.e., a result with a high probability of being selected by the user) as it is used.
[0101] Additionally, the function-name matching score calculation model can be trained based on a context-based dynamic code analysis technique that analyzes the context and flow of the input code to understand its function. Specifically, the function-name matching score calculation model can be trained using training data labeled with identifiers that contain the code's function and the meaning corresponding to the function.
[0102] Additionally, the function-name matching score calculation model can output a function-name matching score. Here, the function-name matching score can be a numeric value that is calculated together with an identifier that includes the function and the meaning corresponding to the function, as the function-name matching score calculation model analyzes the input code by converting it into a code that only contains the function, excluding the identifier.
[0103] For example, when a feature-name matching score calculation model recognizes a first feature, it can output a first score corresponding to a first identifier corresponding to the first feature, a second score corresponding to a second identifier corresponding to the first feature, and a third score corresponding to a third identifier corresponding to the first feature. In this case, the server (100) can recommend the first identifier, the second identifier, and the third identifier for the first feature to the user as recommended parameter names or recommended variable names.
[0104] When the server (100) provides recommended parameter names and recommended variable names to the user terminal, it may provide a function-name matching score corresponding to each recommended parameter name and recommended variable name. Furthermore, the server (100) may provide the number of selections of each recommended parameter name and recommended variable name selected to date for each of at least one undefined identifiers. Furthermore, the server (100) may update the number of selections based on the first selection input received from the user terminal (200).
[0105] After providing the recommended parameter name and the recommended variable name to the user terminal (200), the server (100) may receive a first selection input from the user terminal (200) for selecting one of the recommended parameter name and the recommended variable name. In this case, the server (100) may generate a second source code in which at least one identifier is defined based on the first selection input (S3). In addition, the server (100) may input the second source code into the function-name matching score calculation model and provide the user terminal with a recommended function name related to at least one identifier (S4).
[0106] After the server (100) provides the recommended function name to the user terminal (200), the server (100) receives a second selection input from the user terminal (200) for selecting one of the recommended function names, and based on the second selection input, the server can generate a third source code in which at least one identifier and a function name related to at least one identifier are defined (S5).
[0107] In various embodiments, the server (100) can recognize in real time that a user is writing source code on a user terminal (200). In this case, the server (100) can recognize whether there are missing variables or missing parameters in the source code. Furthermore, if there are missing variables or missing parameters, the server (100) can recommend identifiers for the variables or parameters.
[0108] Specifically, the server (100) can determine whether a variable or parameter that must exist in a specific function included in the first source code is missing based on the function-name matching score calculation model. Furthermore, if the server (100) determines that a variable or parameter that must exist in a specific function is missing, it can recommend an identifier corresponding to the missing variable or parameter.
[0109] Accordingly, the server (100) of the present invention can prevent errors caused by omission of variables or parameters, thereby increasing the completeness of source code and increasing the productivity of coding work.
[0110] According to various embodiments, in step (S3), the server (100) may evaluate a manually entered identifier when a first selection input for selecting one of the recommended parameter name and the recommended variable name is not received and a manually entered identifier is received.
[0111] For example, the server (100) may evaluate whether a manually entered identifier has an appropriate meaning, is of appropriate length, or contains typos. For example, the server (100) may calculate a score for each of the evaluation items described above, and if the sum of the scores is greater than or equal to a preset value, the server may evaluate the manually entered identifier as a normal identifier.
[0112] When the server (100) completes the evaluation, it can retrain the function-name matching score calculation model by labeling the function of the code corresponding to the manually entered identifier and the manually entered identifier.
[0113] Accordingly, the server (100) of the present invention can evaluate an identifier manually input by a user and retrain the model to have extensibility for the name of the identifier.
[0114]
[0115] FIGS. 5, 6 and 7 are flowcharts illustrating an example of a method for automatically changing names of functions and parameters according to various embodiments of the present invention.
[0116] According to one embodiment of the present invention, the server (100) can receive a first source code in which the names of functions and parameters are not changed from the user terminal (200). In addition, the server (100) can input the first source code into a first neural network model for determining parameter names to determine the parameter names of each of at least one parameter included in the first source code. In addition, the server (100) can modify the first source code based on the parameter names to generate a second source code. In addition, the server (100) can input the second source code into a second neural network model for determining function names to determine the function names of each of at least one function included in the second source code. In addition, the server (100) can further modify the second source code based on the function names to generate a third source code.
[0117] The first neural network model and the second neural network model of the present invention may be a function-name matching score calculation model.
[0118] In various embodiments, the server (100) may input a first source code into a first neural network model for determining parameter names, and when determining a parameter name for each of at least one parameter included in the first source code, the server (100) may input the first source code into the first neural network model to obtain a first candidate name corresponding to each of at least one parameter. In addition, the server (100) may provide the first candidate name to the user terminal (200) and receive a selection input or user input from the user terminal (200) for selecting one of the first candidate names. In addition, the server (100) may determine a parameter name for each of at least one parameter based on the selection input or user input.
[0119] In various embodiments, the server (100) inputs the first source code into the first neural network model, and when obtaining a first candidate name corresponding to each of at least one parameter, the server (100) may input a specific parameter into the first neural network model to recognize a score for each parameter name class output by the first neural network model. In addition, the server (100) may determine at least one name having a score greater than or equal to a preset value as the first candidate name corresponding to the specific parameter.
[0120] In various embodiments, the first source code may be a source code in which an identifier for identifying different parameters is inserted into each position of at least one parameter. Meanwhile, when the server (100) generates a second source code by modifying the first source code based on the parameter name, if the parameter name corresponding to a specific parameter is determined, the server (100) may search for the identifier of the specific parameter included in the first source code. In addition, the server (100) may generate the second source code by changing the identifier of the specific parameter to the parameter name corresponding to the specific parameter. Here, the first neural network model may be retrained based on the second source code.
[0121] In various embodiments, the server (100) may input second source code into a second neural network model for determining a function name, and when determining a function name of each of at least one function included in the second source code, the server (100) may input the second source code into the second neural network model to obtain a second candidate name corresponding to each of at least one function. In addition, the server (100) may provide the second candidate name to the user terminal (200) and receive a selection input or user input from the user terminal (200) for selecting one of the second candidate names. In addition, the server (100) may determine a function name of each of at least one function based on the selection input or user input.
[0122] In various embodiments, the server (100) inputs the second source code into the second neural network model, and when obtaining a second candidate name corresponding to each of at least one function, the server (100) may input a specific function into the second neural network model and recognize a score for each function name class output by the second neural network model. In addition, the server (100) may determine at least one name having a score greater than or equal to a preset value as the second candidate name corresponding to the specific function.
[0123] In various embodiments, the source code may be source code in which an identifier for identifying different functions is inserted in each position of at least one function. Meanwhile, when the server (100) generates a third source code by further modifying the second source code based on the function name, if the function name corresponding to the specific function is determined, the server (100) may search for the identifier of the specific function included in the second source code. In addition, the server (100) may generate the third source code by changing the identifier of the specific function to the function name corresponding to the specific function. Here, the third source code is transmitted to the user terminal (200), and the second neural network model may be retrained based on the third source code.
[0124] In various embodiments, the server (100) may acquire a plurality of source codes that have been completed based on a specific code convention for training a neural network model. In addition, the server (100) may recognize a function in each of the plurality of source codes and recognize parameters constituting the function. In addition, the server (100) may recognize the structure and name of the function, and may train a second neural network model using training data that labels the structure of the function with the function name. In addition, the server (100) may recognize the positions and names of the parameters constituting the function, and may train a first neural network model using training data that labels the positions of the parameters constituting the function with the names of the parameters.
[0125] Referring to FIG. 5, the server (100) can receive a first source code in which the names of functions and parameters have not been changed from the user terminal (200) (S110).
[0126] The first source code of the present invention may include at least one parameter and at least one function. Furthermore, the first source code may be source code in which an identifier (e.g., param_1, param_2) is inserted into each position of at least one parameter to identify different parameters. Furthermore, the first source code may be source code in which an identifier (e.g., method_1, method_2) is inserted into each position of at least one function to identify different functions.
[0127] The server (100) can input the first source code into the first neural network model for determining the parameter name and determine the parameter name of each of at least one parameter included in the first source code (S120).
[0128] Specifically, referring to FIG. 6, the server (100) inputs the first source code into the first neural network model to obtain a first candidate name corresponding to each of at least one parameter (S121).
[0129] More specifically, the server (100) can input specific parameters into the first neural network model to recognize the scores for each parameter name class output by the first neural network model.
[0130] For example, the server (100) may input the position of a specific parameter included in the source code into the first neural network model. Here, the position of the specific parameter may be the position of a parameter located within a specific function. In this case, the first neural network model may output a score for each parameter name class based on the position of the specific parameter.
[0131] For example, if the first neural network model receives the position of a specific parameter included in the source code as input, it can calculate and output a score for each of multiple classes distinguished by the name of the parameter. Here, the sum of the scores for each of the multiple classes can be 1. For example, if there are five parameter names, A, B, C, D, and E, the first neural network model can calculate a score for each of the five classes.
[0132] The first neural network model of the present invention may be a multi-classification model, and the number of classes of the first neural network model may correspond to the number of types of parameter names recognized in a plurality of source codes that have been completed, but is not limited thereto.
[0133] Below, a description of a method for the server (100) to pre-train the first neural network model is described with reference to FIG. 8.
[0134] Meanwhile, when the server (100) recognizes a score by parameter name class, it can determine at least one name whose score by parameter name class is greater than or equal to a preset value as a first candidate name corresponding to a specific parameter.
[0135] For example, if the score of parameter name A is recognized as 0.3, the score of parameter name B is recognized as 0.1, the score of parameter name C is recognized as 0.2, the score of parameter name D is recognized as 0.3, and the score of parameter name E is recognized as 0.1, the server (100) can determine parameter names A, C, and D having a preset score value of 0.2 or higher as the first candidate names.
[0136] When the server (100) acquires the first candidate name, it can provide the first candidate name to the user terminal (200). In addition, the server (100) can receive a selection input or user input for selecting one of the first candidate names from the user terminal (200) (S122). In addition, the server (100) can determine the parameter name of each of at least one parameter based on the selection input or user input (S123).
[0137] Specifically, the server (100) may provide a list of first candidate names to the user terminal (200) via a user interface associated with a service that automatically changes the names of functions and parameters. Furthermore, the server (100) may provide an input window for inputting a name if there is no appropriate name among the first candidate names. Furthermore, the server (100) may obtain information selected or entered via the user interface to determine the parameter name of each of at least one parameter.
[0138] Referring again to FIG. 5, if the server (100) determines the parameter name of each of at least one parameter included in the first source code, the server can modify the first source code based on the parameter name to generate the second source code (S130).
[0139] Specifically, when a parameter name corresponding to a specific parameter is determined, the server (100) can search for the identifier of the specific parameter included in the first source code. Furthermore, the server (100) can generate a second source code by changing the identifier of the specific parameter to the parameter name corresponding to the specific parameter. Here, the second source code can be used for retraining the first neural network model.
[0140] When the server (100) generates a second source code, it can input the second source code into a second neural network model for determining a function name to determine the function name of each of at least one function included in the second source code (S140).
[0141] Specifically, referring to FIG. 7, the server (100) can input the second source code into the second neural network model to obtain a second candidate name corresponding to at least one function (S141).
[0142] More specifically, the server (100) can input a specific function into the second neural network model and recognize the scores for each function name class output by the second neural network model. Furthermore, the server (100) can determine at least one name with a score greater than or equal to a preset value as a second candidate name corresponding to the specific function.
[0143] For example, the server (100) may input the structure of a specific function included in the source code into the second neural network model. Here, the structure of the specific function may be determined based on the number of parameters included in the specific function or the types of parameters constituting the specific function. In this case, the second neural network model may output a score for each function name class based on the structure of the specific function.
[0144] The second neural network model of the present invention may be a multi-classification model, and the number of classes of the second neural network model may correspond to the number of types of function names recognized in a plurality of source codes that have been completed, but is not limited thereto.
[0145] Hereinafter, the method by which the server (100) determines the second candidate name using the second neural network model may be the same as the method described with reference to step (S121) of FIG. 6, and any duplicate description will be omitted. In addition, a description of the method by which the server (100) pre-trains the second neural network model will be described later with reference to FIG. 8.
[0146] Meanwhile, when the server (100) obtains a second candidate name, it may provide the second candidate name to the user terminal (200) and receive a selection input or user input for selecting one of the second candidate names from the user terminal (200) (S142). In addition, the server (100) may determine the function name of each of at least one function based on the selection input or user input (S143).
[0147] Specifically, the server (100) may provide a list of second candidate names to the user terminal (200) via a user interface associated with a service that automatically changes the names of functions and parameters. Furthermore, the server (100) may provide an input window for inputting a name if there is no appropriate name among the second candidate names. Furthermore, the server (100) may obtain information selected or entered via the user interface to determine the parameter name of each of at least one parameter.
[0148] Referring again to FIG. 5, if the server (100) determines the function name of each of at least one function included in the second source code, the server can further modify the second source code based on the function name to generate the third source code (S150).
[0149] Specifically, when a function name corresponding to a specific function is determined, the server (100) can search for the identifier of the specific function included in the second source code. Furthermore, the server (100) can generate a third source code by changing the identifier of the specific function to the function name corresponding to the specific function. Here, the third source code can be used for retraining the second neural network model.
[0150] Meanwhile, the third source code generated by the server (100) can be transmitted to the user terminal (200) that provided the first source code.
[0151] Accordingly, the server (100) of the present invention can automatically process the naming task for functions and parameters requiring high difficulty during coding work, thereby increasing work efficiency.
[0152] In an additional embodiment, the server (100) can integrate source codes worked on by multiple workers for one project and change function names and parameter names included in the source code to conform to specific coding style conventions.
[0153] Specifically, the server (100) may receive a first work item from a first worker terminal, which is a worker for a specific project, and may receive a second work item from a second worker terminal, which is a worker for the specific project. Here, each of the first work item and the second work item may refer to source code.
[0154] When the server (100) receives the first workpiece and the second workpiece, it can recognize at least one parameter included in the first workpiece and at least one parameter included in the second workpiece. In addition, the server (100) can compare the parameters included in each of the first workpiece and the second workpiece to recognize parameters that do not overlap with each other.
[0155] The server (100) inputs information related to non-overlapping parameter names into a first neural network model for determining parameter names, thereby recognizing scores for each parameter name class output by the first neural network model. Here, the information related to non-overlapping parameter names may be, but is not limited to, a portion of source code including non-overlapping parameter names, and may include various input data for outputting candidate names related to the parameter names.
[0156] In addition, the server (100) can determine the parameter name with the highest class score for each non-overlapping parameter name as a temporary parameter name. When the server (100) determines the temporary parameter name, it can change the names of the non-overlapping parameter names included in each of the first and second workpieces to the temporary parameter name.
[0157] The server (100) can change the non-overlapping parameter names included in each of the first and second workpieces into temporary parameter names, and then determine again whether non-overlapping parameter names exist. The server (100) can confirm the non-overlapping temporary parameter names as the parameter names of each of the first and second workpieces.
[0158] Meanwhile, if the server (100) recognizes that there are non-overlapping parameter names after changing the term parameter names, it may request user input to determine the names of the non-overlapping parameter names from each of the first worker terminal, the second worker terminal, and the other multiple worker terminals related to a specific project. In addition, if the server (100) receives multiple user inputs from each of the first worker terminal, the second worker terminal, and the other multiple worker terminals related to a specific project, it may determine the name with the highest number of overlapping times as the name of the non-overlapping parameter name based on the multiple user inputs.
[0159] Additionally, when the server (100) receives the first workpiece and the second workpiece, it can recognize at least one function included in the first workpiece and at least one function included in the second workpiece. In addition, the server (100) can compare the functions included in each of the first workpiece and the second workpiece to recognize function names that do not overlap with each other.
[0160] The server (100) inputs information related to non-overlapping function names into a second neural network model for determining function names, thereby recognizing scores for each function name class output by the second neural network model. Here, the information related to non-overlapping function names may be a portion of source code including non-overlapping function names, but is not limited thereto, and may include various input data for outputting candidate names related to the function names.
[0161] In addition, the server (100) can determine the function name with the highest class score for each non-overlapping function name as a temporary function name. When the server (100) determines the temporary function name, it can change the non-overlapping function names included in each of the first and second work products to the temporary function name.
[0162] The server (100) can change the non-overlapping function names included in each of the first and second workpieces into temporary function names, and then determine again whether non-overlapping function names exist. Here, the server (100) can confirm the non-overlapping temporary function names as the function names of each of the first and second workpieces.
[0163] Meanwhile, if the server (100) recognizes that there are non-overlapping function names after changing the term function name, it may request user input to determine the name of the non-overlapping function name from each of the first worker terminal, the second worker terminal, and the other multiple worker terminals related to a specific project. In addition, if the server (100) receives multiple user inputs from each of the first worker terminal, the second worker terminal, and the other multiple worker terminals related to a specific project, it may determine the name with the highest number of overlapping times as the name of the non-overlapping function name based on the multiple user inputs.
[0164] The server (100) can transmit a work product with changed function names and parameter names to each of the first worker terminal and the second worker terminal to conform to a specific coding style convention.
[0165] Accordingly, the server (100) of the present invention can prevent maintenance difficulties that may arise due to the names of functions or parameters temporarily set by an operator becoming fixed.
[0166]
[0167] Figure 8 is a flowchart illustrating an example of a method for training a neural network model according to one embodiment of the present invention.
[0168] According to one embodiment of the present invention, the server (100) can train a first neural network model for determining parameter names and a second neural network model for determining function names.
[0169] Referring to FIG. 8, the server (100) can acquire multiple source codes that have been completed based on specific code conventions for training a neural network model (S210). Here, the code conventions may refer to coding style rules for writing code that is easy for workers to read and manage, and naming parameters and functions may also be included in the coding conventions. For example, the code conventions may include camel case, Pascal notation, Hungarian notation, and snake notation.
[0170] That is, the server (100) can obtain multiple source codes that have been completed using the same style convention. For example, the server (100) can obtain multiple source codes that have been completed from a database server that stores multiple codes, libraries, etc. that have been completed. For another example, the server (100) can obtain multiple source codes that have been completed from an external server that provides open source.
[0171] The server (100) can recognize functions in each of a plurality of source codes and recognize parameters that constitute the functions (S220). In addition, the server (100) can recognize the structure and name of the function, and train a second neural network model using training data that labels the structure of the function with the name of the function (S230). In addition, the server (100) can recognize the positions and names of the parameters that constitute the function, and train a first neural network model using training data that labels the positions of the parameters that constitute the function with the names of the parameters (S240).
[0172] The first neural network model of the present invention may be a multi-classification model that performs a prediction probability determination function for each parameter name class. Here, the number of parameter name classes may correspond to the number of parameter name types recognized in multiple completed source codes, but is not limited thereto.
[0173] Additionally, the second neural network model may be a multi-classification model that performs the function of determining the prediction probability for each function name class. Here, the number of function name classes may correspond to, but is not limited to, the number of parameter name types recognized in multiple completed source codes.
[0174] Each of the first neural network model and the second neural network model of the present invention may include a neural network having a CNN or R-CNN (Region based CNN), C-RNN (Convolutional Recursive Neural Network), Fast R-CNN, Faster R-CNN, R-FCN (Region based Fully Convolutional Network), YOLO (You Only Look Once) or SSD (Single Shot Multibox Detector) structure.
[0175] Below, a description of the activation functions related to the first neural network and the second neural network is provided with reference to Fig. 9.
[0176]
[0177] FIG. 9 is a schematic diagram illustrating one or more activation functions related to one embodiment of the present invention.
[0178] A deep neural network (DNN) can refer to a neural network that includes multiple hidden layers in addition to input and output layers. Using a deep neural network, it is possible to identify latent structures in data. That is, it is possible to identify latent structures of photos, text, videos, voices, and music (e.g., what objects are in the photo, what the content and emotion of the text are, what the content and emotion of the voice are, etc.). A deep neural network can include a convolutional neural network (CNN), a recurrent neural network (RNN), an autoencoder, a generative adversarial network (GAN), a restricted boltzmann machine (RBM), a deep belief network (DBN), a Q network, a U network, a Siamese network, etc. The description of the above-mentioned deep neural network is merely an example, and the present invention is not limited thereto.
[0179] Neural networks can be trained using at least one of supervised learning, unsupervised learning, and semi-supervised learning. Neural network training aims to minimize output errors. Training involves repeatedly inputting training data into the neural network, calculating the neural network output and target error for the training data, and backpropagating the neural network error from the output layer to the input layer to update the weights of each node in the neural network in a direction that reduces the error. Supervised learning uses training data with the correct answer labeled for each training data (i.e., labeled training data). Unsupervised learning, on the other hand, may not have the correct answer labeled for each training data. For example, in the case of supervised learning for data classification, the training data may be data in which each training data category is labeled. Labeled training data is input to a neural network, and an error can be calculated by comparing the output (categories) of the neural network with the labels of the training data. For example, in unsupervised learning for data classification, the error can be calculated by comparing the input training data with the neural network output. The calculated error is backpropagated in the backward direction (i.e., from the output layer to the input layer) in the neural network, and the connection weights of each node in each layer of the neural network can be updated through backpropagation. The amount of change in the connection weights of each updated node can be determined by the learning rate. The neural network's calculation of the input data and the backpropagation of the error can constitute a learning cycle (epoch). The learning rate can be applied differently depending on the number of iterations of the neural network's learning cycle.For example, in the early stages of training a neural network, a high learning rate can be used to quickly allow the neural network to achieve a certain level of performance, thereby improving efficiency, while in the later stages of training, a low learning rate can be used to improve accuracy.
[0180] In neural network training, training data can typically be a subset of real-world data (i.e., the data to be processed using the trained neural network). Therefore, there can be a learning cycle where errors on the training data decrease but errors on the real-world data increase. Overfitting is a phenomenon where excessive training on the training data leads to increased errors on the real-world data. For example, a neural network trained on yellow cats may fail to recognize cats when shown non-yellow colors, a type of overfitting. Overfitting can increase errors in machine learning algorithms. Various optimization methods can be used to prevent overfitting. Methods such as increasing the training data, regularization, and dropout, which omits some nodes from the network during the training process, can be applied.
[0181] Throughout this specification, the terms activation function, computational model, neural network, network function, and neural network may be used interchangeably. (Hereinafter, they are collectively referred to as neural networks.) A data structure may include a neural network. And, a data structure including a neural network may be stored on a computer-readable medium. A data structure including a neural network may also include data input to the neural network, weights of the neural network, hyperparameters of the neural network, data obtained from the neural network, activation functions associated with each node or layer of the neural network, and loss functions for training the neural network. A data structure including a neural network may include any of the components disclosed above. That is, a data structure including a neural network may be configured to include all or any combination of data input to the neural network, weights of the neural network, hyperparameters of the neural network, data obtained from the neural network, activation functions associated with each node or layer of the neural network, and loss functions for training the neural network. In addition to the aforementioned components, a data structure including a neural network may include any other information that determines the characteristics of the neural network. Additionally, the data structure may include any form of data used or generated in the computational process of the neural network, and is not limited to the aforementioned. The computer-readable medium may include a computer-readable recording medium and / or a computer-readable transmission medium. The neural network may be composed of a set of interconnected computational units, which may generally be referred to as nodes. These nodes may also be referred to as neurons. The neural network is composed of at least one node.
[0182] The data structure may include data input to a neural network. The data structure including the data input to the neural network may be stored on a computer-readable medium. The data input to the neural network may include training data input during the neural network training process and / or input data input to the neural network after training has been completed. The data input to the neural network may include data that has undergone preprocessing and / or data that is the target of preprocessing. Preprocessing may include a data processing process for inputting data to the neural network. Accordingly, the data structure may include data that is the target of preprocessing and data generated by the preprocessing. The above-described data structure is merely an example, and the present invention is not limited thereto.
[0183] The data structure may include weights of the neural network. (In this specification, weights and parameters may be used interchangeably.) And the data structure including the weights of the neural network may be stored in a computer-readable medium. The neural network may include a plurality of weights. The weights may be variable and may be varied by a user or an algorithm so that the neural network can perform a desired function. For example, when one or more input nodes are interconnected to one output node by respective links, the output node may determine the output node value based on the values input to the input nodes connected to the output node and the parameters set in the links corresponding to each input node. The above-described data structure is merely an example and the present invention is not limited thereto.
[0184] By way of example and not limitation, the weights may include weights that vary during the neural network learning process and / or weights that have completed neural network learning. The weights that vary during the neural network learning process may include weights at the start of the learning cycle and / or weights that vary during the learning cycle. The weights that have completed neural network learning may include weights that have completed the learning cycle. Therefore, the data structure including the weights of the neural network may include a data structure including weights that vary during the neural network learning process and / or weights that have completed neural network learning. Therefore, the above-described weights and / or combinations of each weight are included in the data structure including the weights of the neural network. The above-described data structures are merely examples and the present invention is not limited thereto.
[0185] A data structure including neural network weights can be stored in a computer-readable storage medium (e.g., memory, hard disk) after going through a serialization process. Serialization can be a process of converting a data structure into a form that can be stored on the same or a different computing device and later reconstructed and used. A computing device can serialize the data structure to transmit and receive data over a network. The serialized data structure including neural network weights can be reconstructed on the same or a different computing device through deserialization. The data structure including neural network weights is not limited to serialization. Furthermore, the data structure including neural network weights can include a data structure that increases computational efficiency while minimizing the use of computing device resources (e.g., a B-Tree, a Trie, an m-way search tree, an AVL tree, a Red-Black Tree in nonlinear data structures). The above are merely examples, and the present invention is not limited thereto.
[0186] The data structure may include hyperparameters of the neural network. The data structure including the hyperparameters of the neural network may be stored in a computer-readable medium. The hyperparameters may be variables that can be changed by the user. The hyperparameters may include, for example, a learning rate, a cost function, the number of learning cycle repetitions, weight initialization (e.g., setting a range of weight values to be subject to weight initialization), and the number of hidden units (e.g., the number of hidden layers, the number of nodes in the hidden layer). The above-described data structure is merely an example, and the present invention is not limited thereto.
[0187]
[0188] While the embodiments of the present invention have been described above with reference to the attached drawings, those skilled in the art will appreciate that the present invention can be implemented in other specific forms without altering the technical concept or essential features thereof. Therefore, the embodiments described above should be understood to be illustrative in all respects and not restrictive.
[0189]
[0190] The best mode for carrying out the invention as described above has been described.
[0191] The present invention can provide a method, device and program for automatically changing the names of functions and parameters.
Claims
1. In a method performed by a server processor, A step of recognizing in real time a first source code including at least one undefined identifier input from a user terminal; A step of inputting the first source code into the function-name matching score calculation model to provide the user terminal with a recommended parameter name and a recommended variable name related to at least one undefined identifier; A step of receiving a first selection input from the user terminal for selecting one of the recommended parameter name and the recommended variable name, and generating a second source code in which at least one identifier is defined based on the first selection input; A step of inputting the second source code into the function-name matching score calculation model to provide a recommended function name related to at least one identifier to the user terminal; and A step of receiving a second selection input from the user terminal for selecting one of the above recommended function names, and generating a third source code in which at least one identifier and a function name related to the at least one identifier are defined based on the second selection input; Including, The above function-name matching score calculation model is, Relearned based on at least one of the first selection input and the second selection input, How to automatically change the names of functions and parameters.
2. In paragraph 1, The above function-name matching score calculation model is, Based on the context-based dynamic code analysis technique that analyzes the context and flow of the input code to understand the function of the input code, learning is performed using learning data labeled with identifiers that include the function of the code and the meaning corresponding to the function. How to automatically change the names of functions and parameters.
3. In paragraph 1, The above function-name matching score calculation model is, Print the function-name match score, The above function-name match score is, The above function-name matching score calculation model analyzes the input code by converting it into a code that only has functions, excluding identifiers, and then calculates a numeric value together with the function and the identifier that includes the meaning corresponding to the function. How to automatically change the names of functions and parameters.
4. In paragraph 3, The step of inputting the first source code into the above function-name matching score calculation model and providing the recommended parameter name and recommended variable name related to at least one undefined identifier to the user terminal is as follows: A step of providing the function-name matching score corresponding to each of the recommended parameter name and the recommended variable name; and A step of providing the number of selections of each of the recommended parameter names and the recommended variable names selected so far for each of the at least one undefined identifiers; Including, Based on the first selection input, the number of selections is updated. How to automatically change the names of functions and parameters.
5. In paragraph 1, The above method, A step of recognizing whether a variable or parameter that must exist in a specific function included in the first source code does not exist based on the above function-name matching score calculation model; and A step of recommending an identifier corresponding to the missing variable or missing parameter, if it is recognized that the variable or parameter that must exist in the specific function does not exist; including more, How to automatically change the names of functions and parameters.
6. In paragraph 1, The above method, When the first selection input for selecting one of the recommended parameter names and the recommended variable names is not received and a manually entered identifier is received, evaluating the manually entered identifier; and A step of retraining the function-name matching score calculation model by labeling the function of the code corresponding to the manually entered identifier and the manually entered identifier; including more, How to automatically change the names of functions and parameters.
7. Memory that stores one or more instructions; and A processor that executes one or more instructions stored in the memory. Including, The processor executes one or more of the instructions, A device for performing the method of claim 1.
8. A computer program stored on a computer-readable recording medium that is combined with a computer as hardware and can perform the method of claim 1.
Citation Information
Patent Citations
Software development assist method and system
JP2018005535A
Stacker crane
KR1020220052572A
Hydrogen Refinement and Production System Based on Waste Disassemblement and Method thereof
KR1020230071804A
Code converting method based on intermediate language and electronic device including the same
KR102341137B1
