Data processing system, data processing method, and data processing program

The system efficiently compares binary data of different lengths by using targeted search processes, ensuring accurate and faster comparisons by focusing on likely matching ranges.

JP7791495B1Active Publication Date: 2025-12-24CAPCOM CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025029400
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-12-24
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

Existing binary data comparison methods struggle when data lengths are different, making it difficult to properly compare binary files.

Method used

A data processing system and method that extracts sample data of a predetermined length from one binary file and searches for matching data in another within a predetermined range, using forward, backward, beginning, and end search processes to determine differences and similarities.

Benefits of technology

Enables accurate comparison of binary data with varying lengths by focusing searches within likely matching ranges, speeding up the process and improving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007791495000001_ABST
    Figure 0007791495000001_ABST
Patent Text Reader

Abstract

Compare binary data appropriately. [Solution] A search processor 101 repeatedly performs a search process to search the second binary data for second sample data SD2 that matches first sample data SD1 of a predetermined data length extracted from the first binary data. In the search process, the search processor 101 searches for second sample data SD2 that matches the first sample data SD1 within a predetermined range R2 that includes a second position in the second binary data that corresponds to a first position, which is the position of the first sample data SD1 in the first binary data. The difference between a first ratio, which is the ratio of the data length from the beginning of the first binary data to the data length of the first binary data, and a second ratio, which is the ratio of the data length from the beginning of the second binary data to the data length of the second binary data, is equal to or less than a predetermined difference.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to data processing technology. [Background technology]

[0002] Patent Document 1 discloses a file comparison device equipped with a file comparison processor and an edit processor. The file comparison processor compares at least two binary files byte by byte. The edit processor marks the different bytes among the corresponding bytes of the binary files arranged horizontally according to the comparison results of the file comparison processor, and outputs the results. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Publication No. 6-12300 Summary of the Invention [Problem to be solved by the invention]

[0004] In the technology of Patent Document 1, each binary file (binary data) is read one byte at a time from the beginning and compared. Therefore, if the data lengths of the binary files are different, it is difficult to properly compare these binary files.

[0005] An object of the present invention is to enable binary data to be compared appropriately. [Means for solving the problem]

[0006] The first aspect is 1. A data processing system for comparing first binary data and second binary data, comprising: a search processing unit that extracts first sample data having a predetermined data length from the first binary data and repeatedly performs a search process to search the second binary data for second sample data that matches the first sample data; an output processing unit that outputs information about a difference between the first binary data and the second binary data based on a result of the search by the search processing unit, the search processing unit searches for the second sample data that matches the first sample data within a predetermined range including a second position in the second binary data that corresponds to a first position that is a position of the first sample data in the first binary data, A difference between a first ratio, which is a ratio of the data length from the beginning of the first binary data to the first position, to the data length of the first binary data, and a second ratio, which is a ratio of the data length from the beginning of the second binary data to the second position, to the data length of the second binary data, is a predetermined difference or less. It is a data processing system.

[0007] In a first aspect, When the second sample data that matches the first sample data is detected within the predetermined range of the second binary data in the search process, the search processing unit may perform a forward search process and a backward search process, In the forward search process, the search processing unit may search to what extent a portion of the first binary data that is further ahead than the first sample data matches a portion of the second binary data that is further ahead than the second sample data, In the backward search process, the search processing unit may search to what extent the part of the first binary data that is closer to the end of the first sample data matches the part of the second binary data that is closer to the end of the second sample data.

[0008] In a first aspect, The search processing unit may extract the first sample data to be used in the (i+1)th search process (i is an integer greater than or equal to 1), which is at least one of the repeatedly performed search processes, from a portion of the first binary data that is away from the position of the first sample data used in the (i+1)th search process.

[0009] In a first aspect, If, during the search process, the second sample data that matches the first sample data is not detected within the specified range of the second binary data, the search processing unit may perform the search process again, setting a data length that is shorter than the data length of the first sample data as the specified data length.

[0010] In a first aspect, The longer the data length of the second binary data, the wider the predetermined range may be.

[0011] In a first aspect, The search processing unit may perform a head search process and an end search process before starting the search process, In the beginning search process, the search processing unit may search to what extent a beginning portion including a beginning of the first binary data matches a beginning portion including a beginning of the second binary data, In the end search process, the search processing unit may search to what extent an end portion including an end of the first binary data matches an end portion including an end of the second binary data.

[0012] In a first aspect, The search processing unit The first binary data may be divided into n pieces of first data (n is an integer of 2 or more), and the second binary data may be divided into n pieces of second data so that a division ratio of the second binary data is equal to a division ratio of the first binary data, The search process may be performed on a k-th (k is an integer of 1 to n) first data among the n first data and a k-th second data among the n second data.

[0013] The second aspect is A data processing method for comparing first binary data and second binary data, comprising: a searching step of repeatedly performing a search process of extracting first sample data having a predetermined data length from the first binary data and searching the second binary data for second sample data that matches the first sample data; an output step of outputting information about a difference between the first binary data and the second binary data based on a result of the search in the search step, In the search process of the search step, the second sample data that matches the first sample data is searched for within a predetermined range including a second position in the second binary data that corresponds to a first position that is a position of the first sample data in the first binary data, A difference between a first ratio, which is a ratio of the data length from the beginning of the first binary data to the first position, to the data length of the first binary data, and a second ratio, which is a ratio of the data length from the beginning of the second binary data to the second position, to the data length of the second binary data, is a predetermined difference or less. It is a data processing method.

[0014] The third aspect is A data processing program for comparing first binary data and second binary data, the program comprising: a search processing unit that extracts first sample data having a predetermined data length from the first binary data and repeatedly performs a search process to search the second binary data for second sample data that matches the first sample data; functioning as an output processing unit that outputs information about the difference between the first binary data and the second binary data based on the search result by the search processing unit; the search processing unit searches for the second sample data that matches the first sample data within a predetermined range including a second position in the second binary data that corresponds to a first position that is a position of the first sample data in the first binary data, A difference between a first ratio, which is a ratio of the data length from the beginning of the first binary data to the first position, to the data length of the first binary data, and a second ratio, which is a ratio of the data length from the beginning of the second binary data to the second position, to the data length of the second binary data, is a predetermined difference or less. It is a data processing program. [Effects of the Invention]

[0015] According to the present invention, even if the data lengths of the first binary data and the second binary data are different from each other, the first binary data and the second binary data can be appropriately compared. Furthermore, by searching within a predetermined range of the second binary data (searching for second sample data that matches the first sample data), the search process can be performed faster than when searching the entire second binary data.

[0016] Furthermore, according to the present invention, by determining the second position so that the difference between the first rate and the second rate is equal to or less than a predetermined difference, the predetermined range (the range in which the search is performed) can be set to a range of the second binary data that is likely to contain second sample data that matches the first sample data, thereby effectively speeding up the search process. [Brief explanation of the drawings]

[0017] [Figure 1] 1 is a block diagram illustrating a configuration of a data processing device according to an embodiment; [Figure 2]10 is a flowchart illustrating a processing flow by a data processing device. [Figure 3] 10 is a flowchart illustrating the flow of a beginning search process. [Figure 4] 10 is a flowchart illustrating the flow of a tail search process. [Figure 5] 10 is a flowchart illustrating the flow of a forward search process. [Figure 6] 10 is a flowchart illustrating the flow of a backward search process. [Figure 7] FIG. 2 is a schematic diagram illustrating a processing flow by a data processing device. [Figure 8] FIG. 10 is a schematic diagram illustrating an image showing comparison result information. [Figure 9] 10 is a flowchart illustrating the flow of a search process according to a first modified example of the embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0018] Hereinafter, the embodiments will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference numerals and their description will not be repeated.

[0019] (Terminology explanation) First, we will explain the term "binary data" used in the following explanation. Binary data is electronic data expressed as binary numbers (0 or 1). Binary data is computer-readable data and is used as various types of data such as text data, image data, and audio data.

[0020] In the following description, the minimum unit data length in binary data will be referred to as "unit data length," and partial data having a unit data length will be referred to as "unit length data." Unit length data indicates the minimum unit of information represented by binary data. For example, if the binary data is text data, the unit length data indicates the minimum unit of "character" in the "sentence" represented by the binary data. For ease of explanation, the following will use an example where the unit data length is "1 byte."

[0021] (Embodiment) FIG. 1 illustrates a configuration of a data processing device 10 according to an embodiment. The data processing device 10 performs a comparison process, which is a process for comparing first binary data with second binary data. The data processing device 10 is an example of a data processing system that performs the comparison process. Examples of the data processing device 10 include a personal computer, a smartphone, a tablet, and a game console. The comparison process is broadly divided into a first process that searches for a match between the first binary data and the second binary data, and a second process that outputs a result of comparing the first binary data with the second binary data based on the result of the first process.

[0022] In this example, the data processing device 10 includes an input unit 11, an output unit 12, a storage unit 13, and a control unit 14. The input unit 11, the output unit 12, and the storage unit 13 are electrically connected to the control unit 14 via a bus 15.

[0023] The input unit 11 inputs various types of information and data. Examples of the input unit 11 include an operation unit that inputs various types of information and data in response to various operations by the user, and a receiving unit that receives various types of information and data transmitted from other data processing devices 10. Examples of the operation unit include a keyboard, a mouse, a touchpad, etc.

[0024] The output unit 12 outputs various types of information and data. Examples of the output unit 12 include a display that displays images showing the various types of information and data, a speaker that outputs audio that shows images showing the various types of information and data, and a transmission unit that transmits the various types of information and data to another data processing device 10.

[0025] The storage unit 13 stores various types of information and data. The storage unit 13 is configured with an HDD, an SSD, a RAM, a ROM, etc. In this example, the storage unit 13 stores information and data for executing various types of processing. Examples of the information and data stored in the storage unit 13 include various types of information and data input by the input unit 11, information and data used in various types of processing (e.g., setting values ​​such as thresholds), information and data obtained in various types of processing (e.g., processing results), and information and data for generating various types of information and data output from the output unit 12 (e.g., image data and audio data).

[0026] The control unit 14 controls the operation of the data processing device 10. The control unit 14 transmits and receives various types of information and data, and processes the various types of information and data to perform various processes. In this example, the control unit 14 has a CPU (microcomputer) and memory. The memory stores programs for operating the CPU, etc.

[0027] [Functional configuration of the control unit] The control unit 14 has a search processing unit 101 and an output processing unit 102. Specifically, the control unit 14 functions as the search processing unit 101 and the output processing unit 102 by its CPU executing various programs. These programs are programs for executing various processes in the data processing device 10, and are an example of a data processing program. The processing by the data processing device 10 is an example of a data processing method. The processing by the search processing unit 101 is an example of a search step. The processing by the output processing unit 102 is an example of an output step.

[0028] Search Processing Unit The search processing unit 101 repeatedly performs a search process. In the search process, the search processing unit 101 extracts first sample data having a predetermined data length from the first binary data, and searches the second binary data for second sample data that matches the first sample data. The search processing unit 101 also performs forward search processing, backward search processing, beginning search processing, and end search processing. The first process of the comparison process (process of searching for matching parts in the first binary data and the second binary data) is performed by the search processing unit 101.

[0029] <Output Processing Section> The output processing unit 102 outputs information about the difference between the first binary data and the second binary data (hereinafter referred to as "difference information") based on the search result by the search processing unit 101. In this example, the output processing unit 102 outputs (supplies) the comparison result information including the difference information to the output unit 12, thereby causing the output unit 12 to output the comparison result information. The second process of the comparison process (processing to output the result of the comparison between the first binary data and the second binary data) is performed by the output processing unit 102.

[0030] [Processing by data processing device] Next, the comparison process by the data processing device 10 will be described with reference to Fig. 2. When a new set of first binary data and second binary data becomes the processing target, the data processing device 10 performs the following process. Note that the processes of the remaining steps except for step S80 among the steps shown in Fig. 2 correspond to the first process of the comparison process, and the process of step S80 corresponds to the second process of the comparison process. The processes of steps S41 to S46 correspond to the search process.

[0031] <Step S10> The search processing unit 101 performs a beginning search process. In the beginning search process, the search processing unit 101 searches to see how far the beginning part including the beginning of the first binary data matches the beginning part including the beginning of the second binary data.

[0032] <Step S20> Next, the search processing unit 101 determines whether or not an unsearched portion remains in the first binary data. If an unsearched portion remains in the first binary data, the process of step S30 is performed; if not, the process of step S80 is performed.

[0033] The "unsearched portion" in the first binary data is a portion of the first binary data that has not been determined to be a "matching portion" in the first process (specifically, any of the beginning search process, the end search process, the search process, the forward search process, and the backward search process), and that has not been extracted as "first sample data" in the search process.

[0034] <Step S30> The search processing unit 101 performs a tail search process. In the tail search process, the search processing unit 101 searches to see how far the tail portion including the tail of the first binary data matches the tail portion including the tail of the second binary data.

[0035] <Step S40> Next, the search processing unit 101 determines whether or not an unsearched portion (specifically, an unsearched portion from which first sample data can be extracted) remains in the first binary data. If an unsearched portion remains in the first binary data, the process of step S51 is performed; if not, the process of step S80 is performed.

[0036] <Step S51> The search processing unit 101 extracts first sample data having a predetermined data length from the first binary data. Specifically, the search processing unit 101 extracts the first sample data from an unsearched portion of the first binary data. The predetermined data length is a data length that allows determination of whether or not a match exists, and is a data length that is at least twice the unit data length (e.g., 32 bytes).

[0037] The process of step S51 (extraction of first sample data) is repeated until no unsearched portions remain in the first binary data. Details of the repeated process of step S51 are as follows. Below, the position of the first sample data extracted in the process of step S51 (the position of the first sample data in the first binary data) is referred to as the "first position." Furthermore, the proportion of the data length from the beginning of the first binary data to the first position (specifically, the center position of the first sample data) to the data length of the first binary data is referred to as the "first proportion."

[0038] In this example, in the (i+1)th search process (i is an integer greater than or equal to 1), which is at least one of the repeated search processes (specifically, the process of step S51), the search processing unit 101 extracts the first sample data to be used in the (i+1)th search process from a portion of the first binary data that is away from the position of the first sample data used in the (i)th search process.

[0039] For example, the first ratio in the first search process is included within a ratio range that includes "0.5." The ratio range that includes "0.5" is a range of ratios that can be considered to be "0.5," for example, a range from "0.45" to "0.55" (a range within ±5% of the total length of the binary data centered on a reference numerical value). In other words, the first position in the first search process is included within a central range that includes the central position of the first binary data (a range of positions that can be considered to be the central position).

[0040] The first ratio in the second search process is included in a ratio range that includes "0.25" (a range of ratios that can be considered to be "0.25"), and the first ratio in the third search process is included in a ratio range that includes "0.75" (a range of ratios that can be considered to be "0.75"). In other words, the first position in the second search process is included in a range that includes a first center position, which is the center position of the portion of the first binary data that is closer to the beginning than the center position (a range of positions that can be considered to be the first center position), and the first position in the third search process is included in a range that includes a second center position, which is the center position of the portion of the first binary data that is closer to the end than the center position (a range of positions that can be considered to be the second center position).

[0041] <Step S52> The search processing unit 101 extracts second sample data having a predetermined data length from the second binary data. Specifically, the search processing unit 101 extracts the second sample data from within a predetermined range including a second position of the second binary data that corresponds to a first position, which is the position of the first sample data in the first binary data. In this example, the longer the data length (total length) of the second binary data, the wider the predetermined range.

[0042] Specifically, the search processing unit 101 extracts the second sample data from an unsearched portion within a predetermined range of the second binary data. The "unsearched portion" within the predetermined range of the second binary data is a portion included within the predetermined range of the second binary data that has not been determined to be a "matching portion" and that has not been extracted as "second sample data" in a search performed within the predetermined range.

[0043] The difference between the "first ratio," which is the ratio of the data length from the beginning of the first binary data to the first position (the position of the first sample data) to the data length of the first binary data, and the "second ratio," which is the ratio of the data length from the beginning of the second binary data to the second position (the position of the second sample data) to the data length of the second binary data, is equal to or less than a predetermined difference. The predetermined difference is a difference at which the first ratio and the second ratio are considered to be equivalent, and is, for example, "0.05 (within a range of ±5%)."

[0044] The process of step S52 (extraction of second sample data within a predetermined range) is repeated until second sample data that matches the first sample data within the predetermined range is detected, or until no unsearched portion remains within the predetermined range. Details of the repeated process of step S52 (extraction position of second sample data) are as follows:

[0045] For example, the extraction position of the second sample data in the first processing of step S52 is the second position. In the processing of step S52 from the second time onwards, the extraction position of the second sample data is determined as follows.

[0046] First, until the extraction position of the second sample data (specifically, the beginning of the second sample data) reaches the beginning of the portion within the specified range of the second binary data, the extraction position of the second sample data in the (i+1)th (i is an integer greater than or equal to 1) processing of step S52 is shifted toward the beginning by the unit data length from the extraction position of the second sample data in the i-th processing of step S52.

[0047] When the extraction position of the second sample data reaches the beginning of the portion of the second binary data within the predetermined range in the (i+1)th processing of step S52, the extraction position of the second sample data in the (i+2)th processing of step S52 becomes a position shifted from the second position toward the end by the unit data length. Thereafter, until the extraction position of the second sample data (specifically, the end of the second sample data) reaches the end of the portion of the second binary data within the predetermined range, the extraction position of the second sample data in the (i+1)th processing of step S52 (i is an integer greater than or equal to 1) becomes a position shifted toward the end by the unit data length from the extraction position of the second sample data in the i-th processing of step S52.

[0048] <Step S53> Next, the search processing unit 101 determines whether the first sample data extracted in step S51 matches the second sample data extracted in step S52. If the first sample data and the second sample data match, the process proceeds to step S54; if not, the process proceeds to step S55.

[0049] <Step S54> If the first sample data and the second sample data match, the search processing unit 101 determines that the portion of the first binary data that corresponds to the "first sample data extracted in step S51" and the portion of the second binary data that corresponds to the "second sample data extracted in step S52" are "matching portions." Then, the search processing unit 101 stores the above determination result in the storage unit 13. Next, the process of step S60 is performed.

[0050] <Step S55> On the other hand, if the first sample data and the second sample data do not match, the search processing unit 101 determines whether or not an unsearched portion remains within the predetermined range of the second binary data. If an unsearched portion remains, the process of step S52 is performed; if not, the process of step S40 is performed.

[0051] <Step S60> When it is determined in step S54 that there is a "matching portion" (i.e., second sample data that matches the first sample data is detected), the search processing unit 101 performs a forward search process. In the forward search process, the search processing unit 101 searches to what extent a portion of the first binary data that is further ahead than the first sample data (the portion of the first sample data that is determined to be a matching portion) matches a portion of the second binary data that is further ahead than the second sample data (the portion of the second sample data that is determined to be a matching portion).

[0052] <Step S70> Next, the search processing unit 101 performs a backward search process. In the backward search process, the search processing unit 101 searches to see how far the part of the first binary data that is closer to the end of the first sample data (the part of the first sample data that is determined to be a matching part) matches the part of the second binary data that is closer to the end of the second sample data (the part of the second sample data that is determined to be a matching part). Next, the process of step S40 is performed.

[0053] <Step S80> If there are no unsearched portions remaining in the first binary data in step S20 or step S40, the output processing unit 102 generates comparison result information based on the "determination result regarding the matching portion" stored in the storage unit 13, and causes the generated comparison result information to be output by the output unit 12. In this example, the output processing unit 102 generates an image indicating the comparison result information, and causes the generated image to be displayed on a display, which is an example of the output unit 12.

[0054] Specifically, the output processing unit 102 determines the “matching portions” in each of the first binary data and the second binary data based on the “determination results regarding the matching portions” stored in the storage unit 13.

[0055] Furthermore, if the first binary data contains a different part (a part that is not a match) between the ith matching point and the (i+1)th matching point, and the second binary data contains a different part between the ith matching point and the (i+1)th matching point, the output processing unit 102 determines that "the different part contained between the ith matching point and the (i+1)th matching point in the first binary data has been replaced with the different part contained between the ith matching point and the (i+1)th matching point in the second binary data."

[0056] Furthermore, if the first binary data does not contain a difference between the ith matching point and the (i+1)th matching point, but the second binary data contains a difference between the ith matching point and the (i+1)th matching point, the output processing unit 102 determines that "a difference located between the ith matching point and the (i+1)th matching point in the second binary data has been added between the ith matching point and the (i+1)th matching point in the first binary data."

[0057] Furthermore, if the first binary data contains a difference between the i-th matching point and the i+1-th matching point, but the second binary data does not contain a difference between the i-th matching point and the i+1-th matching point, the output processing unit 102 determines that "the difference located between the i-th matching point and the i+1-th matching point in the first binary data has been deleted from between the i-th matching point and the i+1-th matching point in the second binary data."

[0058] Then, the output processing unit 102 generates comparison result information based on the above determination.

[0059] [First search process] Next, the beginning search process will be described with reference to Fig. 3. In the beginning search process, the "j-th unit length data from the beginning of the first binary data (or second binary data)" is processed. Note that "j" is an integer equal to or greater than 1, and the initial value of "j" is "1".

[0060] <Step S11> The search processing unit 101 extracts the "j-th unit length data from the beginning of the first binary data" that is the processing target from the first binary data.

[0061] <Step S12> Furthermore, the search processing unit 101 extracts the "j-th unit length data from the beginning of the second binary data" that is the processing target from the second binary data.

[0062] <Step S13> Next, the search processing unit 101 determines whether the j-th unit length data extracted in step S11 matches the j-th unit length data extracted in step S12. If these unit length data match each other, the process proceeds to step S14; if not, the process proceeds to step S20.

[0063] <Step S14> If the unit length data match each other, the search processing unit 101 determines that the portion of the first binary data corresponding to the "j-th unit length data extracted in step S11" and the portion of the second binary data corresponding to the "j-th unit length data extracted in step S12" are "matching portions." Then, the search processing unit 101 stores the above determination result in the storage unit 13.

[0064] <Step S15> Next, the search processing unit 101 determines the "j+1th unit length data from the beginning of the first binary data" located at the end of the "jth unit length data from the beginning of the first binary data" of the first binary data as the target of next processing. Similarly, the search processing unit 101 determines the "j+1th unit length data from the beginning of the second binary data" located at the end of the "jth unit length data from the beginning of the second binary data" of the second binary data as the target of next processing. For example, if the first unit length data is determined to be a "matching portion," the second unit length data is determined to be the target of next processing. Then, the processing of step S11 is performed.

[0065] In step S15, if at least one of the "j+1th unit length data from the beginning of the first binary data" and the "j+1th unit length data from the beginning of the second binary data" cannot be the target of the next process (for example, if the j+1th unit length data is at the end of the binary data), step S20 is performed instead of step S11.

[0066] [Tail search process] Next, the tail search process will be described with reference to Fig. 4. In the tail search process, the "j-th unit length data from the end of the first binary data (or second binary data)" is processed.

[0067] <Step S31> The search processing unit 101 extracts the "j-th unit length data from the end of the first binary data" that is the processing target from the first binary data.

[0068] <Step S32> Furthermore, the search processing unit 101 extracts the "j-th unit length data from the end of the second binary data" that is the processing target from the second binary data.

[0069] <Step S33> Next, the search processing unit 101 determines whether the j-th unit length data extracted in step S31 matches the j-th unit length data extracted in step S32. If these unit length data match each other, the process proceeds to step S34; if not, the process proceeds to step S40.

[0070] <Step S34> If the unit length data match each other, the search processing unit 101 determines that the portion of the first binary data corresponding to the "j-th unit length data extracted in step S31" and the portion of the second binary data corresponding to the "j-th unit length data extracted in step S32" are "matching portions." Then, the search processing unit 101 stores the above determination result in the storage unit 13.

[0071] <Step S35> Next, the search processing unit 101 determines, as the next processing target, the "j+1th unit length data from the end of the first binary data" located at the beginning of the "jth unit length data from the end of the first binary data" in the first binary data. Similarly, the search processing unit 101 determines, as the next processing target, the "j+1th unit length data from the end of the second binary data" located at the beginning of the "jth unit length data from the end of the second binary data" in the second binary data. Then, the processing of step S31 is performed.

[0072] In addition, if at least one of the "j+1th unit length data from the end of the first binary data" and the "jth unit length data from the end of the second binary data" cannot be selected as the target for next processing in step S35, processing in step S40 is performed instead of processing in step S31.

[0073] [Forward Search Processing] Next, the forward search process will be described with reference to Fig. 5. Hereinafter, "the jth unit length data from the end of the portion of the first binary data (or second binary data) that is closer to the beginning of the first sample data (or second sample data)" will be referred to as "the jth unit length data at the beginning of the first sample data (or second sample data)." In the forward search process, the "jth unit length data at the beginning of the first sample data (or second sample data)" is the target of processing.

[0074] <Step S61> The search processing unit 101 determines whether the jth unit length data at the beginning of the first sample data, which is the target of processing in the first binary data, is an unsearched portion. If the jth unit length data at the beginning of the first sample data is an unsearched portion, the process of step S62 is performed; if not, the process of step S70 is performed.

[0075] <Step S62> The search processing unit 101 also determines whether the "j-th unit length data at the beginning of the second sample data" of the second binary data, which is the processing target, is an unsearched portion. The "unsearched portion" in the second binary data refers to a portion of the second binary data that has not been determined to be a "matching portion." If the j-th unit length data at the beginning of the second sample data is an unsearched portion, the process of step S63 is performed; if not, the process of step S70 is performed.

[0076] <Step S63> The search processing unit 101 extracts the "j-th unit length data at the beginning of the first sample data" to be processed from the first binary data.

[0077] <Step S64> Furthermore, the search processing unit 101 extracts the "j-th unit length data at the beginning of the second sample data" that is the processing target from the second binary data.

[0078] <Step S65> Next, the search processing unit 101 determines whether the j-th unit length data extracted in step S63 matches the j-th unit length data extracted in step S64. If these unit length data match each other, the process proceeds to step S66; if not, the process proceeds to step S70.

[0079] <Step S66> If the unit length data match each other, the search processing unit 101 determines that the portion of the first binary data corresponding to the "j-th unit length data extracted in step S63" and the portion of the second binary data corresponding to the "j-th unit length data extracted in step S64" are "matching portions." Then, the search processing unit 101 stores the above determination result in the storage unit 13.

[0080] <Step S67> Next, the search processing unit 101 determines the "j+1th unit length data at the beginning of the first sample data" located at the beginning of the "jth unit length data at the beginning of the first sample data" in the first binary data as the target of next processing. Similarly, the search processing unit 101 determines the "j+1th unit length data at the beginning of the second sample data" located at the beginning of the "jth unit length data at the beginning of the second sample data" in the second binary data as the target of next processing. Then, the processing of step S61 is performed.

[0081] In addition, if in step S67 at least one of the "j+1th unit length data at the beginning of the first sample data" and the "j+1th unit length data at the beginning of the second sample data" cannot be the target of the next processing, processing of step S70 is performed instead of processing of step S61.

[0082] [Backward search processing] Next, the backward search process will be described with reference to Fig. 6. Hereinafter, "the jth unit length data from the beginning of the portion of the first binary data (or second binary data) that is closer to the end of the first sample data (or second sample data)" will be referred to as "the jth unit length data at the end of the first sample data (or second sample data)." In the backward search process, the "jth unit length data at the end of the first sample data (or second sample data)" is the target of processing.

[0083] <Step S71> The search processing unit 101 determines whether the j-th unit length data at the end of the first sample data, which is the target of processing in the first binary data, is an unsearched portion. If the j-th unit length data at the end of the first sample data is an unsearched portion, the process of step S72 is performed; if not, the process of step S20 is performed.

[0084] <Step S72> The search processing unit 101 also determines whether the j-th unit length data at the end of the second sample data, which is the target of processing in the second binary data, is an unsearched portion. If the j-th unit length data at the end of the second sample data is an unsearched portion, the process of step S73 is performed; if not, the process of step S20 is performed.

[0085] <Step S73> The search processing unit 101 extracts the "j-th unit length data at the end of the first sample data" to be processed from the first binary data.

[0086] <Step S74> Furthermore, the search processing unit 101 extracts the "j-th unit length data at the end of the second sample data" that is the processing target from the second binary data.

[0087] <Step S75> Next, the search processing unit 101 determines whether the j-th unit length data extracted in step S73 matches the j-th unit length data extracted in step S74. If these unit length data match each other, the process proceeds to step S76; if not, the process proceeds to step S20.

[0088] <Step S76> If the unit length data match each other, the search processing unit 101 determines that the portion of the first binary data corresponding to the "j-th unit length data extracted in step S73" and the portion of the second binary data corresponding to the "j-th unit length data extracted in step S74" are "matching portions." Then, the search processing unit 101 stores the above determination result in the storage unit 13.

[0089] <Step S77> Next, the search processing unit 101 determines the "j+1th unit length data at the end of the first sample data" located at the end of the "jth unit length data at the end of the first sample data" in the first binary data as the target of next processing. Similarly, the search processing unit 101 determines the "j+1th unit length data at the end of the second sample data" located at the end of the "jth unit length data at the end of the second sample data" in the second binary data as the target of next processing. Then, the processing of step S71 is performed.

[0090] In addition, if in step S77 at least one of the "j+1th unit length data at the end of the first sample data" and the "j+1th unit length data at the end of the second sample data" cannot be the target of the next processing, processing of step S20 is performed instead of processing of step S71.

[0091] [Specific example of processing by data processing device] Next, a specific example of the processing (comparison processing) by the data processing device 10 will be described with reference to Fig. 7. In the example of Fig. 7, unit length data is expressed in alphabets. The predetermined data length is four times the unit data length (four letters), and the data length of the predetermined range R2 is 14 times the unit data length (14 letters).

[0092] 7, a beginning search process is first performed, and it is determined that the "abcd" portion of the beginning of each of the first binary data and the second binary data matches. Then, an end search process is performed, and it is determined that the "uvwxy" portion of the end of each of the first binary data and the second binary data matches.

[0093] Next, a first search process is performed. As a result, the "klmn" portion of the first binary data is extracted as first sample data SD1. Furthermore, in the second binary data, a predetermined range R2 is determined whose center is the position of "ijkl" (second position) corresponding to the first position, which is the position of the "klmn" portion extracted as first sample data SD1, and the first extraction of second sample data SD2 is performed within this predetermined range R2. In this example, the "ijkl" portion (second position portion) of the predetermined range R2 of the second binary data is extracted as second sample data SD2.

[0094] Since the "ijkl" portion of the first second sample data SD2 does not match the "klmn" portion of the first sample data SD1, the second second sample data is extracted from the predetermined range R2 of the second binary data. Thereafter, the second sample data SD2 is repeatedly extracted from the predetermined range R2 of the second binary data until second sample data SD2 that matches the first sample data SD1 is found.

[0095] For example, although not shown in Figure 7, as the second sample data SD2, the ``hijk'' part, which is located within the specified range R2 of the second binary data and shifted forward by one unit data length (one alphabet) from the position of the ``ijkl'' part (the part extracted as the first sample data SD2), is extracted.

[0096] Next, as shown in the center of Figure 7, when second sample data SD2 that matches the first sample data SD1 is detected (the ``klmn'' part of the first sample data SD1 and the ``klmn'' part of the second sample data SD2 are determined to be matching parts), the first search process (the search process in which the ``klmn'' part of the first binary data is used as the first sample data SD1) is completed.

[0097] Next, as shown in the lower part of Figure 7, a forward search process is performed, and the "efghij" part of the first part of the first binary data and the second binary data, which is located ahead of the "klmn" part (the matching part), is determined to be a matching part. Also, a backward search process is performed, and the "opqrs" part of the last part of the first binary data and the second binary data, which is located behind the "klmn" part (the matching part), is determined to be a matching part. Then, the part "efghijklmnopqrs", which is a collection of the "matching part detected by the search process", the "matching part detected by the forward search process", and the "matching part detected by the backward search process", is treated as a single matching part.

[0098] 7, after the forward search process and the backward search process are performed, there is no unsearched portion (an unsearched portion from which the first sample data SD1 can be extracted) remaining in the first binary data. Therefore, the search by the search processing unit 101 is completed. Then, the output processing unit 102 generates comparison result information based on the search result (determination result regarding the matching portion) by the search processing unit 101.

[0099] In the example of Figure 7, the output processing unit 102 determines that the "abcd" part of the first binary data and the second binary data is the "first matching part," the "efghijklmnopqrs" part is the "second matching part," and the "uvwxy" part is the "third matching part."

[0100] The output processing unit 102 also determines that the "t" portion located between the second and third matching portions in the first binary data has been replaced with the "Y" portion located between the second and third matching portions in the second binary data. The output processing unit 102 also determines that the "XXXXX" portion of the second binary data has been added between the first and second matching portions in the first binary data (between the "abcd" portion and the "efghij" portion).

[0101] [Comparison result information] Next, the comparison result information will be described with reference to Fig. 8. In this example, an image P10 indicating the comparison result information is displayed on a display, which is an example of the output unit 12. For ease of explanation, in the example of Fig. 8, the data length of each of the first binary data and the second binary data is longer than the data length in the example of Fig. 7.

[0102] 8, an image P10 showing comparison result information includes a first binary data display region R11, a second binary data display region R12, a display element explanation region R13, and a comparison result explanation region R14. In this example, the first binary data display region R11 and the second binary data display region R12 are arranged side by side in the left-right direction of the image P10.

[0103] The first binary data display area R11 displays the first binary data, and the second binary data display area R12 displays the second binary data. In addition to the binary data, the first binary data display area R11 and the second binary data display area R12 display a display element D10 for identifying the difference (difference) between the first binary data and the second binary data. For example, the display element D10 is a frame that surrounds the portion corresponding to the difference (difference). The display element D10 is an example of difference information.

[0104] 8, the display element D10 includes a first display element D11 and a second display element D12. The first display element D11 is a display element for identifying a replacement portion and is a solid-line frame surrounding the replacement portion. The second display element D12 is a display element for identifying an addition portion or a deletion portion and is a dashed-line frame surrounding the addition portion or the deletion portion.

[0105] In the display element explanation region R13, an explanation of the display elements D10 (which display elements D10 indicate what differences (distinctions)) is displayed.

[0106] The comparison result explanation area R14 displays an explanation of the results of the comparison between the first binary data and the second binary data obtained by the comparison process (how the first binary data and the second binary data match and how they differ). The information displayed in the comparison result explanation area R14 is an example of difference information.

[0107] [Trends in binary data and the usefulness of comparison processing] It should be noted that new binary data may be generated based on certain binary data. For example, one or more new binary data may be generated by modifying part of the binary data (adding or deleting a data string). In this case, these binary data are similar to each other. The above-mentioned comparison process (process for comparing two binary data) is particularly effective at detecting differences (differences) between such similar binary data.

[0108] It is also assumed that various modifications are made to binary data. Therefore, it can be generally assumed that the modifications described above are made evenly (without bias) across the entire binary data. In other words, it can be assumed that when two binary data are compared, the modifications made to one of the binary data tend to be distributed evenly across the entire binary data.

[0109] Furthermore, if one of two binary data to be compared is designated as the "first binary data" and the other as the "second binary data," a portion of the first binary data is designated as the "first portion," and the portion of the second binary data that matches the first portion is designated as the "second portion," then it can be considered that the position of the second portion in the second binary data tends to be similar to the position of the first portion in the first binary data. In other words, it can be considered that the proportion of the data length from the beginning of the second binary data to the position of the second portion to the data length (total length) of the second binary data tends to be equivalent to the proportion of the data length from the beginning of the first binary data to the position of the first portion to the data length (total length) of the first binary data.

[0110] Therefore, in the data processing device 10 of the embodiment, by determining the second position so that the difference between the first rate and the second rate is equal to or less than a predetermined difference, it is possible to set the predetermined range (the range in which the search is performed) to a range in the second binary data that is likely to include second sample data that matches the first sample data. Note that the first rate is the rate of the data length from the beginning of the first binary data to the first position to the data length of the first binary data, and the second rate is the rate of the data length from the beginning of the second binary data to the second position to the data length of the second binary data. The first position is the position of the first sample data in the first binary data, and the second position is the position of the second sample data in the second binary data.

[0111] Furthermore, the beginning (including the beginning) and end (including the end) of binary data often contain information for identifying the binary data (e.g., information about the type or specifications). Therefore, the beginning and end of binary data can be considered to be parts that are relatively unlikely to be altered as described above. Therefore, it can be considered that two binary data to be compared tend to have a relatively high degree of similarity in their respective beginning parts (including the beginning), and a relatively high degree of similarity in their respective end parts (including the end).

[0112] Therefore, in the data processing device 10 of the embodiment, the "head portion of each of the first binary data and the second binary data" that is the target of the head search process can be considered to be a portion that is relatively likely to correspond to a matching portion. Also, the "tail portion of each of the first binary data and the second binary data" that is the target of the tail search process can be considered to be a portion that is relatively likely to correspond to a matching portion.

[0113] [Summary of the embodiment] To summarize the above, the data processing system (data processing device 10) of the embodiment is a data processing system that compares first binary data with second binary data, and includes a search processing unit 101 and an output processing unit .

[0114] The search processing unit 101 extracts first sample data having a predetermined data length from the first binary data, and repeatedly performs a search process to search the second binary data for second sample data that matches the first sample data. The output processing unit 102 outputs information regarding the difference between the first binary data and the second binary data based on the search results by the search processing unit. In the search process, the search processing unit 101 searches for second sample data that matches the first sample data within a predetermined range that includes a second position in the second binary data that corresponds to a first position, which is the position of the first sample data in the first binary data.

[0115] The difference between a first ratio, which is the ratio of the data length from the beginning of the first binary data to the first position to the data length of the first binary data, and a second ratio, which is the ratio of the data length from the beginning of the second binary data to the data length of the second binary data, is less than a predetermined difference.

[0116] A data processing method according to an embodiment is a data processing method for comparing first binary data and second binary data, and includes a search step and an output step. In the search step, the above search process is repeatedly performed. In the output step, information relating to the difference between the first binary data and the second binary data is output based on the search result of the search step.

[0117] The data processing program of the embodiment is a data processing program for comparing first binary data and second binary data, and causes one or more computers (control unit 14) to function as the above-mentioned search processing unit 101 and the above-mentioned output processing unit 102.

[0118] [Effects of the embodiment] As described above, in the embodiment, the search processing unit 101 searches for second sample data that matches the first sample data within a predetermined range of the second binary data (a predetermined range that includes a second position corresponding to a first position that is the position of the first sample data in the first binary data) in the search process. The difference between a first ratio, which is the ratio of the data length from the beginning of the first binary data to the first position, to the data length of the first binary data, and a second ratio, which is the ratio of the data length from the beginning of the second binary data to the data length of the second binary data, is equal to or less than a predetermined difference.

[0119] In the above configuration, even if the data lengths of the first binary data and the second binary data are different from each other, the first binary data can be appropriately compared with the second binary data. Furthermore, by searching within a predetermined range of the second binary data (searching for second sample data that matches the first sample data), the search process can be performed faster than when searching the entire second binary data.

[0120] Furthermore, in the above configuration, by determining the second position so that the difference between the first rate and the second rate is equal to or less than a predetermined difference, the predetermined range (the range in which the search is performed) can be set to a range of the second binary data that is likely to contain second sample data that matches the first sample data, thereby effectively speeding up the search process.

[0121] In addition, in the embodiment, when second sample data that matches the first sample data within a predetermined range of the second binary data is detected during the search process, the search processing unit 101 performs a forward search process and a backward search process. In the forward search process, the search processing unit 101 searches to what extent a portion of the first binary data that is closer to the beginning of the first sample data matches a portion of the second binary data that is closer to the beginning of the second sample data. In the backward search process, the search processing unit 101 searches to what extent a portion of the first binary data that is closer to the end of the first sample data matches a portion of the second binary data that is closer to the end of the second sample data.

[0122] In the above configuration, the portion of the first binary data that is further forward than the first sample data (the first sample data determined to be a matching portion) and the portion of the second binary data that is further forward than the second sample data (the second sample data determined to be a matching portion) can be considered to be portions that are relatively likely to correspond to a matching portion. Therefore, by performing a forward search process, it is possible to search for a matching portion in the portions that are relatively likely to correspond to a matching portion, thereby enabling an effective search for a matching portion.

[0123] Similarly, the portion of the first binary data that is closer to the end of the first sample data (the first sample data determined to be a matching portion) and the portion of the second binary data that is closer to the end of the second sample data (the second sample data determined to be a matching portion) can be considered to be portions that are relatively likely to correspond to a matching portion. Therefore, by performing a backward search process, it is possible to search for a matching portion in the portions that are relatively likely to correspond to a matching portion, thereby enabling an effective search for a matching portion.

[0124] Also, in the embodiment, in the (i+1)th search process (i is an integer greater than or equal to 1), which is at least one of the repeatedly performed search processes, the search processing unit 101 extracts the first sample data to be used in the (i+1)th search process from a portion of the first binary data that is away from the position of the first sample data used in the i-th search process.

[0125] In the above configuration, it can be considered that the altered portions of the second binary data relative to the first binary data tend to be evenly distributed throughout the entire second binary data (matching portions and altered portions alternately occur consecutively). Therefore, the search process can be performed more effectively than when the search process is performed sequentially from the beginning of the first binary data (for example, when a portion adjacent to the position of the first sample data used in the i-th search process is extracted as the first sample data to be used in the (i+1)-th search process).

[0126] In the embodiment, the longer the data length of the second binary data, the wider the predetermined range.

[0127] In the above configuration, it can be considered that the longer the data length (total length) of the second binary data, the longer the interval between matching portions in the second binary data (the interval from a portion that matches a part of the first binary data to another portion that matches another part of the first binary data) tends to be. Therefore, by determining the width of the predetermined range according to the data length of the second binary data so that the longer the data length of the second binary data, the wider the predetermined range (the range in which second sample data that matches the first sample data is searched for), the predetermined range can be appropriately set.

[0128] In the embodiment, the search processing unit 101 performs a start search process and an end search process before starting the search process. In the start search process, the search processing unit 101 searches to what extent a start portion including the start of the first binary data matches a start portion including the start of the second binary data. In the end search process, the search processing unit 101 searches to what extent a end portion including the end of the first binary data matches a end portion including the end of the second binary data.

[0129] In the above configuration, the leading portions of the first binary data and the second binary data can be considered to be portions that are relatively likely to be matching portions. Therefore, by performing the leading portion search process before starting the search process, it is possible to search for matching portions in portions that are relatively likely to be matching portions, thereby enabling the search for matching portions to be carried out effectively.

[0130] Similarly, the tail portions of the first binary data and the second binary data can be considered to be portions that are relatively likely to be matching portions. Therefore, by performing the tail search process before starting the search process, it is possible to search for matching portions in portions that are relatively likely to be matching portions, thereby enabling the search for matching portions to be carried out effectively.

[0131] (Modification 1 of the embodiment) The data processing device 10 of the first modification of the embodiment differs from the data processing device 10 of the embodiment in search processing. The other configurations and processing of the data processing device 10 of the first modification of the embodiment are the same as the configurations and processing of the data processing device 10 of the embodiment.

[0132] In the first modification of the embodiment, the predetermined data length, which is the data length of the first sample data, is a variable value. If the search processing unit 101 does not detect second sample data that matches the first sample data within a predetermined range of the second binary data during the search process, the search processing unit 101 performs the search process again, setting a data length that is shorter than the data length of the first sample data as the predetermined data length.

[0133] As shown in FIG. 9, in the search process of the first modification of the embodiment, in addition to the processes of steps S51 to S55 shown in FIG. 2, the processes of steps S56 and S57 are performed.

[0134] <Step S56> If there is no unsearched portion remaining within the predetermined range of the second binary data in step S55, the search processing unit 101 determines whether the predetermined data length, which is the data length of the first sample data, can be shortened. If the predetermined data length can be shortened, the process of step S57 is performed; if not, the process of step S40 is performed.

[0135] For example, the search processing unit 101 selects one of a plurality of data lengths prepared in advance as the predetermined data length. The process of step S56 is repeated until it is determined that the predetermined data length cannot be shortened. The search processing unit 101 selects one of the plurality of data lengths as the predetermined data length so that the predetermined data length becomes gradually shorter each time the process of step S56 is repeated.

[0136] <Step S57> If the predetermined data length can be shortened, the search processing unit 101 shortens the predetermined data length. Next, the process of step S51 is performed. For example, if the predetermined data length is shortened in the first search process, the first search process is performed again based on the shortened predetermined data length.

[0137] [Effects of Modification 1 of the Embodiment] As described above, in the first modification of the embodiment, if the search process does not find second sample data that matches the first sample data, the data length of the first sample data can be shortened and the search process can be performed again. This allows the search process to be performed again with improved accuracy, thereby improving the accuracy of the comparison between the first binary data and the second binary data.

[0138] (Modification 2 of the embodiment) The data processing device 10 of the second modification of the embodiment differs from the data processing device 10 of the embodiment in the procedure of the comparison process. The other configurations and processes of the data processing device 10 of the second modification of the embodiment are the same as the configurations and processes of the data processing device 10 of the embodiment.

[0139] In a second modification of the embodiment, the search processing unit 101 divides the first binary data into n pieces of first data (n is an integer equal to or greater than 2), and divides the second binary data into n pieces of second data such that the division ratio of the second binary data is equal to the division ratio of the first binary data. For example, the search processing unit 101 divides the first binary data into n pieces of first data such that the data lengths of the n pieces of first data are equal to each other. Similarly, the search processing unit 101 divides the second binary data into n pieces of second data such that the data lengths of the n pieces of second data are equal to each other.

[0140] In the second modification of the embodiment, the search processing unit 101 performs a first process on the k-th (k is an integer greater than or equal to 1 and less than or equal to n) first data among the n pieces of first data and the k-th second data among the n pieces of second data. The first process includes a beginning search process, an end search process, a search process, a forward search process, and a backward search process. Details of the first process are the same as those of the first process in the embodiment. Furthermore, the search processing unit 101 performs n first processes (first processes on the first data and second data) in parallel.

[0141] Furthermore, in a second modification of the embodiment, the output processing unit 102 outputs comparison result information including difference information based on the results obtained by the n first processes (the search results of the search processing unit 101 on the first data and second data). For example, the output processing unit 102 generates the search results of the search processing unit 101 on the first binary data and second binary data by integrating the results obtained by the n first processes, and generates and outputs comparison result information based on the generated results.

[0142] [Effects of Modification 2 of the Embodiment] As described above, in the second modification of the embodiment, the data length of each of the n pieces of first data is shorter than the data length of the first binary data. Furthermore, the data length of each of the n pieces of second data is shorter than the data length of the second binary data. Therefore, the processing load in the first processing on the first data and the second data can be reduced compared to the processing load in the first processing on the first binary data and the second binary data (first processing including search processing). Furthermore, since the n pieces of first processing (first processing on the first data and the second data) can be performed in parallel, the time required for the comparison processing to compare the first binary data and the second binary data can be reduced.

[0143] (Application example) The above comparison process by the data processing device 10 (specifically, the difference information output by the comparison process) is useful for the following purposes.

[0144] For example, in a situation where an "old version of data" already stored in a data processing terminal (not shown) is to be updated to a "new version of data" prepared in the server, data processing device 10, a possible application would be to distribute (download) difference information obtained by performing a comparison process between the old version of data and the new version of data from the server, data processing device 10, to the above-mentioned data processing terminal.

[0145] In the above-described applications, the data processing terminal can restore the "new version of data" based on the "old version of data" already stored in the data processing terminal and the "difference information" distributed from the server, the data processing device 10.

[0146] In this way, by distributing difference information regarding the difference between the old version data and the new version data rather than distributing the new version data as is, it is possible to reduce the amount of communication (the amount of communication required to send and receive data) between the server data processing device 10 and the data processing terminal.

[0147] In addition, in a situation in which the data processing device 10 is attempting to store "new version data" in the memory unit 13 while leaving "old version data" already stored in the memory unit 13 intact, it is possible to use the data processing device 10 to store in the memory unit 13 the difference information obtained by performing a comparison process on the old version data and the new version data.

[0148] In the above-described applications, the data processing device 10 can restore the "new version of data" based on the "old version of data" stored in the storage unit 13 and the "difference information."

[0149] In this way, by storing difference information regarding the difference between the old version data and the new version data in memory unit 13 rather than storing the new version data as is in memory unit 13, the amount of data required to store the "new version data" (the amount of data stored in memory unit 13) can be reduced.

[0150] (Other embodiments) In the above description, the following configuration or processing may be performed.

[0151] The unit data length is not limited to 1 byte and may be other data lengths. The unit data length may be arbitrarily set by the user. The unit length data having a unit data length is not limited to data (minimum unit data) indicating the minimum unit of information among the information indicated by binary data. For example, the unit length data may be a data string including two or more consecutive minimum unit data.

[0152] The predetermined data length is not limited to 32 bytes and may be any other data length. The predetermined data length may be arbitrarily set by the user.

[0153] The data length (width) of the predetermined range determined for the second binary data is not limited to 14 bytes and may be other data lengths. The data length of the predetermined range may be arbitrarily set by the user.

[0154] The order of various processes in the comparison process is not limited to the order shown in Figures 2 to 6 and 9, and may be other orders. For example, the tail search process (step S30) may be performed before the head search process (step S10). The backward search process (step S70) may be performed before the forward search process (step S60). In the head search process shown in Figure 3, step S11 (processing on the first binary data) and step S12 (processing on the second binary data) may be interchanged. The same applies to the tail search process, forward search process, and backward search process.

[0155] In the comparison process, at least one of the beginning search process (step S10) and the end search process (step S30) may be omitted. Similarly, at least one of the forward search process (step S60) and the backward search process (step S70) may be omitted.

[0156] The display element D10 is not limited to a solid or dashed frame, and may be other display elements. For example, the display element D10 may be a portion (a portion corresponding to a difference (distinction)) that is colored in a predetermined color different from the color that is colored in the matching portion of the binary data displayed in the image P10. In other words, the display element D10 may be a part (a portion colored in a predetermined color) of the binary data displayed in the image P10.

[0157] The storage unit 13 may be configured with a single storage device or multiple storage devices. The multiple storage devices may be provided together in one device (housing), or may be provided in different devices (housings).

[0158] The control unit 14 may be configured with a single processor and memory, or may be configured with multiple processors and memories. The multiple processors and memories may be provided together in one device (housing), or may be provided in different devices (housings). In other words, the above program (data processing program) may be executed by a single computer, or may be executed by multiple computers working together.

[0159] The effects of the present invention can be achieved even when these other embodiments are adopted. Furthermore, this embodiment can be combined with other embodiments, and other embodiments can be combined with each other as appropriate. The above-described embodiments are essentially preferred examples and are not intended to limit the scope of the present invention, its applications, or its uses. [Explanation of symbols]

[0160] 10 Data processing device (data processing system) 11 Input section 12 Output section 13 Storage section 14 Control Unit 15 Bus 101 Search processing unit 102 Output processing section

Claims

1. 1. A data processing system for comparing first binary data and second binary data, comprising: a search processing unit that extracts first sample data having a predetermined data length from the first binary data and repeatedly performs a search process to search the second binary data for second sample data that matches the first sample data; an output processing unit that outputs information about a difference between the first binary data and the second binary data based on a result of the search by the search processing unit, the search processing unit searches for the second sample data that matches the first sample data within a predetermined range including a second position in the second binary data that corresponds to a first position that is a position of the first sample data in the first binary data, A difference between a first ratio, which is a ratio of the data length from the beginning of the first binary data to the first position, to the data length of the first binary data, and a second ratio, which is a ratio of the data length from the beginning of the second binary data to the second position, to the data length of the second binary data, is equal to or smaller than a predetermined difference. Data processing system.

2. 2. The data processing system of claim 1, the search processing unit, when the second sample data that matches the first sample data within the predetermined range of the second binary data is detected in the search process, performs a forward search process and a backward search process; In the forward search process, the search processing unit searches to what extent a portion of the first binary data that is further ahead than the first sample data matches a portion of the second binary data that is further ahead than the second sample data, In the backward search process, the search processing unit searches to what extent a portion of the first binary data that is closer to the end of the first sample data and a portion of the second binary data that is closer to the end of the second sample data match. Data processing system.

3. 3. The data processing system of claim 2, The search processing unit extracts the first sample data to be used in the (i+1)th search process (i is an integer equal to or greater than 1), which is at least one search process among the repeatedly performed search processes, from a portion of the first binary data that is distant from the position of the first sample data used in the (i+1)th search process. Data processing system.

4. 2. The data processing system of claim 1, When the second sample data that matches the first sample data is not detected within the predetermined range of the second binary data in the search process, the search processing unit performs the search process again, setting a data length that is shorter than the data length of the first sample data as the predetermined data length. Data processing system.

5. 2. The data processing system of claim 1, The longer the data length of the second binary data, the wider the predetermined range. Data processing system.

6. 2. The data processing system of claim 1, the search processing unit performs a head search process and an end search process before starting the search process; In the beginning search process, the search processing unit searches to what extent a beginning portion including a beginning of the first binary data matches a beginning portion including a beginning of the second binary data, In the end search process, the search processing unit searches to see how much an end portion including an end of the first binary data matches an end portion including an end of the second binary data. Data processing system.

7. 2. The data processing system of claim 1, The search processing unit Dividing the first binary data into n pieces of first data (n is an integer of 2 or more), and dividing the second binary data into n pieces of second data so that the division ratio of the second binary data is equal to the division ratio of the first binary data; The search process is performed on the kth (k is an integer of 1 to n) first data among the n first data and the kth second data among the n second data. Data processing system.

8. A data processing method for comparing first binary data and second binary data, comprising: a searching step of repeatedly performing a searching process of extracting first sample data having a predetermined data length from the first binary data and searching the second binary data for second sample data that matches the first sample data; an output step of outputting information about a difference between the first binary data and the second binary data based on a result of the search in the search step, In the search process of the search step, the second sample data that matches the first sample data is searched for within a predetermined range including a second position in the second binary data that corresponds to a first position that is a position of the first sample data in the first binary data, A difference between a first ratio, which is a ratio of the data length from the beginning of the first binary data to the first position, to the data length of the first binary data, and a second ratio, which is a ratio of the data length from the beginning of the second binary data to the second position, to the data length of the second binary data, is equal to or smaller than a predetermined difference. Data processing methods.

9. A data processing program for comparing first binary data and second binary data, the program comprising: a search processing unit that extracts first sample data having a predetermined data length from the first binary data and repeatedly performs a search process to search the second binary data for second sample data that matches the first sample data; functioning as an output processing unit that outputs information about the difference between the first binary data and the second binary data based on the search result by the search processing unit; the search processing unit searches for the second sample data that matches the first sample data within a predetermined range including a second position in the second binary data that corresponds to a first position that is a position of the first sample data in the first binary data, A difference between a first ratio, which is a ratio of the data length from the beginning of the first binary data to the first position, to the data length of the first binary data, and a second ratio, which is a ratio of the data length from the beginning of the second binary data to the second position, to the data length of the second binary data, is equal to or smaller than a predetermined difference. Data processing program.

Citation Information

Patent Citations

  • Data processing method and device

    CN116932149A

  • Module update detection program, module update detection method and module update detection device

    JP2011141702A

  • Similarity evaluating device, similarity evaluating system, similarity evaluating method, and similarity evaluating program

    JP2018067126A

  • Similarity hashing of binary file feature sets for clustering and malicious detection

    US20240259183A1

  • File comparator

    JP1994012300A