TWI751706B - Method and device for automatically generating development solution - Google Patents

Method and device for automatically generating development solution Download PDF

Info

Publication number
TWI751706B
TWI751706B TW109131900A TW109131900A TWI751706B TW I751706 B TWI751706 B TW I751706B TW 109131900 A TW109131900 A TW 109131900A TW 109131900 A TW109131900 A TW 109131900A TW I751706 B TWI751706 B TW I751706B
Authority
TW
Taiwan
Prior art keywords
specific output
output message
development
command lines
message
Prior art date
Application number
TW109131900A
Other languages
Chinese (zh)
Other versions
TW202213077A (en
Inventor
陳冠儒
Original Assignee
宏碁股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宏碁股份有限公司 filed Critical 宏碁股份有限公司
Priority to TW109131900A priority Critical patent/TWI751706B/en
Application granted granted Critical
Publication of TWI751706B publication Critical patent/TWI751706B/en
Publication of TW202213077A publication Critical patent/TW202213077A/en

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present disclosure provides a method and a device for automatically generating a development solution, including: in response to determining that a trigger event of an enter key is received in a development environment, obtaining a specific output message provided by the development environment in response to the trigger event; obtaining a plurality of first command lines; determining whether the specific output message is an error message based on the specific output message and the first command lines; in response to determining that the specific output message is the error message, obtaining a plurality of specific command lines received in a time interval between a previous error message and the specific output message; and providing a development solution corresponding to the specific output message at least based on the development environment information of the development environment, the specific output message and the specific command lines.

Description

自動產生開發解決方案的方法及裝置Method and apparatus for automatically generating development solutions

本發明是有關於一種輔助開發軟體的技術,且特別是有關於一種自動產生開發解決方案的方法及裝置。The present invention relates to a technology for assisting software development, and in particular, to a method and apparatus for automatically generating a development solution.

一般而言,在開發人員於開源(Open source)的開發環境中進行開發時,將經歷繁瑣冗長的開發歷程,而當遇到問題時,多半需要花費大量的時間尋求解決方法。Generally speaking, when developers develop in an open source (Open source) development environment, they will experience a tedious and lengthy development process, and when they encounter problems, most of them need to spend a lot of time finding solutions.

並且,經耗費許多時間找到的方法不見得為正確的解決方案,因此仍需要開發人員不斷地進行試誤(trial and error),且這些方法甚至可能產生不必要的副作用。Also, the time-consuming methods are not always the right solution, so developers still need constant trial and error, and these methods may even have unwanted side effects.

因此,對於本領域技術人員而言,若能設計一種能夠自動產生開發解決方案的技術,勢必能縮短相關的開發與除錯時間,並大幅降低開發的難度。Therefore, for those skilled in the art, if a technology that can automatically generate a development solution can be designed, the related development and debugging time will be shortened, and the development difficulty will be greatly reduced.

有鑑於此,本發明提供一種自動產生開發解決方案的方法及裝置,其可用於解決上述技術問題。In view of this, the present invention provides a method and apparatus for automatically generating a development solution, which can be used to solve the above-mentioned technical problems.

本發明提供一種自動產生開發解決方案的方法,包括:反應於判定在一開發環境中接收到一輸入按鍵的一觸發事件,取得開發環境因應於觸發事件而提供的一特定輸出訊息;取得多條第一指令行,其中所述多個第一指令行係於觸發事件與輸入按鍵的一先前觸發事件之間所接收;基於特定輸出訊息及所述多個第一指令行判斷特定輸出訊息是否屬於一錯誤訊息;反應於判定特定輸出訊息屬於錯誤訊息,取得於一先前錯誤訊息與特定輸出訊息之間的一時間區間內所接收的多條特定指令行;以及至少基於開發環境的開發環境資訊、特定輸出訊息及所述多個特定指令行提供對應於特定輸出訊息的一開發解決方案。The present invention provides a method for automatically generating a development solution, comprising: in response to determining that a trigger event of an input key is received in a development environment, obtaining a specific output message provided by the development environment in response to the trigger event; obtaining a plurality of a first command line, wherein the plurality of first command lines are received between a trigger event and a previous trigger event of the input key; determining whether the specific output message belongs to the specific output message and the plurality of first command lines an error message; in response to determining that the specific output message is an error message, a plurality of specific command lines received within a time interval between a previous error message and the specific output message are obtained; and at least the development environment information based on the development environment, The specific output message and the plurality of specific command lines provide a development solution corresponding to the specific output message.

本發明提供一種自動產生開發解決方案的裝置,包括儲存電路及處理器。儲存電路儲存多個模組。處理器耦接儲存電路,存取所述多個模組以執行下列步驟:反應於判定在一開發環境中接收到一輸入按鍵的一觸發事件,取得開發環境因應於觸發事件而提供的一特定輸出訊息;取得多條第一指令行,其中所述多個第一指令行係於觸發事件與輸入按鍵的一先前觸發事件之間所接收;基於特定輸出訊息及所述多個第一指令行判斷特定輸出訊息是否屬於一錯誤訊息;反應於判定特定輸出訊息屬於錯誤訊息,取得於一先前錯誤訊息與特定輸出訊息之間的一時間區間內所接收的多條特定指令行;以及至少基於開發環境的開發環境資訊、特定輸出訊息及所述多個特定指令行提供對應於特定輸出訊息的一開發解決方案。The present invention provides a device for automatically generating a development solution, including a storage circuit and a processor. The storage circuit stores a plurality of modules. The processor is coupled to the storage circuit, and accesses the plurality of modules to execute the following steps: in response to determining that a trigger event of an input key is received in a development environment, obtaining a specific information provided by the development environment in response to the trigger event output message; obtain a plurality of first command lines, wherein the plurality of first command lines are received between a trigger event and a previous trigger event of an input key; based on a specific output message and the plurality of first command lines determining whether the specific output message is an error message; in response to determining that the specific output message is an error message, obtaining a plurality of specific command lines received in a time interval between a previous error message and the specific output message; and at least based on the development The development environment information of the environment, the specific output message, and the plurality of specific command lines provide a development solution corresponding to the specific output message.

請參照圖1,其是依據本發明之一實施例繪示的自動產生開發解決方案的裝置示意圖。在不同的實施例中,裝置100例如是各式電腦裝置及/或智慧型裝置,但可不限於此。Please refer to FIG. 1 , which is a schematic diagram of an apparatus for automatically generating a development solution according to an embodiment of the present invention. In different embodiments, the device 100 is, for example, various computer devices and/or smart devices, but is not limited thereto.

如圖1所示,裝置100包括儲存電路102及處理器104。儲存電路102例如是任意型式的固定式或可移動式隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash memory)、硬碟或其他類似裝置或這些裝置的組合,而可用以記錄多個程式碼或模組。As shown in FIG. 1 , the device 100 includes a storage circuit 102 and a processor 104 . The storage circuit 102 is, for example, any type of fixed or removable random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), flash memory (Flash memory), hard drive A disc or other similar device or a combination of these devices may be used to record multiple code or modules.

處理器104耦接於儲存電路102,並可為一般用途處理器、特殊用途處理器、傳統的處理器、數位訊號處理器、多個微處理器(microprocessor)、一個或多個結合數位訊號處理器核心的微處理器、控制器、微控制器、特殊應用積體電路(Application Specific Integrated Circuit,ASIC)、現場可程式閘陣列電路(Field Programmable Gate Array,FPGA)、任何其他種類的積體電路、狀態機、基於進階精簡指令集機器(Advanced RISC Machine,ARM)的處理器以及類似品。The processor 104 is coupled to the storage circuit 102 and can be a general purpose processor, a special purpose processor, a conventional processor, a digital signal processor, a plurality of microprocessors, one or more combined digital signal processors microprocessor, controller, microcontroller, Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA), any other kind of integrated circuit , state machines, Advanced RISC Machine (ARM)-based processors, and the like.

在本發明的實施例中,處理器104可存取儲存電路102中記錄的模組、程式碼來實現本發明提出的自動產生開發解決方案的方法,其細節詳述如下。In an embodiment of the present invention, the processor 104 can access the modules and program codes recorded in the storage circuit 102 to implement the method for automatically generating a development solution proposed by the present invention, the details of which are described in detail below.

請參照圖2,其是依據本發明之一實施例繪示的自動產生開發解決方案的方法流程圖。本實施例的方法可由圖1的裝置100執行,以下即搭配圖1所示的元件說明圖2各步驟的細節。Please refer to FIG. 2 , which is a flowchart of a method for automatically generating a development solution according to an embodiment of the present invention. The method of this embodiment can be executed by the apparatus 100 in FIG. 1 , and the details of each step in FIG. 2 will be described below with the elements shown in FIG. 1 .

首先,在本發明的實施例中,處理器104可判斷是否在開發環境中接收到輸入按鍵的觸發事件。在一些實施例中,上述輸入按鍵例如是一般鍵盤上的Enter鍵,而其相關的觸發事件則例如是所述Enter鍵被按壓時所產生的按鍵事件,但可不限於此。此外,上述開發環境例如是各式程式、軟體、應用程式的開發環境,而其可運作於開發人員屬意的作業系統(例如Linux TM、Windows TM等)中,但可不限於此。 First, in the embodiment of the present invention, the processor 104 may determine whether a trigger event of an input key is received in the development environment. In some embodiments, the above input key is, for example, the Enter key on a general keyboard, and the related trigger event is, for example, a key event generated when the Enter key is pressed, but it is not limited thereto. In addition, the above-mentioned development environment is, for example, a development environment for various programs, software, and application programs, which can operate in the operating system (eg, Linux TM , Windows TM , etc.) desired by developers, but not limited thereto.

在步驟S210中,反應於判定在開發環境中接收到輸入按鍵的觸發事件,處理器104可取得開發環境因應於觸發事件而提供的特定輸出訊息。接著,在步驟S220中,處理器104可取得多條第一指令行,其中所述多個第一指令行係於上述觸發事件與輸入按鍵的一先前觸發事件之間所接收。In step S210, in response to determining that a trigger event of an input key is received in the development environment, the processor 104 can obtain specific output information provided by the development environment in response to the trigger event. Next, in step S220, the processor 104 may obtain a plurality of first command lines, wherein the plurality of first command lines are received between the above trigger event and a previous trigger event of the input key.

詳細而言,一般的開發人員在所使用的開發環境中進行程式開發時,可能會在批次輸入多條指令行(command line)之後才按壓一次Enter鍵,而開發環境將相應地提供一輸出訊息。基此,在一實施例中,所述先前觸發事件例如是Enter鍵上一次被觸發時所形成的按鍵事件。換言之,步驟S220可理解為由處理器104將連續的兩次Enter鍵的觸發事件之間所接收到的指令行擷取作為所述多條第一指令行,但可不限於此。In detail, when developing programs in the development environment used by a general developer, they may press the Enter key only after batch inputting multiple command lines, and the development environment will provide an output accordingly. message. Based on this, in an embodiment, the previous trigger event is, for example, a key event formed when the Enter key was triggered last time. In other words, step S220 can be understood as the processor 104 fetching the command lines received between two consecutive trigger events of the Enter key as the plurality of first command lines, but it is not limited thereto.

之後,在步驟S230中,處理器104可基於特定輸出訊息及所述多個第一指令行判斷特定輸出訊息是否屬於錯誤訊息。在一實施例中,處理器104例如可將上述第一指令行及步驟S210所取得的特定輸出訊息輸入至經預訓練的第一長短期記憶(long short term memory,LSTM)模型,以由此第一LSTM模型基於上述第一指令行及特定輸出訊息判斷特定輸出訊息是否屬於錯誤訊息。Afterwards, in step S230, the processor 104 may determine whether the specific output message is an error message based on the specific output message and the plurality of first command lines. In one embodiment, the processor 104 may, for example, input the above-mentioned first instruction line and the specific output information obtained in step S210 into the pre-trained first long short term memory (LSTM) model, so as to The first LSTM model determines whether the specific output message is an error message based on the above-mentioned first command line and the specific output message.

在一實施例中,為使第一LSTM模型具有判斷特定輸出訊息是否屬於錯誤訊息的能力,設計者可先將多個錯誤訊息以及其個別所對應的錯誤指令行儲存為對應的一文字檔以作為訓練資料,並用以訓練第一LSTM模型。具體而言,對於某第一錯誤訊息而言,設計者可收集導致此第一錯誤訊息的多條指令行作為其對應的錯誤指令行,並據以訓練第一LSTM。藉此,當第一LSTM日後接收到多條指令行及其對應的某輸出訊息時,第一LSTM即可據以辨識此輸出訊息是否屬於錯誤訊息,但可不限於此。In one embodiment, in order to enable the first LSTM model to have the ability to determine whether a specific output message is an error message, the designer can first store a plurality of error messages and their respective corresponding error command lines as a corresponding text file as training data, and used to train the first LSTM model. Specifically, for a certain first error message, the designer can collect multiple instruction lines that cause the first error message as its corresponding error instruction lines, and train the first LSTM accordingly. In this way, when the first LSTM receives a plurality of command lines and a corresponding output message in the future, the first LSTM can identify whether the output message is an error message, but it is not limited thereto.

在一實施例中,若特定輸出訊息不屬於錯誤訊息,則處理器104可允許開發人員進行後續指令行的輸入,但可不限於此。In one embodiment, if the specific output message is not an error message, the processor 104 may allow the developer to input subsequent command lines, but it is not limited thereto.

另一方面,在步驟S240中,反應於判定特定輸出訊息屬於錯誤訊息,處理器104可取得於先前錯誤訊息與特定輸出訊息之間的時間區間內所接收的多條特定指令行。在一實施例中,所述先前錯誤訊息例如是前一個被判定屬於錯誤訊息的輸出訊息。換言之,步驟S240可理解為由處理器104將連續的兩個錯誤訊息之間所接收到的指令行擷取作為所述多條特定指令行,但可不限於此。On the other hand, in step S240, in response to determining that the specific output message is an error message, the processor 104 can obtain a plurality of specific command lines received in the time interval between the previous error message and the specific output message. In one embodiment, the previous error message is, for example, a previous output message determined to be an error message. In other words, step S240 can be understood as the processor 104 fetching the command lines received between two consecutive error messages as the plurality of specific command lines, but it is not limited thereto.

進一步而言,假設所述先前錯誤訊息具有一第一出現時間點,而特定輸出訊息具有一第二出現時間點,則所述時間區間例如可介於第一出現時間點及第二出現時間點之間,而處理器104例如可擷取於此時間區間內所接收的指令行作為上述特定指令行,但可不限於此。Further, if the previous error message has a first occurrence time point, and the specific output message has a second occurrence time point, the time interval may be between the first occurrence time point and the second occurrence time point, for example In between, the processor 104 may, for example, retrieve the command line received in this time interval as the above-mentioned specific command line, but it is not limited thereto.

之後,在步驟S250中,處理器104可至少基於開發環境的開發環境資訊、特定輸出訊息及所述多個特定指令行提供對應於特定輸出訊息的開發解決方案。在一實施例中,上述開發環境的開發環境資訊例如包括開發環境的作業系統名稱及作業系統版本,但可不限於此。Afterwards, in step S250, the processor 104 may provide a development solution corresponding to the specific output message based on at least the development environment information of the development environment, the specific output message and the plurality of specific command lines. In one embodiment, the development environment information of the development environment includes, for example, the operating system name and operating system version of the development environment, but it is not limited thereto.

在一實施例中,處理器104例如可將開發環境的開發環境資訊、特定輸出訊息及上述特定指令行輸入至經預訓練的一第二LSTM模型,以由此第二LSTM模型提供對應於特定輸出訊息的開發解決方案。在本發明的實施例中,所述開發解決方案例如可包括多條候選指令行,以作為開發人員進行除錯的參考資訊。例如,開發人員可直接將所述多條候選指令行輸入至開發環境中,以試圖進行除錯,但可不限於此。In one embodiment, the processor 104 can input, for example, the development environment information of the development environment, the specific output information, and the above-mentioned specific command line to a pre-trained second LSTM model, so that the second LSTM model provides the information corresponding to the specific Development solutions for output messages. In an embodiment of the present invention, the development solution may include, for example, a plurality of candidate instruction lines, which are used as reference information for developers to debug. For example, the developer may directly input the plurality of candidate instruction lines into the development environment in an attempt to debug, but it is not limited thereto.

在一實施例中,為使第二LSTM模型具有提供對應於特定輸出訊息的開發解決方案的能力,設計者可先將多個錯誤訊息、其個別所對應的錯誤指令行、開發環境資訊及開發解決方案(其可由設計者自行於相關資料庫/網路查找而得)整理為一文字檔以作為訓練資料,並用以訓練第二LSTM模型。具體而言,對於某第一錯誤訊息而言,設計者可收集導致此第一錯誤訊息的多條指令行作為其對應的錯誤指令行,並輔以相關的開發環境資訊及開發解決方案而訓練第二LSTM。藉此,當第二LSTM日後接收到多條指令行、對應的錯誤訊息及開發環境資訊時,第二LSTM即可據以提供對應於特定輸出訊息的開發解決方案,但可不限於此。In one embodiment, in order to enable the second LSTM model to have the ability to provide a development solution corresponding to a specific output message, the designer can first combine a plurality of error messages, their respective corresponding error command lines, development environment information and development The solution (which can be found by the designer in the relevant database/network) is organized into a text file as training data, and used to train the second LSTM model. Specifically, for a first error message, the designer can collect multiple command lines that cause the first error message as their corresponding error command lines, and train them with relevant development environment information and development solutions. Second LSTM. In this way, when the second LSTM receives multiple command lines, corresponding error messages and development environment information in the future, the second LSTM can provide a development solution corresponding to the specific output message, but not limited to this.

在另一實施例中,處理器104例如可先取得特定輸出訊息的產生來源(例如是此特定輸出訊息對應的一開發中應用程式),再此產生來源、開發環境的開發環境資訊、特定輸出訊息及上述特定指令行輸入至經預訓練的第二LSTM模型,以由此第二LSTM模型提供對應於特定輸出訊息的開發解決方案,而第二LSTM的相關訓練機制可參照以上說明,於此不另贅述。In another embodiment, the processor 104 may, for example, first obtain the generation source of the specific output message (for example, an application under development corresponding to the specific output message), and then obtain the generation source, the development environment information of the development environment, and the specific output. The message and the above-mentioned specific command line are input to the pre-trained second LSTM model, so that the second LSTM model provides a development solution corresponding to the specific output message, and the related training mechanism of the second LSTM can refer to the above description, here No further description.

由上可知,對於開發人員而言,當其於開發環境中輸入多條指令行並按壓Enter鍵時,開發環境將相應地提供特定輸出訊息,而本案的裝置100可基於先前的教示而判斷此特定輸出訊息是否屬於錯誤訊息。若是,則裝置100可接著將上次出現錯誤訊息之後由開發人員輸入的指令行擷取作為特定指令行,並輔以開發環境資訊、特定輸出訊息(及特定輸出訊息的產生來源)等資訊自動地提供對應於特定輸出訊息的開發解決方案。藉此,開發人員即可較有效率地基於裝置100所提供的開發解決方案進行除錯,從而可節省搜尋相關解決方案所需耗費的時間,進而加速開發的進程。As can be seen from the above, for developers, when they input multiple command lines in the development environment and press the Enter key, the development environment will provide specific output messages accordingly, and the device 100 of the present application can determine this based on the previous teaching. Whether a particular output message is an error message. If so, the device 100 can then retrieve the command line input by the developer after the last error message occurred as a specific command line, and automatically supplement the development environment information, the specific output message (and the generation source of the specific output message) and other information automatically Provides development solutions corresponding to specific output messages. In this way, the developer can more efficiently debug based on the development solution provided by the device 100 , thereby saving the time required for searching for the relevant solution, thereby speeding up the development process.

在一實施例中,在提供包括多條候選指令行的開發解決方案之後,處理器104可更取得提供開發解決方案之後所接收的多條輸入指令行。亦即,處理器104可接續擷取開發人員在參考開發解決方案之後所輸入至開發環境中的指令行作為輸入指令行,但可不限於此。In one embodiment, after providing a development solution including multiple candidate instruction lines, the processor 104 may further obtain multiple input instruction lines received after providing the development solution. That is, the processor 104 can continue to retrieve the command line input by the developer into the development environment after referring to the development solution as the input command line, but it is not limited thereto.

之後,處理器104可判斷所取得的上述輸入指令行是否相同於開發解決方案中所提供的多條候選指令行。亦即,處理器104可判斷開發人員是否依開發解決方案的建議而進行除錯。Afterwards, the processor 104 can determine whether the obtained input instruction line is the same as the plurality of candidate instruction lines provided in the development solution. That is, the processor 104 can determine whether the developer performs debugging according to the suggestion of developing the solution.

在一實施例中,反應於判定上述輸入指令行不同於候選指令行,且不再出現屬於錯誤訊息的其他特定輸出訊息,此即代表開發人員已採用不同於開發解決方案提供的方式而成功地完成除錯。在此情況下,處理器104可基於特定輸出訊息及上述輸入指令更新第二LSTM模型。In one embodiment, in response to determining that the input command line is different from the candidate command line, and no other specific output messages belonging to the error message appear, it means that the developer has successfully adopted a method different from that provided by the development solution. Complete debugging. In this case, the processor 104 may update the second LSTM model based on the specific output message and the aforementioned input command.

在一實施例中,處理器104可基於一強化學習機制更新第二LSTM模型。具體而言,處理器104可維護有一觀察程式(observation agent),而此觀察程式可用於判斷所取得的上述輸入指令行是否相同於開發解決方案中所提供的多條候選指令行,以及是否不再出現屬於錯誤訊息的其他特定輸出訊息。若判定上述輸入指令行不同於候選指令行,且不再出現屬於錯誤訊息的其他特定輸出訊息,則觀察程式可提供一懲罰(punishment)信號,以觸發處理器104基於特定輸出訊息及上述輸入指令對第二LSTM模型重新進行訓練。另一方面,若觀察程式判定上述輸入指令行不同於候選指令行,但另出現屬於錯誤訊息的其他特定輸出訊息,則觀察程式可提供一獎賞(reward)信號,以觸發處理器104維持第二LSTM模型,但可不限於此。In one embodiment, the processor 104 may update the second LSTM model based on a reinforcement learning mechanism. Specifically, the processor 104 can maintain an observation agent, and the observation agent can be used to determine whether the obtained input command line is the same as a plurality of candidate command lines provided in the development solution, and whether it is not Then there are other specific output messages that are error messages. If it is determined that the input command line is different from the candidate command line and no other specific output message belonging to the error message appears, the watcher can provide a punishment signal to trigger the processor 104 based on the specific output message and the input command Retrain the second LSTM model. On the other hand, if the watch program determines that the input command line is different from the candidate command line, but there are other specific output messages that are error messages, the watch program can provide a reward signal to trigger the processor 104 to maintain the second LSTM model, but not limited to this.

綜上所述,本發明的裝置可在開發環境因應於開發人員對輸入按鍵的觸發而提供特定輸出訊息時,判斷此特定輸出訊息是否屬於錯誤訊息。若是,則本發明的裝置可接著將上次出現錯誤訊息之後由開發人員輸入的指令行擷取作為特定指令行,並輔以開發環境資訊、特定輸出訊息(及特定輸出訊息的產生來源)等資訊自動地提供對應於特定輸出訊息的開發解決方案。藉此,開發人員即可較有效率地基於本發明的裝置所提供的開發解決方案進行除錯,從而可節省搜尋相關解決方案所需耗費的時間,進而加速開發的進程。To sum up, the device of the present invention can determine whether the specific output message is an error message when the development environment provides the specific output message in response to the developer triggering the input key. If so, the device of the present invention can then retrieve the command line input by the developer after the last error message occurred as a specific command line, supplemented by development environment information, specific output information (and the source of the specific output message), etc. Information automatically provides development solutions corresponding to specific output messages. In this way, developers can more efficiently debug based on the development solution provided by the device of the present invention, thereby saving time required for searching for relevant solutions, thereby speeding up the development process.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above by the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The protection scope of the present invention shall be determined by the scope of the appended patent application.

100:自動產生開發解決方案的裝置 102:儲存電路 104:處理器 S210~S250:步驟 100: A device that automatically generates development solutions 102: Storage circuit 104: Processor S210~S250: Steps

圖1是依據本發明之一實施例繪示的自動產生開發解決方案的裝置示意圖。 圖2是依據本發明之一實施例繪示的自動產生開發解決方案的方法流程圖。 FIG. 1 is a schematic diagram of an apparatus for automatically generating a development solution according to an embodiment of the present invention. FIG. 2 is a flowchart of a method for automatically generating a development solution according to an embodiment of the present invention.

S210~S250:步驟 S210~S250: Steps

Claims (10)

一種自動產生開發解決方案的方法,包括:反應於判定在一開發環境中接收到一輸入按鍵的一觸發事件,取得該開發環境因應於該觸發事件而提供的一特定輸出訊息,其中該開發環境的開發環境資訊包括該開發環境的一作業系統名稱及一作業系統版本;取得多條第一指令行,其中該些第一指令行係於該觸發事件與該輸入按鍵的一先前觸發事件之間所接收;基於該特定輸出訊息及該些第一指令行判斷該特定輸出訊息是否屬於一錯誤訊息;反應於判定該特定輸出訊息屬於該錯誤訊息,取得於一先前錯誤訊息與該特定輸出訊息之間的一時間區間內所接收的多條特定指令行,其中該先前錯誤訊息具有一第一出現時間點,該特定輸出訊息具有一第二出現時間點,該時間區間介於該第一出現時間點及該第二出現時間點之間,且所述方法包括擷取於該時間區間內所接收的指令行作為該些特定指令行;以及至少基於該開發環境的該開發環境資訊、該特定輸出訊息及該些特定指令行提供對應於該特定輸出訊息的一開發解決方案。 A method for automatically generating a development solution, comprising: in response to determining that a trigger event of an input key is received in a development environment, obtaining a specific output message provided by the development environment in response to the trigger event, wherein the development environment The development environment information includes an operating system name and an operating system version of the development environment; a plurality of first command lines are obtained, wherein the first command lines are between the trigger event and a previous trigger event of the input key received; based on the specific output message and the first command lines, determine whether the specific output message belongs to an error message; in response to determining that the specific output message belongs to the error message, obtain the difference between a previous error message and the specific output message A plurality of specific command lines received in a time interval between, wherein the previous error message has a first occurrence time point, the specific output message has a second occurrence time point, and the time interval is between the first occurrence time point and the second occurrence time point, and the method includes retrieving the command lines received in the time interval as the specific command lines; and at least based on the development environment information of the development environment, the specific output The message and the specific command lines provide a development solution corresponding to the specific output message. 如請求項1所述的方法,其中基於該特定輸出訊息及該些第一指令行判斷該特定輸出訊息是否屬於該錯誤訊息的步驟包括: 將該些第一指令行及該特定輸出訊息輸入至經預訓練的一第一長短期記憶模型,以由該第一長短期記憶模型基於該些第一指令行及該特定輸出訊息判斷該特定輸出訊息是否屬於該錯誤訊息。 The method of claim 1, wherein the step of determining whether the specific output message belongs to the error message based on the specific output message and the first command lines comprises: Inputting the first command lines and the specific output information into a pre-trained first long short-term memory model, so that the first long short-term memory model determines the specific output based on the first command lines and the specific output information Whether the output message belongs to this error message. 如請求項1所述的方法,其中至少基於該開發環境的該開發環境資訊、該特定輸出訊息及該些特定指令行提供對應於該特定輸出訊息的該開發解決方案的步驟包括:將該開發環境的該開發環境資訊、該特定輸出訊息及該些特定指令行輸入至經預訓練的一第二長短期記憶模型,以由該第二長短期記憶模型提供對應於該特定輸出訊息的該開發解決方案。 The method of claim 1, wherein the step of providing the development solution corresponding to the specific output message based on at least the development environment information, the specific output message and the specific command lines of the development environment comprises: the development The development environment information, the specific output message and the specific command lines of the environment are input to a pre-trained second long short term memory model, so that the development corresponding to the specific output message is provided by the second long short term memory model solution. 如請求項1所述的方法,更包括取得該特定輸出訊息的一產生來源,且至少基於該開發環境的該開發環境資訊、該特定輸出訊息及該些特定指令行提供對應於該特定輸出訊息的該開發解決方案的步驟包括:將該開發環境的該開發環境資訊、該特定輸出訊息、該特定輸出訊息的該產生來源及該些特定指令行輸入至經預訓練的一第二長短期記憶模型,以由該第二長短期記憶模型提供對應於該特定輸出訊息的該開發解決方案;其中該特定輸出訊息的該產生來源包括該特定輸出訊息對應的一開發中應用程式。 The method of claim 1, further comprising obtaining a source of the specific output message, and at least providing the specific output message based on the development environment information, the specific output message and the specific command lines of the development environment corresponding to the specific output message The steps of the development solution include: inputting the development environment information of the development environment, the specific output message, the generation source of the specific output message and the specific command lines into a pre-trained second long short-term memory a model, so that the development solution corresponding to the specific output message is provided by the second long short-term memory model; wherein the generation source of the specific output message includes an application under development corresponding to the specific output message. 如請求項3或4所述的方法,其中該開發解決方案包括多條候選指令行,且在提供對應於該特定輸出訊息的該開發解決方案的步驟之後,更包括:取得提供該開發解決方案之後所接收的多條輸入指令行;反應於判定該些輸入指令行不同於該些候選指令行,且不再出現屬於該錯誤訊息的其他特定輸出訊息,基於該特定輸出訊息及該些輸入指令更新該第二長短期記憶模型,反之則維持該第二長短期記憶模型。 The method of claim 3 or 4, wherein the development solution includes a plurality of candidate instruction lines, and after the step of providing the development solution corresponding to the specific output message, further comprising: obtaining and providing the development solution Multiple input command lines received afterward; in response to determining that the input command lines are different from the candidate command lines, and no other specific output messages belonging to the error message appear, based on the specific output message and the input commands The second long and short-term memory model is updated, otherwise, the second long and short-term memory model is maintained. 一種自動產生開發解決方案的裝置,包括:一儲存電路,儲存多個模組;以及一處理器,其耦接該儲存電路,存取該些模組以執行下列步驟:反應於判定在一開發環境中接收到一輸入按鍵的一觸發事件,取得該開發環境因應於該觸發事件而提供的一特定輸出訊息,其中該開發環境的開發環境資訊包括該開發環境的一作業系統名稱及一作業系統版本;取得多條第一指令行,其中該些第一指令行係於該觸發事件與該輸入按鍵的一先前觸發事件之間所接收;基於該特定輸出訊息及該些第一指令行判斷該特定輸出訊息是否屬於一錯誤訊息;反應於判定該特定輸出訊息屬於該錯誤訊息,取得於一先前錯誤訊息與該特定輸出訊息之間的一時間區間內所接收的多條特定指令行,其中該先前錯誤訊息具有一第一出現時間點,該特定輸 出訊息具有一第二出現時間點,該時間區間介於該第一出現時間點及該第二出現時間點之間,且該處理器擷取於該時間區間內所接收的指令行作為該些特定指令行;以及至少基於該開發環境的該開發環境資訊、該特定輸出訊息及該些特定指令行提供對應於該特定輸出訊息的一開發解決方案。 A device for automatically generating a development solution, comprising: a storage circuit storing a plurality of modules; and a processor coupled to the storage circuit and accessing the modules to perform the following steps: in response to determining that a development A trigger event of an input button is received in the environment, and a specific output message provided by the development environment in response to the trigger event is obtained, wherein the development environment information of the development environment includes an operating system name and an operating system of the development environment version; obtain a plurality of first command lines, wherein the first command lines are received between the trigger event and a previous trigger event of the input key; determine the first command line based on the specific output message and the first command lines Whether the specific output message belongs to an error message; in response to determining that the specific output message belongs to the error message, a plurality of specific command lines received in a time interval between a previous error message and the specific output message are obtained, wherein the The previous error message had a first occurrence point, the particular input The outgoing message has a second occurrence time point, and the time interval is between the first occurrence time point and the second occurrence time point, and the processor retrieves the command lines received in the time interval as the a specific command line; and a development solution corresponding to the specific output message is provided at least based on the development environment information, the specific output message and the specific command lines of the development environment. 如請求項6所述的裝置,其中該處理器經配置以:將該些第一指令行及該特定輸出訊息輸入至經預訓練的一第一長短期記憶模型,以由該第一長短期記憶模型基於該些第一指令行及該特定輸出訊息判斷該特定輸出訊息是否屬於該錯誤訊息。 6. The apparatus of claim 6, wherein the processor is configured to: input the first command lines and the specific output message into a pretrained first long short-term memory model for The memory model determines whether the specific output message belongs to the error message based on the first command lines and the specific output message. 如請求項6所述的裝置,其中該處理器經配置以:將該開發環境的該開發環境資訊、該特定輸出訊息及該些特定指令行輸入至經預訓練的一第二長短期記憶模型,以由該第二長短期記憶模型提供對應於該特定輸出訊息的該開發解決方案。 The apparatus of claim 6, wherein the processor is configured to: input the development environment information, the specific output message, and the specific command lines of the development environment into a pretrained second long short-term memory model , to provide the development solution corresponding to the specific output message by the second long short-term memory model. 如請求項6所述的裝置,其中該處理器更經配置以:取得該特定輸出訊息的一產生來源;以及將該開發環境的該開發環境資訊、該特定輸出訊息、該特定輸出訊息的該產生來源及該些特定指令行輸入至經預訓練的一第二長短期記憶模型,以由該第二長短期記憶模型提供對應於該特定輸出訊息的該開發解決方案。 The apparatus of claim 6, wherein the processor is further configured to: obtain a generation source of the specific output message; and the development environment information, the specific output message, the specific output message of the development environment The generation source and the specific command lines are input to a pre-trained second long short term memory model to provide the development solution corresponding to the specific output message by the second long short term memory model. 如請求項8或9所述的裝置,其中該開發解決方案包括多條候選指令行,且在提供對應於該特定輸出訊息的該開發解決方案之後,該處理器更經配置以:取得提供該開發解決方案之後所接收的多條輸入指令行;反應於判定該些輸入指令行不同於該些候選指令行,且不再出現屬於該錯誤訊息的其他特定輸出訊息,基於該特定輸出訊息及該些輸入指令更新該第二長短期記憶模型,反之則維持該第二長短期記憶模型。 The apparatus of claim 8 or 9, wherein the development solution includes a plurality of candidate instruction lines, and after providing the development solution corresponding to the specific output message, the processor is further configured to: obtain the supply of the Multiple input command lines received after the solution is developed; in response to determining that the input command lines are different from the candidate command lines, and no other specific output messages belonging to the error message appear, based on the specific output message and the The second long and short-term memory model is updated by some input commands, otherwise, the second long and short-term memory model is maintained.
TW109131900A 2020-09-16 2020-09-16 Method and device for automatically generating development solution TWI751706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109131900A TWI751706B (en) 2020-09-16 2020-09-16 Method and device for automatically generating development solution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109131900A TWI751706B (en) 2020-09-16 2020-09-16 Method and device for automatically generating development solution

Publications (2)

Publication Number Publication Date
TWI751706B true TWI751706B (en) 2022-01-01
TW202213077A TW202213077A (en) 2022-04-01

Family

ID=80809105

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109131900A TWI751706B (en) 2020-09-16 2020-09-16 Method and device for automatically generating development solution

Country Status (1)

Country Link
TW (1) TWI751706B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI241523B (en) * 2002-05-27 2005-10-11 Toshiba Corp Debugging device and debugging method
US20130275948A1 (en) * 2012-04-17 2013-10-17 International Business Machines Corporation Compiling Source Code For Debugging With Expanded Snapshots
TWI521432B (en) * 2013-06-12 2016-02-11 Mitsubishi Electric Corp Development environment systems, development environment installations, development environment provision methods and program products
TWI530783B (en) * 2008-04-07 2016-04-21 萬國商業機器公司 Debug tours for software debugging
JP2016126700A (en) * 2015-01-08 2016-07-11 富士通株式会社 Program verification device, program verification method, and program verification program
TWI660267B (en) * 2018-03-28 2019-05-21 和碩聯合科技股份有限公司 Boot testing apparatus, system and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI241523B (en) * 2002-05-27 2005-10-11 Toshiba Corp Debugging device and debugging method
TWI530783B (en) * 2008-04-07 2016-04-21 萬國商業機器公司 Debug tours for software debugging
US20130275948A1 (en) * 2012-04-17 2013-10-17 International Business Machines Corporation Compiling Source Code For Debugging With Expanded Snapshots
TWI521432B (en) * 2013-06-12 2016-02-11 Mitsubishi Electric Corp Development environment systems, development environment installations, development environment provision methods and program products
JP2016126700A (en) * 2015-01-08 2016-07-11 富士通株式会社 Program verification device, program verification method, and program verification program
TWI660267B (en) * 2018-03-28 2019-05-21 和碩聯合科技股份有限公司 Boot testing apparatus, system and method thereof

Also Published As

Publication number Publication date
TW202213077A (en) 2022-04-01

Similar Documents

Publication Publication Date Title
US9588876B2 (en) Estimating likelihood of code changes introducing defects
US11281708B2 (en) Utilizing a machine learning model to predict metrics for an application development process
US10936807B1 (en) Systems and methods for displaying effects of code changes
US10248537B2 (en) Translation bug prediction classifier
US9740480B1 (en) Apparatus and methodologies for code refactoring
US10175975B2 (en) Self-mending software builder
US20150143327A1 (en) Project management tool
CN110673936B (en) Breakpoint continuous operation method and device for arrangement service, storage medium and electronic equipment
US20230325182A1 (en) Methods and arrangements to process comments
WO2023029632A1 (en) Model training method and system, and server and chip
WO2022217708A1 (en) Artificial intelligence-based question and answer method and apparatus, server, and storage medium
Breck et al. Data infrastructure for machine learning
US20240134687A1 (en) Systems and methods for operating an autonomous system
TWI751706B (en) Method and device for automatically generating development solution
US10901729B2 (en) System and method for merging specification files for an application programming interface
US11556460B2 (en) Test case generation for software development using machine learning
CN112765188B (en) Configuration information processing method, configuration management system, electronic device and storage medium
CN109144524B (en) Version release method of subject game on education platform and electronic equipment
US11750479B1 (en) System and method for managing issues based on pain reduction efficiency
US11789842B2 (en) System and method for advanced detection of potential system impairment
US11736580B1 (en) Fixing microservices in distributed transactions
US11249883B2 (en) Error repair tool using sentiment analysis
US8521502B2 (en) Passing non-architected registers via a callback/advance mechanism in a simulator environment
US20220067619A1 (en) System and method to provide prescriptive actions for winning a sales opportunity using deep reinforcement learning
JP2018036792A (en) Data processing program and data processing method