JP5265476B2 - Data processing device between document object and schema definition - Google Patents

Data processing device between document object and schema definition Download PDF

Info

Publication number
JP5265476B2
JP5265476B2 JP2009169661A JP2009169661A JP5265476B2 JP 5265476 B2 JP5265476 B2 JP 5265476B2 JP 2009169661 A JP2009169661 A JP 2009169661A JP 2009169661 A JP2009169661 A JP 2009169661A JP 5265476 B2 JP5265476 B2 JP 5265476B2
Authority
JP
Japan
Prior art keywords
data
program
processing
character string
data structure
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2009169661A
Other languages
Japanese (ja)
Other versions
JP2011022949A (en
Inventor
博仁 駒田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yahoo Japan Corp
Original Assignee
Yahoo Japan Corp
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 Yahoo Japan Corp filed Critical Yahoo Japan Corp
Priority to JP2009169661A priority Critical patent/JP5265476B2/en
Publication of JP2011022949A publication Critical patent/JP2011022949A/en
Application granted granted Critical
Publication of JP5265476B2 publication Critical patent/JP5265476B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、Webブラウザが保有するドキュメントオブジェクト形式の記憶領域に記憶されたデータをデータベース記述言語(SQL)でアクセスする装置に関する。   The present invention relates to an apparatus for accessing, in a database description language (SQL), data stored in a document object format storage area held by a Web browser.

Webサービスの普及に伴い、ユーザのWebページ閲覧等に関する情報を保存しておき、様々なWeb上のサービスに利用するニーズが高まってきている。この保存機能は、Webブラウザの機能として提供されており、Cookieが一般的に利用されている。しかしCookieは数キロバイト(KB)のデータしか保存できず、より高度なサービスを実現するためには、容量が不足してきている。
一方、新しいHTMLの仕様として、DOMStorageという領域に保存する方法も提案され、このDOMStorageは数メガバイト(MB)の容量でデータを保存しておくことが可能となる。
With the widespread use of Web services, there is an increasing need for storing information related to user Web page browsing and using it for various Web services. This storage function is provided as a function of a Web browser, and cookies are generally used. However, cookies can only store several kilobytes (KB) of data, and the capacity is insufficient to realize more advanced services.
On the other hand, as a new HTML specification, a method of storing in an area called DOMStorage has been proposed, and this DOMStorage can store data with a capacity of several megabytes (MB).

この大容量の記憶域であるDOMStorageを活用することにより、ユーザ毎の情報を活用した様々なサービス展開が可能となる。   By using DOMStorage, which is a large-capacity storage area, various services can be developed using information for each user.

従来、データベースをXMLなどのドキュメント記述言語で扱う手法は提案されているが(たとえば、特許文献1参照)、その逆のXML、HTMLなどのドキュメント記述言語で記述されたドキュメントを扱うためのDOMStorageなどの文字列データをSQLなどのデータベース記述言語で扱う手法は提案されていなかった。   Conventionally, a technique for handling a database in a document description language such as XML has been proposed (see, for example, Patent Document 1), but the opposite is the case, such as DOMStorage for handling a document described in a document description language such as XML or HTML. No method has been proposed for handling character string data in a database description language such as SQL.

特表2004−519755号公報JP-T-2004-519755

しかし、このDOMStorageなどの文字列データをSQLなどのデータベース記述言語で扱うためには、それぞれの文字列をプログラムで扱うことができるデータの情報構造を付加する必要があるため、文字列データごとにプログラム内で定義する処理等が必要となり、プログラムが煩雑になり、容易にデータベース化できないという問題があった。   However, in order to handle character string data such as DOMStorage in a database description language such as SQL, it is necessary to add an information structure of data that can be handled by each program, so for each character string data There is a problem that the processing defined in the program is necessary, the program becomes complicated, and the database cannot be easily created.

そこで、本発明では、DOMStorage等の文字列のみで記述されたデータを、容易にSQLなどのデータベース記述言語で扱えるようにし、データベースとしてスキーマを定義して活用するための技術を提供することを目的とする。   Therefore, an object of the present invention is to provide a technique for defining and utilizing a schema as a database so that data described using only a character string such as DOMStorage can be easily handled in a database description language such as SQL. And

上記の課題を解決するため、本発明は以下のように構成されている。   In order to solve the above-described problems, the present invention is configured as follows.

(1)本発明の一様態は、文字列のみ記憶するドキュメントオブジェクト型の記憶領域をデータベースとして利用するためのデータ処理装置であって、
Webページを端末画面に表示するための処理を行うWebブラウザ処理手段と、
前記Webブラウザ処理手段の中で実行され、前記Webページ内において、スクリプト言語で記述されたスクリプトプログラムを実行するスクリプト言語処理手段と、
前記スクリプト言語処理手段の中で実行され、前記スクリプトプログラム内に記述されたプログラムデータをプログラムデータ構造とデータの双方を文字列データして表現したものに変換する処理を行うプログラムデータ構造・文字列データ変換処理手段と、
前記プログラムデータ構造・文字列データ変換処理手段により変換された文字列データを前記スクリプト言語処理手段の中で実行されるプログラムデータ構造へ変換する文字列データ・プログラムデータ構造変換処理手段とを備えたことを特徴とする。
(1) One aspect of the present invention is a data processing apparatus for using, as a database, a document object type storage area that stores only character strings.
Web browser processing means for performing processing for displaying the Web page on the terminal screen;
Script language processing means that is executed in the web browser processing means and executes a script program written in a script language in the web page;
Program data structure / character string that is executed in the script language processing means and performs processing for converting program data described in the script program into a representation of both program data structure and data as character string data Data conversion processing means;
Character string data / program data structure conversion processing means for converting the character string data converted by the program data structure / character string data conversion processing means into a program data structure executed in the script language processing means It is characterized by that.

このようなデータ処理装置によれば、Webブラウザが保持するドキュメントオブジェクト型の記憶領域に格納されているデータをSQL言語のスキーマ構造を持った形式で処理することが可能となり、データ管理が容易になる。   According to such a data processing apparatus, data stored in a document object type storage area held by a Web browser can be processed in a format having a SQL language schema structure, and data management is facilitated. Become.

(2)本発明の他の様態は、前記スクリプトプログラム内に記述されたプログラムデータ構造をデータベース記述言語により処理を記述した記述を含むスクリプトプログラム処理するデータベース処理手段を備えたことを特徴とする(1)に記載のデータ処理装置であることを特徴とする。 (2) Another aspect of the present invention, comprising the database processing unit for processing the descriptions of the programs written data structure in said script program describing the processing by the database description language including steaming crypto program The data processing device according to (1) is characterized in that

(3)文字列のみ記憶するドキュメントオブジェクト型の記憶領域をデータベースとして利用するためのデータ処理装置であって、
Webページを端末画面に表示するための処理を行うWebブラウザ処理ステップと、
前記Webブラウザ処理ステップの中で実行され、前記Webページ内において、スクリプト言語で記述されたスクリプトプログラムを実行するスクリプト言語処理ステップと、
前記スクリプト言語処理ステップの中で実行され、前記スクリプトプログラム内に記述されたプログラムデータをプログラムデータ構造とデータの双方を文字列データして表現したものに変換する処理を行うプログラムデータ構造・文字列データ変換処理ステップと、
前記プログラムデータ構造・文字列データ変換処理ステップにより変換された文字列データを前記スクリプト言語処理ステップの中で実行されるプログラムデータ構造へ変換する文字列データ・プログラムデータ構造変換処理ステップとを備えたことを特徴とするデータ処理方法。
(3) A data processing apparatus for using a document object type storage area that stores only character strings as a database,
A web browser processing step for performing processing for displaying the web page on the terminal screen;
A script language processing step that is executed in the Web browser processing step and executes a script program written in a script language in the Web page;
A program data structure / character string that is executed in the script language processing step and performs processing for converting the program data described in the script program into a representation of both the program data structure and the data as character string data A data conversion process step;
A character string data / program data structure conversion processing step for converting the character string data converted in the program data structure / character string data conversion processing step into a program data structure executed in the script language processing step. A data processing method.

(4)文字列のみ記憶するドキュメントオブジェクト型の記憶領域をデータベースとして利用するためのデータ処理装置であって、
Webページを端末画面に表示するための処理を行うWebブラウザ処理ステップと、
前記Webブラウザ処理ステップの中で実行され、前記Webページ内において、スクリプト言語で記述されたスクリプトプログラムを実行するスクリプト言語処理ステップと、
前記スクリプト言語処理ステップの中で実行され、前記スクリプトプログラム内に記述されたプログラムデータをプログラムデータ構造とデータの双方を文字列データして表現したものに変換する処理を行うプログラムデータ構造・文字列データ変換処理ステップと、
前記プログラムデータ構造・文字列データ変換処理ステップにより変換された文字列データを前記スクリプト言語処理ステップの中で実行されるプログラムデータ構造へ変換する文字列データ・プログラムデータ構造変換処理ステップとを備えたことを特徴とするデータ処理プログラム。
(4) A data processing apparatus for using a document object type storage area that stores only character strings as a database,
A web browser processing step for performing processing for displaying the web page on the terminal screen;
A script language processing step that is executed in the Web browser processing step and executes a script program written in a script language in the Web page;
A program data structure / character string that is executed in the script language processing step and performs processing for converting the program data described in the script program into a representation of both the program data structure and the data as character string data A data conversion process step;
A character string data / program data structure conversion processing step for converting the character string data converted in the program data structure / character string data conversion processing step into a program data structure executed in the script language processing step. A data processing program characterized by that.

本発明のドキュメントオブジェクト・スキーマ定義間データ処理装置によれば、文字列のみ格納できるDOMStorageにおいて、データベースの記述言語であるSQLコマンドにより自由にデータ構造を構成し、アクセス可能とすることができ、ツリー構造のみ記述できるDOMStorageに格納されているデータをデータベースのようにSQLを用いて扱うことが可能となり、Webシステムのプログラミングを容易にすることが可能となる。 According to the document object / schema definition data processing apparatus of the present invention, in DOMStorage that can store only character strings, a data structure can be freely configured and accessed by an SQL command that is a database description language, and a tree can be accessed. Data stored in DOMStorage that can describe only the structure can be handled using SQL like a database, and Web system programming can be facilitated.

本発明の一実施形態にかかるドキュメントオブジェクト・スキーマ定義間データ処理装置の構成例を示す図である。It is a figure which shows the structural example of the data processing apparatus between the document object schema definition concerning one Embodiment of this invention. 作成されるデータベース例を示す図である。It is a figure which shows the example of a database produced. JSONの記述例を示す図である。It is a figure which shows the example of description of JSON. 作成されるデータベース例を示す図である。It is a figure which shows the example of a database produced. 本発明の特徴を概念的に表した構成を示す図である。It is a figure which shows the structure which represented the characteristic of this invention notionally. 本実施形態の処理例を示すフローチャートを示す図である。It is a figure which shows the flowchart which shows the process example of this embodiment.

次に、本発明を実施するための形態(「実施形態」と呼ぶ)について、図に沿って説明する。なお、背景技術や課題などで既に述べた内容と共通の前提事項については適宜省略する。   Next, modes for carrying out the present invention (referred to as “embodiments”) will be described with reference to the drawings. It should be noted that assumptions common to those already described in the background art and problems are omitted as appropriate.

[全体構成]
図1は、本発明の一実施形態にかかるシステムの構成例を示す。
[overall structure]
FIG. 1 shows a configuration example of a system according to an embodiment of the present invention.

ユーザ端末装置2は、ユーザ端末のWebブラウザ上でのアプリケーションとして構成され、インターネット等のネットワーク1を介して、複数のWebアプリケーションサーバ3と接続されている。   The user terminal device 2 is configured as an application on a Web browser of the user terminal, and is connected to a plurality of Web application servers 3 via a network 1 such as the Internet.

ユーザ端末装置2は、制御部を構成するCPU(Central Processing Unit)や、記憶部を構成するROM(Read Only Memory)やRAM(Random Access Memory)、通信部を構成する通信I/F(インターフェイス)等のハードウェア資源上で実行されるコンピュータプログラムによって実現される。   The user terminal device 2 includes a CPU (Central Processing Unit) constituting a control unit, a ROM (Read Only Memory) and RAM (Random Access Memory) constituting a storage unit, and a communication I / F (interface) constituting a communication unit. It is realized by a computer program executed on hardware resources such as.

このユーザ端末装置2は、Webブラウザ処理手段21、スクリプト言語処理手段22、プログラムデータ構造・文字列データ変換処理手段23、文字列データ・プログラムデータ構造変換処理手段24、データベース言語処理手段25、記憶手段26、ブラウザ記憶領域51により構成される。   The user terminal device 2 includes a Web browser processing unit 21, a script language processing unit 22, a program data structure / character string data conversion processing unit 23, a character string data / program data structure conversion processing unit 24, a database language processing unit 25, a storage It comprises means 26 and browser storage area 51.

Webブラウザ処理手段21は、インターネットの標準プロトコルであるHTTP(Hyper Text Transfer Protocol)等に従い、HTML(Hyper Text Markup Language)等の言語で記述されたページデータの要求、取得、表示およびフォームデータの送信等を行う機能を備えインターネットエクスプローラやモジラファイアフォックス(登録商標)といったWebブラウザソフトにより実現される。   The Web browser processing means 21 requests, obtains, displays, and transmits form data of page data described in a language such as HTML (Hyper Text Markup Language) according to HTTP (Hyper Text Transfer Protocol) that is a standard protocol of the Internet. It is realized by Web browser software such as Internet Explorer or Mozilla Firefox (registered trademark).

スクリプト言語処理手段22は、上記Webブラウザ処理手段21が提供する機能の1つであり、HTML内に記述されたスクリプト言語(JavaScript等)を処理する。   The script language processing unit 22 is one of the functions provided by the Web browser processing unit 21 and processes a script language (JavaScript or the like) described in HTML.

プログラムデータ構造・文字列データ変換処理手段23はJavaScriptのようなプログラム言語で記述されたデータの構造情報をもったデータを、構造情報をもたず文字列データのみで記述されたデータに変換する処理を行う。この変換された文字列データは、例えば、JSON(JavaScript Object Notation)形式等で表現されたものである。   Program data structure / character string data conversion processing means 23 converts data having structure information of data described in a programming language such as JavaScript into data described only by character string data without structure information. Process. The converted character string data is expressed in, for example, JSON (JavaScript Object Notation) format.

文字列データ・プログラムデータ構造変換処理手段24は、上記プログラムデータ構造・文字列データ変換処理手段23と反対の変換処理を行うものであり、文字列データのみで記述されたデータをプログラム言語で記述されたデータの構造情報をもったデータに変換する処理を行う。   The character string data / program data structure conversion processing unit 24 performs a conversion process opposite to the program data structure / character string data conversion processing unit 23, and describes data described only by the character string data in a program language. The data is converted into data having the structure information.

データベース言語処理手段25は、データベースの定義、操作、および制御機能を記述するための言語、例えばSQL(Structured Query Language)等を処理する。   The database language processing means 25 processes a language for describing database definitions, operations, and control functions, for example, SQL (Structured Query Language).

記憶手段26はプログラム言語の命令により処理されるものであり、ブラウザ記憶領域51に上記プログラムデータ構造・文字列データ変換処理手段23により変換された文字列データを記憶する。この記憶手段26は、例えばJavaScriptによって記述される。詳細については、後述する。   The storage means 26 is processed in accordance with instructions in the program language, and stores the character string data converted by the program data structure / character string data conversion processing means 23 in the browser storage area 51. This storage means 26 is described by, for example, JavaScript. Details will be described later.

一方、アプリケーションサーバ3は、ユーザ端末装置2にHTMLで記述されたページやJavaScriptで記述されたプログラムを送信したり、ユーザ端末装置2からインターネット1を介してドキュメントデータを受信したりする。   On the other hand, the application server 3 transmits a page written in HTML or a program written in JavaScript to the user terminal device 2, or receives document data from the user terminal device 2 via the Internet 1.

アプリケーションサーバ3は、コンテンツ送信手段31、文字列データ受信手段32、文字列データ・プログラムデータ構造変換処理手段33、データベース言語処理手段34、データベース52とを備える。   The application server 3 includes content transmission means 31, character string data reception means 32, character string data / program data structure conversion processing means 33, database language processing means 34, and database 52.

アプリケーションサーバ3は、制御部、記憶部等を備えたコンピュータ(単一あるいは複数)により構成される。具体的には、制御部を構成するCPU、記憶部を構成するROMやRAMやHDD(Hard Disc Drive)、通信部を構成する通信I/F(インターフェイス)、表示部を構成するディスプレイ装置、入力部を構成するキーボードやマウス等の入力装置などのハードウェア資源から構成される。   The application server 3 is configured by a computer (single or plural) including a control unit, a storage unit, and the like. Specifically, the CPU that constitutes the control unit, the ROM, RAM, and HDD (Hard Disc Drive) that constitute the storage unit, the communication I / F (interface) that constitutes the communication unit, the display device that constitutes the display unit, and the input It is composed of hardware resources such as an input device such as a keyboard and a mouse constituting the unit.

アプリケーションサーバ3が備える各手段は、前述したコンピュータの制御部や記憶部等のハードウェア資源上で実行されるコンピュータプログラムによって実現されるものである。なお、これらの手段は、単一のコンピュータ上に配置される必要はなく、必要に応じて分散される形態であってもよい。   Each unit included in the application server 3 is realized by a computer program executed on hardware resources such as a control unit and a storage unit of the computer described above. Note that these means do not need to be arranged on a single computer, and may be distributed as necessary.

また、アプリケーションサーバ3が参照するデータベース52が設けられているが、これらのデータベースは、各データベースを保持するコンピュータ内のHDD等の記憶媒体上に所定のデータを体系的に保持するものである。   In addition, although the database 52 referred to by the application server 3 is provided, these databases systematically hold predetermined data on a storage medium such as an HDD in a computer that holds each database.

コンテンツ送信手段31は、ユーザ端末装置2に対して、HTMLで記述されたドキュメントファイルを送信する。このHTMLは、JavaScriptのようなスクリプト言語で記述されたプログラムを含む。   The content transmission unit 31 transmits a document file described in HTML to the user terminal device 2. This HTML includes a program written in a script language such as JavaScript.

文字列データ受信手段32は、ユーザ端末装置2において、プログラムデータ構造・文字列データ変換処理手段23により文字列に変換されたデータを受信する処理を行う。   The character string data receiving unit 32 performs a process of receiving data converted into a character string by the program data structure / character string data conversion processing unit 23 in the user terminal device 2.

文字列データ・プログラムデータ構造変換処理手段33は、文字列データ受信手段32で受信した文字列データを、サーバ内で起動するプログラムで利用できるプログラムデータ構造情報を含む形式に変換する処理を行う。   The character string data / program data structure conversion processing means 33 performs processing for converting the character string data received by the character string data receiving means 32 into a format including program data structure information that can be used by a program activated in the server.

データベース言語処理手段34は、文字列データ・プログラムデータ構造を変換処理手段33で変換されたデータをデータベース52に格納する処理を行う。   The database language processing means 34 performs processing for storing the data obtained by converting the character string data / program data structure by the conversion processing means 33 in the database 52.

[動作]
次に図6のフローに基づき、さらに詳細なプログラムレベルでの処理手順を示しながら、動作の概要を述べる。
[Operation]
Next, an outline of the operation will be described based on the flow of FIG. 6 while showing a more detailed processing procedure at the program level.

最初に本発明の実行環境となるWebブラウザを起動し(S101)、スクリプト言語処理(S102)を実行させる。このときのスクリプト言語処理が以下の記述となる。   First, a Web browser serving as an execution environment of the present invention is activated (S101), and script language processing (S102) is executed. The script language processing at this time is described as follows.

(1)DOMStorage上にデータベースとして利用する記憶領域を定義する。JavaScriptでの記述は下記のようになる。
var LS = window.localStorage||window.globalStorage[location.hostname];
これは、S104のブラウザデータ記憶処理において利用する記憶領域を確保するための定義部分となる記述である。
上記ローカルストレージ領域は、ドメイン毎にアクセス制限がかけられるので、http://www.aaaaa.comは、http://www.bbbbb.comのローカルストレージ領域にアクセス出来ない。ドメインがDBのスキーマの働きをする事になる。
このDOMStorageは、例えば下記のプロパティ(属性)やメソッド(操作処理)を持つ。
(a)clearメソッド
DOMStorageからすべてのキーと値のペアを削除する。
(b)constructorプロパティ
オブジェクトのコンストラクターを指す参照を返す。
(c)getItemメソッド
DOMStorageキーに関連付けられた現在値を取得する。
(d)keyメソッド
コレクションから、指定されたインデックスのキーを取得する。
(e)lengthプロパティ
キーと値一覧の長さを取得する。
(f)remainingSpaceプロパティ
記憶域オブジェクトに使用する、残りのメモリスペースをバイトで返す。
(g)removeItemメソッド
DOMStorageコレクションからキーと値のペアを削除する。
(h)setItemメソッド
キーと値のペアを設定する。
(1) Define a storage area to be used as a database on DOMStorage. The description in JavaScript is as follows.
var LS = window.localStorage || window.globalStorage [location.hostname];
This is a description that is a definition part for securing a storage area to be used in the browser data storage process of S104.
Since the local storage area is restricted for each domain, http://www.aaaaa.com cannot access the local storage area at http://www.bbbbb.com. The domain will act as a DB schema.
This DOMStorage has the following properties (attributes) and methods (operation processing), for example.
(a) clear method
Remove all key / value pairs from DOMStorage.
(b) Returns a reference to the constructor of the constructor property object.
(c) getItem method
Get the current value associated with the DOMStorage key.
(d) Get the key at the specified index from the key method collection.
(e) Get the length of the length property key and value list.
(f) remainingSpace property Returns the remaining memory space used for the storage object in bytes.
(g) removeItem method
Removes a key / value pair from the DOMStorage collection.
(h) setItem method Set key-value pair.

(2)テーブルの定義
(1)で用意したドメインごとに用意されるローカルストレージ領域に対して、
LS.テーブル名={};
として、テーブル領域を作成する。(LS.user、LS.ob_info等、複数のテーブルを作成可能)。
(2) Table definition For local storage area prepared for each domain prepared in (1),
LS.Table name = {};
Create a table area. (Multiple tables such as LS.user and LS.ob_info can be created).

また、この作成した領域に格納するデータは下記のようにJavaScriptで記述する。
var データ = {
カラム名1 : [データ1-1,データ1-2,データ1-3,・・・・・],
カラム名2 : [データ2-1,データ2-2,データ2-3,・・・・・],
カラム名3 : [データ3-1,データ3-2,データ3-3,・・・・・]
};
In addition, the data stored in the created area is described in JavaScript as follows.
var data = {
Column name 1: [Data 1-1, Data 1-2, Data 1-3, ...],
Column name 2: [Data 2-1, Data 2-2, Data 2-3, ...],
Column name 3: [Data 3-1, Data 3-2, Data 3-3, ...]
};

ここで、データ1−1やデータ1−2等のデータ部分以外の部分、例えば、「カラム名1」や「カラム名2」等の記述がプログラムデータ構造の記述部分である。   Here, portions other than the data portion such as data 1-1 and data 1-2, for example, descriptions such as “column name 1” and “column name 2” are description portions of the program data structure.

このデータ記述形式は、JSON形式と呼ばれるものであり、JavaScriptから派生した、データ交換を行うためのデータ記述形式の一種である。2006年7月にRFC 4627として策定された。JSONはWebアプリケーションの記述のために適したデータ交換形式であるとされ、特にAjaxなどでの活用が注目されている。   This data description format is called JSON format and is a kind of data description format for exchanging data derived from JavaScript. It was formulated as RFC 4627 in July 2006. JSON is considered to be a data exchange format suitable for describing Web applications, and its use in Ajax and the like is attracting attention.

このJSON形式でのデータの記述例を図3に示す。これは、図4に示すような住所録のデータベースをJSON形式として記述したものである。   A description example of data in this JSON format is shown in FIG. This is an address book database as shown in FIG. 4 described in JSON format.

ここで、「:」の後ろに記述されているデータ「佐藤」や「六本木123」等以外の部分、例えば、「住所」や「郵便番号」等の記述がプログラムデータ構造の記述部分である。   Here, portions other than the data “Sato” and “Roppongi 123” described after “:”, for example, descriptions such as “address” and “zip code” are description portions of the program data structure.

(3)データの保存
ブラウザを閉じた後もデータをローカルに記憶しておくが、ローカルストレージ領域は文字列しか格納できない為、(2)までで作成したDB構造のデータを文字列として記憶する必要があり、文字列化された状態のJSON形式で格納することが必要となる。
(3) Data storage Data is stored locally even after the browser is closed, but since the local storage area can only store character strings, DB structure data created up to (2) is stored as character strings. It is necessary to store it in JSON format in a string form.

しかし、JSONオブジェクトとして定義したデータを文字列化してしまうと、データの構造情報が失われてしまうが、以下の手順で復元が可能となる。   However, if the data defined as a JSON object is converted into a character string, the structure information of the data is lost, but it can be restored by the following procedure.

JavaScriptでの記述は下記のようになる。
LS.テーブル名 = uneval(データ);
ここで「uneval」はJavaScriptの持つ関数であり、JavaScriptの構文を文字列として返す関数である。このようにすることで、図2のようなテーブル構造を作成する事が出来る。この記述で実行されるuneval関数の処理がS103の処理に対応し、そのデータをLS.テーブル名に代入する処理がS104に対応する。
The description in JavaScript is as follows.
LS.table name = uneval (data);
Here, “uneval” is a function that JavaScript has, and is a function that returns the syntax of JavaScript as a character string. By doing so, a table structure as shown in FIG. 2 can be created. The process of the uneval function executed with this description corresponds to the process of S103, and the process of substituting the data into the LS. Table name corresponds to S104.

上記のようにする事で、文字列化したJSONデータを格納する。これを再度取出し構造情報を復元する為に、
テーブル格納データ = eval(LS.テーブル名.value);
とする。ここで「eval」はJavaScriptの持つ関数であり、文字列をJavaScriptの構文として返す関数である。このeval関数の処理がS105、S203に対応する。
By doing the above, store the JSON data as a string. To retrieve this again and restore the structural information,
Table storage data = eval (LS.table name.value);
And Here, “eval” is a function of JavaScript, and is a function that returns a character string as JavaScript syntax. The processing of this eval function corresponds to S105 and S203.

(4)SQL
さらに一旦DOMStorageとして格納されたデータをデータベースとしてアクセスできるようにするために、下記の処理を行う。
(4) SQL
Furthermore, in order to make it possible to access data once stored as DOMStorage as a database, the following processing is performed.

DBを扱う為に、一般的にSQLが用いられるが、ローカルストレージに対しても同様にSQLを独自実装する事で、DBと変わらない扱いが可能となる。以下ではSELECTに関して具体例を挙げる。   In order to handle DB, SQL is generally used, but the same treatment as DB is possible by implementing SQL for local storage as well. Specific examples of SELECT are given below.

入力されたSQLというSQLに対して、SELECTの判別を行う。JavaScriptでの記述は下記のようになる。
var res = SQL.match(/^select\s(.*)/i);
,tkn = res[1].match(/^(.+?)\sfROM\s(.+?)(\s(.*))?$/i);
ここで、下記の文字は正規表現であり、それぞれ下記の条件を満たす文字にマッチングする。
「/」は正規表現の開始を示す。
「^」は行の最初にマッチする。
「\s」は空白文字。
「*」は直前の表現が0個以上あることを示す。
「+」は前の表現が1個以上あることを示す。
「?」は直前の表現が0個か1個あることを示す。
「.」は任意の文字にマッチする。
「$」は文字列の最後にマッチする。
「/」は正規表現の終わりを示す。
「/」の後の「i」は大文字小文字を区別しないこと示す。
Performs a SELECT discrimination on the input SQL. The description in JavaScript is as follows.
var res = SQL.match (/ ^ select \ s (. *) / i);
, tkn = res [1] .match (/ ^ (. +?) \ sfROM \ s (. +?) (\ s (. *))? $ / i);
Here, the following characters are regular expressions, which respectively match characters satisfying the following conditions.
“/” Indicates the start of a regular expression.
"^" Matches at the beginning of the line.
"\ S" is a space character.
“*” Indicates that there are 0 or more immediately preceding expressions.
“+” Indicates that there is at least one previous expression.
“?” Indicates that there are 0 or 1 immediately preceding expressions.
"." Matches any character.
“$” Matches the end of the string.
“/” Indicates the end of the regular expression.
“I” after “/” indicates that case is not distinguished.

上記のマッチによりSELECTであることを判別し、tkn[1]が取得カラム名、tkn[2]が取得対象テーブル名、tkn[4]が取得条件として確認出来る。ここで、「SELECT」とは、SQL言語の中の1つの処理で、データベースの中に格納されているデータを取り出す処理を示す。   Based on the above match, it can be determined that it is a SELECT, and tkn [1] can be confirmed as an acquisition column name, tkn [2] as an acquisition target table name, and tkn [4] as an acquisition condition. Here, “SELECT” indicates a process of extracting data stored in the database in one process in the SQL language.

例えば最も簡単な以下のSQL
selectカラム名1fROMテーブル名;
を処理すると
tkn[1] = カラム名1
tkn[2] = テーブル名
となる。実際にテーブルからデータを取得するには、
// 対象テーブルデータ取得
var trgt_table = eval(LS.テーブル名.value);
// カラムのデータを取得(※取得カラムが1つの場合)
var data = trgt_table[カラム名1];
上記のようにアクセス、取得を行う。他のSQLに関しても、データへのアクセス方法は基本的に同様の流れを追う。上記SQLの処理がS106、S204に対応する。
For example, the simplest SQL
select column name 1 FROM table name;
The treatment of,
tkn [1] = column name 1
tkn [2] = table name. To actually get the data from the table,
// Get target table data
var trgt_table = eval (LS.table name.value);
// Get the column data (* When there is one acquisition column)
var data = trgt_table [column name 1];
Access and get as above. For other SQL, the data access method basically follows the same flow. The SQL processing corresponds to S106 and S204.

[概念構成]
図5に上記記述の本発明の特徴を表す概念図を示す。
[Conceptual configuration]
FIG. 5 is a conceptual diagram showing the characteristics of the present invention described above.

本発明の変換処理部7は上記eval関数73、uneval関数72によりJSONデータ71をそれぞれ、プログラムデータ6として利用できる形式にし、SQL文61に引き渡す処理と、文字列データとして、DOMStorage領域8に保存する処理を表している。   The conversion processing unit 7 according to the present invention converts the JSON data 71 into a format that can be used as the program data 6 by the eval function 73 and the uneval function 72, and stores the data in the DOMStorage area 8 as a character string data. Represents the processing to be performed.

[効果]
本発明のドキュメントオブジェクト・スキーマ定義間データ処理装置によれば、文字列のみ格納できるDOMStorageにおいて、データベースの記述言語であるSQLコマンドにより自由にデータ構造を構成し、アクセス可能とすることができ、ツリー構造のみ記述できるDOMStorageに格納されているデータをデータベースのようにSQLを用いて扱うことが可能となり、Webシステムのプログラミングを容易にすることが可能となる。
[effect]
According to the document object / schema definition data processing apparatus of the present invention, in DOMStorage that can store only character strings, a data structure can be freely configured and accessed by an SQL command that is a database description language, and a tree can be accessed. Data stored in DOMStorage that can describe only the structure can be handled using SQL like a database, and Web system programming can be facilitated.

[他の実施形態]
なお、上記実施形態はJavaScriptやSQLなど、特定のプログラミング言語で、例示したが、その他のプログラミング言語においても同様の処理を実現することは可能であり、本発明は、他の実施態様も含むものである。また、本発明において、各手段などの要素は、コンピュータの演算制御部に限らず、ワイヤードロジック等に基づく電子回路で実現してもよい。また、各構成図、データの図、フローチャートの図などは例示に過ぎず、各要素の有無、その順序や具体的内容などは、本発明の範囲で適宜変更可能である。
[Other Embodiments]
In addition, although the said embodiment illustrated in specific programming languages, such as JavaScript and SQL, it is possible to implement | achieve the same process also in other programming languages, and this invention includes another embodiment. . In the present invention, elements such as each means may be realized by an electronic circuit based on a wired logic or the like without being limited to an arithmetic control unit of a computer. Further, each configuration diagram, data diagram, flowchart diagram, and the like are merely examples, and the presence, order, specific content, and the like of each element can be changed as appropriate within the scope of the present invention.

また、本発明の実施形態に記述された効果は、本発明の実施形態から生じる好適な効果を列挙したものであって、本発明による効果は、本発明の実施形態に記述されたものに限定されるものではない。   Further, the effects described in the embodiments of the present invention enumerate suitable effects generated from the embodiments of the present invention, and the effects of the present invention are limited to those described in the embodiments of the present invention. Is not to be done.

1 インターネット
2 ユーザ端末装置
3 アプリケーションサーバ
6 プログラムデータ
7 変換処理部
8 DOMStorage領域
21 Webブラウザ処理手段
22 スクリプト言語処理手段
23 プログラムデータ構造・文字列データ変換処理手段
24 文字列データ・プログラムデータ構造変換処理手段
25 データベース言語処理手段
26 記憶手段
31 コンテンツ送信手段
32 文字列データ受信手段
33 文字列データ・プログラムデータ構造変換処理手段
34 データベース言語処理手段
51 ブラウザ記憶領域
52 データベース
61 SQL文
71 JSONデータ
72 uneval関数
73 eval関数
DESCRIPTION OF SYMBOLS 1 Internet 2 User terminal device 3 Application server 6 Program data 7 Conversion processing part 8 DOMStorage area 21 Web browser processing means 22 Script language processing means 23 Program data structure / character string data conversion processing means 24 Character string data / program data structure conversion processing Means 25 Database language processing means 26 Storage means 31 Content transmission means 32 Character string data reception means 33 Character string data / program data structure conversion processing means 34 Database language processing means 51 Browser storage area 52 Database 61 SQL sentence 71 JSON data 72 uneval function 73 eval function

Claims (3)

文字列のみ記憶するドキュメントオブジェクト型の記憶領域をデータベースとして利用するためのデータ処理装置であって、
Webページを端末画面に表示するための処理を行うWebブラウザ処理手段と、
前記Webブラウザ処理手段の中で実行され、前記Webページ内において、スクリプト言語で記述されたスクリプトプログラムを実行するスクリプト言語処理手段と、
前記スクリプト言語処理手段の中で実行され、前記スクリプトプログラム内に記述されたプログラムデータをプログラムデータ構造とデータの双方を文字列データとして表現したものに変換する処理を行うプログラムデータ構造・文字列データ変換処理手段と、
前記プログラムデータ構造・文字列データ変換処理手段により変換された文字列データを前記スクリプト言語処理手段の中で実行されるプログラムデータ構造へ変換する文字列データ・プログラムデータ構造変換処理手段と
を含み、
さらに、前記スクリプトプログラム内に記述されたプログラムデータ構造をデータベース記述言語により処理を記述した記述を含むスクリプトプログラム処理するデータベース処理手段を含むことを特徴とするデータ処理装置。
A data processing device for using a document object type storage area that stores only character strings as a database,
Web browser processing means for performing processing for displaying the Web page on the terminal screen;
Script language processing means that is executed in the web browser processing means and executes a script program written in a script language in the web page;
Program data structure / character string data which is executed in the script language processing means and performs processing for converting program data described in the script program into a program data structure and data represented as character string data. Conversion processing means;
Character string data / program data structure conversion processing means for converting the character string data converted by the program data structure / character string data conversion processing means into a program data structure executed in the script language processing means, and
Furthermore, the data processing apparatus which comprises a database processing unit for processing the descriptions of the programs written data structure in said script program describing the processing by the database description language including steaming crypto program.
文字列のみ記憶するドキュメントオブジェクト型の記憶領域をデータベースとして利用するためのデータ処理方法であって、
Webページを端末画面に表示するための処理を行うWebブラウザ処理ステップと、
前記Webブラウザ処理ステップの中で実行され、前記Webページ内において、スクリプト言語で記述されたスクリプトプログラムを実行するスクリプト言語処理ステップと、
前記スクリプト言語処理ステップの中で実行され、前記スクリプトプログラム内に記述されたプログラムデータをプログラムデータ構造とデータの双方を文字列データとして表現したものに変換する処理を行うプログラムデータ構造・文字列データ変換処理ステップと、
前記プログラムデータ構造・文字列データ変換処理ステップにより変換された文字列データを前記スクリプト言語処理ステップの中で実行されるプログラムデータ構造へ変換る文字列データ・プログラムデータ構造変換処理ステップと
を含み、
さらに、前記スクリプトプログラム内に記述されたプログラムデータ構造をデータベース記述言語により処理を記述した記述を含むスクリプトプログラム処理するデータベース処理ステップを含むことを特徴とするデータ処理方法。
A data processing method for using a document object type storage area that stores only character strings as a database,
A web browser processing step for performing processing for displaying the web page on the terminal screen;
A script language processing step that is executed in the Web browser processing step and executes a script program written in a script language in the Web page;
Program data structure / character string data that is executed in the script language processing step and performs processing for converting the program data described in the script program into a representation of both the program data structure and data as character string data A conversion processing step;
A character string data / program data structure conversion processing step for converting the character string data converted by the program data structure / character string data conversion processing step into a program data structure executed in the script language processing step,
Furthermore, the data processing method characterized in that it comprises a database processing step of processing the descriptions of the programs written data structure in said script program describing the processing by the database description language including steaming crypto program.
文字列のみ記憶するドキュメントオブジェクト型の記憶領域をデータベースとして利用するためのデータ処理プログラムであって、
Webページを端末画面に表示するための処理を行うWebブラウザ処理ステップと、
前記Webブラウザ処理ステップの中で実行され、前記Webページ内において、スクリプト言語で記述されたスクリプトプログラムを実行するスクリプト言語処理ステップと、
前記スクリプト言語処理ステップの中で実行され、前記スクリプトプログラム内に記述されたプログラムデータをプログラムデータ構造とデータの双方を文字列データとして表現したものに変換する処理を行うプログラムデータ構造・文字列データ変換処理ステップと、
前記プログラムデータ構造・文字列データ変換処理ステップにより変換された文字列データを前記スクリプト言語処理ステップの中で実行されるプログラムデータ構造へ変換する文字列データ・プログラムデータ構造変換処理ステップと
を含み、
さらに、前記スクリプトプログラム内に記述されたプログラムデータ構造をデータベース記述言語により処理を記述した記述を含むスクリプトプログラム処理するデータベース処理ステップを含むことを特徴とするデータ処理プログラム。
A data processing program for using a document object type storage area that stores only character strings as a database,
A web browser processing step for performing processing for displaying the web page on the terminal screen;
A script language processing step that is executed in the Web browser processing step and executes a script program written in a script language in the Web page;
Program data structure / character string data that is executed in the script language processing step and performs processing for converting the program data described in the script program into a representation of both the program data structure and data as character string data A conversion processing step;
A character string data / program data structure conversion processing step for converting the character string data converted by the program data structure / character string data conversion processing step into a program data structure executed in the script language processing step,
Furthermore, the data processing program, characterized in that it comprises a database processing step of processing the descriptions of the programs written data structure in said script program describing the processing by the database description language including steaming crypto program.
JP2009169661A 2009-07-21 2009-07-21 Data processing device between document object and schema definition Active JP5265476B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009169661A JP5265476B2 (en) 2009-07-21 2009-07-21 Data processing device between document object and schema definition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009169661A JP5265476B2 (en) 2009-07-21 2009-07-21 Data processing device between document object and schema definition

Publications (2)

Publication Number Publication Date
JP2011022949A JP2011022949A (en) 2011-02-03
JP5265476B2 true JP5265476B2 (en) 2013-08-14

Family

ID=43632945

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009169661A Active JP5265476B2 (en) 2009-07-21 2009-07-21 Data processing device between document object and schema definition

Country Status (1)

Country Link
JP (1) JP5265476B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070027904A1 (en) * 2005-06-24 2007-02-01 George Chow System and method for translating between relational database queries and multidimensional database queries

Also Published As

Publication number Publication date
JP2011022949A (en) 2011-02-03

Similar Documents

Publication Publication Date Title
US9077681B2 (en) Page loading optimization using page-maintained cache
US10331740B2 (en) Systems and methods for operating a server-side data abstraction layer
JP5443513B2 (en) Method and system for handling cookies across domains
US8660976B2 (en) Web content rewriting, including responses
US20120110437A1 (en) Style and layout caching of web content
CN105243159A (en) Visual script editor-based distributed web crawler system
US20140280691A1 (en) Updating dynamic content in cached resources
US9846686B2 (en) Methods for extending a document transformation server to process multiple documents from multiple sites and devices thereof
JP5113764B2 (en) Transfer and display hierarchical data between databases and electronic documents
JP2006114045A (en) Mapping of schema data into data structure
US20170199850A1 (en) Method and system to decrease page load time by leveraging network latency
US8225192B2 (en) Extensible cache-safe links to files in a web page
US9984052B2 (en) Verifying content of resources in markup language documents
CN106897336A (en) Web page files sending method, webpage rendering intent and device, webpage rendering system
WO2020211367A1 (en) Data crawling method and apparatus, computer device and storage medium
CN102880679B (en) A kind of info web storage means and device
CN105745644A (en) Establishment of state representation of a web page represented in a web browser
EP2874071A1 (en) Method of implementing structured and non-structured data in xml document
JP5265476B2 (en) Data processing device between document object and schema definition
CN106612336A (en) Picture preloading method and picture preloading device
US8301726B2 (en) Method and system for bit streaming for data centric applications
US20050216474A1 (en) Retrieving dynamically-generated and database-driven web pages using a search engine robot
AU2022203715B2 (en) Extracting explainable corpora embeddings
JP4057997B2 (en) Document processing apparatus with script, document acquisition apparatus, document processing system with script, document processing method with script, and program for causing computer to execute the method
US20210357465A1 (en) Method and System for High Speed Serving of Webpages

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120417

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120606

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20120606

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121204

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130304

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20130311

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130409

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130501

R150 Certificate of patent or registration of utility model

Ref document number: 5265476

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250