CN110292775B - Method and device for acquiring difference data - Google Patents

Method and device for acquiring difference data Download PDF

Info

Publication number
CN110292775B
CN110292775B CN201910585963.5A CN201910585963A CN110292775B CN 110292775 B CN110292775 B CN 110292775B CN 201910585963 A CN201910585963 A CN 201910585963A CN 110292775 B CN110292775 B CN 110292775B
Authority
CN
China
Prior art keywords
version
difference data
data
difference
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910585963.5A
Other languages
Chinese (zh)
Other versions
CN110292775A (en
Inventor
胡秋扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910585963.5A priority Critical patent/CN110292775B/en
Publication of CN110292775A publication Critical patent/CN110292775A/en
Application granted granted Critical
Publication of CN110292775B publication Critical patent/CN110292775B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6009Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content

Abstract

The invention discloses a method and a device for acquiring difference data. Wherein, the method comprises the following steps: acquiring a query request from a client, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version; acquiring the difference data from a preset storage area according to the query request; and returning the difference data to the client. The invention solves the technical problems that the table change viewing platform in the prior art has high computing resources occupied by acquiring the difference data among a plurality of table files and low acquisition efficiency.

Description

Method and device for acquiring difference data
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for acquiring difference data.
Background
In the process of developing the game project, along with the improvement of the playing method of the game system, the planning table data in the planning work can be increased and changed more and more frequently, and the regression test performed on the planning table data modification every time obviously brings huge workload. In addition, the planned table file belongs to a binary file, and is different from the text format of a code file, and the diff algorithm function of the version control tool SVN server cannot well support the check of table change.
The prior art plan table change viewing platform cannot effectively acquire the table change content of the plan table data, and mainly has the following technical problems: 1. in the existing scheme, the data of the planning table needs to be stored, if the planning table has more files, large data volume and frequent modification and submission, more memory resources are occupied, and the performance of the server is required to be higher; 2. when the data volume in the planning table is large, the efficiency of the Diff algorithm is reduced, the table change content can be obtained only after long time waiting is carried out on a web interface or an SDK window, and the user experience is poor; 3. different users need to go through a plurality of waiting processes for checking; 4. when different plans in the same project group are designed with different playing methods, the same form may be modified, and when testers corresponding to the different playing methods check specified two historical version (multi-version-spanning) changes submitted by the following planning personnel, the multi-version changes include the modification of a plurality of plans, and independent differentiation cannot be realized.
Aiming at the problems that the table change viewing platform in the prior art is high in computing resource occupied by obtaining difference data among a plurality of table files and low in obtaining efficiency, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for acquiring difference data, which are used for at least solving the technical problems that a form change viewing platform in the prior art is high in calculation resource occupied by acquiring difference data among a plurality of form files and low in acquisition efficiency.
According to an aspect of an embodiment of the present invention, there is provided a method for acquiring difference data, including: acquiring a query request from a client, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version; acquiring the difference data from a preset storage area according to the query request; and returning the difference data to the client.
In an optional embodiment, before obtaining the difference data from the preset storage area according to the query request, the method further includes: pulling the SVN submission record from the version control tool SVN server; acquiring the first version and the second version from the SVN server according to the SVN submission record; performing difference calculation on the first version and the second version to obtain the difference data; and storing the difference data into the preset storage area.
In an alternative embodiment, the difference data comprises: a first portion and a second portion; the first part includes: a change flag for each data unit in the target data file, a file name corresponding to each data unit, and a version number before and after each data unit is changed, wherein the change flag is used for classifying the target data file according to a change operation type of each data unit; the second part includes: description information corresponding to each data unit.
In an optional embodiment, the difference data is stored in the preset storage area by using a dictionary structure, where the dictionary structure includes: and the key value pair is composed of a change position mark and values before and after change.
In an alternative embodiment, the first version is a previous version adjacent to the second version, and returning the difference data to the client includes: and directly returning the difference data to the client.
In an optional embodiment, there are multiple versions between the first version and the second version, and returning the difference data to the client includes: performing data fusion processing on the difference subdata between every two adjacent versions between the first version and the second version to obtain the difference data; and returning the difference data to the client.
In an optional embodiment, performing data fusion processing on the difference sub-data between every two adjacent versions between the first version and the second version to obtain the difference data includes: sequencing all versions from the first version to the second version in an ascending order to obtain a sequencing result; and sequentially superposing the difference subdata between every two adjacent versions according to the sequencing result to obtain the difference data.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for acquiring difference data, including: a first obtaining module, configured to obtain a query request from a client, where the query request is used to query difference data of a target data file from a first version to a second version, and the second version is later than the first version; a second obtaining module, configured to obtain the difference data from a preset storage area according to the query request; and the return module is used for returning the difference data to the client.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute any one of the above methods for acquiring difference data.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes any one of the above methods for acquiring difference data.
In the embodiment of the present invention, a query request from a client is obtained, where the query request is used to query difference data of a target data file from a first version to a second version, and the second version is later than the first version; acquiring the difference data from a preset storage area according to the query request; the difference data are returned to the client, so that the purposes of reducing the computing resources occupied by storing the form files and reducing the time for acquiring the difference data are achieved, the technical effect of improving the efficiency of acquiring the difference data by the client is achieved, and the technical problems that the form change checking platform in the prior art is high in computing resources occupied by acquiring the difference data among a plurality of form files and low in acquisition efficiency are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of obtaining difference data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative method for obtaining difference data according to an embodiment of the present invention; and
fig. 3 is a schematic structural diagram of an apparatus for acquiring difference data according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, in order to facilitate understanding of the embodiments of the present invention, some terms or nouns referred to in the present invention will be explained as follows:
JSON (JavaScript Object Notification) is a lightweight data exchange format based on JavaScript language.
Version control tool (Subversion, SVN): the system is an open source code version control system, and compared with RCS and CVS, the SVN adopts a branch management system.
Software Development Kit (SDK): generally refers to the collection of development tools used by some software engineers to build application software for a particular software package, software framework, hardware platform, operating system, etc.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method of obtaining difference data, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a method for acquiring difference data according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, obtaining a query request from a client, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version;
step S104, acquiring the difference data from a preset storage area according to the query request;
and step S106, returning the difference data to the client.
Optionally, the query request is used to query difference data of a target data file from a first version to a second version, where the first version is the target data file of the first version (for example, a table file: a planned table file); the second version refers to a second version of the target data file.
The second version is later than the first version, and the first version and the second version can be but are not limited to adjacent versions; for example, if the second version is the latest version, the first version may be a previous version of the latest version; the first version and the second version may have a plurality of versions therebetween, and for example, if the second version is the latest version, the first version may be any version before the latest version.
Optionally, the preset storage area may be a preset database, or a storage area preset in the database.
In an alternative embodiment, the difference data comprises: a first portion and a second portion; the first part includes: a change flag for each data unit in the target data file, a file name corresponding to each data unit, and a version number before and after each data unit is changed, wherein the change flag is used for classifying the target data file according to a change operation type of each data unit; the second part includes: description information corresponding to each data unit.
It should be noted that, in the embodiment of the method for obtaining difference data provided by the present application, in order to avoid storing a large amount of table data and repeatedly calculating the table change content (i.e., difference data) between different tables, in consideration of the fact that the data amount of the difference data of each change of a table file is much smaller than the data amount of the whole table file of two versions, in the embodiment of the present application, the table change viewing platform does not store the table file, but directly performs format processing and storage on the difference data obtained by each calculation of the difference lookup algorithm Diff algorithm, and when different users obtain the difference data through a client and view the difference data, the difference data is directly obtained from the storage database and rendered at the front end, so that the efficiency of obtaining the difference data by the client is improved.
By the embodiment of the application, on the basis of reducing the waiting time of the user, the storage of a large amount of form file data can be effectively reduced, and the repeated calculation of form change contents and the repeated waiting of different users are avoided; moreover, as shown in fig. 2, different planners may submit a plurality of target data files (for example, form files) to the SVN server, and when a user views one or more form files modified by different planners in turn, the user may obtain difference data of a plurality of (more than two) versions and a plurality of files at one time by screening a plurality of versions of form files submitted by the target planners.
In the embodiment of the invention, a query request from a client is obtained, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version; acquiring the difference data from a preset storage area according to the query request; the difference data are returned to the client, so that the purposes of reducing the computing resources occupied by storing the form files and reducing the time for acquiring the difference data are achieved, the technical effect of improving the efficiency of acquiring the difference data by the client is achieved, and the technical problems that the form change checking platform in the prior art is high in computing resources occupied by acquiring the difference data among a plurality of form files and low in acquisition efficiency are solved.
In an optional embodiment, before obtaining the difference data from the preset storage area according to the query request, the method further includes:
step S202, pulling an SVN submission record from an SVN server of a version control tool;
step S204, acquiring the first version and the second version from the SVN server according to the SVN submission record;
step S206, calculating the difference between the first version and the second version to obtain the difference data;
step S208, storing the difference data in the preset storage area.
It should be noted that, because the frequency of submitting records by the SVN in the project development is high, especially for a large project with cooperation of multiple persons, the frequency of the timed pull task for pulling the records submitted by the SVN from the SVN server of the version control tool also needs to be set high correspondingly to meet the requirement that the project group obtains the difference data in real time.
Moreover, since the timing pull task needs to perform a series of time-consuming tasks: the method comprises the steps of pulling an SVN submission record, obtaining a target data file and calculating difference data of the target data file from a first version to a second version, wherein if the timing pulling task frequency for pulling the SVN submission record is set to be too high, the calculation pressure and IO pressure of a version control tool SVN server end are large, and particularly the problems that the time for waiting for SVN server response is long, the data quantity of individual table files is large, the time consumption of Diff algorithm calculation is long and the like can exist in obtaining the target data file.
Therefore, in an alternative embodiment of the present application, as shown in fig. 2, a timed pull task is set at the SVN server to pull the SVN submission record, since the SVN server stores the first version and the second version of the target data file, a Diff algorithm may be used to obtain the first version and the second version from the SVN server according to the SVN submission record, and perform a difference calculation on the first version and the second version to obtain the difference data, and store the difference data in a preset storage area, so that the difference data may be returned to the client when receiving a query request from the client.
In the embodiment of the application, a timing pull task based on a cell distributed task queue is realized at a version control tool SVN server, and the timing pull task is split, for example: and pulling the SVN submitting records from the SVN server every five minutes, and regularly acquiring a target data file, calculating difference data and storing the obtained difference data two minutes after the timing pulling task starts.
Through the embodiment of the application, the requirement for real-time pulling of the SVN submission records is met, and the starting time of the timing pulling task can be staggered, so that the calculation pressure and the IO pressure of the SVN server side in the timing pulling task are effectively balanced.
In an optional embodiment, the difference data is stored in the preset storage area by using a dictionary structure, where the dictionary structure includes: and key value pairs consisting of the change position marks and the values before and after the change.
In order to store the difference data in the database conveniently, the difference data can be processed into a JSON format and stored into a middle character string media field, a dictionary structure is adopted to store the difference data into the database, the difference data and the dictionary format can be conveniently converted with each other, and then the difference data is correspondingly stored or calculated.
Because the excel form file comprises a plurality of sub-tables, and the Diff algorithm reads the sub-table data and calculates the corresponding difference data in sequence, the difference data of the whole form file can be processed into two parts: and the key value pair is composed of a change position mark and values before and after change.
The change position indicator may include: the change marks of all the sub-tables of the table file classify all the sub-table names in the table file into an added list, a modified list, a deleted list and an unchanged list respectively, and simultaneously record the changed file names and the SVN version numbers before and after the change corresponding to the difference data; the numerical value before and after the change is the detailed content of the change according to each sub-table in the list order in the change position mark, and comprises at least one of the following: changing the file name, changing the name of the sub-table, changing all column names of the sub-table, marking each column as addition, modification, deletion or unchanged according to the row and column to which the difference data belongs, recording the changed line data as a dictionary format and classifying the changed line data into a corresponding addition list, modification list or deletion list.
In an alternative embodiment, the dictionary structure is used as a basis for subsequent difference data fusion by storing the change position identifier and the values before and after the change in the dictionary structure according to a fixed key value pair. In addition, since a certain submission of a file may be compared with a plurality of different historical versions, a dictionary structure with the same format as described above is generated by comparing with each historical version, and on the basis, the historical version number of the Diff algorithm comparison may be added as a key, and the dictionary content is used as a value to form a new dictionary structure capable of storing difference data of a plurality of different historical versions.
Taking the above form file as an example of the bonus data table, the file size of the bonus data table is 5.22MB, the storage of the whole bonus data table in the database occupies 2.82MB, the number of submissions of the bonus data table in one week is 19, and if all form files are stored, 53.58MB is needed, but the storage of the difference data of 19 submissions only needs 0.57MB, which is only 1% of the storage space of the existing scheme for storing all form files.
By the embodiment of the application, the technical effect of reducing the resources of the locally stored table data of the SVN server or the table change viewing platform can be achieved, and the purpose of effectively reducing the requirements of the table change viewing platform on the hardware storage condition and performance can be achieved.
In an alternative embodiment, the first version is a previous version adjacent to the second version, and returning the difference data to the client includes: step S1061, directly returning the difference data to the client.
In the above optional embodiment, when the first version is a previous version adjacent to the second version, there is no other version between the first version and the second version, and the difference data between the first version and the second version is uniquely determined, the difference data between the first version and the second version may be directly returned to the client.
In an alternative embodiment, there are multiple versions between the first version and the second version, and returning the difference data to the client includes:
step S1063, performing data fusion processing on the difference subdata between every two adjacent versions between the first version and the second version to obtain the difference data;
step S1065, returning the difference data to the client.
In the above optional embodiment, when there are multiple versions between the first version and the second version, one or more other versions exist between the first version and the second version, and difference data between the first version and the second version is not uniquely determined, the difference sub data between every two adjacent versions between the first version and the second version may be subjected to data fusion processing, and the difference data obtained through the fusion processing may be returned to the client.
In an optional embodiment of the present application, the change information of the form file may include, but is not limited to, change categories and detailed difference data of each sub-form, and after the change information is obtained, the form names of the sub-forms may be rendered into different styles for distinguishing; the embodiment of the application can also display all column names of the sub-table at the front end, perform rendering in different styles according to the change types of the columns, and perform comparative display according to the specific change values of the change rows.
Taking the form file as a prop data form with a large data volume as an example, a user submits a request for acquiring the difference data at the same time, the waiting time of the user is 8.19s from the time the user submits the request to the time the difference data is displayed at the front end, but only 0.21s is needed after the difference data is stored by using a background task and a database, the waiting time of the user can be greatly reduced by the embodiment of the application, and other users only need to wait for 0.21s to check the same difference data, so that the waiting time is shortened by 97%.
By the embodiment of the application, when a user acquires the difference data of the table files of multiple versions, the SVN server side can read the designated table files and the difference data among the table files of multiple versions from the database and perform data fusion processing, render the data fusion result at the front end, and greatly improve the efficiency of acquiring the difference data compared with the multiple Diff algorithm calculation of the files.
In an optional embodiment, performing data fusion processing on the difference sub-data between every two adjacent versions between the first version and the second version to obtain the difference data includes:
step S302, sequencing all versions from the first version to the second version in an ascending order to obtain a sequencing result;
and step S304, sequentially superposing the difference subdata between every two adjacent versions according to the sequencing result to obtain the difference data.
In the embodiment of the present application, the difference data generated by each SVN submission record is organized into a corresponding dictionary format, and when a SVN submission record contains a plurality of versions of form files, only the difference sub-data between every two adjacent versions between the first version and the second version needs to be subjected to data fusion processing, and a new dictionary structure is formed by using the name of the form file as a key and the difference data dictionary of each corresponding form file as a value.
When the client needs to obtain the difference data of the multiple versions of the same table file, the difference data of the multiple versions of the same file can be read by taking the version number of the table file as a key, and the difference subdata between every two adjacent versions between the first version and the second version is subjected to data fusion processing. The logic of the data fusion processing may be to sort all versions included from the first version to the second version in an ascending order to obtain a sorting result, and sequentially superimpose the difference subdata between every two adjacent versions according to the sorting result to obtain the difference data.
Specifically, two added, modified, deleted and unchanged form sheet lists in the difference data dictionary with the same data format are fused to generate a new form sheet classification list, and row values added, modified and deleted in the changed form sheet are subjected to data fusion processing, for example, the same numerical value is added first and then deleted, and then the row values are deleted from the added list. Because the differential data is in a designed format, only lists need to be processed during data fusion processing, compared with the differential data calculated by a Diff algorithm, the efficiency is higher, and cross-version change checking can be really realized, namely, only the differential data among a plurality of specified versions are checked in a form file modified by a plurality of planning personnel in turn.
In an optional embodiment, when a user queries difference data among multiple versions, taking a prop data table submitting versions for three times in succession as an example, if 9.43s of waiting is calculated by a Diff algorithm again, according to the scheme for acquiring difference data provided by the application, the difference data of the multiple versions can be acquired only in 0.54s, so that the waiting time of the user can be greatly shortened, a function of skipping over the difference data modified by a specified version is provided for the user, and the efficiency and the accuracy of acquiring the difference data are improved.
In an optional embodiment, when a user queries difference data among multiple versions, taking a general table combat unit value table as an example, if two planners modify the general table combat unit value table in turn, when the user wants to check the change content of the planners W on the table, a manual scheme needs to check the change content of the multiple versions, and then manually combines the change content of the multiple versions according to the change content of the multiple parts to obtain final difference data, the whole process is subjected to three Diff algorithm calculations and manual calculation processes, and the expected time consumption exceeds 1min; moreover, when the content of the change is large and the change is repeated, the manual comparison is easy to miss or error.
Different from the prior art, by the scheme for acquiring the difference data provided by the embodiment of the application, the accurately merged difference data submitted for multiple times can be checked within 0.57s, and the efficiency of acquiring the difference data can be greatly improved.
Example 2
According to an embodiment of the present invention, there is also provided an embodiment of an apparatus for implementing the method for acquiring difference data, fig. 3 is a schematic structural diagram of an apparatus for acquiring difference data according to an embodiment of the present invention, and as shown in fig. 3, the apparatus for acquiring difference data includes: a first acquisition module 30, a second acquisition module 32, and a return module 34, wherein:
a first obtaining module 30, configured to obtain a query request from a client, where the query request is used to query difference data of a target data file from a first version to a second version, and the second version is later than the first version; a second obtaining module 32, configured to obtain the difference data from a preset storage area according to the query request; a returning module 34, configured to return the difference data to the client.
It should be noted that the above modules may be implemented by software or hardware, for example, for the latter, the following may be implemented: the modules can be located in the same processor; alternatively, the modules may be located in different processors in any combination.
It should be noted here that the first acquiring module 30, the second acquiring module 32 and the returning module 34 correspond to steps S102 to S106 in embodiment 1, and the modules are the same as the corresponding steps in implementation examples and application scenarios, but are not limited to the disclosure in embodiment 1. It should be noted that the modules described above may be implemented in a computer terminal as part of an apparatus.
It should be noted that, reference may be made to the relevant description in embodiment 1 for alternative or preferred embodiments of this embodiment, and details are not described here again.
The apparatus for acquiring difference data may further include a processor and a memory, where the first acquiring module 30, the second acquiring module 32, the returning module 34, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls a corresponding program unit from the memory, wherein one or more than one kernel can be arranged. The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
According to the embodiment of the application, the embodiment of the storage medium is also provided. Optionally, in this embodiment, the storage medium includes a stored program, and the apparatus on which the storage medium is located is controlled to execute any one of the above methods for acquiring difference data when the program runs.
Optionally, in this embodiment, the storage medium may be located in any one of a group of computer terminals in a computer network, or in any one of a group of mobile terminals, and the storage medium includes a stored program.
Optionally, the program controls the device on which the storage medium is located to perform the following functions when running: acquiring a query request from a client, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version; acquiring the difference data from a preset storage area according to the query request; and returning the difference data to the client.
Optionally, the program controls the device on which the storage medium is located to perform the following functions when running: pulling an SVN submission record from an SVN server; acquiring the first version and the second version from the SVN server according to the SVN submission record; performing difference calculation on the first version and the second version to obtain the difference data; and storing the difference data into the preset storage area.
Optionally, the program controls the device on which the storage medium is located to perform the following functions when running: and directly returning the difference data to the client.
Optionally, the program controls the device on which the storage medium is located to perform the following functions when running: performing data fusion processing on the difference subdata between every two adjacent versions between the first version and the second version to obtain the difference data; and returning the difference data to the client.
Optionally, the program controls the device on which the storage medium is located to perform the following functions when running: sequencing all versions from the first version to the second version in an ascending order to obtain a sequencing result; and sequentially superposing the difference subdata between every two adjacent versions according to the sequencing result to obtain the difference data.
According to the embodiment of the application, the embodiment of the processor is also provided. Optionally, in this embodiment, the processor is configured to execute a program, where the program executes any one of the above methods for acquiring difference data.
The embodiment of the application provides equipment, the equipment comprises a processor, a memory and a program which is stored on the memory and can run on the processor, and the following steps are realized when the processor executes the program: acquiring a query request from a client, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version; acquiring the difference data from a preset storage area according to the query request; and returning the difference data to the client.
Optionally, when the processor executes the program, the processor may further pull the SVN submission record from the SVN server; acquiring the first version and the second version from the SVN server according to the SVN submission record; performing difference calculation on the first version and the second version to obtain the difference data; and storing the difference data into the preset storage area.
Optionally, when the processor executes a program, the processor may directly return the difference data to the client.
Optionally, when the processor executes a program, data fusion processing may be performed on the difference sub-data between every two adjacent versions between the first version and the second version to obtain the difference data; and returning the difference data to the client.
Optionally, when the processor executes a program, all versions included in the first version to the second version may be sorted in an ascending order to obtain a sorting result; and sequentially superposing the difference subdata between every two adjacent versions according to the sequencing result to obtain the difference data.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a query request from a client, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version; acquiring the difference data from a preset storage area according to the query request; and returning the difference data to the client.
Optionally, when the computer program product executes a program, the SVN submission record may be pulled from the SVN server of the version control tool; acquiring the first version and the second version from the SVN server according to the SVN submission record; performing difference calculation on the first version and the second version to obtain the difference data; and storing the difference data into the preset storage area.
Optionally, when the computer program product executes a program, the difference data may be directly returned to the client.
Optionally, when the computer program product executes a program, data fusion processing may be performed on the difference sub-data between every two adjacent versions between the first version and the second version to obtain the difference data; and returning the difference data to the client.
Optionally, when the computer program product executes a program, all versions included in the first version to the second version may be sorted in an ascending order to obtain a sorting result; and sequentially superposing the difference subdata between every two adjacent versions according to the sequencing result to obtain the difference data.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (9)

1. A method of obtaining difference data, comprising:
acquiring a query request from a client, wherein the query request is used for querying difference data of a target data file from a first version to a second version, and the second version is later than the first version;
acquiring the difference data from a preset storage area according to the query request;
returning the difference data to the client;
wherein the difference data comprises: a first portion and a second portion; the first portion includes: the target data file comprises a change mark of each data unit, a file name corresponding to each data unit and a version number before and after change of each data unit, wherein the change mark is used for classifying the target data file according to the change operation type of each data unit; the second portion includes: description information corresponding to each data unit.
2. The method according to claim 1, wherein before the obtaining the difference data from the preset storage area according to the query request, the method further comprises:
pulling the SVN submission record from the version control tool SVN server;
acquiring the first version and the second version from the SVN server according to the SVN submission record;
performing difference calculation on the first version and the second version to obtain difference data;
and storing the difference data into the preset storage area.
3. The method according to claim 1 or 2, wherein the difference data is stored in the preset storage area using a dictionary structure, wherein the dictionary structure comprises: and the key value pair is composed of a change position mark and values before and after change.
4. The method of claim 1, wherein the first version is a previous version adjacent to the second version, and wherein returning the difference data to the client comprises:
and directly returning the difference data to the client.
5. The method of claim 1, wherein there are multiple versions between the first version and the second version, and wherein returning the difference data to the client comprises:
performing data fusion processing on the difference subdata between every two adjacent versions between the first version and the second version to obtain the difference data;
returning the difference data to the client.
6. The method of claim 5, wherein performing data fusion processing on the difference sub-data between every two adjacent versions between the first version and the second version to obtain the difference data comprises:
sequencing all versions from the first version to the second version in an ascending order to obtain a sequencing result;
and sequentially overlapping the difference subdata between every two adjacent versions according to the sequencing result to obtain the difference data.
7. An apparatus for obtaining difference data, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a query request from a client, the query request is used for querying the difference data of a target data file from a first version to a second version, and the second version is later than the first version;
the second acquisition module is used for acquiring the difference data from a preset storage area according to the query request;
a return module for returning the difference data to the client;
wherein the difference data comprises: a first portion and a second portion; the first portion includes: the target data file comprises a change mark of each data unit, a file name corresponding to each data unit and a version number before and after change of each data unit, wherein the change mark is used for classifying the target data file according to the change operation type of each data unit; the second portion includes: description information corresponding to each data unit.
8. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device where the storage medium is located is controlled to execute the method for acquiring difference data according to any one of claims 1 to 6.
9. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the method of obtaining difference data according to any one of claims 1 to 6 when running.
CN201910585963.5A 2019-07-01 2019-07-01 Method and device for acquiring difference data Active CN110292775B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910585963.5A CN110292775B (en) 2019-07-01 2019-07-01 Method and device for acquiring difference data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910585963.5A CN110292775B (en) 2019-07-01 2019-07-01 Method and device for acquiring difference data

Publications (2)

Publication Number Publication Date
CN110292775A CN110292775A (en) 2019-10-01
CN110292775B true CN110292775B (en) 2023-03-24

Family

ID=68029734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910585963.5A Active CN110292775B (en) 2019-07-01 2019-07-01 Method and device for acquiring difference data

Country Status (1)

Country Link
CN (1) CN110292775B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765145B (en) * 2019-10-15 2022-08-09 益萃网络科技(中国)有限公司 Content item transmission method, device, equipment and storage medium
CN111177302B (en) * 2019-12-16 2024-02-13 金蝶软件(中国)有限公司 Service bill processing method, device, computer equipment and storage medium
CN111813412B (en) * 2020-06-28 2023-03-24 中国科学院计算机网络信息中心 Method and system for constructing test data set for evaluating binary code comparison tool
CN111858679A (en) * 2020-07-29 2020-10-30 武汉修齐科技有限公司 Data caching method, caching system and query method
CN112287028A (en) * 2020-10-30 2021-01-29 完美世界(重庆)互动科技有限公司 Data synchronization method and device, storage medium and computing equipment
CN112579611B (en) * 2020-12-29 2024-03-19 珠海金山数字网络科技有限公司 Data processing method and device
CN112965952B (en) * 2021-02-09 2024-02-27 中国工商银行股份有限公司 Data asset processing method and device
CN113704257B (en) * 2021-08-06 2023-09-26 网易(杭州)网络有限公司 Data table updating method and device
CN113918209B (en) * 2021-12-16 2022-04-15 深圳市明源云科技有限公司 Method and device for generating upgrade list and readable storage medium
CN113934644B (en) * 2021-12-16 2022-04-15 深圳市明源云链互联网科技有限公司 Version difference comparison method and device, intelligent terminal and readable storage medium
CN115086345A (en) * 2022-05-13 2022-09-20 北京百度网讯科技有限公司 File synchronization method and device, electronic equipment and readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160301763A1 (en) * 2013-12-30 2016-10-13 Uc Mobile Co., Ltd. Network data transmission method, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547698A (en) * 2016-11-30 2017-03-29 网易(杭州)网络有限公司 The processing method of coverage data, device and server
CN106681725A (en) * 2016-12-29 2017-05-17 广州华多网络科技有限公司 Code quantity statistical method and device
CN108108425A (en) * 2017-12-18 2018-06-01 苏州蜗牛数字科技股份有限公司 Text-processing comparative approach and device
CN109325058B (en) * 2018-09-03 2023-09-01 中国平安人寿保险股份有限公司 Rule batch comparison method, device, computer equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160301763A1 (en) * 2013-12-30 2016-10-13 Uc Mobile Co., Ltd. Network data transmission method, device and system

Also Published As

Publication number Publication date
CN110292775A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
CN110292775B (en) Method and device for acquiring difference data
EP4006740A1 (en) Method for indexing data in storage engines, and related device
CN111126019B (en) Report generation method and device based on mode customization and electronic equipment
CN110263009A (en) Generation method, device, equipment and the readable storage medium storing program for executing of log classifying rules
CN106484699B (en) Method and device for generating database query field
CN112883042A (en) Data updating and displaying method and device, electronic equipment and storage medium
CN106844320B (en) Financial statement integration method and equipment
CN113326314B (en) Data visualization method, device, electronic equipment and readable storage medium
CN111552704A (en) Data report generation method and device, computer equipment and storage medium
CN106294128B (en) A kind of automated testing method and device exporting report data
CN101976394A (en) Data acquiring and counting system and method
CN105095436A (en) Automatic modeling method for data of data sources
CN111414410A (en) Data processing method, device, equipment and storage medium
CN113434482A (en) Data migration method and device, computer equipment and storage medium
CN111177220B (en) Data analysis method, device and equipment based on big data and readable storage medium
CN110737432A (en) script aided design method and device based on root list
WO2019080419A1 (en) Method for building standard knowledge base, electronic device, and storage medium
TWI684147B (en) Cloud self-service analysis platform and analysis method thereof
CN108427675A (en) Build the method and apparatus of index
JP5206268B2 (en) Rule creation program, rule creation method and rule creation device
US10824803B2 (en) System and method for logical identification of differences between spreadsheets
CN111369294B (en) Software cost estimation method and device
CN114022188A (en) Target crowd circling method, device, equipment and storage medium
CN106776704A (en) Statistical information collection method and device
CN113806336A (en) Data quality evaluation method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant