Data processing method and device, electronic equipment and readable storage medium
Patent Information
- Application Number
- CN202410579752.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2024-09-10
Smart Images

Figure CN118627490A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, a data processing device, an electronic device, and a computer-readable storage medium. Background Art
[0002] In the current project development process, the project development management can be carried out through the version control system, where the project files that need to be managed include table files, resource files, code files, etc.
[0003] Excel has been widely used due to its powerful spreadsheet functions (such as complex calculations, chart creation, and support for macro operations, etc.). However, due to the limited support of version control systems for Excel spreadsheet files, in many cases, project developers are required not to use the Excel spreadsheet format, but to use spreadsheets in other formats such as csv and tsv for development. However, this makes it very inconvenient to handle spreadsheet files.
[0004] In the prior art, when a version control system performs a difference comparison on two Excel spreadsheet files, it is generally necessary to install additional plug-ins such as Spreadsheet Compare and Beyond Compare to view content modifications in the Excel spreadsheet files and then perform a manual difference comparison. Therefore, the operation of the version control system for performing a difference comparison on Excel spreadsheet files is complicated, and the error rate of manual comparison is high. Summary of the invention
[0005] The present disclosure provides a data processing method, a data processing device, an electronic device, and a computer-readable storage medium to solve or at least partially solve the above-mentioned problems, as follows.
[0006] In a first aspect, the present disclosure provides a data processing method, which is applied to a network server in a project management system, wherein the project management system further comprises a network client connected to the network server in communication, and the network server is further connected to a version management system for managing project files in communication, wherein the method comprises:
[0007] Obtaining a version management log of a project from the version management system;
[0008] If it is detected in the version management log that there is content submitted by a table file in the current project version of the project indicating that the development branch of the project has content submitted by a table file, obtaining the current table version of the table file and the previous historical table version of the current table version of the table file from the version management system;
[0009] Comparing the row data in the current table version with the row data in the previous historical table version to obtain the row data in which there are differences between the current table version and the previous historical table version;
[0010] Generate table change information of the table file in the current project version of the project according to the row data with differences.
[0011] In a second aspect, the present disclosure further provides a data processing device, which is applied to a network server in a project management system, wherein the project management system further includes a network client connected to the network server, and the network server is further connected to a version management system for managing project files, wherein the device includes:
[0012] A log acquisition module, used to acquire the version management log of the project from the version management system;
[0013] A table version acquisition module, configured to acquire the current table version of the table file and the previous historical table version of the current table version of the table file from the version management system if it is detected in the version management log that there is content submitted by a table file in the current project version of the project indicating that the development branch of the project has submitted content in the table file in the current project version of the project;
[0014] A difference comparison module, used for comparing the row data in the current table version and the previous historical table version, and obtaining the row data in which there are differences between the current table version and the previous historical table version;
[0015] A change information generating module is used to generate table change information of the table file in the current project version of the project according to the row data with differences.
[0016] In a third aspect, the present disclosure further provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor;
[0017] When the processor executes the computer program instructions, the data processing method described in the first aspect above is implemented.
[0018] In a fourth aspect, the present disclosure further provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed by a processor, they are used to implement the data processing method described in the first aspect above.
[0019] The exemplary embodiments of the present disclosure have the following beneficial effects:
[0020] In the data processing method provided by the present invention, the network server first obtains the version management log of the project from the version management system. If the network server detects in the version management log that there is content in the table file submitted by the development branch of the project in the current project version of the project, the current table file version of the table file and the previous historical table file version of the current table file version of the table file are obtained from the version management system; then the network server compares the row data in the current table file version and the previous historical table file version of the table file locally, and obtains the row data in the current table file version and the previous historical table file version of the table file that differ; and generates table change information of the table file in the current project version of the project based on the row data with differences.
[0021] In the present disclosure, when the network server detects in the version management log of the version management system that a table file has been submitted in a project version of the project, the current table file version and the previous historical table file version of the table file can be exported to the version management system, so that the network server can compare the table differences in units of lines and generate table change information. In this way, the table change information can be obtained without manual comparison of table differences, which reduces the operational difficulty of table difference comparison and reduces the error rate of table difference comparison. In addition, the table change information records the changes between the previous and next table file versions and can be used for retrieval queries. Therefore, the table change information can be used as the basis for realizing the branch table merging function of the project and the search function for the modification history of a specific row in the table, so as to solve the problem that the commands provided by the version control system cannot realize the branch table merging and search for the modification history of a specific row in the table. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is an architecture diagram of a data processing method provided in one embodiment of the present disclosure;
[0023] Figure 2 is a flow chart of a data processing method provided by one of the embodiments of the present disclosure;
[0024] Figure 3 It is a schematic diagram of an interface of a network client provided by one of the embodiments of the present disclosure;
[0025] Figure 4 It is a schematic diagram of an interface of a network client provided by one of the embodiments of the present disclosure;
[0026] Figure 5 It is a schematic diagram of an interface of a network client provided by one of the embodiments of the present disclosure;
[0027] Figure 6 It is a schematic diagram of an interface of a network client provided by one of the embodiments of the present disclosure;
[0028] Figure 7 It is a schematic diagram of an interface of a network client provided by one of the embodiments of the present disclosure;
[0029] Figure 8 is a block diagram of a data processing device provided by one of the embodiments of the present disclosure;
[0030] Fig. 9 It is a logical structure diagram of an electronic device for implementing data processing provided by one of the embodiments of the present disclosure. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present disclosure.
[0032] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0033] It should be understood that in the embodiments of the present disclosure, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.
[0034] It should be understood that in the embodiments of the present disclosure, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean that B is determined only according to A, and B can also be determined according to A and / or other information.
[0035] Before describing the embodiments of the present disclosure in detail, related concepts are first introduced and the prior art is further described.
[0036] 1. Introduction to related concepts
[0037] 1. Version and version number: A version can be understood as a new form of existence of a file that is formed after a file changes during circulation. For example, the addition, deletion, modification and query of the file content will form different versions of the file. Each version will have a unique identifier, which is the version number. For example, a game application may be released in version 1.0, 2.0 or 3.0. The functions of each version of the application may be different. For example, version 1.0 of the game application is a free version, version 2.0 of the game application is a paid version, and version 3.0 of the game application is a holiday version. 1.0, 2.0 or 3.0 are the version numbers corresponding to each version.
[0038] 2. Version Control System (VCS): A software used to track file changes. Every time a file is changed, the file version number will increase. At the same time, it can record the file change time, change content, or change personnel information, effectively solving the version synchronization and development communication problems between different developers, and improving the efficiency of collaborative development. For example, SVN (Subversion) centralized version control system and Git distributed version control system.
[0039] A version control system may include a client and a server. For example, an SVN centralized version control system may include an SVN server for storing and managing project resources, and an SVN client for user operations. Users may submit, update, or pull project resources through the SVN client, and the SVN client may be, for example, TortoiseSVN. In one embodiment of the present disclosure, the version management system in the present disclosure may correspond to the server in the version control system. In an SVN centralized version control system, each submission generates a unique version number, which is global and increments for all files and directories.
[0040] It should be noted that the users in the subsequent embodiments or the accompanying drawings can be understood as operators such as developers or testers who perform project version management.
[0041] 3. Branches and trunks: In the process of project development, there are generally trunks and branches. The so-called trunk, or main line, as the name implies, is used for development in the main direction; branches are another line separated from the trunk and independent of the main line. In a branch management strategy, the code on the trunk is a stable version for release, while the code on the branch is usually used to add new features and fix defects (bug fixes) after the product is released, which can avoid affecting the trunk development process and avoid compilation errors. Multiple branches can be created for a trunk. For example, in the SVN version control system, the trunk can be represented as trunk and the branch can be represented as branches; in actual applications, branches and trunks of the same version control system share a set of version number systems, that is, the version number can locate a specific commit in all branches. Therefore, the version number issued above can be used to obtain the version submission information corresponding to this submission, including which branch it is submitted to, which is the initial file, and which is the modified file.
[0042] 4. svn diff: It is a command of the SVN version control system. It is used to compare the differences between files or directories, and is usually used to view the modified content. The svn diff command will display the differences between the file to be submitted and the last updated or submitted version, including every modified, added or deleted line. However, the svn diff command cannot handle the difference comparison of binary files, such as the submission of Excel spreadsheet files (including spreadsheet files in .xls, .xlsx, .xlsm and other formats). The svn diff command will not be able to process and display the modification details of the file.
[0043] 5. SVN merge: SVN merge is a command in the SVN version control system. It is used to merge part of the SVN code repository (such as changes in a branch) into another part (such as the development trunk or other branches) to integrate and apply the code changes. Merging Excel spreadsheet files is a problem in the SVN version control system, because the SVN version control system is mainly designed for text files (such as code). For text files, the SVN version control system can perform difference comparison and merging very well. However, for binary files, SVN can only identify whether they have changed, but cannot understand the content of these changes. When trying to merge two versions of Excel spreadsheet files, if both versions have changes (that is, conflicts occur), SVN will not try to merge the file contents, but will let people choose which version of the file to use, or manually resolve the conflict. Usually, the merge of modifications is manually processed, such as manually performing the addition, deletion, and modification operations of the corresponding branch on the corresponding table on the target branch).
[0044] 6. svn blame: It is a command in the SVN version control system. Its function is to display the last modification record of each line of the file. The svnblame command is mainly used to process text files, but it does not support binary files such as Excel spreadsheet files. Because the content of binary files such as Excel spreadsheet files is not simple text, the svn version control system cannot identify and compare the differences in their contents. Therefore, the svnblame command cannot be used to find the modification history of a specific line in an Excel spreadsheet file.
[0045] 2. Further description of the prior art
[0046] From the above content, we can see that not only the implementation basis of the svn diff command is diff calculation, that is, difference calculation, but also the implementation basis of the svn merge command and the svnblame command is diff calculation.
[0047] However, in the prior art, the version control system has complex operations for comparing differences in Excel spreadsheet files, and the manual comparison has a high error rate. This further leads to the problems of complex operations and high error rates in merging Excel spreadsheet files in project branches and viewing modification records of Excel spreadsheet files.
[0048] In order to solve or at least partially solve the above problems, the present disclosure provides a data processing method, which is applied to Figure 1 The network server 10 shown is applied in the project management system 100. The project management system 10 also includes a network client 20 which is communicatively connected to the network server 10. The network server 10 is also communicatively connected to a version management system 200 for managing project files.
[0049] Exemplarily, the network server 10 may be a web server, and the network client 20 may be a web client. The web server may serve as a backend to provide online services related to project management, and the web client may serve as a frontend to provide users with an interface related to project management so that users can operate in the interface.
[0050] In an optional embodiment, the network server 10 may be deployed with a corresponding database 30, exemplarily such as a mongo database, which can be used to store data, such as the table change information mentioned below.
[0051] Project files may include binary files (such as table files), resource files, text files (such as code files), etc. The version management system 200 can manage various versions of project files.
[0052] Exemplarily, the network client 20, the network server 10 and the version management system 200 can be connected through a network respectively, and the network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc.
[0053] Figure 2 A flow chart of a data processing method provided by one embodiment of the present disclosure is shown. Figure 2 As shown, the method may include the following steps S101 to S104.
[0054] Step S101: Obtain the version management log of the project from the version management system.
[0055] The operations performed in the version management system can generate corresponding logs for recording, such as submitting branches, backing up files, pulling files, etc., which can generate corresponding logs, namely version management logs.
[0056] In an optional embodiment, the network server in the project management system may periodically obtain the version management log of the project from the version management system. For example, the network server may obtain the version management log of the project from the version management system every 4 hours.
[0057] In an optional embodiment, the version management log includes a submission log. Accordingly, in this step, the network server in the project management system can obtain the submission log of the project from the version management system.
[0058] Step S102: If it is detected in the version management log that the development branch of the indicated project has table file submissions in the current project version of the project, the current table file version of the table file and the previous historical table file version of the current table file version of the table file are obtained from the version management system.
[0059] When submitting a new project version to the version management system for a project, the submitted project version may include files of types such as tables, images, and codes. In an optional embodiment, when obtaining the submission log of the project from the version management system, if the network server detects in the submission log that the development branch branch_1 of the project indicates that there is a table file submitted in the current project version of the project (hereinafter referred to as the table file submitted in the current project version of the project A), then the current table file version A of the table file A can be obtained from the version management system. N , and the current table file version A of table file A N The previous history table file version A N-1. Among them, the current table file version of the table file includes the current table versions of all tables in the table file.
[0060] Among them, the current table file version A N and the previous history table file version A N-1 These are two versions of table file A in the same development branch branch_1.
[0061] In the present disclosure, the network server can store the current table file version A of the table file A. N And the previous history table file version A N-1 Export the version management system to facilitate the comparison of different table file versions locally on the network server.
[0062] Exemplarily, the spreadsheet file may be an Excel spreadsheet file, including files in formats such as .xls, .xlsx, and .xlsm.
[0063] Step S103: Compare the row data in the current table file version with the row data in the previous historical table file version to obtain the row data in which there are differences between the current table file version and the previous historical table file version.
[0064] In an optional embodiment, the table file may include one or more pages, each of which may include a table. Optionally, the page may have the same name as the table in the page. The following Table 1 exemplarily shows the content of one of the tables in a table file, i.e., the "Prop Price" table in the "Prop Price" page of the "Game Prop Table" table file. The data structure of a table is introduced below with reference to Table 1.
[0065] A table usually includes a header part and a data part: as shown in Table 1 below, the first row is the header part, and the second to fourth rows are the data part.
[0066] The table primary key is a unique value that identifies the smallest unit of table data. For example, 2001, 2002, and 2003 in Table 1 below are three table primary keys, and each table primary key corresponds to a game item.
[0067] In this step, you need to compare the current table file version A of table file A. N and the previous history table file version A N-1In an optional embodiment, the minimum unit of comparison can be the row data of the table, that is, the key-value pair consisting of the table primary key and the row data to which it belongs, such as {2001:[2001,'Gold Coin Gift Pack',4,100]}. Each row data of the table is identified by the primary key. In this way, when comparing two table versions of a table, there is no need to ensure that the order of the row data of the two table versions is consistent. For example, if the data content of the two table versions is consistent, but the order of the row data has changed, it will not be recognized as a modification of the table in this step, but it will be recognized as no modification of the table, that is, the content of the two table versions of the table is the same.
[0068] Table 1. Current version of the "Item Price" table
[0069] prop id name Prop quality price 2001 Gold Coin Pack 4 200 2002 Diamond Package 4 200 2003 Props Pack 5 300
[0070] In an optional embodiment, the current table file version A of the table file A can be compared. N and the previous history table file version A N-1 The primary key of the row data and the key value of the primary key in the current table file version A N and the previous history table file version A N-1 The row data with the same primary key but different primary key values (that is, the current table file version A N Compared to the previous history table file version A N-1 Modified row data), in the current table file version A N Exists in the previous history table file version A N-1 The row data does not exist in the current table file version A N Compared to the previous history table file version A N-1 New row data), and in the current table file version A N does not exist in the previous history table file version A N-1 The row data that exists in the table (that is, the current table file version A N Compared to the previous history table file version A N-1 Deleted row data).
[0071] Table 2. Previous historical table version of the "Item Price" table
[0072]
[0073]
[0074] For example, by comparing the row data primary key and the key value of the primary key in the current table version (such as Table 1) of each table in table file A with the previous historical table version (such as Table 2), the current table file version A of table file A can be obtained. N Compared to the previous history table file version A N-1 Modified row data, such as the row data where the primary key 2001 is located, the price of prop 2001 is changed from 100 (see Table 1) to 200 (see Table 2), and the current table file version A of table file A is obtained N Compared to the previous history table file version A N-1 Newly added row data, such as the row data where the primary key 2004 is located, and the current table file version A of table file A N Compared to the previous history table file version A N-1 Deleted row data, such as the row data where the primary key 2003 is located.
[0075] Step S104: Generate table change information of the table file in the current project version of the project according to the row data with differences.
[0076] In an optional embodiment, table change information of the table file in the current project version of the project can be generated based on the primary key of the row data with differences and the row data to which the primary key belongs in the current table file version and the previous historical table file version, that is, at least the primary key of the row data with differences in the table file and the row data to which the primary key belongs in the current table file version and the previous historical table file version are recorded.
[0077] Further, in an optional embodiment, table change information can be stored through two sets, including a row data change record set and a table change record set. The row data change record set is used to store the table file of the project in units of primary keys, where a first mapping relationship exists between the primary key of the row data change in the project version of the project and the row data before and after the modification corresponding to the primary key. Optionally, the row data change record set can also record information such as the project version number and table header corresponding to the first mapping relationship; the table change record set is used to store the table file of the project in units of table files, where a second mapping relationship exists between the primary key of the row data change in the project version of the project and the identifier of the first mapping relationship corresponding to the primary key. Optionally, the table change record set can also record information such as the paging name, table name, modifier, modification log, etc. corresponding to the second mapping relationship.
[0078] Optionally, both the row data change record set and the table change record set can be stored in a database on the network server.
[0079] For example, referring to Table 1 and Table 2 above, compared with the previous historical table file version of the "Game Props Table" (partially shown in Table 2), the current table file version A of the "Game Props Table" is N (Partially see Table 1) The row data where the primary key 2001 is located is modified. Therefore, the primary key 2001 and its respective rows in the previous history table file version A can be modified. N-1 and the current table file version A N The row data {2001: [[2001,'Gold Coin Gift Pack', 4,100], [2001,'Gold Coin Gift Pack', 4,200]]} in the table is stored in the row data change record set. In addition, the version number of the current project version, the header of the "Item Price" table, and other information can also be stored. Optionally, after the data {2001: [[2001,'Gold Coin Gift Pack', 4,100], [2001,'Gold Coin Gift Pack', 4,200]]} is saved to the database, the database can generate a unique data identifier for the data in the database, such as ObjectId("65d5a00923e3").
[0080] In addition, compared to the previous historical table file version A of the "Game Props Table" N-1 (Partially see Table 2), the current table file version A of Table A N (Partially see Table 1) The row data where the primary key 2003 is located is also deleted. Therefore, the primary key 2003 and its respective rows in the previous history table file version A can be N-1 and the current table file version A N The row data {2003: [[2003,'Props Gift Pack',5,300],[]]} is stored in the row data change record set. Note that the primary key 2003 is in the current table file version A. N The row data in is empty. In addition, the version number of the current project version, the header of the "Item Price" table, and other information can be stored at the same time. Optionally, after the data {2003: [[2003,'Item Gift Pack',5,300],[]]} is saved to the database, the database can generate a unique data identifier for the data in the database, such as ObjectId("34806d293a45").
[0081] Furthermore, compared to the previous historical table file version A of the "Game Item Table" N-1 (Partially see Table 2), the current table file version A of Table A N (Partially see Table 1) The row data where the primary key 2004 is located is also added. Therefore, the primary key 2004 and its respective rows in the previous history table file version A N-1 and the current table file version A NThe row data {2004: [[], [2004, 'gem gift package', 6, 360]]} is stored in the row data change record set. Note that the primary key 2004 is in the previous history table file version A. N-1 The row data in is empty. In addition, the version number of the current project version, the header of the "Item Price" table, and other information can be stored at the same time. Optionally, after the data {2004: [[], [2004, 'Gem Gift Pack', 6, 360]]} is saved to the database, the database can generate a unique data identifier for the data in the database, such as ObjectId ("h54f55f4g5sd").
[0082] Exemplarily, for table file A, a primary key list of row data changes in table file A, that is, a primary key list of additions, deletions, and modifications of table file A, may be stored in the table change record set. For example, following the above example, the table file "Game Props Table" includes not only the "Props Price" table in the "Props Price" page, but also the "Weapon Price" table in the "Weapon Price" page, and the row data with weapon id 3005 in the "Weapon Price" table has been modified. Then the addition, deletion and modification primary key list of the "Game Props Table" can be, for example, {'Game Props Table.xlsx':{'Props Price':{"2001":ObjectId("65d5a00923e3")},"2003":ObjectId("34806d293a45")},{"2004":ObjectId("h54f55f4g5sd")}},{'Weapon Price':{"3005":ObjectId("tydfaae7fa49a6")}}. The addition, deletion and modification primary key list of the above "Game Props Table" can be stored in the table change record collection.
[0083] Table change information is stored in two sets. On the one hand, it can facilitate different query requirements, that is, it can query the modified row data in units of primary keys, and query all changes in table files in units of table files; on the other hand, when the amount of table data is large, the table change information is divided into two parts and stored separately in two sets, which can also avoid the data amount of table change information in a single table file being too large.
[0084] In the present disclosure, the network server can store the current table file version A of the table file A. N And the previous history table file version A N-1 Export the version management system to perform difference comparison on the network server, generate table change information, and save the table change information.
[0085] In the data processing method provided by the present invention, the network server first obtains the version management log of the project from the version management system. If the network server detects in the version management log that there is content in the table file submitted by the development branch of the project in the current project version of the project, the current table file version of the table file and the previous historical table file version of the current table file version of the table file are obtained from the version management system; then the network server compares the row data in the current table file version and the previous historical table file version of the table file locally, and obtains the row data in the current table file version and the previous historical table file version of the table file that differ; and generates table change information of the table file in the current project version of the project based on the row data with differences.
[0086] In the present disclosure, when the network server detects in the version management log of the version management system that a table file has been submitted in a project version of the project, the current table file version and the previous historical table file version of the table file can be exported to the version management system, so that the network server can compare the table differences in units of lines and generate table change information. In this way, the table change information can be obtained without manual comparison of table differences, which reduces the operational difficulty of table difference comparison and reduces the error rate of table difference comparison. In addition, the table change information records the changes between the previous and next table file versions and can be used for retrieval queries. Therefore, the table change information can be used as the basis for realizing the branch table merging function of the project and the search function for the modification history of a specific row in the table, so as to solve the problem that the commands provided by the version control system cannot realize the branch table merging and search for the modification history of a specific row in the table.
[0087] In one embodiment of the present disclosure, based on the table change information, the table change details of any project version can be queried, including which tables in the project version have data changes, the table data before and after the change, and so on.
[0088] Correspondingly, in this embodiment, the data processing method may further include the following steps S201 to S202.
[0089] Step S201: receiving a first query instruction for table change records of the current project version of the project sent by a network client, wherein the first query instruction is input through an interface of the network client.
[0090] The network client may provide an interface for the user to input instructions. The user may input a first query instruction through the interface of the network client to query the table change record of the current project version of the project. Optionally, the first query instruction may carry the version number of the current project version of the project. The network client may then send the first query instruction to the network server.
[0091] Step S202: In response to the first query instruction, read the table change information of the table file A in the current project version of the project, and return the table change information to the network client so that the interface of the network client displays the table change information.
[0092] As mentioned above, table file A is in the current table file version A N and the previous history table file version A N-1 There are differences, therefore, there are changes in table file A in the current project version of the project. The network server responds to the first query instruction and can read the table change information of table file A in the current project version of the project from the database, and return the table change information to the network client. The network client can display the table change information in the interface of the network client to show the user the query results of the table change records of the current project version of the project.
[0093] In addition, the interface of the network client may also display relevant information such as the submitter and notes of the form file A, which is not specifically limited in the present disclosure.
[0094] As described above, the table change information can be divided into two parts, which are stored in a row data change record set and a table change record set respectively. Accordingly, in an optional embodiment, this step S202 can be specifically implemented by the following steps S2021 to S2022.
[0095] Step S2021: In response to the first query instruction, read from the table change record set a list of primary keys of table file A in which row data has been changed in the current project version of the project.
[0096] Step S2022: Read from the row data change record set the row data to which the primary keys in the primary key list belong in the current table file version and the previous historical table file version of table file A respectively.
[0097] The primary keys in the primary key list are respectively in the current table file version A of table file A. N and the previous history table file version A N-1 The row data belonging to it, that is, the modified key value and the key value before and after modification corresponding to the primary key in the primary key list, wherein, in the interface of the network client, the modified key value and the key value before and after modification corresponding to the primary key in the primary key list can be displayed in different display styles respectively, for example, the modified key value can be displayed in green font, the key value before modification can be displayed in red font, and so on, the newly added key value can be displayed in green font, and the deleted key value can be displayed in red font.
[0098] For example, refer to Figure 3, the user can enter the SVN version number, that is, the project version number, in the web client interface, and then the user clicks the query control, and the web client can send the first query instruction to the web server to request the table change record of the project version from the web server.
[0099] After receiving the first query instruction, the web server first reads the list of added, deleted and modified primary keys corresponding to each table page in the table file that has been changed in the project version from the table change record set, and optionally reads relevant information such as the submitter. Then, through the list of added, deleted and modified primary keys, the web server batch queries the previous and next key values of all primary keys in the list of added, deleted and modified primary keys in the row data change record set. After that, the web server returns the read data to the web client.
[0100] After the web client receives all the data, it can display the table change information according to the hierarchy of [table file name-page name-table modification record in the page]. The modified table data can be marked by color. For example, the gameplay name of activity 202401031 is changed from juqing1_pailian_title to caoyao_text01. Optionally, juqing1_pailian_title can be displayed in red font and caoyao_text01 can be displayed in green font.
[0101] In one embodiment of the present disclosure, based on the table change information, the modification record of a primary key can be traced back, thereby realizing a function similar to svnblame.
[0102] Correspondingly, in this embodiment, the data processing method may further include the following steps S301 to S304.
[0103] Step S301: receiving a second query instruction for row data change records of a target primary key in table file A sent by a network client, wherein the second query instruction is input through an interface of the network client.
[0104] The user can enter a second query instruction through the interface of the network client to query the modification records of the target primary key in each project version. Optionally, the second query instruction can carry the target primary key to be queried and the table file name and page name to which it belongs. The network client can then send the second query instruction to the network server.
[0105] Step S302: In response to the second query instruction, if the target primary key has row data changes in the current project version of the project, obtain the target primary key in the current table file version A of table file A. N and the previous history table file version A N-1 The row data to which it belongs.
[0106] The target primary key is one of the primary keys in table file A.
[0107] If the target primary key in table file A has row data changes in the current project version of the project, the network server responds to the second query instruction and can obtain from the database the target primary key in the current table file version A of table file A. N and the previous history table file version A N-1 The row data to which it belongs.
[0108] In an optional embodiment, this step can read the target primary key from the row data change record set in the current table file version A of table file A. N and the previous history table file version A N-1 The row data to which it belongs.
[0109] Step S303: If the target primary key has row data changes in the first historical project version of the project, obtain the first historical table file version A of the target primary key in the first historical project version. M and the previous history table file version A of the first history table file version M-1 The row data to which it belongs.
[0110] The first historical project version of the project is one of the historical project versions of the project. If the target primary key has row data changes not only in the current project version of the project, but also in a certain historical project version of the project, the network server can also obtain the first historical table file version A of the target primary key in the historical project version of the project from the database. M and the first history table file version A M The previous history table file version A M-1 The row data in . Where M≤N-1.
[0111] In an optional embodiment, this step can read the first history table file version A of the target primary key in the first history project version from the row data change record set. M and the first history table file version A M The previous history table file version A M-1 The row data to which it belongs.
[0112] Step S304: returning the data acquired for the target primary key to the network client, so that the interface of the network client displays the data acquired for the target primary key.
[0113] The network server can return the data obtained for the target primary key in the above steps S302 and S303 to the network client, and the network client can display the data obtained for the target primary key in the network client interface to show the user the query results of the row data change records for the target primary key.
[0114] For example, refer to Figure 4 , the web client can obtain the names, pages, and primary keys of all table files in the project from the web server for the user to select. The user can select the table file, page, and target primary key to be queried on the web client interface, and then the user clicks the query control, and the web client can send a second query instruction to the web server to request the row data change record of the target primary key from the web server.
[0115] The web server can batch query the key values before and after each change of the target primary key from the row data change record set. After that, the web server returns the read data to the web client.
[0116] After the web client receives all the data, it can display the row data change records of each target primary key in chronological order. Figure 4 exemplarily shows three modification records of the primary key of role 7498002. Optionally, the modified table data can be marked by color, and the modified key value and the key value before and after modification corresponding to the primary key can be distinguished by different colors.
[0117] For example, in the current project version submitted, the model file (one of the key values of the target primary key) of character 7498002 (target primary key) was changed from model / monster / duyatianzhukui / duyatianzhukui_hua.gim to fx / effect / monster / duyatianzhukui / dytzk_skill_01_duan_range.sfx. In an optional implementation, model / monster / duyatianzhukui / duyatianzhukui_hua.gi can be displayed in red font, and fx / effect / monster / duyatianzhukui / dytzk_skill_01_duan_range.sfx can be displayed in green font.
[0118] In one embodiment of the present disclosure, based on the table change information, online collaborative table merging can be performed on table files, that is, table merging of project branches, so that a function similar to svn merge can be implemented.
[0119] Correspondingly, in this embodiment, the data processing method may further include the following steps S401 to S406.
[0120] Step S401: receiving a branch table merging instruction sent by a network client for merging a table file of a source development branch in a target project version of the project into a target development branch, wherein the branch table merging instruction is input through an interface of the network client.
[0121] For example, refer to Figure 5 The network client can display a branch table merge task interface, in which the user can view all created branch table merge tasks and their task progress. The user can open the branch table merge task creation interface in the network client, in which the user can create a branch table merge task. For example, the branch table merge task creation interface can be as follows: Figure 6 In the branch table merge task creation interface, users can select the source development branch (i.e. Figure 6 ), and select the target development branch that needs to be merged into the project (i.e. Figure 6 In addition, in the branch table merge task creation interface, the user can also select / enter the source development branch version to be merged into the target development branch, that is, select / enter which project versions of the source development branch to merge into the target development branch, such as Figure 6 As shown, you can select / enter all project versions of the project, or you can select / enter a specific project version of the project. In this step, the target project version is the project version selected or entered by the user in the branch table merge task creation interface of the network client.
[0122] For example, refer to Figure 6 After the user completes the branch table merge task creation interface, he can click the "OK" control in the branch table merge task creation interface, and the network client can receive the branch table merge instruction for merging the table file of the source development branch in the target project version of the project into the target development branch, thereby creating a branch table merge task, which can be viewed in the branch table merge task interface. Afterwards, the network client can send the branch table merge instruction to the network server.
[0123] Step S402: In response to the branch table merge instruction, if the target project version includes the current project version of the project, for the table file A that has been modified in the current project version, obtain the first primary key list of the row data changes in the table file A.
[0124] If the target project version includes the current project version of the project, the network server responds to the branch table merge instruction and can obtain the primary keys of the row data changes in the table file A that has been modified in the current project version, that is, the first primary key list.
[0125] In an optional embodiment, the first primary key list may be obtained in the following manner: for a table file A that has been modified in the current project version of the project, the first primary key list of table file A with row data changes is read from a table change record set.
[0126] The table change record set stores, in units of table files, a second mapping relationship of primary keys and corresponding first mapping relationships that identify row data changes in each table file of the project in the project version of the project. Therefore, all primary keys of table file A with row data changes in the current project version of the project can be read from the table change record set to obtain the first primary key list.
[0127] Step S403: obtaining a first table file version of the table file A from the source development branch in the current project version, and obtaining a second table file version of the table file A from the target development branch in the current project version.
[0128] In this step, the network server can obtain the versions of the table file A in the source development branch and the target development branch in the current project version from the version management system. The version of the table file A in the source development branch of the current project version is the first table file version of the table file A, and the version of the table file A in the target development branch of the current project version is the second table file version of the table file A.
[0129] For example, if the source development branch is branch_1 as described above, the first table file version of the table file A described in this step is the current table file version A of the table file A described above. N .
[0130] Step S404: Compare the row data to which the primary keys in the first primary key list belong in the first table file version of table file A and the second table file version of table file A respectively.
[0131] In this step, the network server can compare the row data belonging to each primary key in the first primary key list in the first table file version of table file A and the second table file version of table file A, thereby responding to the need for branch table merging and performing table data difference comparison for two different versions of the same table file locally on the network server.
[0132] Step S405: If the row data to which the primary keys in the first primary key list belong in the first table file version of table file A and the second table file version of table file A are inconsistent, generate row data change information corresponding to the primary keys in the first primary key list.
[0133] Each primary key in the first primary key list is traversed. If the row data to which a primary key belongs in the first table file version of table file A and the second table file version of table file A are inconsistent, corresponding row data change information can be generated for the primary key, and the row data change information includes the row data to which the corresponding primary key belongs in the first table file version of table file A and the second table file version of table file A. If the row data to which a primary key belongs in the first table file version of table file A and the second table file version of table file A are consistent, it can be further determined whether the row data to which the next primary key in the first primary key list belongs in the first table file version of table file A and the second table file version of table file A are consistent.
[0134] Step S406: According to the row data change information corresponding to the primary key in the first primary key list, the first table file version of the table file A is merged into the second table file version of the table file A.
[0135] In an optional embodiment, the network server may return the row data change information corresponding to the primary key in the first primary key list to the network client, so that the interface of the network client displays the row data change information corresponding to the primary key in the first primary key list, and the user can confirm the row data change information to be merged on the network client. Then, in response to the confirmation operation for the first row data change information in the row data change information corresponding to the primary key in the first primary key list received on the interface of the network client, the network server may merge the data portion of the first row data change information belonging to the first table file version of table file A into the second table file version of table file A. That is, for the row data in the first table file version of table file A that differs from the second table file version, the first table file version of table file A shall prevail and replace the corresponding row data in the second table file version of table file A.
[0136] In one of the embodiments of the present disclosure, in addition to the current project version of the project, the target project version may also include other historical project versions of the project. When it is necessary to merge branch tables, for the historical project version, refer to the implementation methods in the above steps S402 to S406 and implement the following steps S407 to S411.
[0137] Step S407: In response to the branch table merge instruction, if the target project version also includes a second historical project version of the project other than the current project version, for the second table file B that has been modified in the second historical project version, obtain a second primary key list in which row data has been changed in the second table file B.
[0138] If the target project version also includes a second historical project version of the project other than the current project version of the project (the second historical project version is one of the historical project versions of the project), the network server responds to the branch table merge instruction and can obtain the primary keys of the row data changes in the table file B that has been modified in the current project version, that is, the second primary key list.
[0139] In an optional embodiment, the second primary key list may be obtained in the following manner: for the second table file B that has been modified in the second historical project version, the second primary key list of the second table file B with row data changes is read from the table change record set.
[0140] The table change record set stores, in units of table files, a second mapping relationship of primary keys and their corresponding first mapping relationships for each table file of the project with row data changes in the project version of the project. Therefore, all primary keys of the second table file B with row data changes in the second historical project version of the project can be read from the table change record set to obtain a second primary key list.
[0141] Step S408: Obtain a first table file version of the second table file B from a source development branch in the second historical project version, and obtain a second table file version of the second table file B from a target development branch in the second historical project version.
[0142] In this step, the network server can obtain the versions of the second table file B in the source development branch and the target development branch in the second historical project version from the version management system. The version of the second table file B in the source development branch of the second historical project version is the first table file version of the second table file B, and the version of the second table file B in the target development branch of the second historical project version is the second table file version of the second table file B.
[0143] Step S409: Compare the row data to which the primary keys in the second primary key list belong in the first table file version of the second table file B and the second table file version of the second table file B respectively.
[0144] In this step, the network server can compare the row data belonging to each primary key in the second primary key list in the first table file version of the second table file B and the second table file version of the second table file B, thereby responding to the need for branch table merging and performing table data difference comparison for two different versions of the same table file locally on the network server.
[0145] The above step S404 and the present step S409 are table difference comparisons when the branch tables are merged. In an optional embodiment, the progress of the difference comparison process can be viewed in the interface of the network client.
[0146] In an optional embodiment, the first primary key list and the second primary key list can be deduplicated and integrated into one primary key list, and then the network server performs the above step S404 or the operation of this step S409 for each primary key in the deduplicated and integrated primary key list.
[0147] Step S410: If the row data to which the primary keys in the second primary key list belong in the first table file version of the second table file B and the second table file version of the second table file B are inconsistent, generate row data change information corresponding to the primary keys in the second primary key list.
[0148] Each primary key in the second primary key list is traversed. If the row data to which a primary key belongs in the first table file version of the second table file B and the second table file version of the second table file B are inconsistent, corresponding row data change information can be generated for the primary key, and the row data change information includes the row data to which the corresponding primary key belongs in the first table file version of the second table file B and the second table file version of the second table file B. If the row data to which a primary key belongs in the first table file version of the second table file B and the second table file version of the second table file B are consistent, it can be further determined whether the row data to which the next primary key in the second primary key list belongs in the first table file version of the second table file B and the second table file version of the second table file B are consistent.
[0149] Step S411: merging the first table file version of the second table file B into the second table file version of the second table file B according to the row data change information corresponding to the primary key in the second primary key list.
[0150] In an optional embodiment, the network server may return the row data change information corresponding to the primary key in the second primary key list to the network client, so that the interface of the network client displays the row data change information corresponding to the primary key in the second primary key list, and the user can confirm the row data change information to be merged on the network client; then, in response to the confirmation operation for the second row data change information in the row data change information corresponding to the primary key in the second primary key list received on the interface of the network client, the network server merges the data part of the first table file version of the second table file B in the second row data change information into the second table file version of the second table file B. That is, for the row data in the first table file version of the second table file B that differs from the second table file version, the first table file version of the second table file B shall prevail, and the corresponding row data in the second table file version of the second table file B shall be replaced.
[0151] Optional, such as Figure 7 As shown, the row data change information corresponding to the primary key in the first primary key list and the row data change information corresponding to the primary key in the second primary key list can be displayed in the same interface of the network client, so that the user can select by, for example, checking, etc. After the selection, the user can confirm the selected row data change information by, for example, clicking the "Confirm" control, etc. The unselected row data change information will not be merged. For each row data change information, the network client can also display relevant information such as the modifier of the row.
[0152] Optionally, the confirmation operation for the first row of data change information in the row data change information corresponding to the primary key in the first primary key list and the confirmation operation for the second row of data change information in the row data change information corresponding to the primary key in the second primary key list can be the same operation, that is, the user can confirm the selected first row of data change information and second row of data change information through one operation. When confirming the row data change information, all users related to the project can confirm, thereby realizing the branch table merging of online collaboration.
[0153] After the branch table is merged, the merged branch table can be submitted to the version management system.
[0154] In an exemplary embodiment of the present disclosure, through table change information, users can quickly find and trace table modifications through a web page; according to the table change information, the modification record of any row in any table can be queried, including information such as the person who modified the corresponding row; through online collaborative branch table merging, the table merge between two branches can be quickly executed. At the same time, the relevant users of the project can know in advance the modifications that will be generated by the merge by confirming the row data change information in this process, and then collaborate to confirm the table differences to ensure that the merge modification of each row of the table has a corresponding person in charge, so that the branch table merge process is more accurate and reduces the situation of merging errors; all table queries and merge processes can be operated on the web page, without manual table difference comparison, and without installing and downloading any software or plug-ins, so that fast sharing and collaboration can be achieved. In this way, through the exemplary embodiment of the present disclosure, the problem that the version control system performs complex operations for difference comparison, merging, and viewing modification records for excel table files, and the error rate is high, can be solved.
[0155] Corresponding to the data processing method provided in the embodiment of the present disclosure, the embodiment of the present disclosure also provides a data processing device, which is applied to a network server in a project management system, wherein the project management system also includes a network client connected to the network server, and the network server is also connected to a version management system for managing project files. Figure 8 As shown, the device 700 includes:
[0156] The log acquisition module 701 is used to acquire the version management log of the project from the version management system;
[0157] The table version acquisition module 702 is used to acquire the current table file version of the table file and the previous historical table file version of the current table file version of the table file from the version management system if it is detected in the version management log that there is content submitted by the table file in the current project version of the project indicating that the development branch of the project has the content submitted by the table file in the current project version of the project;
[0158] The difference comparison module 703 is used to compare the row data in the current table file version and the previous historical table file version to obtain the row data in which there is a difference between the current table file version and the previous historical table file version;
[0159] The change information generating module 704 is used to generate the table change information of the table file in the current project version of the project according to the row data with differences.
[0160] Optionally, comparing the row data in the current table file version with the row data in the previous historical table file version to obtain the row data having differences between the current table file version and the previous historical table file version includes:
[0161] Compare the primary keys and key values of the row data in the current table file version and the previous historical table file version to obtain row data with the same primary key but different key values in the current table file version and the previous historical table file version, row data that exists in the current table file version but does not exist in the previous historical table file version, and row data that does not exist in the current table file version but exists in the previous historical table file version.
[0162] Optionally, generating the table change information of the table file in the current project version of the project according to the row data with differences includes:
[0163] According to the primary key of the row data with differences and the row data to which the primary key belongs in the current table file version and the previous historical table file version respectively, the table change information of the table file in the current project version of the project is generated.
[0164] Optionally, the device is also used for:
[0165] Receiving a first query instruction for table change records of the current project version of the project sent by the network client, wherein the first query instruction is input through an interface of the network client;
[0166] In response to the first query instruction, the table change information of the table file in the current project version of the project is read, and the table change information is returned to the network client, so that the interface of the network client displays the table change information.
[0167] Optionally, responding to the first query instruction and reading the table change information includes:
[0168] In response to the first query instruction, read from the table change record set a list of primary keys of the table file in which row data has been changed in the current project version of the project;
[0169] Reading from the row data change record set the row data to which the primary keys in the primary key list belong in the current table file version and the previous history table file version respectively;
[0170] Among them, the row data change record set is used to store, in units of primary keys, a first mapping relationship between a primary key of a table file of the project in which row data has been changed and the row data before and after modification corresponding to the primary key in the project version of the project; the table change record set is used to store, in units of table files, a second mapping relationship between a primary key of a table file of the project in which row data has been changed and the identifier of the first mapping relationship corresponding to the primary key in the project version of the project.
[0171] Optionally, the device is also used for:
[0172] Receiving a second query instruction for row data change records of a target primary key in the table file sent by the network client, wherein the second query instruction is input through an interface of the network client;
[0173] In response to the second query instruction, if the target primary key has row data changes in the current project version of the project, obtaining row data to which the target primary key belongs in the current table file version and the previous historical table file version of the table file respectively;
[0174] If the target primary key has row data changes in the first historical project version of the project, obtain row data of the target primary key in the first table file version in the first historical project version and the previous historical table file version of the first table file version;
[0175] The data acquired for the target primary key is returned to the network client, so that the interface of the network client displays the data acquired for the target primary key.
[0176] Optionally, obtaining row data to which the target primary key belongs in the current table file version and the previous historical table file version of the table file respectively includes:
[0177] Reading row data to which the target primary key belongs in the current table file version and the previous historical table file version of the table file respectively from the row data change record set;
[0178] The obtaining of row data to which the target primary key belongs in the first table file version in the first historical project version and in the previous historical table file version of the first table file version includes:
[0179] Reading row data to which the target primary key belongs in the first table file version in the first historical project version and the previous historical table file version of the first table file version from the row data change record set;
[0180] The row data change record set is used to store the first mapping relationship between the primary key of the row data change in the project version of the project and the row data before and after modification corresponding to the primary key in the table file of the project in units of primary keys.
[0181] Optionally, the device is also used for:
[0182] receiving a branch table merging instruction sent by the network client for merging a table file of a source development branch in a target project version of the project into a target development branch, wherein the branch table merging instruction is input through an interface of the network client;
[0183] In response to the branch table merge instruction, if the target project version includes the current project version, for a second table file that has been modified in the current project version, obtaining a first primary key list in which row data in the table file has been changed;
[0184] Acquire a first table file version of the second table file from the source development branch in the current project version, and acquire a second table file version of the second table file from the target development branch in the current project version;
[0185] Comparing row data to which primary keys in the first primary key list belong in the first table file version of the second table file and the second table file version of the second table file;
[0186] If the row data to which the primary keys in the first primary key list belong in the first table file version of the second table file and the second table file version of the second table file are inconsistent, row data change information corresponding to the primary keys in the first primary key list is generated, and the row data change information corresponding to the primary keys in the first primary key list is returned to the network client, so that the interface of the network client displays the row data change information corresponding to the primary keys in the first primary key list.
[0187] Optionally, the device is also used for:
[0188] receiving a branch table merging instruction sent by the network client for merging a table file of a source development branch in a target project version of the project into a target development branch, wherein the branch table merging instruction is input through an interface of the network client;
[0189] In response to the branch table merge instruction, if the target project version includes the current project version of the project, for the table file that has been modified in the current project version, obtaining a first primary key list in which row data in the table file has been changed;
[0190] Acquire a first table file version of the table file from the source development branch in the current project version, and acquire a second table file version of the second table file from the target development branch in the current project version;
[0191] Compare the row data to which the primary keys in the first primary key list belong in the first table file version of the table file and the second table file version of the table file respectively;
[0192] If the row data to which the primary keys in the first primary key list belong in the first table file version and the second table file version of the table file are respectively inconsistent, generating row data change information corresponding to the primary keys in the first primary key list;
[0193] According to the row data change information corresponding to the primary key in the first primary key list, the first table file version of the table file is merged into the second table file version of the table file.
[0194] Optionally, the device is also used for:
[0195] In response to the branch table merge instruction, if the target project version also includes a second historical project version of the project other than the current project version, for a second table file that has been modified in the second historical project version, obtaining a second primary key list in which row data has been changed in the second table file;
[0196] Acquire a first table file version of the second table file from the source development branch in the second historical project version, and acquire a second table file version of the second table file from the target development branch in the second historical project version;
[0197] Comparing row data to which primary keys in the second primary key list respectively belong in the first table file version of the second table file and the second table file version of the second table file;
[0198] If the row data to which the primary keys in the second primary key list belong in the first table file version of the second table file and the second table file version of the second table file are respectively inconsistent, generating row data change information corresponding to the primary keys in the second primary key list;
[0199] According to the row data change information corresponding to the primary key in the second primary key list, the first table file version of the second table file is merged into the second table file version of the second table file.
[0200] Optionally, the merging the first table file version of the table file into the second table file version of the table file according to the row data change information corresponding to the primary key in the first primary key list includes:
[0201] Returning the row data change information corresponding to the primary key in the first primary key list to the network client, so that the interface of the network client displays the row data change information corresponding to the primary key in the first primary key list;
[0202] In response to a confirmation operation received in the interface of the network client for the first row of data change information corresponding to the primary key in the first primary key list, a data portion of the first row of data change information belonging to the first table file version of the table file is merged into the second table file version of the table file.
[0203] Optionally, the merging the first table file version of the second table file into the second table file version of the second table file according to the row data change information corresponding to the primary key in the second primary key list includes:
[0204] Returning the row data change information corresponding to the primary key in the second primary key list to the network client, so that the interface of the network client displays the row data change information corresponding to the primary key in the second primary key list;
[0205] In response to a confirmation operation received in the interface of the network client for the second row of data change information in the row data change information corresponding to the primary key in the second primary key list, the data portion of the second row of data change information belonging to the first table file version of the second table file is merged into the second table file version of the second table file.
[0206] Optionally, for the table file that has been modified in the current project version, obtaining a first primary key list in which row data in the table file has been changed includes:
[0207] For the table file that has been modified in the current project version, read a first primary key list of the table file in which row data has been changed from a table change record set;
[0208] The acquiring, for the second table file that has been modified in the second historical project version, a second primary key list in which row data has been changed in the second table file includes:
[0209] For the second table file that has been modified in the second historical project version, reading a second primary key list in which row data has been changed in the second table file from the table change record set;
[0210] Among them, the row data change record set is used to store, in units of primary keys, a first mapping relationship between a primary key of the project in which row data has been changed in the project version of the project and the row data before and after modification corresponding to the primary key; the table change record set is used to store, in units of table files, a second mapping relationship between a primary key of the project in which row data has been changed in the project version of the project and an identifier of the first mapping relationship corresponding to the primary key.
[0211] In the data processing device provided by the present invention, the network server first obtains the version management log of the project from the version management system. If the network server detects in the version management log that there is content in the table file submitted by the development branch of the project in the current project version of the project, the current table file version of the table file and the previous historical table file version of the current table file version of the table file are obtained from the version management system; then the network server compares the row data in the current table file version and the previous historical table file version of the table file locally, and obtains the row data in the current table file version and the previous historical table file version of the table file that differ; and generates table change information of the table file in the current project version of the project based on the row data with differences.
[0212] In the present disclosure, when the network server detects in the version management log of the version management system that a table file has been submitted in a project version of the project, the current table file version and the previous historical table file version of the table file can be exported to the version management system, so that the network server can compare the table differences in units of lines and generate table change information. In this way, the table change information can be obtained without manual comparison of table differences, which reduces the operational difficulty of table difference comparison and reduces the error rate of table difference comparison. In addition, the table change information records the changes between the previous and next table file versions and can be used for retrieval queries. Therefore, the table change information can be used as the basis for realizing the branch table merging function of the project and the search function for the modification history of a specific row in the table, so as to solve the problem that the commands provided by the version control system cannot realize the branch table merging and search for the modification history of a specific row in the table.
[0213] Next, an electronic device provided by an embodiment of the present disclosure is introduced. Fig. 9 , Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device 800 may be deployed with the data processing device described in the embodiment of the present disclosure to implement the functions in the embodiment of the present disclosure. Specifically, the electronic device 800 includes: a receiver 801, a transmitter 802, a processor 803 and a memory 804 (the number of processors 803 in the electronic device 800 may be one or more, Fig. 9 In the example of FIG. 801 , the processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of the present disclosure, the receiver 801, the transmitter 802, the processor 803 and the memory 804 may be connected via a bus or other means.
[0214] The memory 804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 803. A portion of the memory 804 may also include a non-volatile random access memory (NVRAM). The memory 804 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0215] The processor 803 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0216] The method disclosed in the above embodiment of the present disclosure can be applied to the processor 803, or implemented by the processor 803. The processor 803 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 803. The above processor 803 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 803 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present disclosure. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiment of the present disclosure can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 804, and the processor 803 reads the information in the memory 804 and completes the steps of the above method in combination with its hardware.
[0217] The receiver 801 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 802 can be used to output digital or character information through the first interface; the transmitter 802 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 802 can also include a display device such as a display screen.
[0218] In the embodiment of the present disclosure, the application processor 8031 in the processor 803 is used to execute the data processing method in the embodiment of the present disclosure. It should be noted that the specific manner in which the application processor 8031 executes each step is based on the same concept as the various method embodiments in the present disclosure, and the technical effects brought by it are the same as the various method embodiments in the present disclosure. For specific contents, please refer to the description in the method embodiments shown in the above disclosure, and no further description will be given here.
[0219] The disclosed embodiment also provides a chip for executing instructions, which is used to execute the technical solution of the data processing method in the above embodiment.
[0220] The embodiment of the present disclosure further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a processor, the processor executes the technical solution of the data processing method in the above embodiment.
[0221] The embodiments of the present disclosure further provide a computer program product, including a computer program, which is used to execute the technical solution of the data processing method in the above embodiments when executed by a processor.
[0222] The computer readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or dedicated server.
[0223] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0224] Although the present disclosure is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present disclosure. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be based on the scope defined by the claims of the present disclosure.
Claims
1. A data processing method, characterized in that: A network server used in a project management system, the project management system further comprising a network client connected to the network server in communication, the network server further connected to a version management system for managing project files in communication, the method comprising: Obtaining a version management log of a project from the version management system; If it is detected in the version management log that there is content submitted in a table file in the current project version of the project indicating that the development branch of the project has content submitted in the table file, obtaining the current table file version of the table file and the previous historical table file version of the current table file version of the table file from the version management system; Comparing the row data in the current table file version with the row data in the previous historical table file version, obtaining the row data in which there are differences between the current table file version and the previous historical table file version; Generate table change information of the table file in the current project version of the project according to the row data with differences.
2. The method according to claim 1, characterized in that: The comparing the row data in the current table file version and the previous historical table file version to obtain the row data having differences between the current table file version and the previous historical table file version includes: Compare the primary keys and key values of the row data in the current table file version and the previous historical table file version to obtain row data with the same primary key but different key values in the current table file version and the previous historical table file version, row data that exists in the current table file version but does not exist in the previous historical table file version, and row data that does not exist in the current table file version but exists in the previous historical table file version.
3. The method according to claim 1, characterized in that The step of generating the table change information of the table file in the current project version of the project according to the row data with differences includes: According to the primary key of the row data with differences and the row data to which the primary key belongs in the current table file version and the previous historical table file version respectively, the table change information of the table file in the current project version of the project is generated.
4. The method according to claim 1, characterized in that: The method further comprises: Receiving a first query instruction for table change records of the current project version of the project sent by the network client, wherein the first query instruction is input through an interface of the network client; In response to the first query instruction, the table change information of the table file in the current project version of the project is read, and the table change information is returned to the network client, so that the interface of the network client displays the table change information.
5. The method according to claim 4, characterized in that The step of responding to the first query instruction and reading the table change information includes: In response to the first query instruction, read from the table change record set a list of primary keys of the table file in which row data has been changed in the current project version of the project; Reading from the row data change record set the row data to which the primary keys in the primary key list belong in the current table file version and the previous history table file version respectively; Among them, the row data change record set is used to store, in units of primary keys, a first mapping relationship between a primary key of a table file of the project in which row data has been changed and the row data before and after modification corresponding to the primary key in the project version of the project; the table change record set is used to store, in units of table files, a second mapping relationship between a primary key of a table file of the project in which row data has been changed and the identifier of the first mapping relationship corresponding to the primary key in the project version of the project.
6. The method according to claim 1, characterized in that The method further comprises: Receiving a second query instruction for row data change records of a target primary key in the table file sent by the network client, wherein the second query instruction is input through an interface of the network client; In response to the second query instruction, if the target primary key has row data changes in the current project version of the project, obtaining row data to which the target primary key belongs in the current table file version and the previous historical table file version of the table file respectively; If the target primary key has row data changes in the first historical project version of the project, obtain row data of the target primary key in the first historical table file version in the first historical project version and the previous historical table file version of the first historical table file version; The data acquired for the target primary key is returned to the network client, so that the interface of the network client displays the data acquired for the target primary key.
7. The method according to claim 6, characterized in that The step of obtaining row data to which the target primary key belongs in the current table file version and the previous history table file version of the table file respectively includes: Reading row data to which the target primary key belongs in the current table file version and the previous historical table file version of the table file respectively from the row data change record set; The step of obtaining row data to which the target primary key belongs in the first history table file version in the first history project version and the previous history table file version of the first history table file version includes: Reading row data to which the target primary key belongs in the first history table file version in the first history project version and the previous history table file version of the first history table file version from the row data change record set; The row data change record set is used to store the first mapping relationship between the primary key of the row data change in the project version of the project and the row data before and after modification corresponding to the primary key in the table file of the project in units of primary keys.
8. The method according to claim 1, characterized in that The method further comprises: receiving a branch table merging instruction sent by the network client for merging a table file of a source development branch in a target project version of the project into a target development branch, wherein the branch table merging instruction is input through an interface of the network client; In response to the branch table merge instruction, if the target project version includes the current project version of the project, for the table file that has been modified in the current project version, obtaining a first primary key list in which row data in the table file has been changed; Acquire a first table file version of the table file from the source development branch in the current project version, and acquire a second table file version of the table file from the target development branch in the current project version; Compare the row data to which the primary keys in the first primary key list belong in the first table file version of the table file and the second table file version of the table file respectively; If the row data to which the primary keys in the first primary key list belong in the first table file version and the second table file version of the table file are respectively inconsistent, generating row data change information corresponding to the primary keys in the first primary key list; According to the row data change information corresponding to the primary key in the first primary key list, the first table file version of the table file is merged into the second table file version of the table file.
9. The method according to claim 8, characterized in that The method further comprises: In response to the branch table merge instruction, if the target project version also includes a second historical project version of the project other than the current project version, for a second table file that has been modified in the second historical project version, obtaining a second primary key list in which row data has been changed in the second table file; Acquire a first table file version of the second table file from the source development branch in the second historical project version, and acquire a second table file version of the second table file from the target development branch in the second historical project version; Comparing row data to which primary keys in the second primary key list respectively belong in the first table file version of the second table file and the second table file version of the second table file; If the row data to which the primary keys in the second primary key list belong in the first table file version of the second table file and the second table file version of the second table file are respectively inconsistent, generating row data change information corresponding to the primary keys in the second primary key list; According to the row data change information corresponding to the primary key in the second primary key list, the first table file version of the second table file is merged into the second table file version of the second table file.
10. The method according to claim 8, characterized in that The step of merging the first table file version of the table file into the second table file version of the table file according to the row data change information corresponding to the primary key in the first primary key list includes: Returning the row data change information corresponding to the primary key in the first primary key list to the network client, so that the interface of the network client displays the row data change information corresponding to the primary key in the first primary key list; In response to a confirmation operation received in the interface of the network client for the first row of data change information corresponding to the primary key in the first primary key list, a data portion of the first row of data change information belonging to the first table file version of the table file is merged into the second table file version of the table file.
11. The method according to claim 9, characterized in that The step of merging the first table file version of the second table file into the second table file version of the second table file according to the row data change information corresponding to the primary key in the second primary key list includes: Returning the row data change information corresponding to the primary key in the second primary key list to the network client, so that the interface of the network client displays the row data change information corresponding to the primary key in the second primary key list; In response to a confirmation operation received in the interface of the network client for the second row of data change information in the row data change information corresponding to the primary key in the second primary key list, the data portion of the second row of data change information belonging to the first table file version of the second table file is merged into the second table file version of the second table file.
12. The method according to claim 9, characterized in that The acquiring, for the table file that has been modified in the current project version, a first primary key list in which row data has been changed in the table file, comprises: For the table file that has been modified in the current project version, read a first primary key list of the table file in which row data has been changed from a table change record set; The acquiring, for the second table file that has been modified in the second historical project version, a second primary key list in which row data has been changed in the second table file includes: For the second table file that has been modified in the second historical project version, reading a second primary key list in which row data has been changed in the second table file from the table change record set; Among them, the row data change record set is used to store, in units of primary keys, a first mapping relationship between a primary key of the project in which row data has been changed in the project version of the project and the row data before and after modification corresponding to the primary key; the table change record set is used to store, in units of table files, a second mapping relationship between a primary key of the project in which row data has been changed in the project version of the project and an identifier of the first mapping relationship corresponding to the primary key.
13. A data processing device, characterized in that: A network server used in a project management system, the project management system also includes a network client connected to the network server in communication, the network server is also connected to a version management system for managing project files in communication, the device includes: A log acquisition module, used to acquire the version management log of the project from the version management system; A table file version acquisition module, configured to acquire the current table file version of the table file and the previous historical table file version of the current table file version of the table file from the version management system if it is detected in the version management log that there is content submitted by the table file in the current project version of the project indicating that the development branch of the project has the content submitted by the table file in the current project version of the project; A difference comparison module, used for comparing the row data in the current table file version and the previous historical table file version, to obtain the row data in which there are differences between the current table file version and the previous historical table file version; A change information generating module is used to generate table change information of the table file in the current project version of the project according to the row data with differences.
14. An electronic device, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the data processing method according to any one of claims 1 to 12 is implemented.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, they are used to implement the data processing method as described in any one of claims 1 to 12 above.
