TWI635440B - System and method of log-recording application - Google Patents
System and method of log-recording application Download PDFInfo
- Publication number
- TWI635440B TWI635440B TW106114501A TW106114501A TWI635440B TW I635440 B TWI635440 B TW I635440B TW 106114501 A TW106114501 A TW 106114501A TW 106114501 A TW106114501 A TW 106114501A TW I635440 B TWI635440 B TW I635440B
- Authority
- TW
- Taiwan
- Prior art keywords
- database
- application
- request message
- response messages
- messages
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 230000004044 response Effects 0.000 claims abstract description 142
- 238000012360 testing method Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 4
- 238000007619 statistical method Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
本發明提出一種應用程式側錄系統及方法。應用程式側錄系統包括第一應用程式伺服器、第一資料庫及客戶端裝置。第一應用程式伺服器的第一應用程式從客戶端裝置分別接收多個請求訊息。第一應用程式傳送請求訊息到第一資料庫並根據請求訊息存取第一資料庫。在完成存取第一資料庫之後,第一資料庫傳送對應請求訊息的第一回應訊息到第一應用程式。第一應用程式伺服器記錄請求訊息的及請求訊息對應的第一回應訊息。第一應用程式將第一回應訊息傳送到客戶端裝置。The invention proposes a system and method for side recording of application programs. The application profile recording system includes a first application server, a first database, and a client device. The first application of the first application server receives multiple request messages from the client device. The first application sends a request message to the first database and accesses the first database according to the request message. After completing access to the first database, the first database sends a first response message corresponding to the request message to the first application. The first application server records the request message and the first response message corresponding to the request message. The first application sends the first response message to the client device.
Description
本發明是有關於一種應用程式側錄系統及方法,且特別是有關於一種以側錄資料作為不同系統環境的系統功能測試應用程式側錄系統及方法。The present invention relates to an application program side recording system and method, and particularly to a system function test application program side recording system and method using side recording data as different system environments.
在目前金融服務的資料庫系統中,常常會因為應用系統程式異常或資料庫系統配置設定不佳而影響系統穩定性。當系統穩定性不佳時就需要進行系統版本的更新。在系統版本更新後,還需要進行系統的測試。在系統測試中,系統管理者需要自己建立測試資料以測試系統的正確性。越多測試資料則可更有效的確保系統的正確性。然而,製作大量的測試資料會耗費系統管理者相當多的時間。In current database systems for financial services, system stability is often affected by abnormal application system programs or poor database system configuration settings. When the system stability is not good, you need to update the system version. After the system version is updated, system testing is also required. In system testing, the system administrator needs to create test data to test the correctness of the system. The more test data, the more accurate the system can be ensured. However, it takes a considerable amount of time for system administrators to produce a large amount of test data.
有鑑於此,本發明提供一種應用程式側錄系統及方法,將使用者使用系統所產生的請求訊息及對應的回應訊息側錄下來作為系統更新的測試資料,以增加系統測試的正確性並同時減少系統管理者製作測試資料的時間。In view of this, the present invention provides an application program side recording system and method, which records the request messages and corresponding response messages generated by the user as the system update test data to increase the accuracy of the system test and at the same time Reduce the time for system administrators to produce test data.
本發明提出一種應用程式側錄系統,包括第一應用程式伺服器、第一資料庫及多個客戶端裝置。第一資料庫耦接到第一應用程式伺服器。上述客戶端裝置,耦接到第一應用程式伺服器。第一應用程式伺服器的第一應用程式從客戶端裝置分別接收多個請求訊息,其中第一應用程式的版本資訊為第一版本。第一應用程式傳送請求訊息到第一資料庫並根據請求訊息存取第一資料庫。在完成存取第一資料庫之後,第一資料庫傳送對應請求訊息的第一回應訊息到第一應用程式。第一應用程式伺服器記錄請求訊息的及請求訊息對應的第一回應訊息。第一應用程式將第一回應訊息傳送到客戶端裝置。The invention provides an application program side recording system, which includes a first application server, a first database, and multiple client devices. The first database is coupled to the first application server. The above client device is coupled to the first application server. The first application of the first application server receives multiple request messages from the client device, wherein the version information of the first application is the first version. The first application sends a request message to the first database and accesses the first database according to the request message. After completing access to the first database, the first database sends a first response message corresponding to the request message to the first application. The first application server records the request message and the first response message corresponding to the request message. The first application sends the first response message to the client device.
在本發明的一實施例中,上述應用程式側錄系統更包括第二應用程式伺服器及第二資料庫。第二應用程式伺服器耦接到第一應用程式伺服器。第二資料庫耦接到第二應用程式伺服器。第二應用程式伺服器的第二應用程式從第一應用程式伺服器接收請求訊息及對應的第一回應訊息,其中第二應用程式的版本資訊為第二版本,且第二版本與第一版本不同。第二應用程式傳送請求訊息到第二資料庫並根據請求訊息存取第二資料庫。在完成存取第二資料庫之後,第二資料庫傳送對應請求訊息的多個第二回應訊息到第二應用程式。第二應用程式伺服器比對第一回應訊息及第二回應訊息。若請求訊息中的第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同,則根據第一請求訊息更新第二應用程式。In an embodiment of the present invention, the application profile recording system further includes a second application server and a second database. The second application server is coupled to the first application server. The second database is coupled to the second application server. The second application of the second application server receives the request message and the corresponding first response message from the first application server, where the version information of the second application is the second version, and the second version and the first version different. The second application sends a request message to the second database and accesses the second database according to the request message. After the access to the second database is completed, the second database sends multiple second response messages corresponding to the request message to the second application. The second application server compares the first response message and the second response message. If one of the first response messages generated by the first request message accessing the first database is different from one of the second response messages generated by the first request message accessing the second database, Then, the second application program is updated according to the first request message.
在本發明的一實施例中,上述第一回應訊息及第二回應訊息各包括總存取時間,當第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一的總存取時間與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一的總存取時間的差異大於門檻值時,判斷第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同。In an embodiment of the present invention, the first response message and the second response message each include a total access time. When the first request message accesses the first database, the total of one of the first response messages is generated. When the difference between the access time and the total access time of one of the second response messages generated by the first request message accessing the second database is greater than the threshold, it is determined that the first request message generates the access to the first database One of the first response messages is different from one of the second response messages generated by the first request message accessing the second database.
在本發明的一實施例中,上述第一回應訊息及第二回應訊息各包括資料參數,當第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一的資料參數與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一的資料參數的不同時,判斷第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同。In an embodiment of the invention, the first response message and the second response message each include data parameters. When the first request message accesses one of the data parameters of the first response message generated by the first database and When the data parameter of one of the second response messages generated by the first request message accessing the second database is different, it is determined that one of the first response messages generated by the first request message accessing the first database It is different from one of the second response messages generated by the first request message accessing the second database.
在本發明的一實施例中,上述請求訊息包括使用者識別碼、網路協定資訊、函數資訊、參數資訊及時間資訊。In an embodiment of the invention, the request message includes a user identification code, network protocol information, function information, parameter information, and time information.
本發明提出一種應用程式側錄方法,包括藉由第一應用程式伺服器的第一應用程式從多個客戶端裝置分別接收多個請求訊息,其中第一應用程式的版本資訊為第一版本。上述應用程式側錄方法還包括藉由第一應用程式傳送請求訊息到第一資料庫並根據請求訊息存取第一資料庫。上述應用程式側錄方法還包括在完成存取第一資料庫之後,第一資料庫傳送對應請求訊息的多個第一回應訊息到第一應用程式。上述應用程式側錄方法還包括藉由第一應用程式伺服器記錄請求訊息的及請求訊息對應的第一回應訊息。上述應用程式側錄方法還包括藉由第一應用程式將第一回應訊息傳送到客戶端裝置。The present invention provides a method for side application recording, which includes receiving a plurality of request messages from a plurality of client devices through a first application of a first application server, wherein the version information of the first application is the first version. The above application program side recording method further includes sending a request message to the first database through the first application program and accessing the first database according to the request message. The above application program side recording method further includes that after the access to the first database is completed, the first database sends a plurality of first response messages corresponding to the request message to the first application program. The above application program side recording method further includes recording the first response message corresponding to the request message and the request message by the first application server. The above application program side recording method further includes transmitting the first response message to the client device through the first application program.
在本發明的一實施例中,上述應用程式側錄方法還包括藉由第二應用程式伺服器的第二應用程式從第一應用程式伺服器接收請求訊息及對應的第一回應訊息,其中第二應用程式的版本資訊為第二版本,且第二版本與第一版本不同。上述應用程式側錄方法還包括藉由第二應用程式傳送請求訊息到第二資料庫並根據請求訊息存取第二資料庫。上述應用程式側錄方法還包括在完成存取第二資料庫之後,第二資料庫傳送對應請求訊息的多個第二回應訊息到第二應用程式。上述應用程式側錄方法還包括藉由第二應用程式伺服器比對第一回應訊息及第二回應訊息。上述應用程式側錄方法還包括以及若請求訊息中的第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同,則根據第一請求訊息更新第二應用程式。In an embodiment of the present invention, the above application profile recording method further includes receiving a request message and a corresponding first response message from the first application server through the second application program of the second application server, wherein The version information of the second application is the second version, and the second version is different from the first version. The above application program side recording method further includes sending a request message to the second database through the second application program and accessing the second database according to the request message. The above application program side recording method further includes that after completing access to the second database, the second database sends a plurality of second response messages corresponding to the request message to the second application program. The above-mentioned application side recording method further includes comparing the first response message and the second response message by the second application server. The above application profile recording method further includes and if one of the first response messages generated by the first request message in the request message accessing the first database and the first request message generated in accessing the second database If one of the two response messages is different, the second application is updated according to the first request message.
在本發明的一實施例中,上述第一回應訊息及第二回應訊息各包括總存取時間,當第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一的總存取時間與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一的總存取時間的差異大於門檻值時,判斷第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同。In an embodiment of the present invention, the first response message and the second response message each include a total access time. When the first request message accesses the first database, the total of one of the first response messages is generated. When the difference between the access time and the total access time of one of the second response messages generated by the first request message accessing the second database is greater than the threshold, it is determined that the first request message generates the access to the first database One of the first response messages is different from one of the second response messages generated by the first request message accessing the second database.
在本發明的一實施例中,上述第一回應訊息及第二回應訊息各包括資料參數,當第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一的資料參數與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一的資料參數的不同時,判斷第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同。In an embodiment of the invention, the first response message and the second response message each include data parameters. When the first request message accesses one of the data parameters of the first response message generated by the first database and When the data parameter of one of the second response messages generated by the first request message accessing the second database is different, it is determined that one of the first response messages generated by the first request message accessing the first database It is different from one of the second response messages generated by the first request message accessing the second database.
在本發明的一實施例中,上述請求訊息包括使用者識別碼、網路協定資訊、函數資訊、參數資訊及時間資訊。In an embodiment of the invention, the request message includes a user identification code, network protocol information, function information, parameter information, and time information.
基於上述,本發明的應用程式側錄系統及方法的應用程式會從客戶端裝置接收多個請求訊息並根據請求訊息存取資料庫以產生回應訊息,並且儲存每一筆請求訊息及對應的回應訊息作為測試資料。當應用程式及資料庫更新時,就可輸入已儲存的請求訊息到更新後資料庫中以產生回應訊息,再檢查此回應訊息與相同請求訊息輸入到舊資料庫中所產生的回應訊息是否相同,藉此進行更新後的應用程式及資料庫的功能驗證。Based on the above, the application program of the application profile recording system and method of the present invention receives multiple request messages from the client device and accesses the database according to the request messages to generate response messages, and stores each request message and corresponding response message As test data. When the application and database are updated, you can enter the saved request message into the updated database to generate a response message, and then check whether this response message is the same as the response message generated by the same request message input into the old database. To verify the function of the updated application and database.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more obvious and understandable, the embodiments are specifically described below and described in detail in conjunction with the accompanying drawings.
圖1為根據本發明一實施例的應用程式側錄系統的方塊圖。FIG. 1 is a block diagram of an application side recording system according to an embodiment of the present invention.
請參照圖1,本發明的應用程式側錄系統100包括多個客戶端裝置101-1到101-n、第一應用程式伺服器102及第一資料庫伺服器103。第一資料庫伺服器103耦接到第一應用程式伺服器102。多個客戶端裝置101-1到101-n耦接到第一應用程式伺服器102。客戶端裝置101-1到101-n可為個人電腦、智慧型手機、平板電腦或其他行動電子裝置並可透過有線或無線通訊耦接到第一應用程式伺服器102。第一應用程式伺服器102可包括處理器(未繪示於圖中)及記憶體(未繪示於圖中),並可包括第一應用程式。第一應用程式可接收客戶端裝置101-1到101-n透過網頁或其他應用程式輸入而產生的請求訊息。第一資料庫伺服器103可包括第一資料庫,而第一資料庫可為關聯式資料庫(例如,IBM DB2企業伺服器版本資料庫)。但本發明並不以此為限。第一資料庫也可以是任意其他類型的資料庫。Referring to FIG. 1, the application profile recording system 100 of the present invention includes a plurality of client devices 101-1 to 101-n, a first application server 102, and a first database server 103. The first database server 103 is coupled to the first application server 102. A plurality of client devices 101-1 to 101-n are coupled to the first application server 102. The client devices 101-1 to 101-n may be personal computers, smart phones, tablet computers, or other mobile electronic devices and may be coupled to the first application server 102 through wired or wireless communication. The first application server 102 may include a processor (not shown in the figure) and memory (not shown in the figure), and may include the first application. The first application program can receive the request message generated by the client devices 101-1 to 101-n through the web page or other application programs. The first database server 103 may include a first database, and the first database may be a relational database (for example, an IBM DB2 enterprise server version database). However, the invention is not limited to this. The first database may also be any other type of database.
在本實施例中,第一應用程式在接收到請求訊息後,可傳送請求訊息到第一資料庫並根據請求訊息存取第一資料庫。請求訊息可包括使用者識別碼、網路協定資訊、函數資訊、參數資訊及時間資訊。在完成存取第一資料庫之後,第一資料庫可傳送對應請求訊息的第一回應訊息到第一應用程式,第一應用程式再將第一回應訊息傳送到客戶端裝置101-1到101-n。同時,第一應用程式伺服器102也可記錄請求訊息的及請求訊息對應的第一回應訊息。In this embodiment, after receiving the request message, the first application can send the request message to the first database and access the first database according to the request message. The request message may include user identification code, network protocol information, function information, parameter information, and time information. After completing access to the first database, the first database can send a first response message corresponding to the request message to the first application, and the first application can then send the first response message to the client devices 101-1 to 101 -n. At the same time, the first application server 102 may also record the request message and the first response message corresponding to the request message.
由於第一應用程式伺服器102記錄了請求訊息及第一回應訊息等側錄資訊,因此第一應用程式可以針對同樣種類的請求訊息(例如,同樣種類的金融交易請求)進行效能統計分析,並進一步改善第一應用程式存取第一資料庫的效能瓶頸。舉例來說,第一應用程式伺服器102可利用側錄資訊建立一個程式日誌系統,包括了每天對第一資料庫所進行的同類型請求訊息的主機名稱、作業名稱、程式路徑、存取方法、執行次數、平均執行時間、最長執行時間、最短執行時間等資料,並利用這些資料進行第一資料庫的效能統計分析。此外,透過側錄資訊,還可以分析每個使用者發出的每個請求訊息的執行時間、回應時間、主機名稱、作業名稱、程式路徑、存取方法等資料,並利用這些資料進行第一資料庫的使用者行為統計。Since the first application server 102 records side information such as request messages and first response messages, the first application can perform performance statistical analysis on the same kind of request messages (for example, the same kind of financial transaction requests), and Further improve the performance bottleneck of the first application accessing the first database. For example, the first application server 102 can use the profile information to create a program log system, including the host name, operation name, program path, and access method of the same type of request message made to the first database every day , Execution times, average execution time, longest execution time, shortest execution time and other data, and use these data to perform statistical analysis of the performance of the first database. In addition, through the profile information, you can also analyze the execution time, response time, host name, operation name, program path, access method and other data of each request message sent by each user, and use these data for the first data The user behavior statistics of the library.
圖2為根據本發明一實施例的應用於應用程式側錄系統的方法的流程圖。2 is a flowchart of a method applied to an application side recording system according to an embodiment of the present invention.
請參照圖2,在步驟S201中,第一應用程式伺服器的第一應用程式從客戶端裝置分別接收多個請求訊息。在步驟S203中,第一應用程式傳送請求訊息到第一資料庫並根據請求訊息存取第一資料庫。在步驟S205中,在完成存取第一資料庫之後,第一資料庫傳送對應請求訊息的第一回應訊息到第一應用程式。在步驟S207中,第一應用程式伺服器記錄請求訊息的及請求訊息對應的第一回應訊息。在步驟S209中,第一應用程式將第一回應訊息傳送到客戶端裝置。Referring to FIG. 2, in step S201, the first application of the first application server receives multiple request messages from the client device, respectively. In step S203, the first application sends a request message to the first database and accesses the first database according to the request message. In step S205, after completing access to the first database, the first database sends a first response message corresponding to the request message to the first application. In step S207, the first application server records the request message and the first response message corresponding to the request message. In step S209, the first application sends the first response message to the client device.
圖3為根據本發明另一實施例的應用程式側錄系統的方塊圖。FIG. 3 is a block diagram of an application side recording system according to another embodiment of the present invention.
請參照圖3,本發明的應用程式側錄系統300包括多個客戶端裝置301-1到301-n、第一應用程式伺服器302、第一資料庫伺服器303、第二應用程式伺服器304及第二資料庫伺服器305。多個客戶端裝置301-1到301-n、第一應用程式伺服器302、第一資料庫伺服器303及其耦接關係及其各別功能相同於圖1的多個客戶端裝置101-1到101-n、第一應用程式伺服器102、第一資料庫伺服器103,因此就不再贅述。在本實施例中,第二應用程式伺服器304耦接到第一應用程式伺服器302且第二資料庫伺服器305耦接到第二應用程式伺服器304。Referring to FIG. 3, the application profile recording system 300 of the present invention includes a plurality of client devices 301-1 to 301-n, a first application server 302, a first database server 303, and a second application server 304 and the second database server 305. The multiple client devices 301-1 to 301-n, the first application server 302, the first database server 303 and their coupling relationships and their respective functions are the same as the multiple client devices 101- of FIG. 1 to 101-n, the first application server 102, and the first database server 103, so they will not be described again. In this embodiment, the second application server 304 is coupled to the first application server 302 and the second database server 305 is coupled to the second application server 304.
在本實施例中,第一應用程式伺服器302的第一應用程式在接收到請求訊息後,可傳送請求訊息到第一資料庫伺服器303的第一資料庫並根據請求訊息存取第一資料庫。請求訊息可包括使用者識別碼、網路協定資訊、函數資訊、參數資訊及時間資訊。在完成存取第一資料庫之後,第一資料庫可傳送對應請求訊息的第一回應訊息到第一應用程式,第一應用程式再將第一回應訊息傳送到客戶端裝置101-1到101-n。同時,第一應用程式伺服器102也可記錄請求訊息的及請求訊息對應的第一回應訊息。In this embodiment, after receiving the request message, the first application of the first application server 302 may send the request message to the first database of the first database server 303 and access the first database according to the request message database. The request message may include user identification code, network protocol information, function information, parameter information, and time information. After completing access to the first database, the first database can send a first response message corresponding to the request message to the first application, and the first application can then send the first response message to the client devices 101-1 to 101 -n. At the same time, the first application server 102 may also record the request message and the first response message corresponding to the request message.
由於第一應用程式伺服器302記錄了請求訊息及第一回應訊息等側錄資訊,第一應用程式伺服器302可進一步將此側錄資訊傳送到第二應用程式伺服器304。具體來說,第二應用程式伺服器304的第二應用程式可從第一應用程式伺服器接收請求訊息及對應的第一回應訊息,其中第二應用程式的版本資訊為第二版本,且第二版本與第一版本不同,也就是說,第二應用程式可為第一應用程式的更新版本。第二應用程式還可傳送請求訊息到第二資料庫伺服器305的第二資料庫並根據請求訊息存取第二資料庫。在完成存取第二資料庫之後,第二資料庫傳送對應請求訊息的多個第二回應訊息到第二應用程式。第二應用程式伺服器接著比對第一回應訊息及第二回應訊息。若請求訊息中的第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同,則根據第一請求訊息更新第二應用程式。Since the first application server 302 records the side information such as the request message and the first response message, the first application server 302 can further send the side information to the second application server 304. Specifically, the second application of the second application server 304 can receive the request message and the corresponding first response message from the first application server, where the version information of the second application is the second version, and the first The second version is different from the first version, that is to say, the second application can be an updated version of the first application. The second application can also send a request message to the second database of the second database server 305 and access the second database according to the request message. After the access to the second database is completed, the second database sends multiple second response messages corresponding to the request message to the second application. The second application server then compares the first response message and the second response message. If one of the first response messages generated by the first request message accessing the first database is different from one of the second response messages generated by the first request message accessing the second database, Then, the second application program is updated according to the first request message.
簡單來說,本發明可利用使用者透過第一應用程式存取第一資料庫的請求訊息及回應訊息作為測試資料,用以測試更新後的第一應用程式及第二資料庫的正確性。若根據同一個請求訊息存取第一資料庫及第二資料庫所產生的回應訊息不同,則可根據此造成錯誤的請求訊息來進行第二應用程式及/或第二資料庫的更新。In short, the present invention can use the user's request message and response message to access the first database through the first application program as test data to test the correctness of the updated first application program and the second database. If the response messages generated by accessing the first database and the second database according to the same request message are different, the second application and / or the second database can be updated according to the request message that caused the error.
在一實施例中,當第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一的總存取時間與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一的總存取時間的差異大於門檻值時,則判斷第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同。In one embodiment, the total access time of one of the first response messages generated when the first request message accesses the first database and the second response generated when the first request message accesses the second database When the difference between the total access time of one of the messages is greater than the threshold, it is determined that one of the first response messages generated by the first request message to access the first database and the first request message access the second data One of the second response messages generated by the library is different.
簡單來說,若根據一回應訊息中記錄的總存取時間(即,請求訊息存取資料庫的總存取時間)來判斷存取第一資料庫及第二資料庫所產生的回應訊息是否相同,由於存取資料庫的總存取時間可能因為伺服器的系統負載高低而有所誤差,因此只有當存取第一資料庫及第二資料庫的總存取時間的差異大於一個門檻值才會判斷存取第一資料庫及第二資料庫所產生的回應訊息不同。In simple terms, if the response message generated by accessing the first database and the second database is determined based on the total access time recorded in a response message (that is, the total access time of the request message to access the database) The same, because the total access time to access the database may be different due to the system load of the server, so only when the difference between the total access time to access the first and second databases is greater than a threshold Only then will the response messages generated by accessing the first database and the second database be different.
在一實施例中,當第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一的資料參數與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一的資料參數的不同時,判斷第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同。In one embodiment, when the first request message accesses one of the data parameters of the first response message generated by the first database and the first request message accesses the second response message generated by the second database When one of the data parameters is different, it is determined that one of the first response message generated by the first request message accessing the first database and the second response message generated by the first request message accessing the second database One of them is different.
簡單來說,若根據一回應訊息中記錄的資料參數來判斷存取第一資料庫及第二資料庫所產生的回應訊息是否相同,由於根據每個請求訊息存取資料庫產生的資料參數是不能有任何錯誤,否則使用者就會得到錯誤的資料,這是不允許發生的情況。因此只要當存取第一資料庫及第二資料庫的資料參數不同,就會判斷存取第一資料庫及第二資料庫所產生的回應訊息不同。To put it simply, if the response parameters generated by accessing the first database and the second database are the same based on the data parameters recorded in a response message, since the data parameters generated by accessing the database according to each request message are There must be no errors, otherwise the user will get the wrong information, which is not allowed. Therefore, as long as the data parameters of accessing the first database and the second database are different, it will be judged that the response messages generated by accessing the first database and the second database are different.
圖4A及圖4B為根據本發明另一實施例的應用於應用程式側錄系統的方法的流程圖。4A and 4B are flowcharts of a method applied to an application side recording system according to another embodiment of the present invention.
請參照圖4A及圖4B,在步驟S401中,第一應用程式伺服器的第一應用程式從客戶端裝置分別接收多個請求訊息。在步驟S403中,第一應用程式傳送請求訊息到第一資料庫並根據請求訊息存取第一資料庫。在步驟S405中,在完成存取第一資料庫之後,第一資料庫傳送對應請求訊息的第一回應訊息到第一應用程式。在步驟S407中,第一應用程式伺服器記錄請求訊息的及請求訊息對應的第一回應訊息。在步驟S409中,第一應用程式將第一回應訊息傳送到客戶端裝置。4A and 4B, in step S401, the first application of the first application server receives multiple request messages from the client device. In step S403, the first application sends a request message to the first database and accesses the first database according to the request message. In step S405, after the access to the first database is completed, the first database sends a first response message corresponding to the request message to the first application. In step S407, the first application server records the request message and the first response message corresponding to the request message. In step S409, the first application sends the first response message to the client device.
在步驟S411中,第二應用程式伺服器的第二應用程式從第一應用程式伺服器接收請求訊息及對應的第一回應訊息,其中第二應用程式的版本資訊為第二版本,且第二版本與第一版本不同。在步驟S413中,第二應用程式傳送請求訊息到第二資料庫並根據請求訊息存取第二資料庫。在步驟S415中,在完成存取第二資料庫之後,第二資料庫傳送對應請求訊息的多個第二回應訊息到第二應用程式。在步驟S417中,第二應用程式伺服器比對第一回應訊息及第二回應訊息。在步驟S419中,若請求訊息中的第一請求訊息存取第一資料庫所產生的第一回應訊息的其中之一與第一請求訊息存取第二資料庫所產生的第二回應訊息的其中之一不同,則根據第一請求訊息更新第二應用程式。In step S411, the second application of the second application server receives the request message and the corresponding first response message from the first application server, where the version information of the second application is the second version, and the second The version is different from the first version. In step S413, the second application sends a request message to the second database and accesses the second database according to the request message. In step S415, after completing access to the second database, the second database sends multiple second response messages corresponding to the request message to the second application. In step S417, the second application server compares the first response message and the second response message. In step S419, if one of the first response messages generated by the first request message accessing the first database and the second response messages generated by the first request message accessing the second database If one of them is different, the second application is updated according to the first request message.
綜上所述,本發明的應用程式側錄系統及方法的應用程式會從客戶端裝置接收多個請求訊息並根據請求訊息存取資料庫以產生回應訊息,並且儲存每一筆請求訊息及對應的回應訊息作為測試資料。當應用程式及資料庫更新時,就可輸入已儲存的請求訊息到更新後資料庫中以產生回應訊息,再檢查此回應訊息與相同請求訊息輸入到舊資料庫中所產生的回應訊息是否相同,藉此進行更新後的應用程式及資料庫的功能驗證。此外,本發明還可透過側錄的請求訊息及回應訊息進行系統效能分析及使用者行為分析,並藉此改善效能瓶頸。In summary, the application program of the application profile recording system and method of the present invention receives multiple request messages from the client device and accesses the database according to the request messages to generate response messages, and stores each request message and the corresponding The response message is used as test data. When the application and database are updated, you can enter the saved request message into the updated database to generate a response message, and then check whether this response message is the same as the response message generated by the same request message input into the old database. To verify the function of the updated application and database. In addition, the present invention can also perform system performance analysis and user behavior analysis through side-recorded request messages and response messages, thereby improving performance bottlenecks.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed as above with examples, it is not intended to limit the present invention. Any person with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention shall be subject to the scope defined in the appended patent application.
100、300‧‧‧應用程式側錄系統 100, 300‧‧‧ Application side recording system
101-1~101-n、301-1~301-n‧‧‧客戶端裝置 101-1 ~ 101-n, 301-1 ~ 301-n‧‧‧Client device
102、302‧‧‧第一應用程式伺服器 102、302‧‧‧First application server
103、303‧‧‧第一資料庫伺服器 103、303‧‧‧First database server
S201、S203、S205、S207、S209‧‧‧應用於應用程式側錄系統的方法的步驟 S201, S203, S205, S207, S209 ‧‧‧ applied to the method of application side recording system
304‧‧‧第二應用程式伺服器 304‧‧‧Second application server
305‧‧‧第二資料庫伺服器 305‧‧‧Second database server
S401、S403、S405、S407、S409、S411、S413、S415、S417、S419‧‧‧應用於應用程式側錄系統的方法的步驟 S401, S403, S405, S407, S409, S411, S413, S415, S417, S419
圖1為根據本發明一實施例的應用程式側錄系統的方塊圖。 圖2為根據本發明一實施例的應用於應用程式側錄系統的方法的流程圖。 圖3為根據本發明另一實施例的應用程式側錄系統的方塊圖。 圖4A及圖4B為根據本發明另一實施例的應用於應用程式側錄系統的方法的流程圖。FIG. 1 is a block diagram of an application side recording system according to an embodiment of the present invention. 2 is a flowchart of a method applied to an application side recording system according to an embodiment of the present invention. FIG. 3 is a block diagram of an application side recording system according to another embodiment of the present invention. 4A and 4B are flowcharts of a method applied to an application side recording system according to another embodiment of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW106114501A TWI635440B (en) | 2017-05-02 | 2017-05-02 | System and method of log-recording application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW106114501A TWI635440B (en) | 2017-05-02 | 2017-05-02 | System and method of log-recording application |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI635440B true TWI635440B (en) | 2018-09-11 |
TW201843586A TW201843586A (en) | 2018-12-16 |
Family
ID=64453088
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW106114501A TWI635440B (en) | 2017-05-02 | 2017-05-02 | System and method of log-recording application |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI635440B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI224264B (en) * | 2001-05-31 | 2004-11-21 | Systex Corp | Program version control management system and its method |
US20100016081A1 (en) * | 2008-03-20 | 2010-01-21 | Gdi Game Domain International Plc | Game server |
TW201445489A (en) * | 2013-05-31 | 2014-12-01 | Hon Hai Prec Ind Co Ltd | Method and system for controlling data |
TWI464611B (en) * | 2007-08-17 | 2014-12-11 | Salesforce Com Inc | On-demand database service system, method, and computer program product for verifying that a developed application will operate properly with at least one other application |
-
2017
- 2017-05-02 TW TW106114501A patent/TWI635440B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI224264B (en) * | 2001-05-31 | 2004-11-21 | Systex Corp | Program version control management system and its method |
TWI464611B (en) * | 2007-08-17 | 2014-12-11 | Salesforce Com Inc | On-demand database service system, method, and computer program product for verifying that a developed application will operate properly with at least one other application |
US20100016081A1 (en) * | 2008-03-20 | 2010-01-21 | Gdi Game Domain International Plc | Game server |
TW201445489A (en) * | 2013-05-31 | 2014-12-01 | Hon Hai Prec Ind Co Ltd | Method and system for controlling data |
Also Published As
Publication number | Publication date |
---|---|
TW201843586A (en) | 2018-12-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10972282B2 (en) | Distributed logging of application events in a blockchain | |
US12236432B2 (en) | Automated cloud security computer system for proactive risk detection and adaptive response to risks and method of using same | |
US10437705B2 (en) | Real-time reporting based on instrumentation of software | |
US11531766B2 (en) | Systems and methods for attributing security vulnerabilities to a configuration of a client device | |
CN110851311A (en) | Service failure identification method, device, equipment and storage medium | |
US10439876B2 (en) | System and method for determining information technology component dependencies in enterprise applications by analyzing configuration data | |
US11503048B2 (en) | Prioritizing assets using security metrics | |
US20230208855A1 (en) | MITIGATING SECURITY THREATS IN DAISY CHAINED SERVERLESS FaaS FUNCTIONS | |
US20150067646A1 (en) | System and Method to Predict Elapsed Response Time for a Query during Application Development Stage | |
CN109245928A (en) | Configuration information setting method and device and terminal management system | |
US11327969B2 (en) | Term vector modeling of database workloads | |
US10749772B1 (en) | Data reconciliation in a distributed data storage network | |
US20170116061A1 (en) | Mechanism for Running Diagnostic Rules Across Multiple Nodes | |
CN114896128A (en) | Blockchain-based application performance testing method and device | |
US9898382B2 (en) | Hyperlink-induced topic search algorithm lock analysis | |
US10394682B2 (en) | Graphical lock analysis | |
US9552235B2 (en) | Using pagerank algorithm-based lock analysis to identify key processes for improving computing system efficiency | |
TWI635440B (en) | System and method of log-recording application | |
US8959107B2 (en) | Enumerating WMI object properties through T-SQL | |
US11238020B2 (en) | Maintaining temporal associations for event data in an event database | |
US10866876B2 (en) | Dynamically configurable operation information collection | |
WO2019169762A1 (en) | Electronic device, zk node information notification method, system, and storage medium | |
TWM546529U (en) | System of log-recording application | |
US20210117312A1 (en) | Systems and methods for quality control application and testing from profile discovery | |
US20250156395A1 (en) | Metadata refreshment for a web service |