Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4728073B2 - Database change point searching method and apparatus - Google Patents
[go: Go Back, main page]

JP4728073B2 - Database change point searching method and apparatus - Google Patents

Database change point searching method and apparatus Download PDF

Info

Publication number
JP4728073B2
JP4728073B2 JP2005258932A JP2005258932A JP4728073B2 JP 4728073 B2 JP4728073 B2 JP 4728073B2 JP 2005258932 A JP2005258932 A JP 2005258932A JP 2005258932 A JP2005258932 A JP 2005258932A JP 4728073 B2 JP4728073 B2 JP 4728073B2
Authority
JP
Japan
Prior art keywords
data
change
file
field
information
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.)
Expired - Fee Related
Application number
JP2005258932A
Other languages
Japanese (ja)
Other versions
JP2007072749A (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.)
Azbil Corp
Original Assignee
Azbil 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 Azbil Corp filed Critical Azbil Corp
Priority to JP2005258932A priority Critical patent/JP4728073B2/en
Publication of JP2007072749A publication Critical patent/JP2007072749A/en
Application granted granted Critical
Publication of JP4728073B2 publication Critical patent/JP4728073B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、データベースに格納された変更前のファイルと変更後のファイルにおける変更点を検索するデータベース変更点検索方法および装置に関するものである。   The present invention relates to a database change point search method and apparatus for searching for a change point in a file before change and a file after change stored in a database.

従来より、ビル監視システムでは、例えば空調設備、電力設備、防犯設備、防災設備などの各種の設備機器の監視ポイントからデータを収集するために、監視ポイントの名称や番号、データのタイプなどを設定した電子データ(汎用的な形式の電子データ、以下、帳票データと表す)が予め作成されている。ビル監視システムの中央監視装置は、この帳票データに基づいてデータを収集すべき監視ポイントを特定し、監視ポイントからデータを収集する。   Conventionally, in building monitoring systems, for example, monitoring point names and numbers, data types, etc. are set in order to collect data from the monitoring points of various types of equipment such as air conditioning equipment, power equipment, crime prevention equipment, and disaster prevention equipment. Electronic data (general-purpose electronic data, hereinafter referred to as form data) is created in advance. The central monitoring device of the building monitoring system identifies the monitoring point from which data is to be collected based on the form data, and collects data from the monitoring point.

ところで、建築物の設計段階や建設段階においては、設計変更によって機器種別の変更などが頻繁に行なわれ、それに伴って監視ポイントの内容変更および監視ポイント数の増減が頻繁に生じることがある。そして、このような設計変更が重なっていくと、監視ポイントの登録数についてそのデータ容量が、中央監視装置の仕様の範囲内であるか否かを確認する必要が生じ、そのために監視ポイントの登録数について増減を確認する場合がある。この確認の際、変更後の帳票データにおいては、変更した箇所がそれと分かるように表示されていない場合が多いため、従来は、変更前の帳票データと変更後の帳票データとを人が見比べて登録内容の違い(変更点)を見つけるといった手作業での確認作業を行なっていた。   By the way, in the building design stage and the construction stage, the change of the equipment type is frequently performed due to the design change, and accordingly, the contents of the monitoring points are changed and the number of monitoring points is frequently increased or decreased. When such design changes overlap, it becomes necessary to check whether the data capacity of the number of registered monitoring points is within the specification range of the central monitoring device. You may want to check for changes in numbers. At the time of this confirmation, in the changed form data, the changed part is often not displayed so that the changed part is clearly understood. Conventionally, the person compared the form data before the change with the form data after the change. Manual confirmation work such as finding differences (changes) in registered contents.

このような監視ポイントの変更履歴を確認する作業は、変更した箇所が分からないために、全てのデータを見比べるといった手作業での確認になるため、変更箇所を見つけ出すことにかなりの労力が掛かっていた。さらに、監視ポイント数が多い場合、そして変更点および変更頻度が多い場合、かなりの労力を生じ、結果として、作業時間が非常に掛かってしまうという問題があった。
また、設計変更時に、人為的ミスによって帳票データに変更内容が正しく入力されていないことがある。監視ポイントの変更が重なり、そして監視ポイント数が多い場合は特に、この入力ミスを発見できないままになるといった人為的ミスが生じることも問題であった。
特に、大規模建築物などは、一般的に、監視ポイントが非常に多いため、以上の問題が多く発生する傾向にある。
Since the work to check the change history of such monitoring points does not know the changed part, it is a manual check such as comparing all data, so it takes considerable effort to find the changed part. It was. Furthermore, when the number of monitoring points is large, and when the change points and the change frequency are large, considerable labor is generated, and as a result, there is a problem that work time is very long.
In addition, at the time of design change, the change contents may not be correctly input into the form data due to human error. It is also a problem that human error such as the input error remains undetected, especially when the monitoring point changes overlap and the number of monitoring points is large.
In particular, a large-scale building or the like generally has a large number of monitoring points, and thus the above problems tend to occur frequently.

このような変更点の確認作業を省力化する手法として、変更前と変更後のデータの差分データを抽出する方法が提案されている(例えば特許文献1参照)。   As a method for saving labor for confirming such changes, a method of extracting difference data between data before and after the change has been proposed (see, for example, Patent Document 1).

特開平9−81427号公報Japanese Patent Laid-Open No. 9-81427

以上のように、変更点の確認を手作業で行う場合には、変更点を見つけ出すことにかなりの労力と時間が掛かるという問題点があり、また帳票データの入力ミスを見過ごしてしまう可能性があった。   As described above, when checking the changes manually, there is a problem that it takes a lot of labor and time to find the changes, and there is a possibility of overlooking input errors in the form data. there were.

一方、特許文献1に開示された方法によれば、変更点の確認作業を省力化することができる。しかしながら、特許文献1に開示された方法では、例えばビル監視システムで使用される帳票データのようにデータ数(監視ポイント数)が多く、データ項目(フィールド)の数も多いデータについて、変更点を確認する作業に適していないという問題点があった。特許文献1に開示された方法が帳票データの確認作業に適していない理由は、特許文献1に開示された方法では指定されたデータ項目についてのみ差分データを表示しているために、変更されたデータがどの監視ポイントのデータであるかを確認しずらいためである。なお、以上のような問題点は、帳票データに限らず、データ数とデータ項目数が多いファイルであれば同様に生じる。   On the other hand, according to the method disclosed in Patent Document 1, it is possible to save labor for confirming a change point. However, in the method disclosed in Patent Document 1, for example, data that has a large number of data (number of monitoring points) and a large number of data items (fields) such as form data used in a building monitoring system is changed. There was a problem that it was not suitable for the work to confirm. The reason why the method disclosed in Patent Document 1 is not suitable for the work of confirming form data has been changed because the method disclosed in Patent Document 1 displays difference data only for specified data items. This is because it is difficult to confirm which monitoring point the data is. The above problems are not limited to form data, but similarly occur in a file having a large number of data and data items.

本発明は、上記課題を解決するためになされたもので、変更点の確認作業を省力化し、かつデータ数とデータ項目数が多いデータであっても変更点を容易に認識することができるデータベース変更点検索方法および装置を提供することを目的とする。   The present invention has been made in order to solve the above-described problem, saves the confirmation work of the change point, and can easily recognize the change point even for data having a large number of data and data items. It is an object of the present invention to provide a method and apparatus for searching for changes.

本発明のデータベース変更点検索方法は、変更前の第1のファイルと変更後の第2のファイルのそれぞれについて、外部から指定された変更点検索の対象となる複数のフィールドと予め設定されたキーフィールドとを読み取る第1のステップと、前記第1のファイルの前記読み取ったフィールドのデータを記憶すると共に、前記第2のファイルの前記読み取ったフィールドのデータを記憶する第2のステップと、前記キーフィールドの情報が同一のデータを、前記第2のステップで記憶した第1のファイルのデータ及び第2のファイルのデータからそれぞれ選択する第3のステップと、この第3のステップで選択した2つのデータを、前記キーフィールド以外の共通のフィールド毎に比較する第4のステップと、この第4のステップの比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、このフィールドを変更点として記憶する第5のステップと、前記第4のステップの比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、前記第3のステップで選択した2つのデータを変更履歴ファイルに書き込む第6のステップと、前記変更点として記憶したフィールドを識別するための情報を、前記変更履歴ファイルに書き込んだ2つのデータの該当フィールドに付与する第7のステップと、外部からの指示に応じて前記変更履歴ファイルを表示するときに、前記識別するための情報が付与されたフィールドを変更前と変更後で色分け表示する第8のステップとを有するものである。 The database change point search method of the present invention includes a plurality of fields to be searched for change points designated from the outside and a preset key for each of the first file before change and the second file after change. A first step of reading a field; a second step of storing data of the read field of the first file; and storing data of the read field of the second file; A third step of selecting data having the same field information from the data of the first file and the data of the second file stored in the second step, and the two selected in the third step. A fourth step of comparing data for each common field other than the key field, and the comparison of this fourth step As a result, when the information does not match in any field, as a result of comparison between the fifth step storing this field as a change point and the fourth step, the information does not match in any field. In this case, the sixth step of writing the two data selected in the third step to the change history file and the two pieces of data written to the change history file for identifying the field stored as the change point When the change history file is displayed according to a seventh step assigned to the corresponding field and an external instruction, the field to which the identification information is given is displayed in different colors before and after the change. And an eighth step .

また、本発明のデータベース変更点検索方法の1構成例は、さらに、前記第4のステップの比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、前記変更履歴ファイルに書き込んだ2つのデータについて、前記変更履歴ファイルの変更種別フィールドにデータの変更を表す変更種別を書き込む第のステップを有するものである。
また、本発明のデータベース変更点検索方法の1構成例は、さらに、前記第3のステップにおいて、前記第2のステップで記憶した第1のファイルのデータのキーフィールドの情報と同一のキーフィールドを備えたデータが、前記第2のステップで記憶した第2のファイルに存在しない場合、この第1のファイルのデータを前記変更履歴ファイルに書き込む第10のステップと、この変更履歴ファイルに書き込んだ第1のファイルのデータについて、前記変更履歴ファイルの変更種別フィールドにデータの削除を表す変更種別を書き込む第11のステップとを有するものである。
また、本発明のデータベース変更点検索方法の1構成例は、さらに、前記第3のステップにおいて、前記第2のステップで記憶した第2のファイルのデータのキーフィールドの情報と同一のキーフィールドを備えたデータが、前記第2のステップで記憶した第1のファイルに存在しない場合、この第2のファイルのデータを前記変更履歴ファイルに書き込む第12のステップと、この変更履歴ファイルに書き込んだ第2のファイルのデータについて、前記変更履歴ファイルの変更種別フィールドにデータの追加を表す変更種別を書き込む第13のステップとを有するものである。
In addition, according to one configuration example of the database change point search method of the present invention, if the information does not match in any field as a result of the comparison in the fourth step, The data includes a ninth step of writing a change type indicating a change of data in the change type field of the change history file.
Further, in one configuration example of the database change point searching method of the present invention, in the third step, the same key field as the key field information of the data of the first file stored in the second step is stored. If the prepared data does not exist in the second file stored in the second step, the tenth step of writing the data of the first file into the change history file, and the first step of writing into the change history file And an eleventh step of writing a change type indicating deletion of data in the change type field of the change history file for the data of one file.
Further, in one configuration example of the database change point searching method of the present invention, in the third step, the same key field as the key field information of the data of the second file stored in the second step is stored. If the prepared data does not exist in the first file stored in the second step, the twelfth step of writing the data of the second file into the change history file and the first file written in the change history file And a thirteenth step of writing a change type indicating addition of data in the change type field of the change history file for the data of the second file.

また、本発明のデータベース変更点検索装置は、変更前の第1のファイルと変更後の第2のファイルのそれぞれについて、外部から指定された変更点検索の対象となる複数のフィールドと予め設定されたキーフィールドとを読み取る読取手段と、前記第1のファイルの前記読み取ったフィールドのデータを記憶すると共に、前記第2のファイルの前記読み取ったフィールドのデータを記憶するデータ記憶手段と、前記キーフィールドの情報が同一のデータを、前記データ記憶手段が記憶した第1のファイルのデータ及び第2のファイルのデータからそれぞれ選択するデータ選択手段と、このデータ選択手段で選択された2つのデータを、前記キーフィールド以外の共通のフィールド毎に比較する比較手段と、この比較手段による比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、このフィールドを変更点として記憶する変更点記憶手段と、前記比較手段による比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、前記データ選択手段で選択された2つのデータを変更履歴ファイルに書き込む書込手段と、前記変更点として記憶したフィールドを識別するための情報を、前記変更履歴ファイルに書き込んだ2つのデータの該当フィールドに付与する識別情報付与手段と、外部からの指示に応じて前記変更履歴ファイルを表示するときに、前記識別するための情報が付与されたフィールドを変更前と変更後で色分け表示する表示手段とを有するものである。 In the database change point search device of the present invention, the first file before change and the second file after change are preset with a plurality of fields to be searched for change points designated from the outside. Reading means for reading the key field; data storage means for storing data of the read field of the first file; and storing data of the read field of the second file; and the key field Data selection means for selecting the same data from the first file data and the second file data stored by the data storage means, and the two data selected by the data selection means, Comparison means for comparing each common field other than the key field, and the result of comparison by this comparison means, If the information does not match in any of the fields, the change point storage means for storing this field as a change point, and if the information does not match in any field as a result of the comparison by the comparison means, the data Write means for writing the two data selected by the selection means to the change history file, and information for identifying the field stored as the change point is assigned to the corresponding fields of the two data written to the change history file Identification information providing means for displaying, and when displaying the change history file in accordance with an instruction from the outside, display means for displaying the field to which the identification information is given in different colors before and after the change. Is.

従来は、監視ポイントの変更履歴を確認する上で、変更前の第1のファイルと、変更後の第2のファイルとを見比べて登録内容の違い(変更点)を見つけるというように手作業で行なわれていたため、非常な労力が掛かり、また登録内容が正しく変更されないままになるといった人為的ミスが生じていた。これに対して、本発明では、キーフィールドの情報が同一のデータを、第1のファイルのデータ及び第2のファイルのデータからそれぞれ選択して、この2つのデータを、キーフィールド以外の共通のフィールド毎に比較することにより、違いがあるフィールドのみを変更点として記憶することを自動的に行なうので、従来に比べて格段に少ない労力、及び短時間で確認作業を完了することができる。また、本発明では、比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、選択した2つのデータを変更履歴ファイルに書き込み、変更点として記憶したフィールドを識別するための情報を、変更履歴ファイルに書き込んだ2つのデータの該当フィールドに付与するようにしている。これにより、本発明を例えばビル監視システムの帳票データの変更点検索に適用すれば、変更されたデータがどの監視ポイントのデータであるかを容易に認識することができ、またこの監視ポイントのどのフィールドのデータが変更されたかを容易に認識することができる。また、本発明では、第1のファイルのデータ及び第2のファイルのデータの共通のフィールドのみを抽出して比較する際、データを文字列として比較するので、変更前もしくは変更後のデータ長が異なる場合においても、違いの有無を確実に判断することができ、従来あった人為的な確認ミスをなくし、違いを修正して正しく登録することができる。   Conventionally, when checking the change history of monitoring points, it is necessary to manually compare the first file before the change with the second file after the change and find the difference (change) in the registered contents. As a result, it took a lot of labor, and a human error was caused such that the registered contents remained unchanged. On the other hand, in the present invention, data having the same information in the key field is selected from the data of the first file and the data of the second file, respectively, and these two data are used as common data other than the key field. By making a comparison for each field, it is possible to automatically store only a field with a difference as a change point, so that the confirmation operation can be completed in a much less labor and in a shorter time than in the past. In the present invention, if the information does not match in any field as a result of comparison, the two selected data are written in the change history file, and the information for identifying the field stored as the change point is changed. The two fields written in the history file are assigned to the corresponding fields. As a result, if the present invention is applied to, for example, a change point search of form data of a building monitoring system, it is possible to easily recognize which monitoring point the changed data is, and which of the monitoring points. It is possible to easily recognize whether the field data has been changed. In the present invention, when only the common field of the data of the first file and the data of the second file is extracted and compared, the data is compared as a character string, so the data length before or after the change is Even if they are different, it is possible to reliably determine whether there is a difference, eliminate the conventional human error, and correct the difference and register correctly.

また、本発明では、第4のステップの比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、変更履歴ファイルに書き込んだ2つのデータについて、変更履歴ファイルの変更種別フィールドにデータの変更を表す変更種別を書き込むことにより、第1のファイルのデータが変更されたことを容易に認識することができる。   Also, in the present invention, if the information in any field does not match as a result of the comparison in the fourth step, the data change is made to the change type field of the change history file for the two data written to the change history file. Can be easily recognized that the data of the first file has been changed.

また、本発明では、第3のステップにおいて、第2のステップで記憶した第1のファイルのデータのキーフィールドの情報と同一のキーフィールドを備えたデータが、第2のステップで記憶した第2のファイルに存在しない場合、この第1のファイルのデータを変更履歴ファイルに書き込み、変更履歴ファイルに書き込んだ第1のファイルのデータについて、変更履歴ファイルの変更種別フィールドにデータの削除を表す変更種別を書き込むことにより、第1のファイルのデータが削除されたことを容易に認識することができる。したがって、本発明を例えばビル監視システムの帳票データの変更点検索に適用すれば、変更前と変更後の監視ポイント数の増減を容易に確認することができる。   In the present invention, in the third step, the data having the same key field as the key field information of the data of the first file stored in the second step is stored in the second step stored in the second step. If this file does not exist, the data of the first file is written in the change history file, and the change type indicating the deletion of data in the change type field of the change history file for the data of the first file written in the change history file Can be easily recognized that the data of the first file has been deleted. Therefore, if the present invention is applied to, for example, a change point search of form data in a building monitoring system, it is possible to easily confirm the increase or decrease in the number of monitoring points before and after the change.

また、本発明では、第3のステップにおいて、第2のステップで記憶した第2のファイルのデータのキーフィールドの情報と同一のキーフィールドを備えたデータが、第2のステップで記憶した第1のファイルに存在しない場合、この第2のファイルのデータを変更履歴ファイルに書き込み、変更履歴ファイルに書き込んだ第2のファイルのデータについて、変更履歴ファイルの変更種別フィールドにデータの追加を表す変更種別を書き込むことにより、第2のファイルのデータが追加されたことを容易に認識することができる。したがって、本発明を例えばビル監視システムの帳票データの変更点検索に適用すれば、変更前と変更後の監視ポイント数の増減を容易に確認することができる。   Further, in the present invention, in the third step, the data having the same key field as the key field information of the second file data stored in the second step is stored in the first step stored in the second step. If this file does not exist, the data of the second file is written to the change history file, and the change type indicating the addition of data in the change type field of the change history file for the data of the second file written to the change history file Can be easily recognized that the data of the second file has been added. Therefore, if the present invention is applied to, for example, a change point search of form data in a building monitoring system, it is possible to easily confirm the increase or decrease in the number of monitoring points before and after the change.

[第1の実施の形態]
以下、本発明の実施の形態について図面を参照して説明する。まず、本実施の形態において変更点検索の対象となる帳票データの詳細を説明するために、帳票データを用いるビル監視システムの中央監視装置について説明する。図1は本発明の実施の形態に係るビル監視システムの中央監視装置の1構成例を示すブロック図である。
[First Embodiment]
Hereinafter, embodiments of the present invention will be described with reference to the drawings. First, a central monitoring device of a building monitoring system that uses form data will be described in order to explain the details of the form data that is the subject of change point search in the present embodiment. FIG. 1 is a block diagram showing one configuration example of a central monitoring device of a building monitoring system according to an embodiment of the present invention.

図1において、1−1はCPU、1−2はRAM、1−3はROM、1−4はハードディスク装置などの記憶装置、1−5〜1−7はインターフェイス装置(以下、I/Fと略する)、1−8はディスプレイ装置、1−9はキーボード、1−10はマウスである。
CPU1−1は、I/F1−5,1−7を介して与えられる各種入力情報を得て、RAM1−2にアクセスしながら、ROM1−3や記憶装置1−4に格納されたプログラムに従って動作し、I/F1−6を介してディスプレイ装置1−8に情報を表示させる。
In FIG. 1, 1-1 is a CPU, 1-2 is a RAM, 1-3 is a ROM, 1-4 is a storage device such as a hard disk device, 1-5 to 1-7 are interface devices (hereinafter referred to as I / F). 1-8 is a display device, 1-9 is a keyboard, and 1-10 is a mouse.
The CPU 1-1 obtains various input information given via the I / Fs 1-5 and 1-7, and operates according to programs stored in the ROM 1-3 and the storage device 1-4 while accessing the RAM 1-2. Then, information is displayed on the display device 1-8 via the I / F 1-6.

記憶装置1−4には、電子帳票作成プログラム(不図示)が格納されている。この電子帳票作成プログラムは、例えばCD−ROMなどの記録媒体に記録された状態で提供され、この記録媒体から読み出されて記憶装置1−4にインストールされている。
ビル監視システムでは、例えば空調設備、電力設備、防犯設備、防災設備などの各種の設備機器の監視ポイントからデータを収集するために、監視ポイントの名称や番号、データのタイプなどを設定した帳票データを電子帳票作成プログラムを用いて予め作成しておく。図1の例では、記憶装置1−4中にデータベースDYが構築され、このデータベースDY中に、帳票データの集まりである帳票ファイルFB1が作成されている。
The storage device 1-4 stores an electronic form creation program (not shown). This electronic form creation program is provided in a state where it is recorded on a recording medium such as a CD-ROM, and is read from this recording medium and installed in the storage device 1-4.
In the building monitoring system, for example, form data that sets the name and number of the monitoring point, the data type, etc. in order to collect data from the monitoring points of various equipment such as air conditioning equipment, power equipment, crime prevention equipment, and disaster prevention equipment. Are created in advance using an electronic form creation program. In the example of FIG. 1, a database DY is constructed in the storage device 1-4, and a form file FB1 that is a collection of form data is created in the database DY.

CPU1−1は、帳票ファイルFB1に基づいてデータを収集すべき監視ポイントを特定し、I/F1−5を通じて監視ポイントからデータを収集して、収集したデータを記憶装置1−4に格納すると共に、このデータをI/F1−6を通じてディスプレイ装置1−8に表示させる。   The CPU 1-1 identifies a monitoring point from which data is to be collected based on the form file FB1, collects data from the monitoring point through the I / F 1-5, and stores the collected data in the storage device 1-4. The data is displayed on the display device 1-8 through the I / F 1-6.

図2に、記憶装置1−4に格納された帳票ファイルFB1の構造の1例を示す。帳票ファイルFB1は、データ構造情報100と帳票データ101とからなる。データ構造情報100は、帳票データ101のフォーマット(データ構造)を示している。データ構造情報100は、フィールド(列)の番号102と、フィールドの属性103とからなる。データ構造情報100の定義によれば、帳票データ101はN個のフィールドから構成され、番号#1のフィールドに各帳票データに固有の帳票番号が格納され、番号#2のフィールドにライン番号が格納され、番号#3のフィールドに監視ポイントのポイント名称が格納され、番号#4のフィールドにモジュール番号が格納され、番号#Nのフィールドに監視ポイントの番号が格納される。   FIG. 2 shows an example of the structure of the form file FB1 stored in the storage device 1-4. The form file FB1 includes data structure information 100 and form data 101. The data structure information 100 indicates the format (data structure) of the form data 101. The data structure information 100 includes a field (column) number 102 and a field attribute 103. According to the definition of the data structure information 100, the form data 101 is composed of N fields, a form number unique to each form data is stored in the number # 1 field, and a line number is stored in the number # 2 field. The point name of the monitoring point is stored in the field of number # 3, the module number is stored in the field of number # 4, and the number of the monitoring point is stored in the field of number #N.

図2の例では、帳票ファイルFB1は、帳票番号「001」〜「125」の125個の帳票データを含んでいる。例えば帳票番号「001」の帳票データでは、ライン番号が「1」、ポイント名称が「5F 給気ファン」、モジュール番号が「21」、ポイント番号が「10」となっている。   In the example of FIG. 2, the form file FB1 includes 125 form data with form numbers “001” to “125”. For example, in the form data of form number “001”, the line number is “1”, the point name is “5F air supply fan”, the module number is “21”, and the point number is “10”.

次に、帳票データの変更点検索に用いる汎用コンピュータについて説明する。この汎用コンピュータは、例えばビル監視システムの開発企業の作業者が使用するものである。図3は本発明の実施の形態に係る汎用コンピュータの1構成例を示すブロック図である。図3において、2−1はCPU、2−2はRAM、2−3はROM、2−4はハードディスク装置などの記憶装置、2−5〜2−7はI/F、2−8はディスプレイ装置、2−9はキーボード、2−10はマウスである。   Next, a general-purpose computer used for searching for changes in the form data will be described. This general-purpose computer is used, for example, by a worker of a building monitoring system development company. FIG. 3 is a block diagram showing one configuration example of the general-purpose computer according to the embodiment of the present invention. In FIG. 3, 2-1 is a CPU, 2-2 is a RAM, 2-3 is a ROM, 2-4 is a storage device such as a hard disk device, 2-5 to 2-7 are I / Fs, and 2-8 is a display. A device, 2-9 is a keyboard, and 2-10 is a mouse.

CPU2−1は、I/F2−5,2−7を介して与えられる各種入力情報を得て、RAM2−2にアクセスしながら、ROM2−3や記憶装置2−4に格納されたプログラムに従って動作し、I/F2−6を介してディスプレイ装置2−8に情報を表示させる。
記憶装置2−4には、本実施の形態に特有のプログラムとして、データベース変更点検索出力プログラム(不図示)が格納されている。併せて、記憶装置2−4には、電子帳票作成プログラム(不図示)が格納されている。このデータベース変更点検索出力プログラムおよび電子帳票作成プログラムは、例えばCD−ROMなどの記録媒体に記録された状態で提供され、この記録媒体から読み出されて、記憶装置2−4にインストールされている。
The CPU 2-1 obtains various input information given via the I / Fs 2-5 and 2-7, and operates in accordance with programs stored in the ROM 2-3 and the storage device 2-4 while accessing the RAM 2-2. Then, information is displayed on the display device 2-8 via the I / F 2-6.
The storage device 2-4 stores a database change point search output program (not shown) as a program specific to the present embodiment. In addition, an electronic form creation program (not shown) is stored in the storage device 2-4. The database change point search output program and the electronic form creation program are provided in a state of being recorded on a recording medium such as a CD-ROM, for example, read from the recording medium, and installed in the storage device 2-4. .

作業者は、以上のような汎用コンピュータを使用して帳票ファイルを作成・変更することができる。例えばビル監視システムに設計変更が生じて、監視ポイントを変更する必要が出た場合、作業者は、中央監視装置のデータベースDYに格納されている帳票ファイルFB1を、フレキシブルディスクなどの記録媒体あるいはネットワークを介して記憶装置2−4内のデータベースDPに読み込む。そして、作業者は、設計変更の内容を反映させるべく、電子帳票作成プログラムを用いて帳票ファイルFB1を編集し、新たな帳票ファイルFB2を作成する。図2は、データベースDP内に変更前の帳票ファイルFB1が格納され、さらに変更後の帳票ファイルFB2が作成された状態を示している。なお、帳票ファイルFB2も変更前の帳票ファイルFB1と同様の構造である。   An operator can create and change a form file using the general-purpose computer as described above. For example, when a design change occurs in a building monitoring system and it is necessary to change a monitoring point, an operator can save a form file FB1 stored in the database DY of the central monitoring device as a recording medium such as a flexible disk or a network. To the database DP in the storage device 2-4. The worker edits the form file FB1 using the electronic form creation program to reflect the contents of the design change, and creates a new form file FB2. FIG. 2 shows a state in which a pre-change form file FB1 is stored in the database DP and a post-change form file FB2 is created. The form file FB2 has the same structure as the pre-change form file FB1.

帳票ファイルの変更後、作業者は、汎用コンピュータのデータベース変更点検索出力プログラムを用いて、帳票ファイルの変更履歴を確認することができる。図4、図5は、本実施の形態のデータベース変更点検索処理を示すフローチャートである。汎用コンピュータのCPU2−1は、記憶装置2−4に格納されているデータベース変更点検索出力プログラムに従って図4、図5のような処理を行う。これにより、汎用コンピュータは、変更前の帳票ファイルと変更後の帳票ファイルのそれぞれについて、変更点検索の対象となるフィールドとキーフィールドとを読み取る読取手段と、変更前と変更後の帳票ファイルの読み取ったフィールドのデータを記憶するデータ記憶手段と、キーフィールドの情報が同一のデータを、変更前帳票ファイル及び変更後帳票ファイルからそれぞれ選択するデータ選択手段と、選択した2つの帳票データを、キーフィールド以外の共通のフィールド毎に比較する比較手段と、比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、このフィールドを変更点として記憶する変更点記憶手段と、いずれかのフィールドにおいて情報が一致しなかった場合、選択した2つの帳票データを変更履歴ファイルに書き込む書込手段と、変更点として記憶したフィールドを識別するための情報(変更点識別フラグ)を、変更履歴ファイルに書き込んだ2つの帳票データの該当フィールドに付与する識別情報付与手段とを備えたデータベース変更点検索装置として機能する。   After changing the form file, the operator can check the change history of the form file using the database change point search output program of the general-purpose computer. 4 and 5 are flowcharts showing database change point search processing according to this embodiment. The CPU 2-1 of the general-purpose computer performs the processes shown in FIGS. 4 and 5 according to the database change point search output program stored in the storage device 2-4. As a result, the general-purpose computer reads the field and key field to be searched for the change point for each of the pre-change form file and the post-change form file, and reads the pre-change and post-change form files. Data storage means for storing the field data, data selection means for selecting the same data in the key field information from the pre-change form file and the post-change form file, and the two selected form data as the key field Comparison means for comparing each other common field, if the information does not match in any field as a result of the comparison, change point storage means for storing this field as a change point, and information in any field If they do not match, the two selected form data are Writing means for writing to the file, and identification information giving means for giving information (change point identification flag) for identifying the field stored as the change point to the corresponding fields of the two form data written to the change history file It functions as a database change point search device.

以下、図4、図5の処理について説明する。まず、作業者は、キーボード2−9とマウス2−10を操作して、変更点検索の対象となる変更前の帳票ファイルFB1と変更後の帳票ファイルFB2とを指定すると共に、変更点検索の対象となるフィールドを例えばフィールド番号で指定する。   Hereinafter, the processing of FIGS. 4 and 5 will be described. First, the operator operates the keyboard 2-9 and the mouse 2-10 to designate the pre-change form file FB1 and the post-change form file FB2 to be changed, and change point search. The target field is specified by, for example, a field number.

CPU2−1は、記憶装置2−4に格納されている変更前の帳票ファイルFB1のデータ構造情報を読み込み、作業者から指定されたフィールドをデータ構造情報に基づいて特定し、指定されたフィールドのデータを帳票ファイルFB1から読み取る。そして、CPU2−1は、読み取ったデータを比較用の変更前帳票ファイルFB1’として記憶装置2−4のデータベースDPに格納する(図4ステップ401)。変更前帳票ファイルFB1’の1例を図6に示す。   The CPU 2-1 reads the data structure information of the pre-change form file FB1 stored in the storage device 2-4, identifies the field designated by the operator based on the data structure information, Data is read from the form file FB1. Then, the CPU 2-1 stores the read data in the database DP of the storage device 2-4 as a pre-change form file FB1 'for comparison (step 401 in FIG. 4). An example of the pre-change form file FB1 'is shown in FIG.

次に、CPU2−1は、記憶装置2−4に格納されている変更後の帳票ファイルFB2のデータ構造情報を読み込み、作業者から指定されたフィールドをデータ構造情報に基づいて特定し、指定されたフィールドのデータを帳票ファイルFB2から読み取る。そして、CPU2−1は、読み取ったデータを比較用の変更後帳票ファイルFB2’として記憶装置2−4のデータベースDPに格納する(ステップ402)。変更後帳票ファイルFB2’の1例を図7に示す。なお、フィールド番号#1の帳票番号については、後述のようにソート・比較用のキーとして用いるため、ステップ401,402において必要なフィールドのデータとして無条件に読み取るようにしている。   Next, the CPU 2-1 reads the data structure information of the changed form file FB2 stored in the storage device 2-4, identifies the field designated by the operator based on the data structure information, and is designated. The field data is read from the form file FB2. Then, the CPU 2-1 stores the read data in the database DP of the storage device 2-4 as a changed form file FB2 'for comparison (step 402). An example of the post-change form file FB2 'is shown in FIG. Note that the form number of field number # 1 is used unconditionally as necessary field data in steps 401 and 402 since it is used as a sort / comparison key as described later.

続いて、CPU2−1は、変更前帳票ファイルFB1’と変更後帳票ファイルFB2’をRAM1−2に格納する(ステップ403)。
CPU2−1は、フィールドをカウントするカウント値nを1とし、RAM1−2に記憶されている変更前帳票ファイルFB1’のデータ構造情報を読み込み、n=1番目のフィールドの帳票番号をキーフィールドとして設定すると共に、RAM1−2に記憶されている変更後帳票ファイルFB2’のデータ構造情報を読み込み、n=1番目のフィールドの帳票番号をキーフィールドとして設定する(ステップ404)。
Subsequently, the CPU 2-1 stores the pre-change form file FB1 ′ and the post-change form file FB2 ′ in the RAM 1-2 (step 403).
The CPU 2-1 sets the count value n for counting fields to 1, reads the data structure information of the pre-change form file FB 1 ′ stored in the RAM 1-2, and uses the form number of the n = 1st field as a key field. At the same time, the data structure information of the post-change form file FB2 ′ stored in the RAM 1-2 is read, and the form number of the n = 1st field is set as a key field (step 404).

そして、CPU2−1は、キーフィールドの値が昇順となるように変更前帳票ファイルFB1’のデータ及び変更後帳票ファイルFB2’のデータをそれぞれソートする(ステップ405)。変更前帳票ファイルFB1’は、帳票番号が「001」〜「125」の125個の帳票データを含み(図6)、変更後帳票ファイルFB2’は、帳票番号が「001」〜「123」、「125」、「126」の125個の帳票データを含んでいる(図7)。   Then, the CPU 2-1 sorts the data of the pre-change form file FB1 'and the data of the post-change form file FB2' so that the key field values are in ascending order (step 405). The pre-change form file FB1 ′ includes 125 form data whose form numbers are “001” to “125” (FIG. 6), and the post-change form file FB2 ′ has form numbers “001” to “123”, It includes 125 form data “125” and “126” (FIG. 7).

次に、CPU2−1は、変更前帳票ファイルFB1’の帳票データをカウントするカウント値aをA(Aは変更前帳票ファイルFB1’の帳票データの個数)とし(ステップ406)、変更前帳票ファイルFB1’のa番目の帳票データについて、そのキーフィールドの値(帳票番号)を読み取り、この値と一致するキーフィールドを有する帳票データを変更後帳票ファイルFB2’において検索する(ステップ407)。ここでは、検索の結果得られた変更後帳票ファイルFB2’の帳票データをb番目とする。図6の例では、変更前帳票ファイルFB1’のa=1番目の帳票データのキーフィールドには、帳票番号として「001」が書き込まれている。図7の例では、この「001」と一致するキーフィールドを有する変更後帳票ファイルFB2’の帳票データは、1番目に存在するので、b=1である。   Next, the CPU 2-1 sets the count value a for counting the form data in the pre-change form file FB1 ′ to A (A is the number of form data in the pre-change form file FB1 ′) (step 406), and the pre-change form file For the a-th form data of FB1 ′, the value of the key field (form number) is read, and the form data having the key field that matches this value is searched in the changed form file FB2 ′ (step 407). Here, it is assumed that the form data of the post-change form file FB2 'obtained as a result of the search is b-th. In the example of FIG. 6, “001” is written as the form number in the key field of the a = 1st form data of the pre-change form file FB1 ′. In the example of FIG. 7, since the form data of the post-change form file FB2 ′ having the key field that matches “001” exists first, b = 1.

続いて、CPU2−1は、キーフィールドの値が一致した、変更前帳票ファイルFB1’のa番目の帳票データと変更後帳票ファイルFB2’のb番目の帳票データとを、比較対象のデータとして選択する(ステップ408)。
そして、CPU2−1は、選択した2つの帳票データを、キーフィールドを除く同一番号のフィールド毎、すなわちn=2〜N番目のフィールド毎に比較する。具体的には、CPU2−1は、n=2とし(ステップ409)、変更前帳票ファイルFB1’のa番目の帳票データのn番目のフィールドの情報と変更後帳票ファイルFB2’のb番目の帳票データのn番目のフィールドの情報とを比較する(ステップ410)。
Subsequently, the CPU 2-1 selects the a-th form data of the pre-change form file FB 1 ′ and the b-th form data of the post-change form file FB 2 ′, whose key field values match, as comparison target data. (Step 408).
Then, the CPU 2-1 compares the two selected form data for each field having the same number excluding the key field, that is, every n = 2 to Nth field. Specifically, the CPU 2-1 sets n = 2 (step 409), information on the nth field of the ath form data of the pre-change form file FB1 ′, and the bth form of the post-change form file FB2 ′. The information in the nth field of the data is compared (step 410).

比較した結果、n番目のフィールドの情報が一致している場合(ステップ411においてNO)、CPU2−1は、n=Nが成立するかどうか、すなわち最後のフィールド#Nまで比較が終了したかどうかを判定し(ステップ413)、カウント値nが最後のフィールド番号#Nに達していない場合は、カウント値nを1増やして(ステップ414)、ステップ410に戻る。こうして、ステップ410,411,413,414の処理がカウント値n毎に行われる。   As a result of the comparison, if the information in the nth field matches (NO in step 411), the CPU 2-1 determines whether n = N is satisfied, that is, whether the comparison is completed up to the last field #N. (Step 413), if the count value n has not reached the last field number #N, the count value n is incremented by 1 (step 414) and the process returns to step 410. In this way, the processing of steps 410, 411, 413, and 414 is performed for each count value n.

一方、CPU2−1は、ステップ411においてn番目のフィールドの情報が一致していないと判断した場合、前記選択した2つの帳票データのn番目のフィールドの情報に不一致があったことを示す不一致情報をRAM2−2に格納し、データベースDP内の変更履歴ファイルFRに、変更前帳票ファイルFB1’のa番目の帳票データと変更後帳票ファイルFB2’のb番目の帳票データとを書き込む(ステップ412)。この変更履歴ファイルFRの1例を図8に示す。   On the other hand, if the CPU 2-1 determines in step 411 that the information in the nth field does not match, the mismatch information indicating that there is a mismatch in the information in the nth field of the two selected form data. Are stored in the RAM 2-2, and the a-th form data of the pre-change form file FB1 ′ and the b-th form data of the post-change form file FB2 ′ are written in the change history file FR in the database DP (step 412). . An example of the change history file FR is shown in FIG.

このとき、CPU2−1は、変更履歴ファイルFRにデータ区分フィールドを作成しておき、変更履歴ファイルFRに書き込む帳票データが変更前帳票ファイルFB1’の帳票データであれば、データ区分フィールドに「変更前」と書き込み、変更後帳票ファイルFB2’の帳票データであれば、データ区分フィールドに「変更後」と書き込む。これにより、変更前帳票ファイルFB1’の帳票データであるのか、変更後帳票ファイルFB2’の帳票データであるのかを判別できるようにしておく。   At this time, the CPU 2-1 creates a data division field in the change history file FR, and if the form data to be written in the change history file FR is the form data of the pre-change form file FB1 ′, the “change” field displays “change”. If it is the form data of the changed form file FB2 ′, “after change” is written in the data classification field. As a result, it is possible to determine whether it is the form data of the pre-change form file FB1 'or the form data of the post-change form file FB2'.

また、CPU2−1は、変更履歴ファイルFRに書き込んだ2つの帳票データのn番目のフィールドに対して例えば変更点識別フラグを設定することで、帳票データの変更点を識別できるようにしておく。図8の例では、変更点識別フラグが設定されている箇所を梨子地で示している。   Further, the CPU 2-1 sets the change point identification flag for the nth field of the two form data written in the change history file FR so that the change point of the form data can be identified. In the example of FIG. 8, a place where the change point identification flag is set is indicated by a pear ground.

さらに、CPU2−1は、変更履歴ファイルFRに変更種別フィールドを作成しておき、変更種別を書き込む。例えば図8の例では、帳票番号「0002」の変更前の帳票データにおいてライン番号が「1」であったのに対して、同じ帳票番号「0002」の変更後の帳票データではライン番号が「2」に変更されているので、変更種別を「変更」とする。   Further, the CPU 2-1 creates a change type field in the change history file FR and writes the change type. For example, in the example of FIG. 8, the line number is “1” in the form data before the change of the form number “0002”, whereas the line number is “1” in the form data after the change of the same form number “0002”. Since it has been changed to “2”, the change type is set to “change”.

なお、ステップ410の比較を行なうにあたり、フィールドの情報のデータタイプは、数値型や文字列型などであるが、比較を実行する際は、文字列データとして比較するので、数値型や文字列型の違いに関らず、前記選択した2つの帳票データのフィールドに書き込まれている情報に違いがあれば、その違いを確実に判別することができる。   In the comparison in step 410, the data type of the field information is a numeric type or a character string type. However, since the comparison is performed as character string data when performing the comparison, the numeric type or the character string type is used. Regardless of the difference, if there is a difference in the information written in the fields of the two selected form data, the difference can be reliably determined.

次に、ステップ413においてn=Nが成立すれば、最後のフィールド#Nまで比較が終了したことになる。CPU2−1は、ステップ413において判定YESとなった場合、変更前帳票ファイルFB1’のa番目の帳票データと変更後帳票ファイルFB2’のb番目の帳票データとの間で全てのフィールドの情報が一致したかどうかを判定し(図5ステップ415)、全てのフィールドの情報が一致した場合には、ステップ408で選択してRAM2−2に格納した帳票データを削除する(ステップ416)。   Next, if n = N is established in step 413, the comparison is completed up to the last field #N. If the determination is YES in step 413, the CPU 2-1 stores all field information between the a-th form data of the pre-change form file FB1 ′ and the b-th form data of the post-change form file FB2 ′. It is determined whether or not they match (step 415 in FIG. 5). If the information in all fields match, the form data selected in step 408 and stored in the RAM 2-2 is deleted (step 416).

ステップ415において少なくとも一部のフィールドの情報に不一致があったと判定した場合、あるいはステップ416の処理が終了した場合、CPU2−1は、a=1が成立するかどうか、すなわち変更前帳票ファイルFB1’の最初の帳票データまで処理が終了したかどうかを判定し(ステップ417)、a=1が成立しない場合は、カウント値aを1減らして(ステップ418)、ステップ407に戻る。   If it is determined in step 415 that the information in at least some fields does not match, or if the processing in step 416 is completed, the CPU 2-1 determines whether a = 1 is satisfied, that is, the pre-change form file FB 1 ′. It is determined whether the process has been completed up to the first form data (step 417). If a = 1 is not satisfied, the count value a is decreased by 1 (step 418), and the process returns to step 407.

こうして、変更前帳票ファイルFB1’の帳票データ毎にステップ407〜418の処理が行われる。ステップ417においてa=1が成立する場合は、変更前帳票ファイルFB1’の帳票データと変更後帳票ファイルFB2’の帳票データのうち、キーフィールドの値が一致する帳票データ同士の比較が完了したことになる。   In this way, the processing in steps 407 to 418 is performed for each form data of the pre-change form file FB1 '. If a = 1 is satisfied in step 417, the comparison between the form data of the pre-change form file FB1 ′ and the form data of the post-change form file FB2 ′ having the same key field value is completed. become.

以上の処理は、変更種別が「変更」の場合の変更点を検索するための処理であるが、帳票データの変更種別としては、この他に「削除」(帳票データが削除されたことにより変更前帳票ファイルFB1’のみに帳票データが存在する場合)や、「追加」(帳票データが追加されたことにより変更後帳票ファイルFB2’のみに帳票データが存在する場合)がある。これら変更種別が「削除」、「追加」となる場合を判別するべく、次のようなフローで検索を実行する。   The above process is a process for searching for changes when the change type is “Change”. However, the change type of form data is “Delete” (changed when form data is deleted). And “add” (when the form data exists only in the post-change file FB2 ′ due to the addition of the form data). In order to determine the case where these change types are “deletion” and “addition”, a search is executed in the following flow.

CPU2−1は、ステップ417においてa=1が成立した場合、変更前帳票ファイルFB1’の帳票データのキーフィールドの値と一致するキーフィールドを備えた帳票データが変更後帳票ファイルFB2’に存在しない場合(ステップ419においてYES)、データベースDP内の変更履歴ファイルFRに、変更前帳票ファイルFB1’の当該帳票データを書き込むと共に、この帳票データの変更種別を「削除」とする(ステップ420)。   If a = 1 is established in step 417, the CPU 2-1 does not have any form data having a key field that matches the value of the key field of the form data in the pre-change form file FB1 ′ in the post-change form file FB2 ′. In this case (YES in step 419), the form data of the pre-change form file FB1 ′ is written in the change history file FR in the database DP, and the change type of the form data is set to “delete” (step 420).

例えば、カウント値a=124とし、変更前帳票ファイルFB1’の124番目の帳票データについて、データ構造情報に書き込まれているキーフィールドの帳票番号を読み取る。図6の例では、124番目の帳票データのキーフィールドに帳票番号として「124」が書き込まれており、この「124」がキーフィールドのキーとして読み取られる。次に、CPU2−1は、読み取ったキーと一致する、変更後帳票ファイルFB2’のb番目の帳票データのキーフィールドの情報を検索する。図7の例では、変更前帳票ファイルFB1’の帳票データから読み取ったキーと一致するキーフィールドを備えた帳票データは変更後帳票ファイルFB2’には存在しない。   For example, the count value a = 124, and the form number of the key field written in the data structure information is read for the 124th form data of the pre-change form file FB1 '. In the example of FIG. 6, “124” is written as the form number in the key field of the 124th form data, and this “124” is read as the key of the key field. Next, the CPU 2-1 searches for information in the key field of the b-th form data of the changed form file FB2 'that matches the read key. In the example of FIG. 7, the form data having a key field that matches the key read from the form data of the pre-change form file FB1 'does not exist in the post-change form file FB2'.

これにより、ステップ419において判定YESとなり、CPU2−1は、変更前帳票ファイルFB1’の124番目の帳票データを選択し、図8に示すように変更履歴ファイルFRに、変更前帳票ファイルFB1’の124番目の帳票データを書き込む(ステップ420)。このとき、CPU2−1は、変更履歴ファイルFRに書き込む帳票データが変更前のデータであるか、もしくは変更後のデータであるかを一見して判別できるようにする。ここでは、変更履歴ファイルFRに書き込んだ帳票データが変更前帳票ファイルFB1’の帳票データなので、図8に示すようにデータ区分フィールドに「変更前」と書き込む。   As a result, the determination in step 419 is YES, and the CPU 2-1 selects the 124th form data of the pre-change form file FB1 ′, and the change history file FR as shown in FIG. 8 stores the pre-change form file FB1 ′. The 124th form data is written (step 420). At this time, the CPU 2-1 can determine at a glance whether the form data to be written in the change history file FR is data before change or data after change. Here, since the form data written in the change history file FR is the form data of the pre-change form file FB1 ', "before change" is written in the data classification field as shown in FIG.

さらに、CPU2−1は、当該帳票データについて、削除があったことを一見して判別できるようにする。図8の例では、変更履歴ファイルFRに書き込んだ帳票データの変更種別フィールドに変更種別として「削除」と書き込む。   Further, the CPU 2-1 can determine at a glance that the form data has been deleted. In the example of FIG. 8, “Delete” is written as the change type in the change type field of the form data written in the change history file FR.

また、CPU2−1は、ステップ417においてa=1が成立した場合、変更後帳票ファイルFB2’の帳票データのキーフィールドの値と一致するキーフィールドを備えた帳票データが変更前帳票ファイルFB1’に存在しない場合(ステップ419においてYES)、データベースDP内の変更履歴ファイルFRに、変更後帳票ファイルFB2’の当該帳票データを書き込むと共に、この帳票データの変更種別を「追加」とする(ステップ420)。   Further, when a = 1 is established in step 417, the CPU 2-1, the form data having the key field that matches the value of the key field of the form data in the post-change form file FB2 ′ is stored in the pre-change form file FB1 ′. If it does not exist (YES in step 419), the form data of the changed form file FB2 ′ is written in the change history file FR in the database DP, and the change type of the form data is set to “add” (step 420). .

例えば、変更後帳票ファイルFB2’の帳票データをカウントするカウント値bを125とし、変更後帳票ファイルFB2’の125番目の帳票データについて、データ構造情報に書き込まれているキーフィールドの帳票番号を読み取る。図7の例では、125番目の帳票データのキーフィールドに帳票番号として「126」が書き込まれており、この「125」がキーフィールドのキーとして読み取られる。次に、CPU2−1は、読み取ったキーと一致する、変更前帳票ファイルFB1’のa番目の帳票データのキーフィールドの情報を検索する。図6の例では、変更後帳票ファイルFB2’の帳票データから読み取ったキーと一致するキーフィールドを備えた帳票データは変更前帳票ファイルFB1’には存在しない。   For example, the count value b for counting the form data of the changed form file FB2 ′ is set to 125, and the form number of the key field written in the data structure information is read for the 125th form data of the changed form file FB2 ′. . In the example of FIG. 7, “126” is written as the form number in the key field of the 125th form data, and this “125” is read as the key of the key field. Next, the CPU 2-1 searches for information in the key field of the a-th form data of the pre-change form file FB1 'that matches the read key. In the example of FIG. 6, the form data having a key field that matches the key read from the form data of the post-change form file FB2 'does not exist in the pre-change form file FB1'.

これにより、ステップ419において判定YESとなり、CPU2−1は、変更後帳票ファイルFB2’の125番目の帳票データを選択し、図8に示すように変更履歴ファイルFRに、変更後帳票ファイルFB2’の125番目の帳票データを書き込む(ステップ420)。このとき、CPU2−1は、変更履歴ファイルFRに書き込む帳票データが変更前のデータであるか、もしくは変更後のデータであるかを一見して判別できるようにする。ここでは、変更履歴ファイルFRに書き込んだ帳票データが変更後帳票ファイルFB2’の帳票データなので、図8に示すようにデータ区分フィールドに「変更後」と書き込む。   As a result, the determination in step 419 is YES, and the CPU 2-1 selects the 125th form data in the post-change form file FB2 ′, and the change log file FR2 ′ in the post-change form file FB2 ′ is selected as shown in FIG. The 125th form data is written (step 420). At this time, the CPU 2-1 can determine at a glance whether the form data to be written in the change history file FR is data before change or data after change. Here, since the form data written in the change history file FR is the form data of the changed form file FB2 ', "after change" is written in the data classification field as shown in FIG.

