TWI490717B - System for generating target file using two-tier container and method thereof - Google Patents

System for generating target file using two-tier container and method thereof Download PDF

Info

Publication number
TWI490717B
TWI490717B TW099141746A TW99141746A TWI490717B TW I490717 B TWI490717 B TW I490717B TW 099141746 A TW099141746 A TW 099141746A TW 99141746 A TW99141746 A TW 99141746A TW I490717 B TWI490717 B TW I490717B
Authority
TW
Taiwan
Prior art keywords
data
container
target
sub
containers
Prior art date
Application number
TW099141746A
Other languages
Chinese (zh)
Other versions
TW201224813A (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 TW099141746A priority Critical patent/TWI490717B/en
Publication of TW201224813A publication Critical patent/TW201224813A/en
Application granted granted Critical
Publication of TWI490717B publication Critical patent/TWI490717B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

以雙層容器生成目標檔案之系統及其方法System and method for generating target file by double-layer container

一種檔案生成系統及其方法,特別係指一種以雙層容器生成目標檔案之系統及其方法。A file generation system and method thereof, in particular, a system and method for generating a target file in a double layer container.

使用者界面(User Interface,UI),是電腦軟硬體與使用者之間進行資訊交換的媒介,凡參與人類與機械的資訊交流的領域都存在著使用者界面。使用者界面使得使用者能夠方便有效率地去操作電腦軟硬體以達成雙向之互動,完成所希望藉助電腦完成之工作。使用者和電腦軟硬體之間一般用受限制的自然語言進行互動,但隨著視窗作業系統的普及,目前的使用者界面大多是以圖形使用者界面(Graphics User Interface,GUI)的方式呈現。The user interface (UI) is a medium for information exchange between computer hardware and software and users. There is a user interface in all fields of information exchange between humans and machinery. The user interface enables the user to conveniently and efficiently operate the computer software and hardware to achieve two-way interaction and accomplish the work that is desired to be done by the computer. The user and the computer software and hardware generally interact with the restricted natural language. However, with the popularity of the Windows operating system, the current user interface is mostly presented by the Graphic User Interface (GUI). .

事實上,開發圖形使用者界面的過程是非常不容易的,開發者需要為圖形使用者界面中的每一個圖形物件撰寫相對應的程式碼,這將使得一個看起來簡單的圖形使用者界面會有著冗長的程式碼,同時,在程式碼中通常會定義每一個圖形物件(如圖示或是程式之執行結果的顯示範圍)的大小、位置、顏色等屬性以及圖形使用者界面的整體顯示風格,一旦圖形物件需要更動,例如更改大小、位置、顏色等,開發者便需要修改程式碼,這樣使得圖形使用者界面的開發更加辛苦,因此,目前有許多軟體改為使用HTML語法來呈現圖形使用者界面,如此,圖形使用者界面的開發者只需要使用簡單的HTML語法便可以完成圖形使用者界面的開發,這比撰寫程式碼容易許多。In fact, the process of developing a graphical user interface is very difficult. The developer needs to write the corresponding code for each graphic object in the graphical user interface, which will make a seemingly simple graphical user interface. It has a lengthy code. At the same time, the size, position, color and other attributes of each graphic object (such as the display range of the execution result of the program or the program) and the overall display style of the graphical user interface are usually defined in the code. Once the graphic object needs to be changed, such as changing the size, position, color, etc., the developer needs to modify the code, which makes the development of the graphical user interface more difficult. Therefore, many softwares currently use HTML syntax to render graphics. In this way, developers of graphical user interfaces can develop graphical user interfaces using simple HTML syntax, which is much easier than writing code.

在以HTML語法表現圖形使用者界面的開發方式中,目前所使用的方式都是直接將圖形使用者界面中的資料按照排列在HTML檔案中的先後順序排列成一個序列,如此,只需要按照序列的順序讀取資料便可以生成HTML檔案。不過,由於某些HTML語法有著固定的位置,例如,CSS檔案的載入語法必須要在網頁的「<HEAD>」標籤內,如此,在生成網頁時,一旦CSS檔案的載入語法產生的時間較「<HEAD>」標籤晚,則CSS檔案的載入語法將排列在「<HEAD>」標籤之後,如此,網頁中使用到該CSS檔案的語法都無法正確的被表現,因此,開發人員在建立生成網頁的序列時,往往需要特別考量各個語法產生的先後順序,造成開發上的複雜度。In the development method of expressing the graphical user interface in HTML syntax, the currently used method is to directly arrange the data in the graphical user interface into a sequence according to the order arranged in the HTML file, so that only the sequence is required. The order is read in order to generate an HTML file. However, since some HTML syntax has a fixed location, for example, the loading syntax of a CSS file must be in the "<HEAD>" tag of the web page, so when the web page is generated, once the loading syntax of the CSS file is generated, Later than the "<HEAD>" tag, the loading syntax of the CSS file will be listed after the "<HEAD>" tag. As a result, the syntax of the CSS file used in the page cannot be correctly represented. Therefore, the developer is When establishing a sequence of generating web pages, it is often necessary to specifically consider the order in which the various grammars are generated, resulting in complexity in development.

綜上所述,可知先前技術中長期以來一直存在網頁語法必須要按照特定順序產生而增加開發複雜度的問題,因此有必要提出改進的技術手段,來解決此一問題。In summary, it can be seen that in the prior art, there has been a long-standing problem that the webpage grammar must be generated in a specific order to increase the development complexity. Therefore, it is necessary to propose an improved technical means to solve this problem.

有鑒於先前技術存在網頁語法必須要按照特定順序產生而增加開發複雜度的問題,本發明遂揭露一種以雙層容器(container)生成目標檔案之系統及其方法,其中:In view of the prior art, there is a problem that the webpage grammar must be generated in a specific order to increase the development complexity. The present invention discloses a system for generating a target file in a double container and a method thereof, wherein:

本發明所揭露之以雙層容器生成目標檔案之系統,至少包含:記憶體;目標資料讀取模組,用以至各資料來源中讀取目標資料;資料儲存模組,用以於記憶體中初始化容器,容器包含多個子容器(sub-container),及用以將目標資料之各第一資料項目存入與各第一資料項目對應之子容器中,其中,子容器具有相對應之排列順序;資料項目獲取模組,用以獲取與資料來源對應之第二資料項目,並由資料儲存模組將第二資料項目存入另一子容器中;檔案生成模組,用以依據各子容器之排列順序及各第一資料項目與各第二資料項目於各子容器中之排列順序,讀取容器中之所有第一資料項目及所有第二资料項目,藉以生成目標檔案;輸出模組,用以輸出目標檔案。The system for generating a target file by a double-layer container according to the present invention comprises at least: a memory; a target data reading module for reading target data into each data source; and a data storage module for storing in the memory Initializing a container, the container includes a plurality of sub-containers, and storing the first data items of the target data into the sub-containers corresponding to the first data items, wherein the sub-containers have corresponding arrangement order; a data item obtaining module for acquiring a second data item corresponding to the data source, wherein the data storage module stores the second data item in another sub-container; the file generating module is configured to be based on each sub-container Arranging the order and the order of the first data items and the second data items in each sub-container, reading all the first data items and all the second data items in the container, thereby generating a target file; To output the target file.

本發明所揭露之以雙層容器生成目標檔案之方法,其步驟至少包括:初始化容器,容器包含多個子容器,子容器具有相對應之排列順序;至各資料來源中讀取目標資料;獲取與各資料來源對應之第二資料項目;將目標資料之各第一資料項目存入與各第一資料項目對應之子容器中;將各第二資料項目存入另一子容器中;依據各子容器之排列順序及各第一資料項目與各第二資料項目於各子容器中之排列順序,讀取容器中之所有第一資料項目與所有第二資料項,藉以生成目標檔案;輸出目標檔案。The method for generating a target file by a double-layer container according to the present invention comprises the steps of: initializing a container, the container comprises a plurality of sub-containers, the sub-containers have a corresponding sorting order; reading target data to each data source; obtaining and The second data item corresponding to each data source; the first data item of the target data is stored in the sub-container corresponding to each first data item; the second data item is stored in another sub-container; The order of the arrangement and the order of the first data items and the second data items in each sub-container are read, and all the first data items and all the second data items in the container are read to generate a target file; and the target file is output.

本發明所揭露之系統與方法如上,與先前技術之間的差異在於本發明透過容器所包含的各個子容器儲存不同資料類別的資料項目,並依據子容器與資料項目的排列順序讀取資料項目來產生目標檔案,藉以解決先前技術所存在的問題,並可以達成將特定資料項目加入目標檔案中之指定位置的技術功效。The system and method disclosed in the present invention are as above, and the difference from the prior art is that the present invention stores data items of different data categories through respective sub-containers included in the container, and reads data items according to the arrangement order of the sub-containers and the data items. To generate a target file, to solve the problems of the prior art, and to achieve the technical effect of adding a specific data item to a specified location in the target file.

以下將配合圖式及實施例來詳細說明本發明之特徵與實施方式,內容足以使任何熟習相關技藝者能夠輕易地充分理解本發明解決技術問題所應用的技術手段並據以實施,藉此實現本發明可達成的功效。The features and embodiments of the present invention will be described in detail below with reference to the drawings and embodiments, which are sufficient to enable those skilled in the art to fully understand the technical means to which the present invention solves the technical problems, and The achievable effects of the present invention.

本發明是以雙層式的容器(container)來產生包含目標資料的目標檔案。其中,本發明所提之目標資料為需要被顯示的資料,其被儲存於本發明之外的資料來源中。The present invention uses a two-layer container to generate a target file containing target data. The target data proposed by the present invention is information that needs to be displayed, and is stored in a data source other than the present invention.

本發明所提之容器為記憶體中的儲存空間,可能是一塊連續的儲存空間或是多個不連續的儲存空間。一般而言,本發明所提之容器為鏈結串列(linked-list)的形式,但本發明並不以此為限,例如容器也可以為動態陣列的形式。The container provided by the present invention is a storage space in the memory, which may be a continuous storage space or a plurality of discontinuous storage spaces. In general, the container of the present invention is in the form of a linked-list, but the invention is not limited thereto, for example, the container may also be in the form of a dynamic array.

如「第1圖」所示,在本發明所提之容器100中的各個元素實際上是另外一個容器,在本發明中,容器中的容器稱為「子容器(sub-container)」,子容器(如第一子容器110、第二子容器120等)同樣可以是鏈結串列或是動態陣列的形式,而子容器中的元素(如第一元素111、第二元素112等)才是儲存資料項目的位置。其中,本發明所提之資料項目包含第一資料項目與第二資料項目,第一資料項目為目標資料中的部分資料,也就是說,目標資料可以被分為多個第一資料項目,各個第一資料項目分別順序地被儲存在容器100所包含之對應子容器的各個元素中。另外,第二資料項目為目標資料中需要放置在固定位置的資料項目,目標資料中包含有多個第二資料項目,且所有的第二資料項目被順序儲存在容器100的另一個子容器的各個元素中。As shown in Fig. 1, the elements in the container 100 of the present invention are actually another container. In the present invention, the container in the container is called a "sub-container". The container (such as the first sub-container 110, the second sub-container 120, etc.) may also be in the form of a chain of links or a dynamic array, and elements in the sub-container (such as the first element 111, the second element 112, etc.) Is the location where the data item is stored. Wherein, the data item proposed by the present invention comprises a first data item and a second data item, wherein the first data item is part of the target data, that is, the target data can be divided into a plurality of first data items, each The first data items are sequentially stored in respective elements of the corresponding sub-containers included in the container 100. In addition, the second data item is a data item that needs to be placed in a fixed location in the target data, the target data includes a plurality of second data items, and all the second data items are sequentially stored in another sub-container of the container 100. Among the various elements.

在本發明中,容器中的每一個子容器只儲存屬於特定之資料類別的資料項目。例如,容器中包含兩個子容器,此兩個子容器分別儲存屬於「CSS語法」之資料類別以及屬於「HTML語法」之資料類別的資料項目。但本發明所提之資料類別並不以「CSS語法」以及「HTML語法」為限。In the present invention, each sub-container in the container stores only data items belonging to a particular material category. For example, the container contains two child containers, which respectively store data items belonging to the "CSS grammar" and data items belonging to the "HTML grammar" data category. However, the category of information proposed by the present invention is not limited to "CSS grammar" and "HTML grammar".

以下先以「第2圖」本發明所提之以雙層容器生成目標檔案之系統架構圖來說明本發明的系統運作。如「第2圖」所示,本發明之系統含有記憶體210、目標資料讀取模組220、資料項目獲取模組230、資料儲存模組260、檔案生成模組270以及輸出模組280。In the following, the system operation of the present invention will be described with reference to the system architecture diagram of the double-layer container generation target file in the "Fig. 2". As shown in FIG. 2, the system of the present invention includes a memory 210, a target data reading module 220, a data item acquisition module 230, a data storage module 260, a file generation module 270, and an output module 280.

記憶體210負責提供儲存空間。The memory 210 is responsible for providing storage space.

目標資料讀取模組220負責至外部儲存媒體400中讀取目標資料的第一資料項目。The target data reading module 220 is responsible for reading the first data item of the target data into the external storage medium 400.

資料儲存模組260負責在記憶體210中初始化容器100,也就是在記憶體210中配置一塊儲存空間給容器100使用。The data storage module 260 is responsible for initializing the container 100 in the memory 210, that is, arranging a storage space in the memory 210 for use by the container 100.

資料儲存模組260也負責將組成目標資料的所有第一資料項目分別存入與各個第一資料項目對應的子容器中。The data storage module 260 is also responsible for storing all of the first data items constituting the target data into the sub-containers corresponding to the respective first data items.

值得一提的是,資料儲存模組260所儲存之第一資料項目會成為與其資料類別相對應之子容器的最後一個元素。另外,在資料儲存模組260儲存資料項目時,若容器中不存在儲存第一資料項目之資料類別的子容器,則資料儲存模組260會先在容器100中建立儲存屬於該資料類別之第一資料項目的子容器,再將第一資料項目存入新建立的子容器中。其中,特別值得一提的是,資料儲存模組260建立子容器時,會依據組成目標檔案所需之資料類別的順序,將新建立的子容器排列在適合的位置,例如,目標檔案為HTML檔時,若屬於「CSS語法」之資料類別的子容器為新建立的子容器,則資料儲存模組260會將屬於「CSS語法」之資料類別的子容器排列在屬於「HTML語法」之資料類別的子容器之前。It is worth mentioning that the first data item stored in the data storage module 260 becomes the last element of the sub-container corresponding to its data category. In addition, when the data storage module 260 stores the data item, if the sub-container storing the data category of the first data item does not exist in the container, the data storage module 260 first establishes in the container 100 the storage belonging to the data category. A sub-container of the data item, and then the first data item is stored in the newly created sub-container. In particular, it is particularly worth mentioning that when the data storage module 260 creates a sub-container, the newly created sub-containers are arranged in an appropriate position according to the order of the data categories required to form the target file, for example, the target file is HTML. In the case of a file, if the sub-container of the data category belonging to the "CSS grammar" is a newly created sub-container, the data storage module 260 arranges the sub-containers belonging to the "CSS grammar" data category in the "HTML grammar" data. Before the child container of the category.

資料項目獲取模組230負責獲取與外部儲存媒體400中之各資料來源對應的第二資料項目。資料項目獲取模組230獲取之第二資料項目通常為附加在目標檔案中,與目標資料相關的資料。例如,第二資料項目可以為用來定義目標資料中各資料之顯示格式的資料,但本發明所提之第二資料項目並不以此為限。The data item acquisition module 230 is responsible for acquiring second data items corresponding to respective data sources in the external storage medium 400. The second data item acquired by the data item acquisition module 230 is usually the data associated with the target data attached to the target file. For example, the second data item may be the data used to define the display format of each data in the target data, but the second data item mentioned in the present invention is not limited thereto.

一般而言,資料項目獲取模組230只會獲取與目標資料之資料來源對應的第二資料項目,但本發明並不以此為限。In general, the data item obtaining module 230 only obtains the second data item corresponding to the data source of the target data, but the invention is not limited thereto.

資料儲存模組260會將資料項目獲取模組230獲取到之第二資料項目存入容器100中之特定的子容器,其中,儲存第一資料項目的子容器與儲存第二資料項目的子容器並不相同。The data storage module 260 stores the second data item acquired by the data item obtaining module 230 into a specific sub-container in the container 100, wherein the sub-container storing the first data item and the sub-container storing the second data item are stored. Not the same.

檔案生成模組270負責依據容器中之各個子容器的排列順序及各第一資料項目,各第二資料項目於各子容器中之排列順序,由各個子容器中讀取各個第一資料項目以及各個第二資料項目,藉以由讀出的資料項目生成目標檔案。其中,檔案生成模組270會依據資料項目在子容器中的排列順序由各個子容器中讀取資料項目,也就是說,每個子容器中的資料項目只會被檔案生成模組270讀取一次,而後當檔案生成模組270至同一子容器讀取資料項目時,檔案生成模組270將會讀取排列在前次被讀取出之資料項目後的資料項目。The file generation module 270 is configured to read each of the first data items from each of the sub-containers according to the order of the sub-containers in the container and the first data items, the order of the second data items in each sub-container, and Each of the second data items generates a target file from the read data items. The file generation module 270 reads the data items from the respective sub-containers according to the arrangement order of the data items in the sub-containers, that is, the data items in each sub-container are only read once by the file generation module 270. Then, when the file generation module 270 reads the data item from the same sub-container, the file generation module 270 will read the data item arranged after the previously read data item.

輸出模組280負責輸出目標檔案。輸出模組280可以將目標檔案顯示在螢幕上的方式輸出目標檔案,也可以將目標檔案儲存到儲存媒體輸出目標檔案,但輸出模組280輸出目標檔案的方式並不以上述為限。The output module 280 is responsible for outputting the target file. The output module 280 can output the target file by displaying the target file on the screen, or can store the target file to the storage medium output target file, but the output module 280 outputs the target file in a manner not limited to the above.

本發明還可以包含資料分割模組250。在本發明中,目標資料可能在儲存於資料來源時,便已被分為多個第一資料項目,但若目標資料沒有被分為多個第一資料項目,則資料分割模組250會在目標資料讀取模組220讀取到目標資料後,將目標資料分割為多個第一資料項目。一般而言,資料分割模組250會將目標資料中的每一行或每一個段落分割為不同的第一資料項目,但本發明並不以此為限。The present invention may also include a data segmentation module 250. In the present invention, the target data may be divided into a plurality of first data items when stored in the data source, but if the target data is not divided into the plurality of first data items, the data segmentation module 250 may After the target data reading module 220 reads the target data, the target data is divided into a plurality of first data items. In general, the data segmentation module 250 divides each row or each segment in the target material into different first data items, but the invention is not limited thereto.

本發明更可以包含標籤模組290,標籤模組290負責依據目標資料讀取模組220讀取出之目標資料的資料來源或依據目標資料的預定格式,對目標資料中的各個第一資料項目加入相對應的顯示標籤,例如,對第一資料項目在目標資料中的位置加入包含特定CSS語法的HTML標籤或是會載入特定CSS語法的HTML標籤。一般而言,顯示標籤可以在輸出模組280以顯示的方式輸出目標檔案時,對目標檔案中的第一資料項目進行對應處理,使得被顯示之目標檔案中的第一資料項目以對應的外觀呈現,例如改變第一資料項目被顯示時的字體、顏色等。The present invention may further include a label module 290. The label module 290 is responsible for each of the first data items in the target data according to the data source of the target data read by the target data reading module 220 or according to a predetermined format of the target data. The corresponding display label is added, for example, an HTML tag containing a specific CSS syntax or an HTML tag that loads a specific CSS syntax is added to the location of the first data item in the target material. In general, the display label can perform corresponding processing on the first data item in the target file when the output module 280 outputs the target file in a display manner, so that the first data item in the displayed target file has a corresponding appearance. Presenting, for example, changing the font, color, and the like when the first material item is displayed.

接著以第一實施例來解說本發明的運作系統與方法,並請參照「第3圖」本發明所提之以雙層容器生成目標檔案之方法流程圖。在本實施例中,本發明包含在釋義查找軟體中,負責讀取字詞庫所儲存之字詞的釋義資料,藉以生成提供給使用者的目標檔案,也就是說,執行釋義查找軟體之裝置所儲存的字詞庫即為本發明所提之外部儲存媒體400,而本發明所提之目標資料即為字詞的釋義資料,其中,字詞的釋義資料包含但不限於字詞的發音符號、詞性、說明文字、例句等。但本發明所提之目標資料並不以字詞的釋義資料為限。其中,特別值得一提的是,在本實施例中所產生目標檔案為HTML格式,也就是說,字詞的釋義資料將以HTML來表示。Next, the operation system and method of the present invention will be explained with reference to the first embodiment, and please refer to the "Fig. 3" flowchart of the method for generating a target file in a double-layer container according to the present invention. In this embodiment, the present invention is included in the definition lookup software, which is responsible for reading the interpretation data of the words stored in the word dictionary, thereby generating a target file provided to the user, that is, executing the device for reading the definition software. The stored word library is the external storage medium 400 mentioned in the present invention, and the target data proposed by the present invention is the interpretation data of the word, wherein the interpretation data of the word includes but is not limited to the pronunciation symbol of the word. , part of speech, explanatory text, example sentences, etc. However, the target information proposed by the present invention is not limited to the interpretation data of the words. Among them, it is particularly worth mentioning that the target file generated in this embodiment is in HTML format, that is, the interpretation data of the word will be represented by HTML.

當使用者欲使用釋義查找軟體查找字詞「test」的釋義資料時,使用者首先會在釋義查找軟體所提供的查詢界面中輸入字詞「test」之後,目標資料讀取模組220便可以至執行釋義查找軟體之裝置的字詞庫(外部儲存媒體400)的各個字典檔中,查找字詞「test」的釋義資料(目標資料),藉以完成目標資料中之第一資料項目的讀取(步驟310)。在實務上,本實施例中之目標資料讀取模組220也可以在特定的時間等條件下自動讀取釋義資料藉以生成目標檔案,而不一定需要在使用者查找釋義資料時才讀取釋義資料。When the user wants to use the definition search software to find the definition data of the word "test", the user first enters the word "test" in the query interface provided by the definition search software, and the target data reading module 220 can Searching for the definition data (target data) of the word "test" in each dictionary file of the word library (external storage medium 400) of the device for performing the definition finding software, thereby completing the reading of the first data item in the target data (Step 310). In practice, the target data reading module 220 in the embodiment can also automatically read the interpretation data to generate the target file under a specific time and the like, without necessarily reading the interpretation when the user searches for the interpretation data. data.

在實務上,目標資料讀取模組220所讀取到之目標資料並不一定已被分為第一資料項目,因此,若本實施例之釋義查找軟體中還包含在資料分割模組250,則在目標資料讀取模組220讀取目標資料中之第一資料項目(步驟310)後,資料分割模組250還可以將目標資料分割為多個第一資料項目(步驟321)。在本實施例中,字詞「test」的釋義資料通常為一個完整的資料,因此,目標資料讀取模組220會依據字詞「test」之釋義資料中的每一個換行符號將字詞「test」之釋義資料分割為多個第一資料項目,也就是說,在本實施例中,字詞「test」之釋義資料中的一行即為一個第一資料項目,例如,第一資料項目可能為字詞「test」的發音符號、詞性、一個說明、一個例句,或是一個例句翻譯等,但本發明並不以此為限。In practice, the target data read by the target data reading module 220 is not necessarily divided into the first data item. Therefore, if the definition finding software in this embodiment is further included in the data splitting module 250, After the target data reading module 220 reads the first data item in the target data (step 310), the data segmentation module 250 may further divide the target data into a plurality of first data items (step 321). In this embodiment, the interpretation data of the word "test" is usually a complete data. Therefore, the target data reading module 220 will use the word "every line break" in the interpretation data of the word "test". The interpretation data of the test is divided into a plurality of first data items, that is to say, in the present embodiment, one line in the interpretation data of the word "test" is a first data item, for example, the first data item may It is a pronunciation symbol, part of speech, a description, an example sentence, or an example sentence translation of the word "test", but the invention is not limited thereto.

在目標資料讀取模組220至多個資料來源查找字詞「test」的釋義資料以讀取目標資料中的第一資料項目(步驟310)後,資料項目獲取模組230可以獲取與各資料來源對應之第二資料項目(步驟330)。在本實施例中,假設目標資料讀取模組220在英漢字典以及英英字典中讀取到目標資料,由於字詞的釋義資料是以HTML表示,因此資料項目獲取模組230會依據讀取到目標資料的資料來源,也就是英漢字典以及英英字典,獲取定義分別定義由英漢字典或英英字典所讀出之釋義資料之表現格式的CSS檔案路徑,並依據獲取到之CSS檔案路徑生成與英漢字典以及英英字典相對應的CSS檔案載入語法。After the target data reading module 220 searches for the definition data of the word "test" to read the first data item in the target data (step 310), the data item obtaining module 230 can obtain the data source and the data source. Corresponding second data item (step 330). In this embodiment, it is assumed that the target data reading module 220 reads the target data in the English-Chinese dictionary and the English-English dictionary. Since the interpretation data of the words is represented by HTML, the data item obtaining module 230 reads according to the data. The source of the target data, that is, the English-Chinese dictionary and the English-English dictionary, obtain the CSS file path defining the expression format of the interpretation data read by the English-Chinese dictionary or the English-English dictionary, and generate the CSS file path according to the obtained CSS file path. CSS file loading syntax corresponding to English-Chinese dictionaries and English-English dictionaries.

在資料儲存模組260初始化容器100(步驟301),且資料項目獲取模組230獲取與各資料來源對應之第二資料項目(步驟330)後,若本實施例之釋義查找軟體中還包含標籤模組290,則標籤模組290可以依據顯示目標資料之預設格式,對第一資料項目加入對應之顯示標籤(步驟350)。在本實施例中,標籤模組290可以依據表示釋義資料之HTML檔案的格式,對各個第一資料項目加入改變第一資料項目之顯示外觀的對應HTML標籤,使得各個第一資料項目符合表示釋義資料之HTML檔案的格式,例如對釋義資料中之字詞的說明文字加入「<div id="dropdownid"class="t_buue">」的標籤,對釋義資料中之字詞的發音符號、詞性以及例句則加上其他標籤等,但本發明所提之顯示標籤並不以此為限。After the data storage module 260 initializes the container 100 (step 301), and the data item obtaining module 230 acquires the second data item corresponding to each data source (step 330), if the definition finding software in the embodiment further includes the label In the module 290, the label module 290 can add a corresponding display label to the first data item according to the preset format of the display target data (step 350). In this embodiment, the label module 290 can add a corresponding HTML label for changing the display appearance of the first data item to each of the first data items according to the format of the HTML file indicating the interpretation data, so that each of the first data items conforms to the definition. The format of the HTML file of the data, for example, the description of the words in the interpretation data is added to the label of "<div id="dropdownid"class="t_buue">", the pronunciation symbol of the words in the interpretation data, the part of speech and The example sentence is added with other labels, etc., but the display label proposed by the present invention is not limited thereto.

事實上,在目標資料讀取模組220讀取目標資料中的第一資料項目(步驟310)之前或之後,資料儲存模組260需要先在記憶體210中初始化容器100(步驟301)。在本實施例中,假設容器100為鏈結串列,容器中之子容器也為鏈結串列,但本發明並不以此為限。In fact, before or after the target data reading module 220 reads the first data item in the target data (step 310), the data storage module 260 needs to initialize the container 100 in the memory 210 (step 301). In the present embodiment, it is assumed that the container 100 is a chain of links, and the sub-containers in the container are also a series of links, but the invention is not limited thereto.

在實務上,資料儲存模組260在記憶體210中初始化容器100(步驟301)與目標資料讀取模組220讀取目標資料的第一資料項目(步驟310)之步驟沒有先後次序的關係,同樣的,資料儲存模組260在記憶體210中初始化容器100(步驟301)也與資料項目獲取模組230獲取與各資料來源對應之第二資料項目(步驟330)之步驟沒有先後次序的關係。In practice, the data storage module 260 initializes the container 100 in the memory 210 (step 301) and the target data reading module 220 reads the first data item of the target data (step 310) in a non-sequential relationship. Similarly, the data storage module 260 initializes the container 100 in the memory 210 (step 301) and the data item acquisition module 230 acquires the second data item corresponding to each data source (step 330). .

在標籤模組290對第一資料項目加入對應之顯示標籤(步驟350)後,資料儲存模組260可以將第二資料項目存入專門儲存CSS檔案載入語法的子容器中(步驟361),並可以將目標資料之各第一資料項目存入與各第一資料項目對應之子容器中(步驟365),在本實施例中,也就是將由英漢字典或英英字典所讀出之釋義資料中的第一資料項目分別存入與英漢字典或英英字典對應的子容器中。其中,由於在HTML檔案中,CSS檔案載入語法必須要排列在顯示釋義資料的HTML語法之前,因此,資料儲存模組260會將專門儲存CSS檔案載入語法的子容器排列在各個儲存與第一資料項目對應的子容器之前。After the tag module 290 adds the corresponding display tag to the first data item (step 350), the data storage module 260 can store the second data item in a sub-container that stores the CSS file loading syntax (step 361). And storing each of the first data items of the target data into the sub-container corresponding to each of the first data items (step 365), in this embodiment, that is, the interpretation data read by the English-Chinese dictionary or the English-English dictionary The first data items are respectively stored in sub-containers corresponding to English-Chinese dictionaries or English-English dictionaries. In the HTML file, the CSS file loading syntax must be arranged before the HTML syntax for displaying the interpretation data. Therefore, the data storage module 260 arranges the sub-containers that store the CSS file loading syntax in each storage and the first Before a sub-container corresponding to a data item.

在實務上,資料儲存模組260將目標資料之各第一資料項目存入與各第一資料項目對應之子容器中(步驟365)與資料儲存模組260將第二資料項目存入專門儲存CSS檔案載入語法的子容器中(步驟361)並沒有先後順序的關係,也就是說,資料儲存模組260可以先將第一資料項目存入與各第一資料項目對應之子容器中(步驟365)後,再將第二資料項目存入專門儲存CSS檔案載入語法的子容器中(步驟361)。In practice, the data storage module 260 stores the first data items of the target data into the sub-containers corresponding to the first data items (step 365) and the data storage module 260 stores the second data items into the dedicated storage CSS. The sub-container of the file loading grammar (step 361) has no sequential relationship, that is, the data storage module 260 may first store the first data item in the sub-container corresponding to each first data item (step 365). After that, the second data item is stored in a sub-container that stores the CSS file loading syntax (step 361).

在資料儲存模組260將目標資料之各資料項目存入與各資料項目對應之子容器中(步驟365)時,由於本實施例中之子容器為鏈結串列,因此,資料儲存模組260在儲存資料項目時,只需要在記憶體210中初始化被儲存之資料項目的儲存空間,並在儲存資料項目至該儲存空間後,設定與該資料項目對應之子容器的最後一個元素鏈結到儲存該資料項目之儲存空間便完成資料項目的儲存,但若子容器為動態陣列,則資料儲存模組260需要建立可以儲存與該資料項目對應之子容器中之所有元素以及該資料項目的儲存空間,再將該資料項目對應之子容器中之所有元素依序存入該儲存空間後,最後存入該資料項目才完成資料項目的儲存。When the data storage module 260 stores the data items of the target data in the sub-containers corresponding to the data items (step 365), since the sub-containers in the embodiment are linked, the data storage module 260 is When storing the data item, it is only necessary to initialize the storage space of the stored data item in the memory 210, and after storing the data item to the storage space, set the last element of the sub-container corresponding to the data item to be stored. The storage of the data item completes the storage of the data item, but if the sub-container is a dynamic array, the data storage module 260 needs to establish a storage space for storing all the elements in the sub-container corresponding to the data item and the data item, and then All the elements in the sub-container corresponding to the data item are sequentially stored in the storage space, and finally stored in the data item to complete the storage of the data item.

在資料儲存模組260將第二資料項目存入子容器中(步驟361),並將目標資料之各第一資料項目存入與各第一資料項目對應之子容器中(步驟365)後,檔案生成模組270可以依據子容器之排列順序以及第一資料項目及第二資料項目於子容器中之排列順序,依序讀取容器100中之所有第一資料項目與所有第二資料項目,並依序將讀出的第一資料項目與第二資料項目組成目標檔案(步驟370)。The data storage module 260 stores the second data item in the sub-container (step 361), and stores each of the first data items of the target data into the sub-container corresponding to each of the first data items (step 365), and the file The generating module 270 can sequentially read all the first data items and all the second data items in the container 100 according to the order of the sub-containers and the order of the first data item and the second data item in the sub-container, and The read first data item and the second data item are sequentially formed into a target file (step 370).

最後,由輸出模組280顯示目標檔案(步驟380)。由於在本實施例中,目標檔案包含載入CSS檔案的HTML語法(第二資料項目),也包含帶有顯示標籤的第一資料項目,因此,在輸出模組280所顯示的目標檔案中,第一資料項目會隨著與顯示標籤對應的CSS語法改變顯示的外觀。Finally, the target file is displayed by output module 280 (step 380). In this embodiment, the target file includes an HTML syntax (second data item) for loading the CSS file, and the first data item with the display label is also included. Therefore, in the target file displayed by the output module 280, The first data item changes the appearance of the display with the CSS syntax corresponding to the display label.

綜上所述,可知本發明與先前技術之間的差異在於具有雙層的容器,容器所包含的各個子容器儲存不同資料類別的資料項目,並依據子容器與資料項目的排列順序讀取資料項目來產生目標檔案之技術手段,藉由此一技術手段可以解決先前技術所存在網頁語法必須要按照特定順序產生而增加開發複雜度的問題,進而達成將特定資料項目加入目標檔案中之指定位置的技術功效。In summary, it can be seen that the difference between the present invention and the prior art is that there are two-layer containers, each sub-container contained in the container stores data items of different data categories, and reads data according to the arrangement order of the sub-containers and the data items. The technical means for the project to generate the target file, by which a technical means can solve the problem that the prior art web page grammar must be generated in a specific order and increase the development complexity, thereby achieving the specific data item added to the specified position in the target file. Technical efficacy.

再者,本發明之以雙層容器生成目標檔案之方法,可實現於硬體、軟體或硬體與軟體之組合中,亦可在電腦系統中以集中方式實現或以不同元件散佈於若干互連之電腦系統的分散方式實現。Furthermore, the method for generating a target file in a double-layer container according to the present invention can be implemented in a combination of hardware, software, or a combination of hardware and software, or can be implemented in a centralized manner in a computer system or spread over several different components by different components. Even the decentralized way of implementing computer systems.

雖然本發明所揭露之實施方式如上,惟所述之內容並非用以直接限定本發明之專利保護範圍。任何本發明所屬技術領域中具有通常知識者,在不脫離本發明所揭露之精神和範圍的前提下,對本發明之實施的形式上及細節上作些許之更動潤飾,均屬於本發明之專利保護範圍。本發明之專利保護範圍,仍須以所附之申請專利範圍所界定者為準。While the embodiments of the present invention have been described above, the above description is not intended to limit the scope of the invention. Any modification of the form and details of the practice of the present invention, which is a matter of ordinary skill in the art to which the present invention pertains, is a patent protection of the present invention. range. The scope of the invention is to be determined by the scope of the appended claims.

100...容器100. . . container

110...第一子容器110. . . First subcontainer

120...第二子容器120. . . Second subcontainer

210...記憶體210. . . Memory

220...目標資料讀取模組220. . . Target data reading module

230...資料項目獲取模組230. . . Data item acquisition module

250...資料分割模組250. . . Data segmentation module

260...資料儲存模組260. . . Data storage module

270...檔案生成模組270. . . File generation module

280...輸出模組280. . . Output module

290...標籤模組290. . . Label module

400...外部儲存媒體400. . . External storage medium

步驟301 初始化容器,容器包含多個子容器,子容器具有相對應之排列順序Step 301: Initializing a container, the container includes a plurality of sub-containers, and the sub-containers have corresponding order

步驟310 至各資料來源中讀取目標資料之各第一資料項目Step 310: reading each of the first data items of the target data in each data source

步驟321 分割目標資料為第一資料項目Step 321 Divide the target data into the first data item.

步驟330 獲取與各資料來源對應之第二資料項目Step 330: Acquire a second data item corresponding to each data source

步驟350 依據目標資料之格式對第一資料項目加入對應之顯示標籤Step 350: Add a corresponding display label to the first data item according to the format of the target data.

步驟361 將第二資料項目存入子容器中Step 361: storing the second data item in the sub-container

步驟365 將各第一資料項目存入與各第一資料項目對應之子容器中Step 365: storing each first data item in a sub-container corresponding to each first data item

步驟370 依據子容器之排列順序、第一資料項目及第二資料項目於子容器中之排列順序,讀取容器中所有第一資料項目與第二資料項目,藉以生成目標檔案Step 370: reading all the first data items and the second data items in the container according to the order of the sub-containers, the order of the first data item, and the second data item in the sub-container, thereby generating the target file

步驟380 輸出目標檔案Step 380 output target file

第1為本發明所提之雙層容器之示意圖。The first is a schematic view of the double-layered container of the present invention.

第2為本發明所提之以雙層容器生成目標檔案之系統架構圖。The second is a system architecture diagram for generating a target file in a double-layer container according to the present invention.

第3為本發明所提之以雙層容器生成目標檔案之方法流程圖。The third is a flowchart of a method for generating a target file by a double-layer container according to the present invention.

步驟301 初始化容器,容器包含多個子容器,子容器具有相對應之排列順序Step 301: Initializing a container, the container includes a plurality of sub-containers, and the sub-containers have corresponding order

步驟310 至各資料來源中讀取目標資料之各第一資料項目Step 310: reading each of the first data items of the target data in each data source

步驟321 分割目標資料為第一資料項目Step 321 Divide the target data into the first data item.

步驟330 獲取與各資料來源對應之第二資料項目Step 330: Acquire a second data item corresponding to each data source

步驟350 依據目標資料之格式對第一資料項目加入對應之顯示標籤Step 350: Add a corresponding display label to the first data item according to the format of the target data.

步驟361 將第二資料項目存入子容器中Step 361: storing the second data item in the sub-container

步驟365 將各第一資料項目存入與各第一資料項目對應之子容器中Step 365: storing each first data item in a sub-container corresponding to each first data item

步驟370 依據子容器之排列順序、第一資料項目及第二資料項目於子容器中之排列順序,讀取容器中所有第一資料項目與第二資料項目,藉以生成目標檔案Step 370: reading all the first data items and the second data items in the container according to the order of the sub-containers, the order of the first data item, and the second data item in the sub-container, thereby generating the target file

步驟380 輸出目標檔案Step 380 output target file

Claims (8)

一種以雙層容器(container)生成目標檔案之方法,用以輸出儲存於至少一資料來源之一目標資料,該方法至少包含下列步驟:初始化一容器,該容器包含多個子容器(sub-container),該些子容器具有相對應之排列順序;至各該資料來源中讀取該目標資料之各第一資料項目;獲取與各該資料來源對應之一第二資料項目;將各該第一資料項目存入與各該第一資料項目對應之一該子容器中;將各該第二資料項目存入另一子容器中;依據各該子容器之排列順序、各該第一資料項目及各該第二資料項目於各該子容器中之排列順序,讀取該容器中之所有第一資料項目與所有第二資料項,藉以生成一目標檔案;及輸出該目標檔案。A method for generating a target file by using a double container for outputting target data stored in at least one data source, the method comprising at least the following steps: initializing a container, the container including a plurality of sub-containers And the sub-containers have a corresponding order; each of the data sources reads the first data item of the target data; and acquires a second data item corresponding to each of the data sources; The project is stored in one of the sub-containers corresponding to each of the first data items; each of the second data items is stored in another sub-container; and according to the order of the sub-containers, each of the first data items and each The second data item is arranged in each of the sub-containers, and all the first data items and all the second data items in the container are read to generate a target file; and the target file is output. 如申請專利範圍第1項所述之以雙層容器生成目標檔案之方法,其中該方法於該至各該資料來源中讀取該目標資料之第一資料項目之步驟後,更包含依據各該資料來源或該目標資料之格式,對各該第一資料項目加入對應之一顯示標籤之步驟。The method for generating a target file by using a double-layer container as described in the first aspect of the patent application, wherein the method further comprises the step of reading the first data item of the target data in each of the data sources. The data source or the format of the target data, and the step of adding one of the corresponding display labels to each of the first data items. 如申請專利範圍第1項所述之以雙層容器生成目標檔案之方法,其中該方法於該至各該資料來源中讀取該目標資料之第一資料項目之步驟後,更包含分割該目標資料為各該第一資料項目之步驟。The method for generating a target file by a double-layer container according to the first aspect of the patent application, wherein the method further comprises dividing the target after the step of reading the first data item of the target data in each of the data sources The information is the step of each of the first data items. 一種以雙層容器生成目標檔案之系統,用以輸出儲存於至少一資料來源之一目標資料,該系統至少包含:一記憶體;一目標資料讀取模組,用以至各該資料來源中讀取該目標資料;一資料儲存模組,用以於該記憶體中初始化一容器,該容器包含多個子容器,及用以將該目標資料之各第一資料項目存入與各該第一資料項目對應之一該子容器中,其中,該些子容器具有相對應之排列順序;一資料項目獲取模組,用以獲取與各該資料來源對應之一第二資料項目,並由該資料儲存模組將各該第二資料項目存入另一子容器中;一檔案生成模組,用以依據各該子容器之排列順序及各該第一資料項目與各該第二資料項目於各該子容器中之排列順序,讀取該容器中之所有第一資料項目及第二資料項目,藉以生成一目標檔案;及一輸出模組,用以輸出該目標檔案。A system for generating a target file in a double-layer container for outputting target data stored in at least one data source, the system comprising at least: a memory; a target data reading module for reading to each of the data sources Taking the target data; a data storage module for initializing a container in the memory, the container includes a plurality of sub-containers, and storing the first data item of the target data into each of the first data The item corresponds to one of the sub-containers, wherein the sub-containers have a corresponding sorting order; a data item obtaining module is configured to obtain a second data item corresponding to each of the data sources, and store the data item The module stores each of the second data items in another sub-container; a file generation module for arranging the sub-containers according to the order of the sub-containers and each of the first data items and each of the second data items The order of the sub-containers is to read all the first data items and the second data items in the container to generate a target file; and an output module for outputting the target file. 如申請專利範圍第4項所述之以雙層容器生成目標檔案之系統,其中該系統更包含一標籤模組,用以依據各該資料來源或該目標資料之格式,對各該第一資料項目加入相對應之一顯示標籤,該輸出模組更用以於以顯示之方式輸出該目標檔案時,依據該顯示標籤處理該第一資料項目。A system for generating a target file by a double-layer container as described in claim 4, wherein the system further comprises a tag module for each of the first data according to the format of the data source or the target data. The item is added to a corresponding one of the display labels, and the output module is further configured to process the first data item according to the display label when the target file is outputted in a display manner. 如申請專利範圍第4項所述之以雙層容器生成目標檔案之系統,其中該系統更包含一資料分割模組,用以將目標資料分割為各該資料項目。A system for generating a target file by a double-layer container as described in claim 4, wherein the system further comprises a data splitting module for dividing the target data into the data items. 如申請專利範圍第4項所述之以雙層容器生成目標檔案之系統,其中該容器及該子容器係鏈結串列(linked-list)。A system for generating a target file in a double-layered container as described in claim 4, wherein the container and the sub-container are linked-listed. 如申請專利範圍第4項所述之以雙層容器生成目標檔案之系統,其中該資料來源為字典檔,該目標資料為字詞之釋義資料。A system for generating a target file by a double-layer container as described in claim 4, wherein the source of the data is a dictionary file, and the target data is a definition of the word.
TW099141746A 2010-12-01 2010-12-01 System for generating target file using two-tier container and method thereof TWI490717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099141746A TWI490717B (en) 2010-12-01 2010-12-01 System for generating target file using two-tier container and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099141746A TWI490717B (en) 2010-12-01 2010-12-01 System for generating target file using two-tier container and method thereof

Publications (2)

Publication Number Publication Date
TW201224813A TW201224813A (en) 2012-06-16
TWI490717B true TWI490717B (en) 2015-07-01

Family

ID=46725966

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099141746A TWI490717B (en) 2010-12-01 2010-12-01 System for generating target file using two-tier container and method thereof

Country Status (1)

Country Link
TW (1) TWI490717B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040260715A1 (en) * 2003-06-20 2004-12-23 Mongeon Brad A. Object mapping across multiple different data stores
US7051276B1 (en) * 2000-09-27 2006-05-23 Microsoft Corporation View templates for HTML source documents
TW200933386A (en) * 2008-01-25 2009-08-01 Inventec Corp File format transferring system capable of changing text format and a method thereof
CN1954314B (en) * 2004-04-30 2010-05-26 微软公司 Document mark up methods and systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7051276B1 (en) * 2000-09-27 2006-05-23 Microsoft Corporation View templates for HTML source documents
US20040260715A1 (en) * 2003-06-20 2004-12-23 Mongeon Brad A. Object mapping across multiple different data stores
CN1954314B (en) * 2004-04-30 2010-05-26 微软公司 Document mark up methods and systems
TW200933386A (en) * 2008-01-25 2009-08-01 Inventec Corp File format transferring system capable of changing text format and a method thereof

Also Published As

Publication number Publication date
TW201224813A (en) 2012-06-16

Similar Documents

Publication Publication Date Title
US10656920B2 (en) Dynamically adaptable tool for graphical development of user interfaces
Petzold Programming windows
Nathan Windows presentation foundation unleashed
CN112114807A (en) Interface display method, device, equipment and storage medium
Da Rocha Learn Chart. js: Create interactive visualizations for the web with chart. js 2
US20080256469A1 (en) Host controlled user interface
JP2010532513A (en) Data system and method
EP2162833A1 (en) A method, system and computer program for intelligent text annotation
KR20050039551A (en) Programming interface for a computer platform
MacDonald Pro WPF 4.5 in VB
CN105373520A (en) Method and device for setting control style attributes
Meeks D3. js in Action: Data visualization with JavaScript
Horton Ivor Horton's Beginning Java 2
Halliday Vue. js 2 Design Patterns and Best Practices: Build enterprise-ready, modular Vue. js applications with Vuex and Nuxt
Bawane et al. A Review on Technologies used in MERN stack
MacDonald Pro WPF in C# 2008: Windows presentation foundation with. NET 3.5
Collins Pro HTML5 with CSS, JavaScript, and Multimedia
US20180196738A1 (en) Test input information search device and method
Hermes et al. Building Xamarin. Forms Mobile Apps Using XAML: Mobile Cross-Platform XAML and Xamarin. Forms Fundamentals
TWI490717B (en) System for generating target file using two-tier container and method thereof
Benson et al. Cascading tree sheets and recombinant HTML: better encapsulation and retargeting of web content
CN111459483B (en) Interface processing method and device
CN111898762A (en) Deep learning model catalog creation
CN105630149A (en) Techniques for providing a user interface incorporating sign language
Sunderaraman Practical Ext JS 4

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees