Data processing method and device, computer program product and electronic equipment
By receiving and parsing the log information of the configuration table, the difference information between the target configuration table and the main branch is generated, which solves the abnormal problems caused by incorrect configuration in game project development and improves the efficiency and accuracy of project development.
Patent Information
- Application Number
- CN202411123936.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2026-03-03
Smart Images

Figure CN121597677A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a data processing method and data processing apparatus, computer program product and electronic device. Background Technology
[0002] During the game development process, the planners used Excel files to control aspects such as combat progression stats, item production, and game events.
[0003] However, after designers modify multiple Excel files and commit them to the SVN repository (version control repository), they may forget to read one or more of the Excel files. This will prevent the generation of differences between the Excel files and the files already stored in the SVN repository. This will not only cause the game to malfunction due to incorrect configuration, but also require testers or programmers to spend time finding the problem.
[0004] Therefore, there is an urgent need in this field to develop a new data processing method and apparatus.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a data processing method, a data processing apparatus, a computer-readable storage medium, and an electronic device, thereby at least to some extent overcoming the problem caused by related technologies that the difference between the Excel file and the file already stored in the SVN repository cannot be automatically generated after submitting the Excel file to the SVN repository.
[0007] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part by practice of this disclosure. According to a first aspect of an embodiment of the present invention, a data processing method is provided, applied to a server, the method comprising: if a target configuration table is received from a version management repository, determining all projects stored in the version management repository and the trunk branches corresponding to all projects; wherein the target configuration table has been modified; based on the trunk branch version of the trunk branches of all projects, extracting log information between a first trunk branch of the latest version and a second trunk branch of a historical version; wherein the historical version is the version preceding the latest version; parsing each log message to determine the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs; generating difference information between the target configuration table and the stored configuration table recorded in the target trunk branch, and returning the difference information.
[0008] According to a second aspect of the present invention, a data processing apparatus is provided, applied to a server, the apparatus comprising: a configuration table receiving module configured to, upon receiving a target configuration table from a version management repository, determine all items stored in the version management repository and the trunk branches corresponding to all items; wherein the target configuration table has been modified; a log information extraction module configured to, based on the trunk branch versions of the trunk branches of all items, extract log information between a first trunk branch of the latest version and a second trunk branch of a historical version; wherein the historical version is the version preceding the latest version; a log information parsing module configured to parse each log information to determine the target item to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs; and a difference information generation module configured to generate difference information between the target configuration table and the stored configuration table recorded in the target trunk branch, and return the difference information.
[0009] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, which, when executed by the processor, implement the data processing method of any of the above exemplary embodiments.
[0010] According to a fourth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the data processing method in any of the above exemplary embodiments.
[0011] As can be seen from the above technical solutions, the data processing method, data processing apparatus, computer storage medium, and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:
[0012] In the method and apparatus provided by the exemplary embodiments of this disclosure, if a target configuration table is received from a version management repository, all projects stored in the version management repository and the corresponding trunk branches of all projects are determined. Based on the trunk branch version, log information between the latest version of the first trunk branch and the historical version of the second trunk branch is extracted, and the log information is parsed to determine the target project and target trunk branch to which the target configuration table belongs. On the one hand, difference information between the target configuration table and the stored configuration table recorded in the target trunk branch is generated, ensuring that no difference information corresponding to the target configuration table is missed after the target configuration table is received, thus avoiding game abnormalities caused by incorrect game configuration. On the other hand, multiple trunk branches are supported to be generated simultaneously during the generation of difference information, improving the efficiency of project development.
[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0015] Figure 1 This schematic diagram illustrates a process for generating difference information in the prior art.
[0016] Figure 2 The schematic diagram illustrates a flow chart of a data processing method in an embodiment of this disclosure;
[0017] Figure 3 This illustration schematically shows a flowchart of viewing preview difference information in an embodiment of this disclosure;
[0018] Figure 4 This illustration schematically shows a flowchart of the data processing method in a specific scenario according to an embodiment of the present disclosure;
[0019] Figure 5 This schematic diagram illustrates the relationship between different script modules in embodiments of the present disclosure;
[0020] Figure 6 A schematic diagram of the logic module in an embodiment of this disclosure is shown.
[0021] Figure 7 This illustration shows a flowchart of the calling process of the logic module in an embodiment of this disclosure;
[0022] Figure 8 The illustration schematically depicts an apparatus for a data processing method according to an embodiment of the present disclosure;
[0023] Figure 9 An electronic device for a data processing method is illustrated schematically in an embodiment of this disclosure;
[0024] Figure 10 The illustration schematically depicts a computer program product for a data processing method according to an embodiment of the present disclosure. Detailed Implementation
[0025] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0026] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.
[0027] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0028] Figure 1 This schematically illustrates a process for generating difference information in the prior art, such as... Figure 1 As shown, during game development, designers need to control aspects such as item production, gameplay activities, and combat stats through Excel spreadsheets. When designers need to modify configuration information in the target game (such as configuration information corresponding to items, configuration information corresponding to gameplay activities, etc.), they will modify the Excel spreadsheet locally (i.e., the table that determines the configuration information of the target game), commit the Excel spreadsheet to the project's SVN repository, and then send a command through a client to request the remote server to read the locally modified Excel spreadsheet.
[0029] The remote server periodically pulls the latest Excel files (i.e., Excel files modified locally by designers) from the SVN repository. Upon receiving a read request, it first checks if the read operation is already locked. If it is, it waits for others to complete the read operation and returns a "read in use" message to the client. If designers see that others are currently reading the table, they must wait for them to complete before initiating another read request. If there are no ongoing read requests, the server locks the read operation, converts the extracted Excel file into a code file, compares it with the code file in the SVN repository, generates a difference file (i.e., a file containing code differences), and finally sends the difference content to the client for designers to view.
[0030] After the planner reviews and confirms the changes, they determine whether the differences meet expectations. If there are issues with the differences, they request the remote server to roll back the table read operation (i.e., roll back the submitted Excel table), then modify the Excel table again and repeat the above process. If there are no issues with the differences, they request the remote server to submit the generated code files to the SVN repository.
[0031] Once the remote server receives a notification of successful rollback or successful submission, it will release the lock on the table read operation.
[0032] Therefore, it's evident that in existing technologies, after designers modify multiple Excel files and commit them to the SVN repository, they might forget to read one or more of these files. This can cause game malfunctions due to incorrect configuration, requiring testers or programmers to spend time troubleshooting. Furthermore, because current Excel file handling methods rely on the same project code directory path for reading, only one person can perform the reading operation. Moreover, when multiple branches of a project are under simultaneous development, it's impossible to read the Excel files corresponding to other branches. Manual reading of these other branches' Excel files requires coordination with programmers, significantly impacting project development progress.
[0033] In view of the problems existing in the related technologies, this disclosure proposes a data processing method. Figure 2 This schematic diagram illustrates a flow chart of a data processing method in an embodiment of this disclosure, applied to a server, such as... Figure 2 As shown, the data processing method includes at least the following steps:
[0034] Step S210. If a target configuration table is received from the version management repository, determine all projects stored in the version management repository and the corresponding trunk branches; wherein, the target configuration table has been modified.
[0035] Step S220. Based on the trunk branch versions of all projects, extract the log information between the latest version's first trunk branch and the historical version's second trunk branch; where the historical version is the version preceding the latest version.
[0036] Step S230. Parse each log message to determine the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs.
[0037] Step S240. Generate difference information between the target configuration table and the storage configuration table recorded in the target trunk branch, and return the difference information.
[0038] In the method and apparatus provided by the exemplary embodiments of this disclosure, if a target configuration table is received from a version management repository, all projects stored in the version management repository and the corresponding trunk branches of all projects are determined. Based on the trunk branch version, log information between the latest version's first trunk branch and the historical version's second trunk branch is extracted, and the log information is parsed to determine the target project and target trunk branch to which the target configuration table belongs. On the one hand, difference information between the target configuration table and the stored configuration table recorded in the target trunk branch is generated, ensuring that no difference information corresponding to the target configuration table is missed after receiving the target configuration table, thus avoiding game abnormalities due to incorrect game configuration. On the other hand, the generation of difference information supports multiple trunk branches simultaneously, improving project development efficiency. The following provides a detailed description of each step of the data processing method.
[0039] In step S210, if a target configuration table is received from the version management repository, all projects stored in the version management repository and the corresponding trunk branches are determined; wherein, the target configuration table has been modified.
[0040] In the exemplary embodiments disclosed herein, the version control repository is an SVN repository. After a planner modifies the configuration table of any branch of any project, they can directly commit the configuration table to the SVN repository. The server periodically receives the target configuration table from the SVN repository. The target configuration table is the latest modified configuration table submitted by the planner and received from the SVN repository.
[0041] "All projects" refers to projects currently stored in the SVN repository. For example, "all projects" could include projects for configuring gameplay mode 1 in the target game, projects for configuring gameplay mode 2 in the target game, and projects for configuring combat stats in the target game. It's worth noting that the trunk branch includes not only the trunk itself but also multiple branches connected to it. The trunk records configuration information shared by multiple branches.
[0042] In an optional embodiment, before receiving the target configuration table from the version management repository, the method further includes: if a difference preview request sent by the client is received, parsing the version management repository link to analyze and obtain the target project and target trunk branch to which the target configuration table belongs; wherein the difference preview request carries the target configuration table and the version management repository link corresponding to the target configuration table; obtaining a trunk branch copy in an unlocked state based on the target project and the target trunk branch; converting the target configuration table into target configuration code to generate preview difference information between the target configuration code and the copy code corresponding to the trunk branch copy, and returning the preview difference information to the client.
[0043] Among these features, after a planner modifies the configuration table of any branch of any project, in addition to directly submitting the configuration table to the SVN repository, they can also request a preview of the differences through a client.
[0044] Specifically, sometimes planners have a high degree of complexity in modifying the target configuration table. In such cases, they may want to send a difference preview request to obtain preview differences between the target configuration table and the main branch copy in advance. By previewing the difference information, planners can determine whether the current modifications to the target configuration table meet their current requirements. If not, they can modify the target configuration table again until it meets their current requirements before committing it to the version control repository.
[0045] The process of obtaining preview difference information is as follows: If the planner needs to preview the difference information, they can send a difference preview request to the server through the client. It is worth noting that the difference preview request carries the target configuration table for comparison and the version repository link of the target configuration table.
[0046] By parsing the version repository link, we can determine the project to which the target configuration table belongs (i.e., the target project) and the trunk branch to which the target configuration table belongs within the target project (i.e., the trunk and branches within the target project). The target trunk branch of the target project stores multiple trunk branch copies, which are the objects used for difference comparison with the target configuration table.
[0047] Based on this, the target configuration table is converted into code (i.e., target configuration code). When the trunk branch replica is unlocked, preview difference information is generated based on the target configuration code and the replica code of the trunk branch replica. The preview difference information records the differences between the target configuration code and the replica code recorded in the trunk branch replica. After obtaining the preview difference information, it can be returned to the client for relevant personnel to view.
[0048] Figure 3 This illustration schematically shows a flowchart of viewing preview difference information in an embodiment of this disclosure, such as... Figure 3 As shown, firstly, the server receives a difference preview request from the client. Then, it saves the target configuration table carried in the request in a temporary directory and parses the version control repository link corresponding to the target configuration table to determine the target project and target trunk branch to which the target configuration table belongs. Next, it checks whether the trunk branch copy corresponding to the target trunk branch is locked. If all trunk branch copies are locked, the client is notified to make the difference preview request later. If there is an unlocked trunk branch copy, it is retrieved and locked. The target configuration table is converted into target configuration code, and preview difference information (i.e., a file containing the code difference content) is generated between the target configuration code and the copy code corresponding to the trunk branch copy. Finally, based on the detailed information involved in the above process (including operation information, output information, error information, preview difference information, etc.), an HTML webpage is generated and sent to the client. After sending the HTML webpage to the client, the lock on the trunk branch copy is released. If the planner believes that the preview difference information is insufficient, the generated target configuration code is rolled back.
[0049] In an optional embodiment, the target configuration table may contain a lot of modified content, and there may be revisions in the target configuration table that are uncertain whether they are correct. In this case, the target configuration table can be submitted to the SVN repository directly without submitting it directly. Instead, a difference preview request can be sent to check in advance whether there are any abnormalities or errors in the target configuration table and whether the modified content meets expectations. This avoids errors affecting the development or testing of others and reduces the occurrence of repeated submissions of the target configuration table and repeated rollbacks of the target configuration code.
[0050] In an optional embodiment, determining all projects stored in the version management repository and the corresponding trunk branches includes: checking the validity of the dependent configuration paths to obtain a check result; if the check result is valid, determining whether a configuration table belonging to the project trunk and the configuration code corresponding to the configuration table exist in the local directory to obtain a first judgment result; wherein, the project trunk is the trunk of all projects stored in the version management repository; if the first judgment result is that it exists, determining the consistency between the first project branch corresponding to all projects stored locally on the server and the second project branch corresponding to all projects stored in the version management repository to obtain a second judgment result; if the second judgment result is consistent, determining all projects stored in the version management repository and the corresponding trunk branches.
[0051] Before determining the projects stored in the SVN repository and their corresponding trunk branches, a series of checks and judgments need to be performed in advance.
[0052] Specifically, the first step is to determine whether the configuration paths that the server depends on are still valid. The configuration paths that the server depends on include the parent directory path for storing configuration tables, the parent directory path for storing configuration code, the parent directory path for storing operation information, output information, error information, preview difference information, etc., the parent directory path for storing logs, and the parent directory path for storing permanent data.
[0053] If the check result is valid, it proves that the above path is still valid and usable. At this point, we can determine whether the configuration table and configuration code already exist in the local directory of the server to obtain the first judgment result. The configuration table refers to the configuration table recorded in the project trunk stored in the SNV repository, and the configuration code is obtained by converting the configuration table.
[0054] If the first judgment result is that the project exists, the system continues to check whether the first project branch of all projects stored locally on the server is consistent with the second project branch stored in the SVN repository to obtain the second judgment result. Only when the check result is valid, the first judgment result is that the project exists, and the second judgment result is consistent, can the system determine all projects stored in the SVN repository and the corresponding trunk branches of all projects.
[0055] In an optional embodiment, based on the inspection results, the first judgment result, and the second judgment result, it is determined whether to identify all projects stored in the SVN repository and the corresponding trunk branches of all projects at this time, so as to prepare in advance and avoid unnecessary problems in the subsequent generation of difference information.
[0056] In an optional embodiment, the method further includes: if the first determination result is that the configuration table and / or configuration code does not exist, then a pull task is created for the configuration table and / or configuration code, and all projects stored in the version management repository and the corresponding trunk branches are terminated; if the second determination result is inconsistent, and there is a project branch to be pulled that is not included in the local server in the version management repository, then a branch pull task corresponding to the project branch to be pulled is created, and all projects stored in the version management repository and the corresponding trunk branches are terminated; if the second determination result is inconsistent, and there is a project branch to be deleted that is not included in the version management repository in the local server, then a deletion task corresponding to the project branch to be deleted is created, and all projects stored in the version management repository and the corresponding trunk branches are terminated.
[0057] If the first judgment result does not exist, it proves that some project trunk configuration tables and / or configuration code have not been pulled from the SVN repository to the local directory. In this case, it is necessary to create a pull task for these configuration tables and / or configuration code that have not been pulled to the local directory, and execute the pull task to pull the configuration tables and / or configuration code of the project trunk that are not currently in the local directory from the SVN repository to the SVN repository.
[0058] When the SVN repository contains a branch of the project to be pulled that is not included in the local SVN repository, the second judgment result is inconsistent. In this case, a branch pull task needs to be created for the branch to be pulled. When the local SVN repository contains a branch of the project to be deleted that is not included in the local SVN repository, the second judgment result is also inconsistent. In this case, a deletion task needs to be created for the branch to be deleted, which then pulls the branch to be pulled from the SVN repository and deletes the branch to be deleted from the local SVN repository to ensure that the project branch stored on the local SVN repository is completely consistent with the project branch stored in the SVN repository.
[0059] It is worth noting that when the check result is invalid, the first judgment result is non-existent, or the second judgment result is inconsistent, all stored projects and their corresponding trunk branches will not be identified from the version control repository.
[0060] In optional embodiments, pull tasks for configuration tables and / or configuration code, branch pull tasks for project branches to be pulled, and deletion tasks for project branches to be deleted can be created to lay the foundation for subsequent generation of difference information and ensure the accuracy of subsequent generation of difference information.
[0061] In step S220, based on the trunk branch versions of all projects, the log information between the latest version of the first trunk branch and the historical version of the second trunk branch is extracted; where the historical version is the version before the latest version.
[0062] In an exemplary embodiment of this disclosure, after determining the main branches of all projects, the current version of the main branch, i.e., the main branch version, can be determined, for example, the main branch version is 4.0. Based on this, log information between the first main branch of version 4.0 (i.e., the latest version) and the second main branch of version 3.0 (a historical version) can be extracted from the SVN repository.
[0063] In an optional embodiment, the log information is the log information between the first trunk branch of the latest version and the second trunk branch of the historical version, which helps to determine the target project and target trunk branch to which the target configuration table belongs based on the log information.
[0064] In step S230, each log message is parsed to determine the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs.
[0065] In an exemplary embodiment of this disclosure, after obtaining the log information, each log message can be parsed. By parsing the log information, the project to which the target configuration mesh belongs (i.e., the target project) and the main branch to which the target configuration mesh belongs within the target project (i.e., the target main branch) can be determined.
[0066] In an optional embodiment, each log message is parsed to determine the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs, including: determining the version management link of the target configuration table; parsing each log message to obtain all version projects belonging to the latest version and historical versions and the version trunk branches corresponding to all version projects; based on the version management link, determining the target project to which the target configuration table belongs among all version projects, and determining the target trunk branch to which the target configuration table belongs among the version trunk branches.
[0067] By parsing each log message sequentially, we can obtain all projects (i.e., version projects) belonging to the latest version and historical versions, as well as the main branches (i.e., version main branches) that each version project possesses.
[0068] By using the version management links of the target configuration table, you can identify the target project that is linked to the target configuration table in the version project. The target project is the project to which the target configuration table belongs in the version project. Based on this, you can also identify the target trunk branch to which the target configuration table belongs in the version trunk branch.
[0069] In an optional embodiment, by parsing the log information, the target project to which the target configuration table belongs can be determined within version projects belonging to both the latest and historical versions, thereby identifying the target trunk branch to which the target configuration table belongs. This facilitates the subsequent generation of difference information between the target configuration table and configuration tables belonging to the target trunk branch.
[0070] In an optional embodiment, after determining the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs, the method further includes: creating a difference comparison task for each log message and establishing a processing relationship between the difference comparison task and the target trunk branch.
[0071] Specifically, a difference comparison task is created for each log entry. This task generates information about the differences between the target configuration table and the configuration table in the target trunk branch. It's worth noting that a difference comparison task has a processing relationship with its corresponding target trunk branch; in this case, for each target trunk branch, difference information between the target configuration table and the configuration table in that branch can be generated.
[0072] In an optional embodiment, a difference comparison task is created for each log message, and a processing relationship is established between the difference comparison task and the target trunk branch. This helps to generate difference information between the target configuration table and the configuration table in the target trunk branch for each target trunk branch, thus avoiding errors and omissions.
[0073] In step S240, difference information between the target configuration table and the storage configuration table recorded in the target trunk branch is generated, and the difference information is returned.
[0074] In an exemplary embodiment of this disclosure, the difference information refers to the difference between the target configuration table and the configuration table stored in the target trunk branch. After the difference information is determined, it needs to be returned to the client so that the planner can view it.
[0075] In an optional embodiment, generating difference information between the target configuration table and the storage configuration table recorded in the target trunk branch includes: selecting a target difference comparison task in the difference comparison task; determining whether the target trunk branch that has a processing relationship with the target difference comparison task is in a locked state to obtain a state judgment result; if the state judgment result is unlocked, updating the state of the target trunk branch to a locked state; and performing a difference comparison between the storage configuration table recorded in the target trunk branch and the target configuration table to generate difference information between the storage configuration table recorded in the target trunk branch and the target configuration table.
[0076] There can be multiple difference comparison tasks. When there are multiple difference comparison tasks, each target difference comparison task needs to be executed sequentially.
[0077] After selecting a target difference comparison task, it is necessary to determine whether the target trunk branch is currently locked. If the target trunk branch that has a processing relationship with the target difference comparison task is currently locked, it means that the difference comparison task cannot be executed at this time. Therefore, it is necessary to wait for the status of the target trunk branch to be updated to unlocked before the difference comparison task can continue to be executed. If the target trunk branch that has a processing relationship with the target difference comparison task is currently unlocked, the storage configuration table recorded in the target trunk branch can be determined.
[0078] Compare the differences between the storage configuration table recorded in the target trunk branch and the target configuration table to generate difference information.
[0079] In an optional embodiment, if the status judgment result is unlocked, the status of the target main branch is updated to locked, and subsequent difference comparison is performed, which avoids conflicts between multiple difference comparison tasks.
[0080] In an optional embodiment, generating difference information between the storage configuration table recorded in the target trunk branch and the target configuration table includes: converting the target configuration table into a first target configuration code and determining a second target configuration code recorded in the target trunk branch; comparing the first target configuration code and the second target configuration code to obtain difference information.
[0081] This involves converting the contents of the target configuration table into code, i.e., into the first target configuration code. At the same time, it is also necessary to determine the second target configuration code in the target main branch for comparison with the first target configuration code.
[0082] The differences between the first target configuration code and the second target configuration code are compared to obtain the difference information.
[0083] In an optional embodiment, comparing the first target configuration code and the second target configuration code can reveal the differences between the target configuration table and the configuration code of the target historical version, so that subsequent planners can confirm whether to submit the first target configuration code to the SVN repository.
[0084] In an optional embodiment, before returning the difference information, the method includes: if no error message is generated, submitting the first target configuration code to the version management repository; if an error message is generated, performing a rollback process on the target configuration table.
[0085] When an error message is generated, it indicates that an error occurred during the generation of the difference information. In this case, it proves that the target configuration table is incorrect, and the target configuration table is rolled back. If no error message is generated, it proves that the obtained first target configuration code is correct, and the first target configuration code is committed to the SVN repository.
[0086] In an optional embodiment, automatic submission of the corresponding first target configuration code is implemented, ensuring the accuracy of the game configuration.
[0087] In the method and apparatus provided by the exemplary embodiments of this disclosure, if a target configuration table is received from a version management repository, all projects stored in the version management repository and the corresponding trunk branches of all projects are determined. Based on the trunk branch version, log information between the latest version of the first trunk branch and the historical version of the second trunk branch is extracted, and the log information is parsed to determine the target project and target trunk branch to which the target configuration table belongs. On the one hand, difference information between the target configuration table and the stored configuration table recorded in the target trunk branch is generated, ensuring that no difference information corresponding to the target configuration table is missed after the target configuration table is received, thus avoiding game abnormalities caused by incorrect game configuration. On the other hand, multiple trunk branches are supported to be generated simultaneously during the generation of difference information, improving the efficiency of project development.
[0088] Figure 4 This schematic diagram illustrates a flow chart of the data processing method in a specific scenario according to an embodiment of the present disclosure, such as... Figure 4 As shown, planners can directly submit modified Excel tables to the SVN repository, or they can initiate a difference preview request to generate preview difference information via the server. Planners then evaluate the preview difference information to see if it meets expectations. If it does not, the Excel table is not submitted to the SVN repository; if it does, it is submitted, and the planners wait for the server to return detailed information (i.e., operation information, output information, error information, and preview difference information obtained during the generation of the preview difference information).
[0089] If the planner does not initiate a difference preview request and directly commits the Excel table to the SVN repository, the system will begin checking the server configuration paths that the server depends on, checking the versions of all project trunks (i.e., obtaining the first judgment result), and checking the versions of all project branches (i.e., obtaining the second judgment result). When all the above checks pass, the latest Excel table is pulled from the SVN repository, and its corresponding SVN version number is recorded, and a timer is started.
[0090] The timer will check the branch versions of all projects (i.e., identify all projects stored in the version control repository and the corresponding trunk branches); it will also extract the SVN commit logs (i.e., extract log information); then create an automatic processing task for each log message (i.e., create a difference comparison task); and then execute each difference comparison task.
[0091] During the execution of the difference comparison task, it is determined whether the task project version is locked (i.e., whether the target trunk branch that has a processing relationship with the target difference comparison task is in a locked state); if it is locked, it waits for the project version to be unlocked; if it is not locked, it locks the project version (i.e., locks the target trunk branch); the Excel table is converted into a code file and difference information is generated.
[0092] Determine if any errors occurred during the generation of difference information (i.e., whether error messages were displayed); if errors occurred, roll back the Excel table; if no errors occurred, commit the code file (i.e., the first target configuration code).
[0093] It can also generate an HTML webpage based on detailed information (operation information, output information, error information, difference information, etc.) and return the HTML webpage to the client. After returning the HTML webpage to the client, it unlocks the version of the project, that is, it unlocks the target trunk branch.
[0094] In specific application scenarios, the server can be developed using Python (a computer programming language) based on a web application framework called Flask (a program development framework). Clients and servers communicate via HTTP (Hypertext Transfer Protocol) to request and receive results. After executing the server's main script, it listens on the server's IP address and port, creating a Flask web application. Once the web application starts, clients can perform operations such as starting and stopping the server through requests.
[0095] The implemented client operation requests include: starting the server, stopping the server, stopping the timer, setting automatic processing permissions for users, and executing corresponding preview difference requests.
[0096] Figure 5 A diagram illustrating the relationship between different script modules in an embodiment of this disclosure is shown.
[0097] The logic module is the core module for automatic processing; it automatically generates difference information after the server receives the target configuration table. Figure 6 A schematic diagram of the logic module in an embodiment of this disclosure is shown, such as... Figure 6 The simulation processing is the processing procedure corresponding to the difference preview request, the automatic processing task is the difference comparison task, the branch deletion task is the deletion task, and the branch retrieval task is the branch retrieval task. Figure 7 The flowchart illustrating the calling process of the logic module in an embodiment of this disclosure is shown.
[0098] Furthermore, in an exemplary embodiment of this disclosure, a data processing apparatus is also provided. Figure 8 This diagram illustrates the structure of a data processing device, applied to a server, such as... Figure 8 As shown, the data processing device 800 may include: a configuration table receiving module 810, a log information extraction module 820, a log information parsing module 830, and a difference information generation module 840.
[0099] in:
[0100] The configuration table receiving module 810 is configured to, upon receiving a target configuration table from the version management repository, determine all projects stored in the version management repository and the corresponding trunk branches; wherein the target configuration table has been modified. The log information extraction module 820 is configured to, based on the trunk branch versions of the trunk branches of all projects, extract log information between the latest version's first trunk branch and the historical version's second trunk branch; wherein the historical version is the version preceding the latest version. The log information parsing module 830 is configured to parse each log message to determine the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs. The difference information generation module 840 is configured to generate difference information between the target configuration table and the stored configuration table recorded in the target trunk branch, and return the difference information.
[0101] In an exemplary embodiment of this disclosure, based on the foregoing scheme, the configuration table receiving module 810 further includes: a difference preview request module, configured to parse the version management repository link if a difference preview request sent by the client is received, so as to analyze and obtain the target project and target trunk branch to which the target configuration table belongs; wherein, the difference preview request carries the target configuration table and the version management repository link corresponding to the target configuration table; an unlocked module, configured to obtain a trunk branch copy in an unlocked state based on the target project and the target trunk branch; and a preview difference information generation module, configured to convert the target configuration table into target configuration code, so as to generate preview difference information between the target configuration code and the copy code corresponding to the trunk branch copy, and return the preview difference information to the client.
[0102] In an exemplary embodiment of this disclosure, based on the foregoing scheme, the configuration table receiving module 810 includes: a checking module configured to check the validity of the dependent configuration path to obtain a checking result; a first judgment module configured to, if the checking result is valid, determine whether a configuration table belonging to the project trunk and the configuration code corresponding to the configuration table exist in the local directory to obtain a first judgment result; wherein, the project trunk is the trunk of all projects stored in the version management repository; a second judgment module configured to, if the first judgment result is valid, determine the consistency between the first project branch corresponding to all projects stored locally on the server and the second project branch corresponding to all projects stored in the version management repository to obtain a second judgment result; and a project determination module configured to, if the second judgment result is consistent, determine all projects stored in the version management repository and the trunk branches corresponding to all projects.
[0103] In an exemplary embodiment of this disclosure, based on the foregoing scheme, the configuration table receiving module 810 further includes: a pull task creation module, configured to create a pull task for the configuration table and / or configuration code if the first judgment result is that it does not exist, and terminate the determination of all stored projects and the corresponding trunk branches from the version management repository; a branch pull task creation module, configured to create a branch pull task corresponding to the project branch to be pulled if the second judgment result is inconsistent, and there is a project branch to be pulled that is not included in the local server in the version management repository, and terminate the determination of all stored projects and the corresponding trunk branches from the version management repository; and a deletion task module, configured to create a deletion task corresponding to the project branch to be deleted if the second judgment result is inconsistent, and there is a project branch to be deleted that is not included in the version management repository in the local server, and terminate the determination of all stored projects and the corresponding trunk branches from the version management repository.
[0104] In one exemplary embodiment of this disclosure, the log information parsing module 830 includes: a link determination module configured to determine the version management link of the target configuration table; a log parsing module configured to parse each log message to obtain all version items belonging to the latest version and historical versions, as well as the version trunk branches corresponding to all version items; and a project branch determination module configured to, based on the version management link, determine the target project to which the target configuration table belongs among all version items, and determine the target trunk branch to which the target configuration table belongs among the version trunk branches.
[0105] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the project branch determination module further includes: a difference comparison task creation module, configured to create a difference comparison task for each log message and establish a processing relationship between the difference comparison task and the target trunk branch.
[0106] In an exemplary embodiment of this disclosure, based on the foregoing scheme, the difference information generation module 840 includes: a target task selection module, configured to select a target difference comparison task from the difference comparison tasks; a status judgment module, configured to determine whether a target trunk branch that has a processing relationship with the target difference comparison task is in a locked state to obtain a status judgment result; a locking module, configured to update the status of the target trunk branch to a locked state if the status judgment result is unlocked; and a difference comparison module, configured to perform a difference comparison between the storage configuration table recorded in the target trunk branch and the target configuration table to generate difference information between the storage configuration table recorded in the target trunk branch and the target configuration table.
[0107] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the difference comparison module includes: a code conversion module configured to convert the target configuration table into a first target configuration code and determine the second target configuration code recorded in the target trunk branch; and to compare the first target configuration code and the second target configuration code to obtain difference information.
[0108] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the method further includes: a submission module, configured to submit the first target configuration code to the version management repository if no error message is generated; and a rollback module, configured to roll back the target configuration table if an error message is generated.
[0109] The specific details of the aforementioned data processing device 800 have been described in detail in the corresponding data processing method, so they will not be repeated here.
[0110] It should be noted that although several modules or units of the data processing apparatus 800 are mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0111] Furthermore, in an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0112] The following reference Figure 9 To describe an electronic device 900 according to such an embodiment of the present invention. Figure 9The electronic device 900 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0113] like Figure 9 As shown, the electronic device 900 is manifested in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 530 connecting different system components (including storage unit 920 and processing unit 910), and a display unit 940.
[0114] The storage unit stores program code that can be executed by the processing unit 910, causing the processing unit 910 to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of the present invention.
[0115] Storage unit 920 may include readable media in the form of volatile storage units, such as random access memory (RAM) 921 and / or cache memory 922, and may further include read-only memory (ROM) 923.
[0116] Storage unit 920 may also include a program / utility 924 having a set (at least one) of program modules 925, such program modules 925 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may contain the reality of the network environment.
[0117] Bus 930 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0118] Electronic device 900 can also communicate with one or more external devices 970 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 900, and / or with any device that enables electronic device 900 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 950. Furthermore, electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 960. As shown, network adapter 960 communicates with other modules of electronic device 900 via bus 930. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0119] The processor in the aforementioned electronic device, by executing machine-executable instructions, can perform the following operations in the aforementioned virtual background generation method:
[0120] If a target configuration table is received from the version control repository, identify all projects stored in the repository and their corresponding trunk branches; the target configuration table is the one that has been modified. Based on the trunk branch versions of all projects, extract log information between the latest version's first trunk branch and the historical version's second trunk branch; the historical version is the version preceding the latest version. Parse each log entry to determine the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs. Generate difference information between the target configuration table and the storage configuration table recorded in the target trunk branch, and return the difference information.
[0121] The validity of the dependent configuration path is checked to obtain the check result; if the check result is valid, the existence of a configuration table belonging to the project trunk and the corresponding configuration code in the local directory is determined to obtain the first judgment result; where the project trunk is the trunk of all projects stored in the version management repository; if the first judgment result is that it exists, the consistency between the first project branch corresponding to all projects stored locally on the server and the second project branch corresponding to all projects stored in the version management repository is determined to obtain the second judgment result; if the second judgment result is consistent, all projects stored in the version management repository and the trunk branches corresponding to all projects are identified.
[0122] If the first determination result is that the configuration table and / or configuration code does not exist, a fetch task is created for the configuration table and / or configuration code, and the process of identifying all projects stored in the version control repository and their corresponding trunk branches is terminated. If the second determination result is inconsistent, and there is a branch of the project to be fetched that is not included in the local server in the version control repository, a branch fetch task corresponding to the branch to be fetched is created, and the process of identifying all projects stored in the version control repository and their corresponding trunk branches is terminated. If the second determination result is inconsistent, and there is a branch of the project to be deleted that is not included in the version control repository on the local server, a deletion task corresponding to the branch to be deleted is created, and the process of identifying all projects stored in the version control repository and their corresponding trunk branches is terminated.
[0123] Determine the version management link of the target configuration table; parse each log message to obtain all version projects belonging to the latest version and historical versions, as well as the version trunk branches corresponding to all version projects; based on the version management link, determine the target project to which the target configuration table belongs among all version projects, and determine the target trunk branch to which the target configuration table belongs among the version trunk branches.
[0124] Create a difference comparison task for each log message and establish the processing relationship between the difference comparison task and the target trunk branch.
[0125] Select a target difference comparison task in the difference comparison task; determine whether the target trunk branch that has a processing relationship with the target difference comparison task is in a locked state and obtain the state judgment result; if the state judgment result is unlocked, update the state of the target trunk branch to locked state; compare the storage configuration table recorded in the target trunk branch with the target configuration table to generate difference information between the storage configuration table recorded in the target trunk branch and the target configuration table.
[0126] The target configuration table is converted into the first target configuration code, and the second target configuration code recorded in the target trunk branch is determined; the difference information is obtained by comparing the first target configuration code and the second target configuration code.
[0127] If no error message is generated, the first target configuration code is committed to the version control repository; if an error message is generated, the target configuration table is rolled back.
[0128] If a difference preview request is received from the client, the version management repository link is parsed to analyze and obtain the target project and target trunk branch to which the target configuration table belongs. The difference preview request carries the target configuration table and the version management repository link corresponding to the target configuration table. Based on the target project and the target trunk branch, an unlocked copy of the trunk branch is obtained. The target configuration table is converted into target configuration code to generate preview difference information between the target configuration code and the copy code corresponding to the trunk branch copy, and the preview difference information is returned to the client.
[0129] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0130] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section above.
[0131] refer to Figure 10 As shown, a program product 1000 for implementing the above-described method according to an embodiment of the present invention is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0132] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0133] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0134] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0135] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0136] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A data processing method, characterized in that, Applied to a server, the method includes: If a target configuration table is received from the version control repository, all projects stored in the version control repository and the corresponding trunk branches of all projects are identified; wherein, the target configuration table has been modified. Based on the trunk branch versions of all the projects, extract the log information between the latest version's first trunk branch and the historical version's second trunk branch; wherein, the historical version is the version preceding the latest version. Each log entry is parsed to determine the target project to which the target configuration table belongs and the target branch to which the target configuration table belongs. Generate difference information between the target configuration table and the storage configuration table recorded in the target trunk branch, and return the difference information.
2. The method according to claim 1, characterized in that, The process of identifying all projects stored in the version management repository and the corresponding trunk branches for each project includes: The validity of the dependent configuration paths is checked to obtain the check results; If the check result is valid, then determine whether there is a configuration table belonging to the project trunk and the configuration code corresponding to the configuration table in the local directory to obtain the first judgment result; wherein, the project trunk is the trunk of all projects stored in the version management repository; If the first judgment result is that it exists, then the consistency between the first project branch corresponding to all the projects stored locally on the server and the second project branch corresponding to all the projects stored in the version management repository is determined to obtain the second judgment result; If the second judgment result is consistent, all projects stored in the version management repository and the corresponding trunk branches of all projects are determined.
3. The method according to claim 2, characterized in that, The method further includes: If the first determination result is that it does not exist, then create a pull task for the configuration table and / or the configuration code, and terminate all projects stored in the version management repository and the trunk branches corresponding to all projects; If the second judgment result is inconsistent, and there is a project branch to be pulled that is not included in the local server in the version management repository, then create a branch pull task corresponding to the project branch to be pulled, and terminate all projects stored in the version management repository and the trunk branches corresponding to all projects. If the second determination result is inconsistent, and there is a project branch to be deleted that is not included in the version management repository on the local server, then a deletion task corresponding to the project branch to be deleted is created, and all projects stored in the version management repository and the trunk branches corresponding to all projects are terminated.
4. The method according to claim 1, characterized in that, The step of parsing each log entry to determine the target project to which the target configuration table belongs and the target branch to which the target configuration table belongs includes: Determine the version management link for the target configuration table; Each log entry is parsed to obtain all version projects belonging to the latest version and the historical versions, as well as the version trunk branches corresponding to all version projects; Based on the version management link, the target project to which the target configuration table belongs is determined among all version projects, and the target trunk branch to which the target configuration table belongs is determined among the version trunk branches.
5. The method according to claim 1, characterized in that, After determining the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs, the method further includes: Create a difference comparison task for each log entry and establish the processing relationship between the difference comparison task and the target trunk branch.
6. The method according to claim 5, characterized in that, The step of generating the difference information between the target configuration table and the storage configuration table recorded in the target trunk branch includes: Select a target difference comparison task from the difference comparison tasks; Determine whether the main branch of the target that has the processing relationship with the target difference comparison task is in a locked state to obtain a state judgment result; If the state determination result is unlocked, then the state of the target main branch is updated to locked. The storage configuration table recorded in the target trunk branch is compared with the target configuration table to generate difference information between the storage configuration table recorded in the target trunk branch and the target configuration table.
7. The method according to claim 6, characterized in that, The step of generating the difference information between the storage configuration table recorded in the target trunk branch and the target configuration table includes: The target configuration table is converted into a first target configuration code, and the second target configuration code recorded in the target trunk branch is determined; The difference information is obtained by comparing the first target configuration code and the second target configuration code.
8. The method according to claim 7, characterized in that, Before returning the difference information, the method includes: If no error message is generated, the first target configuration code is submitted to the version management repository; If the error message is generated, the target configuration table will be rolled back.
9. The method according to claim 1, characterized in that, Before receiving the target configuration table from the version management repository, the method further includes: If a difference preview request is received from the client, the version management repository link is parsed to analyze and obtain the target project and target trunk branch to which the target configuration table belongs; wherein, the difference preview request carries the target configuration table and the version management repository link corresponding to the target configuration table; Based on the target project and the target trunk branch, obtain a copy of the trunk branch that is in an unlocked state; The target configuration table is converted into target configuration code to generate preview difference information between the target configuration code and the copy code corresponding to the trunk branch copy, and the preview difference information is returned to the client.
10. A data processing apparatus, characterized in that, Applied to a server, the device includes: The configuration table receiving module is configured to, upon receiving a target configuration table from a version management repository, identify all projects stored in the version management repository and the corresponding trunk branches; wherein the target configuration table has been modified. The log information extraction module is configured to extract log information between the latest version of the first main branch and the historical version of the second main branch based on the main branch version of the main branch of all projects; wherein, the historical version is the version before the latest version. The log information parsing module is configured to parse each log message to determine the target project to which the target configuration table belongs and the target trunk branch to which the target configuration table belongs; The difference information generation module is configured to generate difference information between the target configuration table and the storage configuration table recorded in the target trunk branch, and return the difference information.
11. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-9 by executing the executable instructions.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is processed and executed, it implements the method described in any one of claims 1-9.