さらに、CPU2−1は、当該帳票データについて、追加があったことを一見して判別できるようにする。図8の例では、変更履歴ファイルFRに書き込んだ帳票データの変更種別フィールドに変更種別として「追加」と書き込む。こうして、記憶装置2−4内のデータベースDP内に、図8に示したような変更履歴ファイルFRが生成される。   Further, the CPU 2-1 can determine at a glance that the form data has been added. In the example of FIG. 8, “addition” is written as the change type in the change type field of the form data written in the change history file FR. In this way, the change history file FR as shown in FIG. 8 is generated in the database DP in the storage device 2-4.

以上のように、本実施の形態では、キーフィールドの情報が同一のデータを、変更前帳票ファイルFB1’の帳票データ及び変更後帳票ファイルFB2’の帳票データからそれぞれ選択して、この2つの帳票データを、キーフィールド以外の共通のフィールド毎に比較することにより、違いがあるフィールドのみを変更点として記憶することを自動的に行なうので、従来に比べて格段に少ない労力、及び短時間で確認作業を完了することができる。   As described above, in the present embodiment, data having the same key field information is selected from the form data of the pre-change form file FB1 ′ and the form data of the post-change form file FB2 ′, and the two forms are selected. By comparing the data for each common field other than the key field, only the field with the difference is automatically stored as the change point, so it is confirmed with much less labor and shorter time than before. Work can be completed.

また、本実施の形態では、比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、選択した2つの帳票データを変更履歴ファイルFRに書き込み、変更点として記憶したフィールドを識別するための情報(変更点識別フラグ)を、変更履歴ファイルFRに書き込んだ2つの帳票データの該当フィールドに付与するようにしている。図4、図5に示したデータベース変更点検索処理の終了後、作業者が、キーボード2−9とマウス2−10を操作して、変更履歴ファイルFRの表示をCPU2−1に指示すると、CPU2−1は、I/F2−6を介してディスプレイ装置2−8に変更履歴ファイルFRを表示させる。   In the present embodiment, if the information does not match in any field as a result of the comparison, the two selected form data are written in the change history file FR, and the field stored as the change point is identified. Information (change point identification flag) is assigned to the corresponding fields of the two form data written in the change history file FR. When the operator operates the keyboard 2-9 and the mouse 2-10 to instruct the CPU 2-1 to display the change history file FR after the database change point search processing shown in FIGS. -1 displays the change history file FR on the display device 2-8 via the I / F 2-6.

このとき、CPU2−1は、変更点識別フラグが設定されているフィールドを例えば色分け表示するなどして、変更があったことを一見して判別できるようにする。これにより、作業者は、変更された帳票データがどの監視ポイントのデータであるかを容易に認識することができ、またこの監視ポイントのどのフィールドのデータが変更されたかを容易に認識することができる。例えば図8の例では、帳票番号「0002」の変更前の帳票データにおいてライン番号が「1」であったのに対して、同じ帳票番号「0002」の変更後の帳票データではライン番号が「2」に変更されていることを容易に認識できる。   At this time, the CPU 2-1 makes it possible to determine at a glance that there has been a change, for example, by color-displaying the field in which the change point identification flag is set. As a result, the operator can easily recognize which monitoring point the changed form data is, and can easily recognize which field data of the monitoring point has been changed. it can. For example, in the example of FIG. 8, the line number is “1” in the form data before the change of the form number “0002”, whereas the line number is “1” in the form data after the change of the same form number “0002”. It can be easily recognized that it has been changed to “2”.

なお、本実施の形態では、本発明のデータベース変更点検索方法の適用対象として、ビル監視システムで使用される帳票データを例に挙げて説明しているが、これに限るものではなく、他のデータベースにも適用できることは言うまでもない。
また、本実施の形態では、変更前帳票ファイルFB1’と変更後帳票ファイルFB2’の各帳票データについて変更点を見つける度に、その都度、帳票データを変更履歴ファイルFRに書き込んでいくが、全ての帳票データについて変更点の検索を実施した後で、不一致があったデータを変更履歴ファイルFRに書き込むようにしてもよい。
また、図8に示した変更履歴ファイルFRを表示する際に、変更前の帳票データを例えば緑色で表示し、変更後の帳票データを例えば青色で表示するといったように、変更前と変更後で色分け表示してもよい。
In the present embodiment, as an application target of the database change point search method of the present invention, the form data used in the building monitoring system is described as an example. However, the present invention is not limited to this. It goes without saying that it can also be applied to databases.
In the present embodiment, every time a change is found for each form data of the pre-change form file FB1 ′ and the post-change form file FB2 ′, the form data is written to the change history file FR. After the change point search is performed on the form data, the mismatched data may be written in the change history file FR.
Further, when the change history file FR shown in FIG. 8 is displayed, the form data before the change is displayed in green, for example, and the form data after the change is displayed in blue, for example, before and after the change. You may display by color.

本発明は、データベースに格納されたファイルの変更点を検索する技術に適用することができる。   The present invention can be applied to a technique for searching for changes in a file stored in a database.

本発明の実施の形態に係るビル監視システムの中央監視装置の1構成例を示すブロック図である。It is a block diagram which shows one structural example of the central monitoring apparatus of the building monitoring system which concerns on embodiment of this invention. 本発明の実施の形態における帳票ファイルの構造を示す図である。It is a figure which shows the structure of the form file in embodiment of this invention. 本発明の実施の形態に係る汎用コンピュータの1構成例を示すブロック図である。It is a block diagram which shows one structural example of the general purpose computer which concerns on embodiment of this invention. 図3の汎用コンピュータのデータベース変更点検索処理を示すフローチャートである。It is a flowchart which shows the database change point search process of the general purpose computer of FIG. 図3の汎用コンピュータのデータベース変更点検索処理を示すフローチャートである。It is a flowchart which shows the database change point search process of the general purpose computer of FIG. 本発明の実施の形態において変更点検索の対象となる変更前帳票ファイルの1例を示す図である。It is a figure which shows an example of the pre-change form file used as the object of a change point search in embodiment of this invention. 本発明の実施の形態において変更点検索の対象となる変更後帳票ファイルの1例を示す図である。It is a figure which shows an example of the after-change form file used as the object of a change point search in embodiment of this invention. 本発明の実施の形態において変更点検索の結果得られた変更履歴ファイルの1例を示す図である。It is a figure which shows an example of the change history file obtained as a result of the change point search in embodiment of this invention.

符号の説明Explanation of symbols

1−1,2−1…CPU、1−2,2−2…RAM、1−3,2−3…ROM、1−4,2−4…記憶装置、1−5〜1−7,2−5〜2−7…インターフェイス装置、1−8,2−8…ディスプレイ装置、1−9,2−9…キーボード、1−10,2−10…マウス。
1-1, 2 ... CPU, 1-2, 2-2 ... RAM, 1-3, 2-3 ... ROM, 1-4, 2-4 ... storage device, 1-5 to 1-7, 2 -5 to 2-7 ... interface device, 1-8, 2-8 ... display device, 1-9, 2-9 ... keyboard, 1-10, 2-10 ... mouse.

Claims (5)

