WO2007065341A1 - A method and apparatus for verifying an image file - Google Patents

A method and apparatus for verifying an image file Download PDF

Info

Publication number
WO2007065341A1
WO2007065341A1 PCT/CN2006/002940 CN2006002940W WO2007065341A1 WO 2007065341 A1 WO2007065341 A1 WO 2007065341A1 CN 2006002940 W CN2006002940 W CN 2006002940W WO 2007065341 A1 WO2007065341 A1 WO 2007065341A1
Authority
WO
WIPO (PCT)
Prior art keywords
image file
feature value
file
module
characteristic value
Prior art date
Application number
PCT/CN2006/002940
Other languages
French (fr)
Chinese (zh)
Inventor
Xiaohu Yang
Original Assignee
Tencent Technology (Shenzhen) Company Limited
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 Tencent Technology (Shenzhen) Company Limited filed Critical Tencent Technology (Shenzhen) Company Limited
Publication of WO2007065341A1 publication Critical patent/WO2007065341A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the file is like a file
  • Characteristics compared to the characteristics of a file according to a predetermined algorithm, the calculated characteristics are compared
  • 2 Liben uses a process like a file.
  • the multi-image file can be reduced to an intermediary file on the file, and the file includes a special list of each similar file generated by each of which is saved in.
  • the client downloads the file to the client's material resources, and the mercury will be solved by the client.
  • the client's mercury will be solved by the client.
  • Step 10 Whether the image file required by the customer has been downloaded; if it has been downloaded, step 20, otherwise step 30.
  • Step 20 if the client is like a file, then step 0, otherwise step 30
  • Step 30 Download the required image file, the same as the downloaded image file.
  • the download may be a file including the multi-image file, and the file includes a special list of seven multi-image files.
  • the special list can be secret or unsecret.
  • step 30 if the image file is not downloaded in the form of, then step 40 can be omitted.
  • Step 50 Use the solid image file from the mercury phase.
  • step 30 if the image file is not downloaded as a file, then the solution for mercury is to download mercury.
  • the special list is an AS list, and each mercury in the list includes document paper and S document paper and S inches.
  • the A & S uses the 5 algorithm to calculate the unused.
  • the 5 algorithm can specialize any number of degrees to the content of the fixed number of files, and the calculated number is relative
  • the A4S corresponds to the "" of the image file, while the mercury is like the original content of the file.
  • step 20 which is like an image file.
  • step 201 the mercury is like the mercury in the file.
  • the mercury like the file can be either mercury or download. However, the mercury can also be the same mercury. Without loss of generality, like the mercury in the file and the image file is a multi-image file, there is a special list of image files under the mercury where the image is.
  • step 202 The file where the special list is located in step 202 is resolved, and if successful, step 203 is performed otherwise it is lost.
  • step 30 If the special list downloaded in step 30 is unclassified, this step can be omitted.
  • Step 203 Special list.
  • Step 204 Remove mercury from the list.
  • step 205 whether there is a mercury file phase file under mercury, if it exists, step 206 is executed; otherwise, it fails.
  • Step 206 Calculate the former characteristics of the institute.
  • step 207 the special features in mercury are equal to the previous features calculated in step 206. If they are equal, perform step 208, otherwise, they are lost.
  • step 208 If all of the items in step 208 are in the list, then complete if not; otherwise, return to step 204, and the nickel removes the remaining mercury.
  • the background generally includes GF file, "button B file”, and "configuration file” files.
  • the above file is reduced to a file that is downloaded to the client ’s physical resource mercury, and then the mercury file of the mercury client is resolved.
  • the S list is included recently, and the S list shown in 4 has the background and configuration files respectively, and there are 16 city information or A4S per mercury.
  • the customer Before using the image file, the customer should first take out the mercury list from the mercury client system and then check whether there is a relevant file in the mercury solution from the mercury client system in the background, ie the scene file. S, see whether the ALS in the list was calculated before The same is true until all the mercury in the A4S list is the same as the calculated HA4S. Among them, mercury has been downloaded in the background of this client and can not be used to re-download image files.
  • the above method provides an image device, including the following
  • the son and mercury son If the solution is successful in the special list, the mercury in the special list will be used. If it fails, the comparison will be indicated.
  • Failed Mercury is in the special list. Mercury exists in the document of mercury. If it exists, compare the special features in the mercury, otherwise it indicates that the specific mercury is missing. Among them, the son is acceptable.
  • the image file is a special file in the mercury where the image file is located.
  • the characteristics are similar to the characteristics of the file according to a predetermined algorithm, and the calculated characteristics are compared.

Abstract

An image file verification method includes: loading the record including a image file ID and characteristic value; calculating the characteristic value of the image file corresponding the file ID; judging whether the characteristic value recorded in the file match the calculated characteristic value; and if matches, then the verification is passed, otherwise the verification is failed. An image verification apparatus includes: a characteristic value load module, an image file load module, a characteristic value calculating module and a characteristic value comparing module. The technical scheme provided can prevent the image file from being altered arbitrarily.

Description

一种对图像文件进行验证的方法和装置 技术领域 A method and device for verifying image files Technical field
本发明涉及图像数据处理技术, 尤其涉及一种对图像文件进行验证 的方法和装置。 发明背景 The present invention relates to image data processing technology, and in particular, to a method and device for verifying image files. Background of the invention
随着社会及科技的发展, 图像处理技术在计算机领域得到越来越多 的应用, 使得人们的工作、 学习和日常生活日益丰富多彩。 在一些应用 中, 远程的图像文件需要下载到本地, 然后才能正常使用。 在这种情况 下, 本地用户有可能对所述图像文件进行修改, 从而影响对图像文件的 使用。 With the development of society and science and technology, image processing technology has been increasingly used in the computer field, making people's work, study and daily life increasingly colorful. In some applications, remote image files need to be downloaded locally before they can be used normally. In this case, the local user may modify the image file, thereby affecting the use of the image file.
例如, 为了增加虚拟宠物游戏的个性化效果, 玩家可以下载相应的 图像文件作为道具, 如玩具、 气泡背景等, 供宠物玩耍及装饰宠物, 以 增加领养宠物的趣味性。 现有技术中, 用户首先需要从服务器下载图像 文件到客户端, 然后用户点击相应的项目即可启动客户端的图像文件, 使宠物做玩球的动作或显示出气泡背景等。 For example, in order to increase the personalized effect of the virtual pet game, players can download corresponding image files as props, such as toys, bubble backgrounds, etc., for pets to play with and decorate, so as to increase the fun of adopting pets. In the existing technology, the user first needs to download the image file from the server to the client, and then the user clicks the corresponding item to start the image file on the client, causing the pet to play with the ball or display a bubble background, etc.
由于所有图像文件均需要下载到客户端才能使用 , 这样用户可以在 客户端随意更改图像文件, 致使宠物的个性化效果展现得不佳, 或者影 响服务器端对图像文件的管理。 发明内容 Since all image files need to be downloaded to the client before they can be used, users can change the image files at will on the client, causing the pet's personalized effect to be poorly displayed, or affecting the management of image files on the server side. Contents of the invention
有鉴于此, 本发明提供了对图像文件进行验证的方法和装置, 从而 阻止对更改后的图像文件的使用 , 进而防止图像文件被更改。 In view of this, the present invention provides a method and device for verifying image files, thereby preventing the use of modified image files, thereby preventing the image files from being modified.
一种驗证图像文件的方法, 包括如下步骤: 读入包括图像文件标识和特征值的记录; A method for verifying image files, including the following steps: Read in records including image file identifiers and feature values;
计算与所述文件标识对应的图像文件的特征值; Calculate the characteristic value of the image file corresponding to the file identification;
判断记录中所记载的特征值与计算得到的特征值是否相同, 如果相 同则验证通过, 否则验证失败。 Determine whether the characteristic value recorded in the record is the same as the calculated characteristic value. If they are the same, the verification passes, otherwise the verification fails.
一种瞼证图像文件的装置, 包括: A device for documenting image files, including:
特征值读取模块, 用于从特征值列表中读取特征值, 并且将所读取 的特征值发送给特征值比较模块; The eigenvalue reading module is used to read the eigenvalues from the eigenvalue list and send the read eigenvalues to the eigenvalue comparison module;
图像文件读取模块, 用于从图像文件所在的目录中读取图像文件, 并且发送给特征值计算模块; The image file reading module is used to read the image file from the directory where the image file is located, and send it to the feature value calculation module;
特征值计算模块, 用于按照预定的算法计算图像文件的特征值, 并 且将所计算出的特征值发送给特征值比较模块; The feature value calculation module is used to calculate the feature value of the image file according to a predetermined algorithm, and send the calculated feature value to the feature value comparison module;
特征值比较模块, 用于比较特征值读取模块和特征值计算模块所发 送的特征值是否相同, 如果相同则输出驗证通过, 否则输出验证失败。 The eigenvalue comparison module is used to compare whether the eigenvalues sent by the eigenvalue reading module and the eigenvalue calculation module are the same. If they are the same, the output verification passes, otherwise the output verification fails.
根据本发明所提供的技术方案, 当客户端下载图像文件到本地时, 同时下载图像文件的特征值到本地。 在使用本地图像文件之前, 利用所 述特征值和当前本地图像文件进行对比, 如果匹配则正常使用该本地图 像文件, 如果不匹配则说明文件可能被更改或替换, 将不再使用该本地 图像文件。 从而有效防止图像文件被随意更改。 附图简要说明 According to the technical solution provided by the present invention, when the client downloads the image file locally, it also downloads the feature values of the image file locally. Before using the local image file, compare the characteristic value with the current local image file. If they match, the local image file will be used normally. If they do not match, the file may have been changed or replaced, and the local image file will no longer be used. . This effectively prevents image files from being changed at will. Brief description of the drawings
图 1 为本发明实施例中图像文件的使用示意图。 Figure 1 is a schematic diagram of the use of image files in the embodiment of the present invention.
图 2为本发明实施例中使用图像文件的流程图。 Figure 2 is a flow chart of using image files in the embodiment of the present invention.
图 3为本发明实施例中验证图像文件的流程图。 Figure 3 is a flow chart for verifying image files in the embodiment of the present invention.
图 4为本发明实施例中特征值列表示意图。 Figure 4 is a representation of the characteristic value column in the embodiment of the present invention.
图 5为本发明实施例中验证图像文件装置的方框图。 实施本发明的方式 Figure 5 is a block diagram of a device for verifying image files in an embodiment of the present invention. Ways to practice the invention
为了使本发明的目的、 技术方案及优点更加清楚明白, 以下结合附 图及实施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的 具体实施例仅仅用以解释本发明 , 并不用于限定本发明。 In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
为了增加虚拟宠物的个性化效果, 玩家可以下载相应的图像文件作 为道具, 如玩具、 气泡背景等, 供虚拟宠物玩耍及装饰宠物。 如图 1所 示, 为了显示某种效果, 往往需要多个相关图像文件, 如图像文件 1、 图像文件 2等。 因此在服务器上可以将所述多个相关图像文件压缩成一 个文件包, 该文件包内包括有由服务器生成的各相关图像文件的特征值 列表, 其中特征值列表保存在文件中。 然后客户端下载该文件包到客户 端的宠物资源目录中; 继而将各图像文件的解压缩目录设置为客户端系 统的临时目录, 然后在客户端进行解压缩。 使用图像文件时自解压缩目 录中读取相关数据。 当然, 如何设置图像文件的解压缩目录是可以灵活 变化的, 本发明不作限制。 In order to increase the personalized effect of virtual pets, players can download corresponding image files as props, such as toys, bubble backgrounds, etc., for virtual pets to play with and decorate. As shown in Figure 1, in order to display a certain effect, multiple related image files are often required, such as image file 1, image file 2, etc. Therefore, the multiple related image files can be compressed into a file package on the server. The file package includes a feature value list of each related image file generated by the server, where the feature value list is saved in the file. Then the client downloads the file package to the client's pet resource directory; then sets the decompression directory of each image file to the temporary directory of the client system, and then decompresses it on the client. When working with image files, the relevant data is read from the self-extracting directory. Of course, how to set the decompression directory of the image file can be flexibly changed, and is not limited by the present invention.
下面将结合图 2说明本发明客户端使用图像文件时的具体流程作一 说明: The specific process when the client of the present invention uses image files will be described below in conjunction with Figure 2:
步骤 10, 客户端检测所需要的图像文件是否已经下载, 如果已经下 载则执行步骤 20, 否则执行步骤 30。 Step 10, the client detects whether the required image file has been downloaded. If it has been downloaded, go to step 20, otherwise go to step 30.
步骤 20, 客户端对该图像文件进行验证, 如果验证通过则执行步骤 50, 否则执行步骤 30。 Step 20, the client verifies the image file. If the verification passes, step 50 is executed, otherwise step 30 is executed.
步骤 30, 下载所需要的图像文件, 同时下载的还有图像文件的特征 值。 Step 30, download the required image file, and also download the feature values of the image file.
这里, 如果需要下载的是多个图像文件, 则下载的可以是包括所述 多个图像文件的文件包, 该文件包中还包括与所述多个图像文件对应的 特征值列表。 所述特征值列表可以是加密的, 也可以是未加密的。 步骤 40, 设置图像文件的解压缩目录, 然后解压缩图像文件。 Here, if what needs to be downloaded is multiple image files, what is downloaded may be a file package including the multiple image files, and the file package further includes a feature value list corresponding to the multiple image files. The feature value list may be encrypted or unencrypted. Step 40, set the decompression directory of the image file, and then decompress the image file.
在步骤 30中, 如果图像文件不是以压缩后的文件包形式被下载的, 那么步骤 40可以省略。 In step 30, if the image file is not downloaded in the form of a compressed file package, then step 40 can be omitted.
步骤 50, 自解压缩目录中读取相关数据, 使用图像文件。 Step 50, read relevant data from the self-extracting directory and use image files.
在步驟 30中, 如果图像文件不是以压缩后的文件包形式被下载的, 那么此处的解压缩目录应该是下载目录。 In step 30, if the image file is not downloaded in the form of a compressed file package, then the decompression directory here should be the download directory.
在本发明的较佳实施例中, 所述特征值列表为一 HASH值列表, 该 HASH值列表的每一条记录包括文件标识和 HASH值, 文件标识和 HASH值之间一-" "对应。 所述 HASH值是利用 MD5加密算法计算出来 的, 该 MD5加密算法可以将任意长度的数据计算转化成为一个固定长 度的数据串, 一旦文件的内容发生变化, 计算出的数据串则会相应发生 变化。 依次所述 HASH值相当于给图像文件拍摄的 "快照 ", 从而记录 下该图像文件的原始内容。 In a preferred embodiment of the present invention, the feature value list is a HASH value list. Each record of the HASH value list includes a file identifier and a HASH value. There is a "" correspondence between the file identifier and the HASH value. The HASH value is calculated using the MD5 encryption algorithm. The MD5 encryption algorithm can convert data of any length into a fixed-length data string. Once the content of the file changes, the calculated data string will change accordingly. . The HASH value described in turn is equivalent to taking a "snapshot" of the image file, thus recording the original content of the image file.
下面将结合图 3所示说明如何实现步骤 20,即对图像文件进行验证。 步骤 201 , 设置验证目录为图像文件所在的目录, 根据步骤 50中所 述, 图像文件所在的目录可以是解压缩目录,也可以是下载目录, 当然, 这两个目录也可以是同一个目录。 这里, 不失一般性, 假设图像文件所 在的目.录为解压缩目录, 并且所述图像文件是多个图像文件, 则图像文 件所在的目录下还有对应于所述多个图像文件的特征值列表。 The following will illustrate how to implement step 20, which is to verify the image file, as shown in Figure 3. Step 201, set the verification directory to the directory where the image file is located. According to step 50, the directory where the image file is located can be the decompression directory or the download directory. Of course, these two directories can also be the same directory. Here, without loss of generality, assuming that the directory where the image file is located is the decompression directory, and the image file is multiple image files, then there are features corresponding to the multiple image files in the directory where the image file is located. List of values.
步骤 202, 对所述特征值列表所在文件进行解密, 如果解密成功则 执行步骤 203 , 否则确定验证失败。 Step 202: Decrypt the file containing the characteristic value list. If the decryption is successful, perform step 203. Otherwise, it is determined that the verification fails.
如果在步骤 30中所下载的特征值列表文件是未加密的,则本步骤可 以省略。 If the characteristic value list file downloaded in step 30 is unencrypted, this step can be omitted.
步骤 203 , 读入特征值列表。 Step 203, read in the feature value list.
步骤 204 , 从特征值列表中取出一条记录。 步骤 205, 判断验证目录下是否存在与该条记录的文件标识相对应 的文件, 如果存在则执行步骤 206, 否则确定验证失败。 Step 204, take out a record from the feature value list. Step 205: Determine whether there is a file corresponding to the file identifier of the record in the verification directory. If it exists, perform step 206. Otherwise, it is determined that the verification has failed.
步骤 206, 计算出所述对应文件的当前特征值。 Step 206: Calculate the current feature value of the corresponding file.
步骤 207, 判断记录中的特征值与步骤 206中计算出的当前特征值 是否相等, 如果相等则执行步骤 208, 否则确定验证失败。 Step 207: Determine whether the characteristic value in the record is equal to the current characteristic value calculated in step 206. If they are equal, perform step 208; otherwise, it is determined that the verification has failed.
' 步骤 208, 判断特征值列表中的记录是否都验证完毕, 若完毕则验 证完成, 否则返回步驟 204, 继续读取下一条记录。 'Step 208, determine whether the records in the feature value list have been verified. If so, the verification is completed. Otherwise, return to step 204 and continue reading the next record.
在上述步驟过程中, 如果对特征值列表解密失败, 或者验证目录下 不存在与所验证的记录相对应的文件 , 或者客户端计算出的所述对应文 件的特征值与特征值列表中的特征值不相等, 都会导致验证失败, 直接 到达步骤 30, 开始重新下载该图像文件, 而不再使用当前客户端中的图 像文件。 During the above steps, if the decryption of the feature value list fails, or the file corresponding to the verified record does not exist in the verification directory, or the feature value of the corresponding file calculated by the client is different from the feature value list If the values are not equal, the verification will fail and step 30 will be reached directly to start re-downloading the image file instead of using the image file in the current client.
为了更加清楚的描述本发明的图像文件的验证方法, 下面将以虚拟 宠物中 "个性化气泡背景图像文件" 为例来进行更加详细的说明。 In order to describe the image file verification method of the present invention more clearly, a more detailed description will be given below using the "personalized bubble background image file" in the virtual pet as an example.
一个气泡背景一般包括 "背景 GIF文件"、 "按钮 BMP文件"、 "配 置文件" 三个文件。 为了下载方便, 将上述的三个文件压缩成一个文件 包下载到客户端的宠物资源目录中, 然后设置其解压缩目录为客户端系 统的临时目录,解压缩该三个文件。所述文件包中还包括一 HASH列表, 如图 4所示, 该 HASH列表中包括有三条记录, 分别对应背景、 按钮及 配置文件, 每一个记录中对应有一 16字节信息串即 HASH值。 A bubble background generally includes three files: "background GIF file", "button BMP file", and "configuration file". For the convenience of downloading, compress the above three files into one file package and download it to the pet resource directory of the client, then set its decompression directory to the temporary directory of the client system, and decompress the three files. The file package also includes a HASH list. As shown in Figure 4, the HASH list includes three records, corresponding to the background, button and configuration file. Each record corresponds to a 16-byte information string, which is a HASH value.
客户端在使用图像文件之前, 首先设置验证目录为客户端系统的临 时目录; 解密出 HASH列表; 然后从该列表中取出背景这一条记录中所 对应的记录; 验证客户端系统中的解压缩目录中是否有与该记录相对应 的文件, 即 "背景文件"; 若有, 则利用 MD5算法计算出当前 "背景文 件"的 HASH值;接着判断列表中的 HASH值是否与当前计算出的 HASH 值相同;如此类推,直到 HASH列表中所有记录的 HASH值均与当前计 算出的 HASH值相同, 则验证通过。 若其中有一记录没验证通过, 则已 下载在本客户端的气泡背景不可再用, 需要重新下载图像文件。 Before using the image file, the client first sets the verification directory as the temporary directory of the client system; decrypts the HASH list; then removes the record corresponding to the background record from the list; verifies the decompression directory in the client system Whether there is a file corresponding to the record, that is, a "background file"; if so, use the MD5 algorithm to calculate the HASH value of the current "background file"; then determine whether the HASH value in the list is consistent with the currently calculated HASH The values are the same; and so on, until the HASH values of all records in the HASH list are the same as the currently calculated HASH values, the verification is passed. If one of the records fails the verification, the bubble background that has been downloaded in this client cannot be used again, and the image file needs to be downloaded again.
综上所述,客户端在每次使用图像文件之前,均要利用加密的 HASH 值与当前图像文件下所有的文件内容进行比对, 一旦发现差异, 则说明 该图像文件已经被替换或更改, 那么将不再使用当前文件, 而是重新下 载该图像文件。 从而有效防止图像文件被随意改动。 To sum up, before each use of an image file, the client must use the encrypted HASH value to compare with all file contents under the current image file. Once a difference is found, it means that the image file has been replaced or changed. The current file will no longer be used and the image file will be downloaded again. This effectively prevents image files from being modified at will.
为了实现上述方法, 本发明还提供了一种对图像文件进行验证的装 置, 包括以下模块: In order to implement the above method, the present invention also provides a device for verifying image files, including the following modules:
特征值读取模块, 用于从特征值列表中读取特征值, 并且将所读取 的特征值发送给特征值比较模块。 The eigenvalue reading module is used to read eigenvalues from the eigenvalue list, and send the read eigenvalues to the eigenvalue comparison module.
特征值读取模块包括解密子模块和记录识别子模块。 其中解密子模 块用于对特征值列表进行解密, 如果解密成功则将解密后的特征值列表 发送给记录识别子模块 , 如果解密失败则指示特征值比较模块输出验证 失败; 记录识别子模块用于从特征值列表中读取记录, 判断是否存在与 该记录对应的文件, 如果存在则将该记录中的特征值发送给特征值比较 模块, 否则指示特征值比较模块输出验证失败。 其中解密子模块是可选 的。 The characteristic value reading module includes a decryption sub-module and a record identification sub-module. The decryption sub-module is used to decrypt the feature value list. If the decryption is successful, the decrypted feature value list is sent to the record identification sub-module. If the decryption fails, it indicates that the feature value comparison module output verification failed; the record identification sub-module is used to Read the record from the feature value list and determine whether there is a file corresponding to the record. If it exists, send the feature value in the record to the feature value comparison module. Otherwise, indicate that the feature value comparison module output verification failed. The decryption submodule is optional.
图像文件读取模块, 用于从图像文件所在的目录中读取图像文件, 并且发送给特征值计算模块。 The image file reading module is used to read the image file from the directory where the image file is located, and send it to the feature value calculation module.
特征值计算模块, 用于按照预定的算法计算图像文件的特征值, 并 且将所计算出的特征值发送给特征值比较模块。 The feature value calculation module is used to calculate the feature value of the image file according to a predetermined algorithm, and send the calculated feature value to the feature value comparison module.
特征值比较模块, 用于比较特征值读取模块和特征值计算模块所发 送的特征值是否相同, 如果相同则输出验证通过, 否则输出验证失败。 The eigenvalue comparison module is used to compare whether the eigenvalues sent by the eigenvalue reading module and the eigenvalue calculation module are the same. If they are the same, the output verification passes, otherwise the output verification fails.
总之, 以上所述仅为本发明的较佳实施例而已, 并非用于限定本发 明的保护范围。 凡在本发明的精神和原则之内, 所作的任何修改、 等同 替换、 改进等, 均应包含在本发明的保护范围之内。 In short, the above descriptions are only preferred embodiments of the present invention and are not intended to limit the scope of the present invention. clear scope of protection. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

Claims

权利要求书 claims
1、 一种验证图像文件的方法, 其特征在于, 包括如下步骤: 读入包括图像文件标识和特征值的记录; 1. A method for verifying image files, characterized by including the following steps: reading records including image file identifiers and feature values;
计算与所述文件标识对应的图像文件的特征值; Calculate the characteristic value of the image file corresponding to the file identification;
判断记录中所记载的特征值与计算得到的特征值是否相同, 如果相 同则验证通过, 否则验证失败。 Determine whether the characteristic value recorded in the record is the same as the calculated characteristic value. If they are the same, the verification passes, otherwise the verification fails.
2、根据权利要求 1所述的方法, 其特征在于, 所述特征值为 HASH 值。 2. The method according to claim 1, characterized in that the characteristic value is a HASH value.
3、根据权利要求 1或 2所述的方法, 其特征在于, 计算与所述文件 标识对应的图像文件的特征值为: 3. The method according to claim 1 or 2, characterized in that, calculating the characteristic value of the image file corresponding to the file identification is:
利用 MD5算法计算与所述文件标识对应的图像文件的特征值。 The MD5 algorithm is used to calculate the feature value of the image file corresponding to the file identification.
4、根据权利要求 1所述的方法, 其特征在于, 所述读入包括图像文 件标识和特征值的记录之前进一步包括: 4. The method according to claim 1, characterized in that, before reading the record including the image file identifier and the characteristic value, the step further includes:
对包含所述记录的文件进行解密, 如果解密成功则读入所述记录, 否则确定验证失败。 Decrypt the file containing the record, and if the decryption is successful, read the record; otherwise, it is determined that the verification fails.
5、根据权利要求 1所述的方法、其特征在于, 所述读入包括图像文 件标识和特征值的记录和计算与所述文件标识对应的图像文件的特征 值之间进一步包括: 5. The method according to claim 1, characterized in that, between the reading of the image file identifier and the recording of the characteristic value and the calculation of the characteristic value of the image file corresponding to the file identifier further includes:
判断是否存在与所述文件标识对应的图像文件, 如果存在则计算该 图像文件的特征值, 否则确定验证失败。 Determine whether there is an image file corresponding to the file identification, and if so, calculate the feature value of the image file; otherwise, determine that the verification has failed.
6、 一种验证图像文件的装置, 其特征在于, 该装置包括: 特征值读取模块, 用于从特征值列表中读取特征值, 并且将所读取 的特征值发送给特征值比较模块; 6. A device for verifying image files, characterized in that the device includes: a feature value reading module, used to read feature values from the feature value list, and send the read feature values to the feature value comparison module ;
图像文件读取模块, 用于从图像文件所在的目录中读取图像文件, 并且发送给特征值计算模块; Image file reading module, used to read image files from the directory where the image files are located, And sent to the eigenvalue calculation module;
特征值计算模块, 用于按照预定的算法计算图像文件的特征值, 并 且将所计算出的特征值发送给特征值比较模块; The feature value calculation module is used to calculate the feature value of the image file according to a predetermined algorithm, and send the calculated feature value to the feature value comparison module;
特征值比较模块, 用于比较特征值读取模块和特征值计算模块所发 送的特征值是否相同, 如果相同则输出验证通过, 否则输出验证失败。 The eigenvalue comparison module is used to compare whether the eigenvalues sent by the eigenvalue reading module and the eigenvalue calculation module are the same. If they are the same, the output verification passes, otherwise the output verification fails.
7、根据权利要求 6所述的装置, 其特征在于, 所述特征值读取模块 包括: 7. The device according to claim 6, characterized in that the characteristic value reading module includes:
解密子模块, 用于对特征值列表进行解密, 如果解密成功则将解密 后的特征值列表发送给记录识别子模块, 如果解密失败则指示特征值比 较模块输出验证失败; The decryption sub-module is used to decrypt the feature value list. If the decryption is successful, the decrypted feature value list will be sent to the record identification sub-module. If the decryption fails, it will indicate that the feature value comparison module output verification failed;
记录识别子模块, 用于从特征值列表中读取记录, 判断是否存在与 该记录对应的文件, 如果存在则将该记录中的特征值发送给特征值比较 模块, 否则指示特征值比较模块输出验证失败。 Record identification submodule, used to read records from the feature value list, determine whether there is a file corresponding to the record, and if so, send the feature value in the record to the feature value comparison module, otherwise instruct the feature value comparison module to output verification failed.
PCT/CN2006/002940 2005-12-10 2006-11-02 A method and apparatus for verifying an image file WO2007065341A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200510120652.X 2005-12-10
CNB200510120652XA CN100462995C (en) 2005-12-10 2005-12-10 Checking of image document and method for using same

Publications (1)

Publication Number Publication Date
WO2007065341A1 true WO2007065341A1 (en) 2007-06-14

Family

ID=38122475

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2006/002940 WO2007065341A1 (en) 2005-12-10 2006-11-02 A method and apparatus for verifying an image file

Country Status (2)

Country Link
CN (1) CN100462995C (en)
WO (1) WO2007065341A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262493B (en) * 2008-01-14 2011-10-05 深圳市深信服电子科技有限公司 Method for accelerating inter-network data transmission via stream buffer
CN101957858A (en) * 2010-09-27 2011-01-26 中兴通讯股份有限公司 Data comparison method and device
CN103118045B (en) * 2011-11-17 2017-03-15 腾讯科技(深圳)有限公司 A kind of method and system of offline download
US10089323B2 (en) 2012-04-05 2018-10-02 Microsoft Technology Licensing, Llc Telemetry system for a cloud synchronization system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1431622A (en) * 2001-12-28 2003-07-23 佳能株式会社 Image verification system, its appts. and method
WO2004034325A1 (en) * 2002-10-09 2004-04-22 Koninklijke Philips Electronics N.V. Localisation of image tampering
CN1536871A (en) * 2003-04-04 2004-10-13 ������������ʽ���� Image checking device and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SE513356C2 (en) * 1998-11-20 2000-08-28 Ericsson Telefon Ab L M Method and apparatus for encrypting images
TW200523524A (en) * 2003-11-05 2005-07-16 Asml Masktools Bv Eigen decomposition based OPC model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1431622A (en) * 2001-12-28 2003-07-23 佳能株式会社 Image verification system, its appts. and method
WO2004034325A1 (en) * 2002-10-09 2004-04-22 Koninklijke Philips Electronics N.V. Localisation of image tampering
CN1536871A (en) * 2003-04-04 2004-10-13 ������������ʽ���� Image checking device and method

Also Published As

Publication number Publication date
CN100462995C (en) 2009-02-18
CN1979516A (en) 2007-06-13

Similar Documents

Publication Publication Date Title
US8595488B2 (en) Apparatus, system and method for securing digital documents in a digital appliance
WO2018090642A1 (en) Application program upgrade method, user terminal and storage medium
US8122100B2 (en) Multiple object download
JP4913871B2 (en) Upgrade memory cards with security mechanisms to prevent copying of secure content and applications
US9489520B2 (en) Decryption and encryption of application data
KR101379861B1 (en) Apparatus, system and method for providing DRM
US20040039932A1 (en) Apparatus, system and method for securing digital documents in a digital appliance
JP6189438B2 (en) Use media security controllers to protect media items
JP2008508595A (en) System and method for enabling a device in response to rights protection
JP2007525755A (en) Protect digital data content
US20070078775A1 (en) System and method for preventing unauthorized use of digital works
WO2015068220A1 (en) Software update device, and software update program
WO2011157242A2 (en) Method and device for file protection
US9092612B2 (en) Method and system for secure access to data files copied onto a second storage device from a first storage device
WO2010072041A1 (en) Management system of digital copyright and achieving method thereof
CN103034788A (en) Verification method and system of electronic readings, server, client and terminal
TWI324349B (en) Secure protable storage device and control method for the same
WO2007065341A1 (en) A method and apparatus for verifying an image file
KR20210017268A (en) Electronic device operating encryption for user data
US20090119744A1 (en) Device component roll back protection scheme
CN1898625A (en) License information management apparatus and license information management method
JP2004112555A (en) Download system and method therefor
JP2010157144A (en) Document management system, document management method and program therefor
TWI273492B (en) Encryption/decryption method incorporated with local server software
Gravel Xbox one file system data storage: A forensic analysis

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 05-11-2008)

122 Ep: pct application non-entry in european phase

Ref document number: 06805141

Country of ref document: EP

Kind code of ref document: A1