201025045 九、發明說明: 【發明所屬之技術領域】 本發明涉及一種資料檢索與處理系統及方法,尤其涉 及一種能夠將資料操作集中於客戶端的系統與方法。 【先前技術】 隨著資訊產業電子化的發展以及web開發技術的提 升,基於B/S架構的網站程式憑藉著其無須安裝的特點越 來越多的被應用於各行業的資訊服務中。其中很大比例的 ® 利用方式是:採用網站提供資訊發佈與公共資訊檢索服 務,例如,書店向顧客提供網頁查詢書籍資料等。 傳統的web貧料檢索糸統在進行資料檢索時*需要先 獲取用戶設置的檢索條件,發送給網站伺服器,透過在網 站伺服器端對海量資訊的檢索與篩選,以獲取符合檢索條 件的記錄。此方法在檢索少量資料時尚可滿足用戶的基本 要求5而·--旦檢索到的貢料夏很大’且基於web的資料檢 @ 索糸統在接收完網站祠服裔所回饋的資料前’會長時間處 於忙碌狀態,無法顯示任何内容,而只能在接收完網站伺 服器回饋的所有資料後才會對資料進行顯示。大量的資料 極容易使資料檢索系統停止回應而造成系統的不穩定性。 另外,傳統資料檢索系統對於檢索結果的排列和篩選主要 是透過資料庫進行的,具體而言,當用戶需要對所檢索的 資料進行排序與篩選時,需要經由網站伺服器向資料庫發 送排序與篩選命令,然後在資料庫對所檢索的資料進行排 序與篩選,最終再將排序與筛選後的資料發送給客戶端, 5 201025045 其排序與筛選的本質就是對目#纪錄的又-次重新檢索。 鑒於此,傳統資料檢索系統在對資料記錄的處理方式上很 不靈活、速度慢,且重新檢索造成了資源的浪費。 .【發明内容】 鑒於以上内容,有必要提供一種資料檢索與處理系統 及方法,其可將資料操作集中在客戶端進行,椏大地降低 網站飼服器的壓力,以實現快速檢索的功能。 ❿ 山一種資料檢索與處理系統,該系統包括炱少一個客戶 =所述客戶端包括:轉容器;檢索模組,用於提示用 乂入本次檢索的技術領域,並經由與該客戶端相連的網 =器從一個資料庫中搜索該技術領域内的所有資料; 物件向ΐ私用於創建非同步通訊物件,透過該#同步通訊 資料^ =庫發送資料提取命令;提取模組,用於根據該 ’ ♦令將上述搜㈣的所有資料緩存至所述資料容 ❹ 在資料=述檢索模組’還用於拫據用戶輸入的檢索條件 結果於订身抖檢索’創建表格行物件以顯示檢索 輪入Ιΐΐ料檢索與處理方法,包括如下步驟 :於客戶端 htrr技術領域並經由網站舰器從資料庫中搜 = 通訊物件向資料庫發送一個資料提取 至該客戶端的資料容号中.=迷搜索到的所有資料緩存 . ,獲取用戶輸入的檢索條件並根 檢索條件在貧料容器中進行資料檢索;及於客戶端創 6 201025045 建表格行物件以顯示檢索結果於資料表中。 相較於習知技術,所述資料檢索與處理系統及方法, _ 可將資料操作集中在客戶端中進行,能快速地對大量資料 _ 進行檢索與處理,避免類似web頁面更新資料緩慢的情況 發生,且能將檢索到的資料快速地反應給客戶,同時,可 以對用戶所查詢的資料快速地進行篩選與排序等操作。 【實施方式】 如圖1所示,係本發明資料檢索與處理系統較佳實施 ® 例之硬體架構圖。該硬體架構圖中包括:一個或多個客戶 端1 (如圖中所示的客戶端la、lb、lc和Id),透過網路 2與該多個客戶端1相連的至少一台網站伺服器3(圖中僅 示出一台)和資料庫4。 其中,網路2可以是一企業内部網路(Intranet ),也 可以是網際網路(Internet)或其他類型通訊網絡。資料庫 4既可以内置於所述網站伺服器3,也可以外置於該網站伺 ❿ 服器3。 客戶端1可為電腦、掌上型移動設備或者是任意其他 適用的終端設備。該客戶端1用於提供一互動式用戶介 面,以便於用戶進行資料檢索、資料處理和查看檢索結果。 另外,該客戶端1内還儲存一資料檢索與處理單元10,用 於在客戶端1構建資料容器30,將特定資料從資料庫4中 緩存至客戶端1進行檢索與處理,減輕了網站伺服器3面 對大量資料檢索與傳輸的壓力。 如圖2所示,係本發明資料檢索與處理單元10之功 7 201025045 能模組圖。該客戶端1根據其内部儲存的電腦程式的功能 可劃分為:創建模組1〇〇、提取模組1〇2、檢索模組1〇4 和處理模組106。 . 當用戶於客戶端1中開啟本實施例的資料檢索與處理 單元10後,檢索模組104會於客戶端i所提供的介面上提 示用戶輸入本次檢索的技術領域,並透過網路2將所輸入 的技術領域發送給網站伺服器3,經由該網站伺服器3從 資料庫4中搜索該技術領域内的所有資料。其中,本實施 ❹例中所講的技術領域用於限縮本次檢索的範圍。 創建模組100用於在上述介面上創建一個非同步通訊 物件20,並透過該非同步通訊物件2〇向資料庫4發送一 個貢料提取命令。具體而言,創建模組1〇〇調用客戶端工 的非同步通訊功能,並由此創建一個物件用於向資料庫4 發送資料提取命令。該非同步通訊是指一種創建互動式網 頁應用的網頁開發技術,英文名稱為“Asynchronous ❿ JavaScnPt and XML,Ajax” ,其優點就是能在不更新客戶 端1的頁面的前提下維護資料。 提取模組102根據上述資料提取命令將上述搜索到的 所有資料緩存至本地資料容器30中。該資料容器3〇為客 戶端1中的一個儲存模組,其可將網站伺服器3從資料庫 4中搜索到的所有資料映射到本地儲存,即緩存至客戶端1 中進行儲存。資料容器30根據所搜索到的資料在資料庫4 中的儲存列表的數目可以被劃分成多個陣列。 在本實施例中,該資料容器30可透過以下方法進行 8 201025045 構建:將上述搜索到的資料轉化為可擴展標記性語言 (extensible markup language,XML)資訊;採用多維陣 列對該xml資訊進行儲存,具體儲存方式為:多維陣列 的最外層陣列保存資料表名稱,然後由外向内的陣列分別 儲存欄位名和攔位值,該資料表名稱、欄位名和欄位值由 此組成複合陣列資訊,由該複合陣列資訊構成的多維陣列 即為所述資料容器30。 魯 檢索模組104用於在客戶端1上顯示檢索介面以提示 用戶輸入檢索條件,檢索模組104根據該檢索條件在資料 容器30中進行資料檢索,並顯示檢索結果。具體而言,檢 索模組104將所有檢索結果按時間順序分頁顯示到—個資 料表中,並採取dom技術動態的向該資料表中増加資料 行,即創建表格行物件40,其中,每個資料行對應—條檢 索結果’每條檢索結果包含多個欄位值。另外,所述資料 表中還儲存了該資料表的名稱、欄位名和檢索關鍵字等欄 % 位。如圖3所示,係一張存有員工資訊之資料表,其中, 資料表的第一行包括筛選設置和檢索關鍵字攔,第二行所 示的“姓名’,、“工號”、“資位”和“年齡”為襴位名, 其對應的列中的值為攔位值。 處理模組106用於檢索模組1〇4創建完表格行物件4〇 後’將上述包含檢索結果的資料表採用層疊樣式表 (cascading style Sheets ’ CSS)的屬性設置進行分頁顯示,獲 取用戶排序和篩選條件的設置,重新調整資料表的行結構 以顯示符合條件的資料50。例如,當用戶點擊資料表中的 9 201025045 欄位名如“資位”或在“篩選”攔選擇關鍵字“資位元” 時,處理模組10 6會發出對於該欄位名或關鍵字進行篩選操 作的指令,這些指令會觸發相應的腳本函數,獲取指令參 _ 數對資料表進行全表搜索,以獲取符合該欄位名或關鍵字 的所有資料,並根據所搜索到的資料重新調整資料表的行 結構,以展示最終符合條件的資料50。其中,該資料排序 與篩選的過程自始至終只需在客戶端1的資料容器30中進 行,而無須再經由網站伺服器3和資料庫4。 ® 所述處理模組106還用於自動初始化資料容器30,設 置讀取資料庫4中的内容的時間間隔,及根據該時間間隔從 資料庫4中讀取最新資料,以更新資料容器30中的資料。其 中,所述初始化資料容器30是指:處理模組106自動將資料 容器30中的資料清空,該資料可能為上次資料檢索所儲存 的資料。 如圖4所示,係本發明資料檢索與處理方法較佳實施 φ 例之作業流程圖。 步驟S400,當用戶於客戶端1中開啟本實施例的資料 檢索與處理單元10後,檢索模組104會於客戶端1所提供的 介面上提示用戶輸入本次檢索的技術領域,並經由網站伺 服器3從資料庫4中搜索所述技術領域内的所有資料。其 中,本實施例中所講的技術領域用於限縮本次檢索的範圍。 步驟S402,創建模組100在上述介面上創建一個非同 步通訊物件20,並透過該非同步通訊物件20向資料庫4發送 一個資料提取命令。 201025045 步驟S404,處理模組106自動初始化資料容器30,提 取模組102根據上述資料提取命令將上述搜索到的所有資 料緩存至本地資料容器30中。該本地資料容器30是指客戶 ^ 端1内的資料容器30。 步驟S406,檢索模組104在客戶端1上顯示檢索介面以 提示用戶輸入檢索條件。 步驟S408,檢索模組104獲取用戶輸入的檢索條件, 並根據該檢索條件在資料容器30中進行資料檢索。 ® 步驟S410,檢索模組104創建表格行物件40以顯示檢 索結果於資料表中。具體而言,檢索模組104將所有檢索結 果按時間順序分頁顯示到一個資料表中,並採取dom技術 動態的向該資料表中增加資料行,其中,每個資料行對應 一條檢索結果,每條檢索結果包含多個欄位值,該資料表 中還儲存了該資料表的名稱、攔位名和檢索關鍵字欄。如 圖3所不’是一張存有貝工資訊的貧料表’該貧料表即為檢 φ 索模組104檢索後所創建的表格行物件40。 步驟S412,處理模組106獲取用戶排序和篩選條件的 設置,重新調整資料表的行結構以顯示符合條件的資料50。 本實施例所述的資料檢索與處理方法還包括步驟:於 客戶端1内設定讀取資料庫4的時間間隔,及根據所設定的 時間間隔讀取資料庫4中的最新資料,以更新資料容器30 中的資料。 另外,本實施例中所述的步驟:處理模組106自動初 始化資料容器30,還可位於步驟S404之前的任一步驟中。 11 201025045 本發明雖以較佳實施例揭露如上,然其並非用以限定 本發明。任何熟悉此項技藝之人士,在不脫離本發明之精 神及範圍内,當可做更動與潤飾,因此本發明之保護範圍 當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 圖1係本發明用於資料檢索與處理系統較佳實施例之 硬體架構圖。 圖2係本發明資料檢索與處理單元之功能模組圖。 圖3係一張存有員工資訊之資料表。 圖4係本發明資料檢索與處理方法較佳實施例之作業 流程圖。 【主要元件符號說明】 客戶端 la、lb、lc、Id 1 網路 2 網站伺服器 3 資料庫 4 資料檢索與處理單元 10 創建模組 100 提取模組 102 檢索模組 104 處理模組 106 非同步通訊物件 20 資料容器 30 表格行物件 40 12 201025045 符合條件的資料 50 輸入本次檢索的技術領域,經由網站伺服器從資料庫 中搜索該技術領域内的資料 S400 創建非同步通訊物件並透過該非同步通訊物件向資料 Λ 庫發送一個資料提取命令 S402 初始化資料容器並將所提取的資料緩存至資料容器中 S404 顯示檢索介面提示用戶輸入檢索條件 S406 ® 獲取檢索條件並在上述資料容器中進行資料檢索 S408 創建表格行物件顯示檢索結果於資料庫中 S410 獲取用戶排序和篩選條件的設置,重新調整資料表的 行結構以顯示符合條件的資料 S412 13201025045 IX. Description of the Invention: [Technical Field] The present invention relates to a data retrieval and processing system and method, and more particularly to a system and method capable of focusing data operations on a client. [Prior Art] With the development of electronic information industry and the development of web development technology, B/S-based website programs are increasingly being used in information services in various industries by virtue of their unnecessary installation features. A large percentage of ® is used by means of website publishing and public information retrieval services. For example, bookstores provide customers with web page books and materials. The traditional web poor material search system needs to obtain the search conditions set by the user first, and send it to the web server to retrieve and filter the massive information on the web server to obtain the records that meet the search conditions. . This method can meet the basic requirements of users when retrieving a small amount of data. 5 - Once the retrieved tribute is very large, and the web-based data is checked @索糸统 before receiving the information from the website 'It will be busy for a long time, can't display any content, and will only display the data after receiving all the information returned by the web server. A large amount of information is extremely easy to cause the data retrieval system to stop responding and cause system instability. In addition, the traditional data retrieval system arranges and filters the search results mainly through the database. Specifically, when the user needs to sort and filter the retrieved data, the database server needs to send the sort to the database. Filter the command, then sort and filter the retrieved data in the database, and finally send the sorted and filtered data to the client, 5 201025045 The essence of sorting and filtering is the order of the record # Re-search. In view of this, the traditional data retrieval system is very inflexible and slow in processing the data records, and the re-retrieval results in waste of resources. [Invention] In view of the above, it is necessary to provide a data retrieval and processing system and method, which can focus data operations on the client side, and greatly reduce the pressure of the website feeding device to realize the function of fast retrieval. A data retrieval and processing system, the system includes: reducing one client = the client includes: a transfer container; a retrieval module for prompting to break into the technical field of the search, and connecting to the client The network=device searches all the data in the technical field from a database; the object is used to create a non-synchronized communication object, and the data is extracted through the # synchronization communication data ^= library; the extraction module is used for According to the ' ♦ order, all the data of the above search (4) is cached to the data capacity. The data=reporting module is also used to retrieve the table line object according to the result of the search condition input by the user. Retrieving the round-trip data retrieval and processing method, including the following steps: in the client htrr technical field and through the website ship from the database search = communication object to send a data to the database to the data content of the client. Search all the data cache. Get the search conditions entered by the user and search the data in the poor container for the root search condition; and create 6 20 on the client side. 1025045 Create a table row object to display the search results in the data sheet. Compared with the prior art, the data retrieval and processing system and method, _ can concentrate data operations on the client, and can quickly retrieve and process a large amount of data _ to avoid slow situation like web page update data. Occurs, and the retrieved data can be quickly reflected to the customer. At the same time, the data queried by the user can be quickly filtered and sorted. [Embodiment] As shown in Fig. 1, it is a hardware architecture diagram of a preferred embodiment of the data retrieval and processing system of the present invention. The hardware architecture diagram includes: one or more clients 1 (clients la, lb, lc, and Id as shown in the figure), and at least one website connected to the plurality of clients 1 through the network 2 The server 3 (only one shown in the figure) and the database 4 are provided. The network 2 can be an intranet or an internet or other type of communication network. The database 4 can be built in either the website server 3 or externally placed on the website server 3. Client 1 can be a computer, a palm-sized mobile device, or any other suitable terminal device. The client 1 is used to provide an interactive user interface for users to perform data retrieval, data processing and viewing search results. In addition, the client 1 also stores a data retrieval and processing unit 10 for constructing the data container 30 on the client 1, and buffering specific data from the database 4 to the client 1 for retrieval and processing, thereby reducing the website servo. Device 3 faces a lot of pressure on data retrieval and transmission. As shown in FIG. 2, it is a module diagram of the data retrieval and processing unit 10 of the present invention. The client 1 can be divided into: a creation module 1 , an extraction module 1 2 , a retrieval module 1 4 , and a processing module 106 according to the functions of the computer program stored therein. After the user opens the data retrieval and processing unit 10 of the embodiment in the client 1, the retrieval module 104 prompts the user to input the technical field of the retrieval on the interface provided by the client i, and through the network 2 The input technical field is transmitted to the website server 3, and all the materials in the technical field are searched from the database 4 via the website server 3. Among them, the technical field described in the example of this embodiment is used to limit the scope of this search. The creation module 100 is configured to create an asynchronous communication object 20 on the interface and send a tribute extraction command to the database 4 through the asynchronous communication object 2 . Specifically, the creation module 1 calls the asynchronous communication function of the client, and thereby creates an object for sending a data extraction command to the database 4. The asynchronous communication refers to a webpage development technology for creating an interactive webpage application. The English name is "Asynchronous ❿ JavaScnPt and XML, Ajax", and the advantage is that the data can be maintained without updating the page of the client 1. The extraction module 102 caches all of the searched data into the local data container 30 according to the data extraction command. The data container 3 is a storage module in the client 1, which can map all the data searched by the website server 3 from the database 4 to the local storage, that is, cached to the client 1 for storage. The data container 30 can be divided into a plurality of arrays based on the number of stored lists in the database 4 based on the searched data. In this embodiment, the data container 30 can be constructed by the following method: 201025045 construction: converting the searched data into extensible markup language (XML) information; storing the xml information by using a multidimensional array The specific storage method is: the outermost array of the multi-dimensional array saves the name of the data table, and then the outer and inner arrays respectively store the column name and the block value, and the data table name, the column name and the field value form the composite array information. The multi-dimensional array composed of the composite array information is the data container 30. The search module 104 is configured to display a search interface on the client 1 to prompt the user to input search conditions. The search module 104 performs data search in the data container 30 according to the search condition, and displays the search result. Specifically, the search module 104 displays all the search results in chronological order into a data table, and adopts dom technology to dynamically add data rows to the data table, that is, create a table row object 40, wherein each Data row correspondence - Article search result 'Each search result contains multiple field values. In addition, the data table also stores the column % of the name of the data table, the field name, and the search keyword. As shown in Figure 3, there is a data sheet with employee information. The first line of the data table includes the filter settings and the search keyword block. The "name" and "work number" shown in the second line. The "asset" and "age" are the name of the place, and the value in the corresponding column is the block value. The processing module 106 is used to search the module 1〇4 to create the table line object 4〇' The data table of the search result is displayed by cascading style sheets (CSS) attribute setting, the user sorting and filtering conditions are set, and the row structure of the data table is re-adjusted to display the qualified data 50. For example, when When the user clicks on the 9 201025045 field name in the data table, such as "location" or selects the keyword "location" in the "filter" block, the processing module 106 will issue a filtering operation for the field name or keyword. The instructions, which trigger the corresponding script function, obtain the instruction parameter and perform a full table search on the data table to obtain all the data that matches the field name or keyword, and re-adjust according to the searched data. The row structure of the data table is used to display the final eligible data 50. The data sorting and screening process is performed only in the data container 30 of the client 1 from the beginning, without having to go through the web server 3 and the database 4 The processing module 106 is further configured to automatically initialize the data container 30, set a time interval for reading the content in the database 4, and read the latest data from the database 4 according to the time interval to update the data container 30. The information in the initialization data container 30 means that the processing module 106 automatically clears the data in the data container 30, and the data may be the data stored in the last data retrieval. As shown in FIG. The invention data retrieval and processing method preferably implements the operation flow chart of the example φ. Step S400, after the user opens the data retrieval and processing unit 10 of the embodiment in the client 1, the retrieval module 104 is provided by the client 1. The user is prompted to input the technical field of the search, and searches the database 4 for all the materials in the technical field via the website server 3. The technical field mentioned in the embodiment is used to limit the scope of the current search. Step S402, the creating module 100 creates an asynchronous communication object 20 on the interface, and sends a non-synchronized communication object 20 to the database 4 through the non-synchronized communication object 20. Data extraction command 201025045 Step S404, the processing module 106 automatically initializes the data container 30, and the extraction module 102 caches all the searched data into the local data container 30 according to the data extraction command. The local data container 30 refers to the client. ^ The data container 30 in the terminal 1. In step S406, the retrieval module 104 displays the retrieval interface on the client 1 to prompt the user to input the retrieval condition. In step S408, the retrieval module 104 acquires the retrieval condition input by the user, and according to the retrieval condition Data retrieval is performed in the data container 30. ® Step S410, the retrieval module 104 creates a table row object 40 to display the retrieval result in the data table. Specifically, the search module 104 displays all the search results in a chronological page into a data table, and uses dom technology to dynamically add data rows to the data table, wherein each data row corresponds to a search result, and each data row corresponds to one search result. The search result includes a plurality of field values, and the name of the data table, the block name, and the search key column are also stored in the data table. As shown in Fig. 3, it is a poor material table containing the beacon information. The poor material table is the table row object 40 created after the retrieval of the φ cable module 104. In step S412, the processing module 106 obtains the settings of the user sorting and filtering conditions, and re-adjusts the row structure of the data table to display the qualified data 50. The data retrieval and processing method of the embodiment further includes the steps of: setting a time interval for reading the database 4 in the client 1, and reading the latest data in the database 4 according to the set time interval to update the data. The data in the container 30. In addition, the steps described in this embodiment: the processing module 106 automatically initializes the data container 30, and may also be located in any step before step S404. 11 201025045 The present invention has been described above by way of a preferred embodiment, and is not intended to limit the invention. Any person skilled in the art will be able to make changes and refinements without departing from the spirit and scope of the invention, and the scope of the invention is defined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a diagram showing the hardware architecture of a preferred embodiment of the data retrieval and processing system of the present invention. 2 is a functional block diagram of the data retrieval and processing unit of the present invention. Figure 3 is a data sheet with employee information. Figure 4 is a flow chart showing the operation of a preferred embodiment of the data retrieval and processing method of the present invention. [Main component symbol description] Client la, lb, lc, Id 1 Network 2 Web server 3 Database 4 Data retrieval and processing unit 10 Creation module 100 Extraction module 102 Search module 104 Processing module 106 Unsynchronized Communication object 20 data container 30 table line object 40 12 201025045 Eligible information 50 Enter the technical field of this search, search the database for the data in the technical field via the web server S400 to create a non-synchronized communication object and through the non-synchronization The communication object sends a data extraction command to the data library S402 to initialize the data container and cache the extracted data into the data container. S404 Display the search interface prompting the user to input the search condition S406 ® Obtain the search condition and perform data retrieval in the data container S408 Create a table row object to display the search result in the database S410 to obtain the user sorting and filtering conditions settings, readjust the row structure of the data table to display the eligible data S412 13