変更前の第1のファイルと変更後の第2のファイルのそれぞれについて、外部から指定された変更点検索の対象となる複数のフィールドと予め設定されたキーフィールドとを読み取る第1のステップと、
前記第1のファイルの前記読み取ったフィールドのデータを記憶すると共に、前記第2のファイルの前記読み取ったフィールドのデータを記憶する第2のステップと、
前記キーフィールドの情報が同一のデータを、前記第2のステップで記憶した第1のファイルのデータ及び第2のファイルのデータからそれぞれ選択する第3のステップと、
この第3のステップで選択した2つのデータを、前記キーフィールド以外の共通のフィールド毎に比較する第4のステップと、
この第4のステップの比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、このフィールドを変更点として記憶する第5のステップと、
前記第4のステップの比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、前記第3のステップで選択した2つのデータを変更履歴ファイルに書き込む第6のステップと、
前記変更点として記憶したフィールドを識別するための情報を、前記変更履歴ファイルに書き込んだ2つのデータの該当フィールドに付与する第7のステップと
外部からの指示に応じて前記変更履歴ファイルを表示するときに、前記識別するための情報が付与されたフィールドを変更前と変更後で色分け表示する第8のステップとを有することを特徴とするデータベース変更点検索方法。
A first step of reading a plurality of fields to be searched for change points designated externally and a preset key field for each of the first file before the change and the second file after the change;
Storing the read field data of the first file and storing the read field data of the second file;
A third step of selecting data having the same information in the key field from data of the first file and data of the second file stored in the second step;
A fourth step of comparing the two data selected in the third step for each common field other than the key field;
As a result of the comparison in the fourth step, if the information does not match in any field, the fifth step stores this field as a change point;
As a result of the comparison in the fourth step, if the information does not match in any field, the sixth step writes the two data selected in the third step to the change history file;
A seventh step of assigning information for identifying the field stored as the change point to the corresponding fields of the two data written in the change history file ;
When displaying the change history file in response to an instruction from the outside, an eighth step is provided in which the field to which the information for identification is added is color-coded before and after the change. Database change point search method.
請求項1記載のデータベース変更点検索方法において、
さらに、前記第4のステップの比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、前記変更履歴ファイルに書き込んだ2つのデータについて、前記変更履歴ファイルの変更種別フィールドにデータの変更を表す変更種別を書き込む第のステップを有することを特徴とするデータベース変更点検索方法。
In the database change point search method according to claim 1,
Further, as a result of the comparison in the fourth step, if the information does not match in any field, the two types of data written in the change history file are changed in the change type field of the change history file. A database change point search method comprising a ninth step of writing a change type to be expressed.
請求項1記載のデータベース変更点検索方法において、
さらに、前記第3のステップにおいて、前記第2のステップで記憶した第1のファイルのデータのキーフィールドの情報と同一のキーフィールドを備えたデータが、前記第2のステップで記憶した第2のファイルに存在しない場合、この第1のファイルのデータを前記変更履歴ファイルに書き込む第10のステップと、
この変更履歴ファイルに書き込んだ第1のファイルのデータについて、前記変更履歴ファイルの変更種別フィールドにデータの削除を表す変更種別を書き込む第11のステップとを有することを特徴とするデータベース変更点検索方法。
In the database change point search method according to claim 1,
Further, in the third step, data having the same key field as the key field information of the first file data stored in the second step is stored in the second step stored in the second step. A tenth step of writing data of the first file to the change history file if it does not exist in the file;
A database change point search method comprising: an eleventh step of writing a change type representing data deletion into the change type field of the change history file for the data of the first file written to the change history file .
請求項1記載のデータベース変更点検索方法において、
さらに、前記第3のステップにおいて、前記第2のステップで記憶した第2のファイルのデータのキーフィールドの情報と同一のキーフィールドを備えたデータが、前記第2のステップで記憶した第1のファイルに存在しない場合、この第2のファイルのデータを前記変更履歴ファイルに書き込む第12のステップと、
この変更履歴ファイルに書き込んだ第2のファイルのデータについて、前記変更履歴ファイルの変更種別フィールドにデータの追加を表す変更種別を書き込む第13のステップとを有することを特徴とするデータベース変更点検索方法。
In the database change point search method according to claim 1,
Further, in the third step, the data having the same key field as the key field information of the data of the second file stored in the second step is stored in the first step stored in the second step. A twelfth step of writing the data of the second file to the change history file if it does not exist in the file;
A database change point search method comprising: a thirteenth step of writing a change type indicating addition of data in the change type field of the change history file for the data of the second file written to the change history file .
変更前の第1のファイルと変更後の第2のファイルのそれぞれについて、外部から指定された変更点検索の対象となる複数のフィールドと予め設定されたキーフィールドとを読み取る読取手段と、
前記第1のファイルの前記読み取ったフィールドのデータを記憶すると共に、前記第2のファイルの前記読み取ったフィールドのデータを記憶するデータ記憶手段と、
前記キーフィールドの情報が同一のデータを、前記データ記憶手段が記憶した第1のファイルのデータ及び第2のファイルのデータからそれぞれ選択するデータ選択手段と、
このデータ選択手段で選択された2つのデータを、前記キーフィールド以外の共通のフィールド毎に比較する比較手段と、
この比較手段による比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、このフィールドを変更点として記憶する変更点記憶手段と、
前記比較手段による比較の結果、いずれかのフィールドにおいて情報が一致しなかった場合、前記データ選択手段で選択された2つのデータを変更履歴ファイルに書き込む書込手段と、
前記変更点として記憶したフィールドを識別するための情報を、前記変更履歴ファイルに書き込んだ2つのデータの該当フィールドに付与する識別情報付与手段と
外部からの指示に応じて前記変更履歴ファイルを表示するときに、前記識別するための情報が付与されたフィールドを変更前と変更後で色分け表示する表示手段とを有することを特徴とするデータベース変更点検索装置。
Reading means for reading a plurality of fields to be searched for change points designated from the outside and a preset key field for each of the first file before the change and the second file after the change,
Data storage means for storing the read field data of the first file and storing the read field data of the second file;
Data selection means for selecting data having the same information in the key field from data of the first file and data of the second file stored by the data storage means;
Comparing means for comparing two data selected by the data selecting means for each common field other than the key field;
As a result of comparison by the comparison means, if the information does not match in any field, a change point storage means for storing this field as a change point;
As a result of comparison by the comparison means, if the information does not match in any field, the writing means for writing the two data selected by the data selection means to the change history file;
Identification information giving means for giving information for identifying the field stored as the change point to the corresponding fields of the two data written in the change history file ;
A database change characterized by having a display means for displaying the field to which the information for identification is given in color before and after the change when displaying the change history file according to an instruction from the outside Point search device.
JP2005258932A 2005-09-07 2005-09-07 Database change point searching method and apparatus Expired - Fee Related JP4728073B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005258932A JP4728073B2 (en) 2005-09-07 2005-09-07 Database change point searching method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005258932A JP4728073B2 (en) 2005-09-07 2005-09-07 Database change point searching method and apparatus

Publications (2)

Publication Number Publication Date
JP2007072749A JP2007072749A (en) 2007-03-22
JP4728073B2 true JP4728073B2 (en) 2011-07-20

Family

ID=37934132

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005258932A Expired - Fee Related JP4728073B2 (en) 2005-09-07 2005-09-07 Database change point searching method and apparatus

Country Status (1)

Country Link
JP (1) JP4728073B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5538981B2 (en) * 2010-03-31 2014-07-02 キヤノン株式会社 Form generation device, control method of form generation device, program
JP6247542B2 (en) * 2014-01-20 2017-12-13 アズビル株式会社 Monitoring point definition changing method and engineering device
JP6191515B2 (en) * 2014-03-14 2017-09-06 横河電機株式会社 File content comparison output device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04350739A (en) * 1991-05-28 1992-12-04 Casio Comput Co Ltd file comparison device
JP2646304B2 (en) * 1991-10-25 1997-08-27 新日本製鐵株式会社 Computer program test verification method
JPH1125011A (en) * 1997-07-09 1999-01-29 Casio Comput Co Ltd Communication system, information processing apparatus, recording medium recording information transmission / reception control program
JPH11161528A (en) * 1997-11-25 1999-06-18 Nec Corp Update state decision system for file
JPH11232149A (en) * 1998-02-13 1999-08-27 The Japan Reserch Institute Ltd File comparison processing method and device, and medium storing file comparison processing program
JP2003058238A (en) * 2001-08-21 2003-02-28 Nissin Electric Co Ltd Monitoring and controlling method
JP2004005284A (en) * 2002-06-03 2004-01-08 Mitsubishi Electric Corp Monitoring and control system
JP2005025620A (en) * 2003-07-04 2005-01-27 Canon Inc Document update notification device, document update notification method, and document update notification device control program

Also Published As

Publication number Publication date
JP2007072749A (en) 2007-03-22

Similar Documents

Publication Publication Date Title
CN111143370B (en) Method, apparatus and computer-readable storage medium for analyzing relationships between a plurality of data tables
US7162688B1 (en) Method for automated generation and assembly of specifications documents in CADD environments
CN112307124B (en) Database synchronous verification method, device, equipment and storage medium
JP2005322129A (en) Apparatus and method for tracing product
CN108388640B (en) Data conversion method and device and data processing system
US7885933B2 (en) Apparatus and system for analyzing computer events recorded in a plurality of chronicle datasets
AU2120101A (en) Computer automated system for management of engineering drawings
JP2016511881A (en) Method for managing and selectively placing multiple documents and sets of pages within a document
CN112559773A (en) Knowledge graph system building method and device
US20020103620A1 (en) Apparatus management method, apparatus management system, and apparatus management program product
JP2007264768A (en) System development support program, system development support device, and system development support method
JP4728073B2 (en) Database change point searching method and apparatus
JPH11265368A (en) Work procedure management system
JP6633009B2 (en) Table data analysis program
JP2004192212A (en) Automatic storage system, program, and method for file
JP2015191389A (en) Migration processing result search device
CN117434883B (en) Visual management method and device for PLC program version
JP2007079671A (en) Database correction registration method and apparatus
JP2003233686A (en) Failure analysis system
JP2005293403A (en) Design work support device
CN112597156B (en) Programming-free dynamic data storage and form drawing method and device
US20050015400A1 (en) Existing content utilization support method, information processing device, program, and recording medium
KR20060114569A (en) How Patent Information System Works
US20070112816A1 (en) Information processing apparatus, information processing method and program
JPH0831887A (en) Difference extraction system and difference extraction method in manufacturing process

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080318

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101025

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101116

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110113

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110412

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110414

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140422

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees