Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for updating a data table, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that herein.
In addition, it should be further noted that a data table editing tool (hereinafter, referred to as an editing tool for short) may be used as an execution subject of this embodiment, where the editing tool may be editing software or application of a data table, and may implement requirements for management, editing, and the like of multiple tables, cross tables, and single tables.
Fig. 2 is a flowchart of a method for updating a data table according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S202, determining a first target entry from the plurality of first entries, and determining a field to be linked from a plurality of fields included in the first target entry, where the plurality of first entries are a plurality of entries in a first data table displayed by a graphical user interface.
In step S202, the first data table may be, but is not limited to, an EXCEL data table, wherein the first data table may be any one of data tables in a data table file containing a plurality of data tables. Optionally, the first data table is a data table selected by a user through operation in a graphical user interface corresponding to the editing tool. For example, as can be seen from the graphical user interface of the editing tool shown in fig. 3, the graphical user interface of the editing tool mainly includes three windows, namely, a data table directory window, an entry window, and an entry data window, where the data table directory window displays identification information (e.g., name of each data table) of each data table included in the data table file; the entry window shows entry information of entries included in the data table selected by the user, for example, each entry included in the "MZ hit determination table" is shown in the entry window in fig. 3; the entry data window shows fields and values corresponding to the fields included in the target entry selected by the user, for example, the entry data window in fig. 3 shows fields and values corresponding to the fields corresponding to the "double-tap first segment — first tap" entry (for example, the value corresponding to the "injury event number" field is "3010111").
It should be noted that the data table may include a plurality of entries, and each entry may be composed of a plurality of fields and values corresponding to the plurality of fields.
It should be noted that the first data table is a data table selected by a user from a plurality of data tables displayed on a graphical user interface of the editing tool, for example, the first data table may be the "MZ hit determination table" in fig. 3. The first entry is an entry included in the first data table, and the first target entry is a target entry selected by the user from the plurality of first entries in the first data table, for example, in fig. 3, if the user selects "double-blade tap first segment-first click" entry from the plurality of entries displayed in the entry window, the entry is the first target entry.
It is easy to note that, because the editing tool can respectively visually display the data tables, the entries contained in the data tables, and the data contained in the entries through the data table directory window, the entry window, and the entry data window, the user can clearly know the data information contained in each data table through each window without performing repeated opening and closing operations on the data tables, thereby improving the management efficiency of the user in managing the data tables.
Step S204, a plurality of second entries associated with the field to be linked are obtained, where the plurality of second entries are a plurality of entries in a second data table displayed on the graphical user interface, and the first data table is different from the second data table.
In step S204, the second data table may be any one of the data tables in the data table file. Similar to the first data table and the first entry, the second entry is an entry included in the second data table, wherein each of the plurality of second entries also includes a field and a value corresponding to the field.
It should be noted that chain links can be established between the data tables through the fields to be linked, wherein the chain links between the data tables are realized through the fields to be linked between the data tables. For example, in FIG. 3, "@" indicates that the current field is a to-link field that implements a chain link between data tables. After the user clicks the field after "@", the editing tool automatically jumps from the graphical user interface of the first data table into the graphical user interface of the second data table, for example, as shown in fig. 4, after the user clicks the "@ default injury value" field in fig. 3, a plurality of second entries contained in the second data table associated with the first data table are presented in an entry window of the graphical user interface of the editing tool, and a chain TAB label is presented at the TAB, for example, a secondary TAB label direct _ damage is presented in the entry window of fig. 4. As shown in fig. 4, at the same time, the fields and the corresponding numerical values of the fields in the second target entry in the plurality of second entries are shown in the entry data window of the graphical user interface.
In step S206, a second target entry is determined from the plurality of second entries.
Alternatively, in the graphical user interface of the editing tool shown in fig. 5, the user has selected a second target item "physical non-injurious skill" among a plurality of second items shown in the item window. The user can determine the second target item from the plurality of second items by mouse clicking or finger touch. Meanwhile, fields contained in the physical harmless skills and numerical values corresponding to the fields are shown in the entry data window.
And step S208, assigning the key name corresponding to the second target entry to the field to be linked, and updating the first data table.
Optionally, as in fig. 5, the user selects a "physical harmless skill" entry, and at the same time, performs a right mouse button operation on the entry, at this time, an entry editing control pops up in the entry window, and the entry editing control includes three sub-controls, for example, in fig. 5, the entry editing control includes a "copy entry" control, a "delete entry" control, and an "apply entry" control, and the user operates the three sub-controls to implement the copy, delete, and apply operations on the selected entry. In fig. 5, when the user operates the "application entry" control, the editing tool assigns the key name "5000000" corresponding to the "physical harmless skill" to the field to be linked, so that the numerical value of the field to be linked is updated from "3010211" to "5000000". Meanwhile, the editing tool jumps from the graphical user interface shown in fig. 5 to the graphical user interface shown in fig. 6, and the "entry window" and the "entry data window" in fig. 6 only show the TAB labels of one level. As can be seen from fig. 6, through steps S202 to S208, the value corresponding to the field to be linked in the first target entry in the first data table is updated from "3010211" to "5000000", so that the update of the first data table is implemented.
It should be noted that after the modification of the numerical value of the field to be linked is completed, the user may also modify other fields of the data table and the numerical values corresponding to the fields by using an editing tool. After the editing tool completes the modification of all the data tables, the editing tool can uniformly update all the data tables.
According to the content, the fields to be linked realize the association between the data tables, the numerical values corresponding to the fields to be linked are modified through the editing tool, and the modification of the same fields in the data tables can be realized without the need of memorizing and searching the relation chains among the data tables by a user, so that the editing efficiency of the data tables is improved. Meanwhile, multiple opening and closing operations on the data tables are not needed in the process, and the management efficiency of the data tables is further improved.
Based on the solutions defined in steps S202 to S208, it can be known that, in the embodiment of the present invention, after determining a first target entry from a plurality of first entries and determining a field to be linked from a plurality of fields included in the first target entry by using a data table editing tool to manage a data table, a plurality of second entries associated with the field to be linked are obtained and a second target entry is determined from the plurality of second entries, and finally, a key name corresponding to the second target entry is assigned to the field to be linked and the first data table is updated. The first entries are entries in a first data table displayed by the graphical user interface, the second entries are entries in a second data table displayed by the graphical user interface, and the first data table is different from the second data table.
It is easy to note that, in the above process, since the field to be linked is associated with the plurality of second entries in the second data table, and the field to be linked is a field in the plurality of fields included in the first target entry in the first data table, the field to be linked can implement association between the first data table and the second data table, so that a user can implement field linking between cross-tables without performing frequent opening and closing operations on the data tables, thereby improving editing efficiency between the data tables, and further improving management efficiency of the data tables.
Therefore, the purpose of managing the data table is achieved by the scheme, the technical effect of improving the management efficiency of the data table is achieved, and the technical problem that the management efficiency is low due to the fact that the data table needs to be manually managed in the prior art is solved.
In an optional embodiment, after assigning the key name corresponding to the second target entry to the field to be linked, the editing tool displays, in the graphical user interface, the plurality of first fields included in the first target entry and the key names corresponding to the plurality of first fields, where the key name corresponding to the field to be linked is the key name corresponding to the second target entry. For example, after the editing tool completes the assignment operation of the field to be linked, the editing tool automatically jumps to the graphical user interface shown in fig. 6, where the graphical user interface shown in fig. 6 shows a plurality of first entries included in the first data table and a numerical value corresponding to the field to be linked in the first target entry, and the numerical value corresponding to the field to be linked is a numerical value obtained by modifying the numerical value corresponding to the field to be linked in a link jump manner.
It should be noted that, the process of updating the fields in the data table by the editing tool in the manner of chain jumping relates to reading, writing, parsing, editing and visualization of a single data table, management, editing and operation of batch data tables, and configuration of a relationship chain between data tables. Optionally, fig. 7 shows a data flow diagram of an optional editing tool, and as can be seen from fig. 7, the editing tool reads the EXCEL file into the local memory, and then performs processing such as parsing, visualization, editing, and saving on the EXCEL file. The EXCEL file includes at least one EXCEL data table, and the EXCEL data table may be the first data table in step S202.
In an optional embodiment, before determining the first target entry from the plurality of first entries, when the editing tool detects a read instruction, the read instruction is parsed to obtain a list identifier, and then a file list corresponding to the list identifier is read from a preset cache and the file list is displayed.
It should be noted that the list identifier may be set according to actual requirements, wherein in a game scene, the list identifier may be determined according to a type to which a model to be rendered belongs, for example, a data table in the list a includes fields and/or data related to garment rendering of a virtual character, and a list B includes fields and/or data related to skill of the virtual character.
Optionally, the user may need to process fields and/or data relating to the skills of the virtual character, at which point the user may determine the group in which the skills of the virtual character are located through an editing tool, such as "skill group" in fig. 8. Then, the editing tool reads all files in the skill set from the preset cache and displays the files.
Further, after the file list is displayed, when a selection instruction for the file list is detected, the editing tool determines a target file to be loaded from the file list, then loads the target file, and displays a data table list corresponding to the target file, wherein the data table list at least includes identification information of at least one data table, and the target file includes at least one data table.
The target file includes a plurality of data tables, for example, the "art group" list includes files corresponding to different art tasks, for example, the art a1 corresponds to the file B1, the art a2 corresponds to the file B2, the file B1 includes a plurality of data tables corresponding to the art a1, and the file B2 also includes a plurality of data tables corresponding to the art a2, and each data table may be an EXCEL data table.
Alternatively, if the user selects "art a 1" in "art group", the data tables included in "art a 1" are displayed in the data table entry window of the editing tool.
It is easy to note that the target file is determined by the editing tool after receiving the selection instruction, that is, the editing tool can selectively display the data tables required to be displayed by the user according to the requirement of the user, thereby avoiding the problem of slow loading speed caused by loading all the data tables at one time.
In addition, it should be noted that, because there are many data tables and it is not feasible to read and write the data tables frequently, the read and parsed data tables need to be cached.
Furthermore, after the editing tool determines the target file, the editing tool loads the target file and displays a data table list corresponding to the target file. Specifically, the editing tool performs deserialization operation on at least one data table to obtain a data structure corresponding to the at least one data table, and then loads the data structure and displays the data table list based on the data structure.
Optionally, as shown in fig. 7, after the editing tool reads the EXCEL file into the local memory, the deserializing operation is performed on the EXCEL file to obtain a data structure corresponding to the data table included in the determined EXCEL file, the data structure is loaded into the modification cache, and then the data table is visually displayed based on the modification cache. The user can edit the data content of the data table displayed in the graphical user interface of the editing tool, the editing result is stored in the modification cache, then the data in the modification cache is written back to the data structure, the data structure is subjected to serialization operation, the data after the serialization operation is stored in the local memory, and finally the data in the local memory is written into the EXCEL file.
In an alternative embodiment, after loading the target file, the editing tool determines a first data table from at least one data table contained in the target file, and performs a copy operation on the first data table.
It should be noted that, in the process of parsing the data table, the editing tool needs to process the original data table, read the data table, modify the logical relationship between the cache and the display, and therefore, the consistency of the data table needs to be maintained. In the process of editing the data table, the editing tool solves the problem of data conflict between the modified data table and the original data table in a file copying mode, and ensures that data in the data table can not be modified externally when being read in the editing process. In addition, the data table can be copied to avoid the problem that the data table cannot be edited due to the fact that the file is occupied.
The process of reading, modifying and storing the data table by the editing tool is an atomic operation, and the atomic operation is an inseparable operation, namely, all the operations are performed or none of the operations are performed. That is, the original data table a, the duplicate data table B and the data table C in the memory of the editing tool ensure that the data after being saved or reloaded are the same, for example, if the data table C is modified to be C +, then the three data tables (a ← B ← C +) are saved as (a + ← B + ← C +); if the data table A is modified to be A +, overloading (A + → B → C) is carried out on the three data tables, and then (A + → B + → C +) is obtained; if both tables A and C are modified, the user may select the table to be saved or reloaded via the editing tool and discard the other table.
In an alternative embodiment, before the first target entry is determined from the first entries, the editing tool reads the data table file, splits the data table file by taking the worksheet as a unit to obtain a plurality of data tables, and then displays the table identifiers corresponding to the plurality of data tables in the first display area of the graphical user interface. Wherein the data table file contains one or more data tables.
In general, data tables are edited in units of files, for example, in units of EXCEL files, and when an EXCEL file is manipulated, it is necessary to consider the problem of multiple tables and files. It is easy to note that since a plurality of data tables are located in the same file, when the data tables are operated, the editing tool needs to disassemble the file, for example, the EXCEL file is disassembled into a plurality of sheet tables, which results in complicated operation. In order to solve the above problem, in this embodiment, the editing tool splits the first data table by using the sub-table as an editing unit to obtain a plurality of sub-tables, so as to implement a multi-level unified design of the editing tool, for example, splitting the EXCEL into a plurality of sub-tables by using the sheet as a unit.
It should be noted that, in this embodiment, the editing tool is an editor designed based on an MVC (model View controller) framework, where fig. 9 shows an optional MVC framework schematic diagram, and as can be seen from fig. 9, in this embodiment, the editing tool can implement parsing, visualization, and editing operations on a data table through a model module, a View module, and a control module. In addition, as can be seen from fig. 9, after the data table is parsed, the parsed data table can be visually displayed by the editing tool, wherein the editing tool transmits the parsed data table from the model module to the view module in a signal form (as shown by a dotted line in fig. 9). The view module may display the parsed data table through a graphical user interface of the editing tool shown in fig. 8, for example, display each entry included in the data table in an entry window shown in fig. 8, and display fields included in the entry selected by the user and values corresponding to the fields in the entry data window.
In an optional embodiment, after the table identifiers corresponding to the multiple data tables are displayed in the first display area of the graphical user interface, the editing tool determines the first data table from the table identifiers corresponding to the multiple data tables, performs a copy operation on the first data table to obtain a copied first data table, then analyzes the copied first data table to obtain multiple first entries corresponding to the first data table and data corresponding to the multiple first entries, displays the multiple first entries in the second display area of the graphical user interface, and finally displays multiple fields included in the first target entry and values corresponding to the multiple fields in the third display area of the graphical user interface.
It should be noted that the first display area may be the data entry window in fig. 3, the second display area may be the entry window in fig. 3, and the third display area may be the entry data window in fig. 3.
Optionally, taking fig. 3 as an example for explanation, the user selects "MZ hit determination table" as the first data table from the multiple data tables shown in the data table entry window, at this time, the editing tool performs copy operation on the "MZ hit determination table", and analyzes the copied "MZ hit determination table" to obtain an entry included in the "MZ hit determination table". Then, the editing tool shows the respective entries contained in the "MZ hit determination table" in the entry window in fig. 3. After the user selects the first target item "double tap first segment-first click" in the item window, the fields contained in the item "double tap first segment-first click" and the values corresponding to the fields are displayed in the item data window of the editing tool.
In an optional embodiment, after the copied first data table is analyzed to obtain a plurality of first entries corresponding to the first data table and data corresponding to the plurality of first entries, the editing tool analyzes a preset field at a preset position in the first data table, determines a target type corresponding to the preset field, determines an original type corresponding to preset data input to the preset field, determines a type conversion function according to the preset data, and converts the original type into the target type according to the type conversion function.
It should be noted that, in the above process, the preset position in the first data table may be, but is not limited to, a header field of the first data table, where the header field defines a format type (i.e., an original type, e.g., a character string type) of the content data. The editing tool may convert the field type of the header field in the first data table through a type conversion function, where different field types correspond to different type conversion functions, for example, the editing tool converts the string type into an int (bone) type (i.e., a target type) using thetype conversion function 1.
In addition, it should be further noted that, in this embodiment, the editing tool may implement type conversion between a string type and a base type (e.g., int, pool, float, str, etc.), may also implement type conversion between a string type and a container type (e.g., list, dit, etc.), and may also implement type conversion between a string type and a combination type (e.g., a combination of a container type and a base type, e.g., list (int)).
In an optional embodiment, after the copied first data table is analyzed to obtain a plurality of first entries corresponding to the first data table and data corresponding to the plurality of first entries, the editing tool detects whether data corresponding to a preset field at a preset position in the first data table is empty, and determines that the data corresponding to the preset field is the preset data when the data corresponding to the preset field is detected to be empty. That is, in this embodiment, when it is detected that the content corresponding to a certain field in the sheet table is empty, default data is used for padding, so that the problem of program exception caused by the fact that the data content is empty is avoided.
In an optional embodiment, in the process of parsing the copied first data table, the editing tool reads first data corresponding to cells in the copied first data table, then converts the first data format corresponding to the first data into a second data format, and displays the first data in the second data format on the graphical user interface.
It should be noted that the editing tool can read, convert, modify, and display the data content corresponding to the cells in the copied first data table. Specifically, the editing tool reads the data content in the copied first data table into the memory in a character string form, and performs format conversion on the data content by using a type conversion function, for example, converts the character string type (i.e., the first data format) into an int type (i.e., the second data format). After the format conversion is completed, the editing tool displays the format-converted data content in the entry data window.
In addition, it should be noted that, in addition to the format conversion of the data content, the user may modify the data content, for example, the user modifies the value corresponding to the "injury event number" field to "3010112" through the entry data window in fig. 3, and at this time, the entry data window of the editing tool displays the modified value of the "injury event number".
In an optional embodiment, after the copied first data table is analyzed to obtain the plurality of first fields corresponding to the first data table and the plurality of numerical values corresponding to the first fields, the editing tool may further perform function definition on the fields in the first data table, for example, relationship chain, data range limitation, associated fields, enumeration, and the like.
Specifically, the editing tool analyzes a preset field at a preset position in the first data table, and determines a field function corresponding to the preset field. When the field function is a construction function of the relationship chain, the editing tool constructs the relationship chain between the first data table and the second data table based on the preset field.
And when the field function is a data range limiting function, the editing tool determines a numerical range corresponding to the preset field based on the field type of the preset field. For example, if the user limits the numerical range corresponding to the "flash from the clicked" field to an integer, the user can only input the integer into the numerical range corresponding to the field, and if the user inputs a floating point number, the editing tool enforces the floating point number to be modified to the integer, for example, if the user inputs "3.1", the editing tool enforces "3.1" to be modified to "3" or "4".
When the field function is a field association function, the editing tool constructs an association relationship between a third field and a second target entry, wherein the third field is a field associated with the second target entry in the plurality of first fields. For example, field a (i.e., the third field) is associated with entry b (i.e., the second target entry).
In addition, the editing tool may also construct an association relationship between fields, for example, if a field a is associated with a field b, and if the value corresponding to the field a is "0", the value corresponding to the field b is an invalid value, and at this time, the editing tool may automatically set the field b as a default value.
And when the field function is an enumeration function, the editing tool constructs enumeration content corresponding to the preset field. For example, the numerical content corresponding to the field c can only be "0" and "1", and the editing tool sets "0" and "1" as the enumerated content of the field c.
Besides the above function definitions, the editing tool can perform function expansion based on editing of multiple tools and multiple interfaces, for example, curve drawing, bounding box drawing, data transmission, and the like, which is not illustrated here.
In an alternative embodiment, the editing tool may further determine a first data table from the data tables displayed in the data table entry window, then determine a first target entry from the plurality of entries included in the first data table, and display a field included in the first target entry and a value corresponding to the field in the entry data window. For example, in the graphical user interface shown in fig. 3, the first data table is an "MZ hit determination table," and the user determines and selects an entry with the number "3010111" as a first target entry from entries included in the "MZ hit determination table" through a "filtering" control in the entry window, and displays a field corresponding to the entry with the number "3010111" and a numerical value corresponding to the field in the entry data window.
It should be noted that, because the graphical user interface of the editing tool can display the fields of the data table and the values corresponding to the fields, the user does not need to check the data table in a form of opening or closing the data table for many times. In addition, the user can edit the data table through a visual window of the editing tool.
In an alternative embodiment, the editing tool may further detect whether a data table editing instruction is received, and in the case that the data table editing instruction is received, edit at least one data table in the data table catalog window.
It should be noted that the data table editing instruction may implement operations of searching, saving, screening, resetting, hot-up, reloading, pulling, and the like on the data table (including the single table and the batch table).
Optionally, after assigning the key name corresponding to the second target entry to the field to be linked, the editing tool responds to a reset instruction, and restores the first data table to the initial data table and/or restores the entry in the first data table to the initial entry, where the initial data table is a data table before the first data table is updated, and the initial entry is an entry before the entry in the first data table is updated.
It should be noted that, the resetting operation performed on the data table list may cause the editing tool to undo the modification of the data table list, so as to return the data table list to an unmodified state. For example, the user deletes the "FX flight object table" in the data table list through the editing tool, at this time, the identifier corresponding to the data table is no longer displayed in the data table directory window of the editing tool, and after the user clicks the "reset" control in the graphical user interface of the editing tool, the identifier corresponding to the data table continues to be displayed in the data table directory window of the editing tool.
In an optional embodiment, after assigning the key name corresponding to the second target entry to the field to be linked, the editing tool responds to the reload instruction, reads the third data table, performs a copy operation on the third data table to obtain a copied third data table, and then loads the copied third data table to perform a covering operation on the first data table. The third data table is obtained after the first data table stored in the configuration file is updated.
It should be noted that, the reloading operation on the data table is to copy the original data table and load the copied copy into the editing tool, at this time, the editing tool acquires the modified data table, and the modification performed on the data table by the user in the editing tool before is lost. For example, a user performs multiple modification operations on the data table through an editing tool, but in the modification process, the user finds that an error occurs in one modification step, and therefore, the data table needs to be modified again, and at this time, the user can realize reloading of the data table by clicking the "reload all Excel" control in fig. 8, and modify the data table again.
In an optional embodiment, after assigning the key name corresponding to the second target entry to the field to be linked, the editing tool further responds to the pull instruction, obtains a fourth data table from the version control system, performs merging operation on the fourth data table and the third data table to obtain a merged data table, then performs copy operation on the merged data table to obtain a copied merged data table, and loads the copied merged data table to perform overlay operation on the first data table. The third data table is obtained after the first data table stored in the configuration file is updated.
It should be noted that, the pulling operation on the data table is to pull the data table (i.e., the fourth data table) on the SVN into the local, automatically merge the data table with the data table in the local (i.e., the third data table), and overwrite the merged file with the data table in the local memory. It is easy to note that the pull operation on the data table may cause the modification content of the data table by the user through the editing tool to be lost. For example, other users perform modification operations on the data table, and submit the modified data table to the SVN. When the current user needs to use the data table modified by other users, the current user can pull the modified data table by clicking the 'pull all Excel' control in fig. 8.
In an optional embodiment, after assigning the key name corresponding to the second target entry to the field to be linked, the editing tool further saves the updated first data table, and uploads the updated first data table to the client and the server.
It should be noted that, after the data table is modified, the editing tool saves the modified content into the first data table, and uploads the content in the first data table to the client (e.g., game client) and the server, so as to implement hot update of the data table, that is, during the process of updating the data table, the client and the server using the data table can still read the data table and operate normally.
Optionally, the editing tool may further determine a classification identifier of the first data table, then screen out a target group where the first data table is located from the multiple groups according to the classification identifier, and determine the first data table from the target group.
It should be noted that, in practical applications, a user may need to process multiple data tables at the same time, and in the present application, the user may perform batch processing on multiple data tables through an editing tool, for example, performing batch screening grouping according to the classification identifier of the data table. For example, the data table catalog window in FIG. 8 shows the data tables contained in "skill set" (e.g., "MZ hit determination Table", "FX flight object Table", etc.) that have the same class identifier. For another example, when the user selects the "art group" control in the table catalog window in fig. 8, all the tables included in the "art group" are displayed in the table catalog window of the editing tool.
Optionally, the editing tool may further determine a target data table from the at least one data table, search for an entry included in the target data table to obtain an entry to be edited, and then edit the entry to be edited to obtain an editing result. For example, in the graphical user interface shown in fig. 8, the "MZ hit determination table" is the target data table, and the entries included in the "MZ hit determination table" are shown in the middle "entry window". Because the number of entries is large, a user cannot easily find the entry to be edited from the plurality of entries, and at the moment, the user can screen the entry to be edited through the screening control in the entry window. For example, the item numbered "3010111" is screened by the "screening" control to be the item to be edited, and then the user selects the operation performed on the field to be edited by right-clicking, such as the "copy item" operation, the "delete item" operation, and the "apply item" operation.
Optionally, the editing tool may further determine a target data table from the at least one data table, then determine a target position of an entry to be added in the target data table and a target field type corresponding to a field included in the entry to be added, and add the entry to be added and the field included in the entry to be added to the target data table based on the target position and the target field type. For example, the user may right-click at a blank position in the "entry window" in fig. 8, then select "add entry" from the pop-up dialog box, and set the target position of the newly added entry (i.e., the entry to be added) and the information such as the target field type and data content corresponding to the fields included in the entry to be added. After the above information setting is completed, the newly added entry may be displayed in the "entry window" in fig. 8.
Optionally, the editing tool further determines a target data table from the at least one data table, and performs a reset operation on a preset field in the target data table when the reset instruction is detected, so that the target data table is reset to the initial state.
It should be noted that, similarly to the process of resetting the data table list, the process of resetting the preset field in the data table may cancel the modification of the preset field by the editing tool, so as to return the preset field to the unmodified state. For example, the user deletes thepreset field 1 through the editing tool, at this time, the identifier corresponding to thepreset field 1 is no longer displayed in the visualization window of the editing tool, and after the user clicks the "reset" control, the identifier corresponding to thepreset field 1 is continuously displayed in the graphical user interface of the editing tool.
In an alternative embodiment, fig. 10 shows a schematic diagram of interworking editing among multiple tools, where the multiple tools at least include an Excel editor, a version management tool (SVN), Excel editing software, a form guidance tool, a client, a server, and the like. As can be seen from fig. 10, the inter-working editing among the multiple tools can implement operations of saving, resetting, warming, reloading, and pulling the data table. The step of saving the data table refers to saving the content modified in the editing tool into the Sheet of the Excel file; the resetting of the data table means that the modification in the editing tool is cancelled and returns to an unmodified state; the hot data table means that the content in the Sheet is uploaded to the game client and the server, and meanwhile, the modification in the editing tool is stored firstly; the reloading of the data sheet refers to loading the modification in the Excel into an editing tool; the data sheet pulling refers to pulling Excel on the SVN to the local, automatically combining with a local file, and reloading into an editor.
In an alternative embodiment, as seen from the graphical user interface of the editing tool shown in fig. 8, the graphical windows of the editing tool include an Excel table catalog window (i.e., data table catalog window), an Excel table entry window (i.e., entry window), and an Excel table entry data window (i.e., entry data window), which are used to implement three-level functions. The Excel table catalog window is used for managing all Excel tables and is responsible for single-table operation, batch operation, screening search and the like so as to solve pain points of multi-table batch operation and meet requirements of cross-tool operation; the Excel table entry window is used for managing all entries of the selected Excel table, and is responsible for increasing, deleting, modifying, screening and searching and the like so as to realize the requirement of fast searching and screening; the Excel table entry data window is used for displaying and editing all data of selected entries so as to meet the requirements of data editing, limiting, detecting and associating and realize the operation of a relationship chain.
The editing tool in the present application manages the Excel file not for the replaced Excel editing software but as a functional extension of the Excel editing software.
According to the scheme, the integration and expansion of common functions on the general Excel editing software and the customization of the characteristics of the game industry can be realized. The scheme provided by the application can also solve the problem of pain in batch Excel table management and editing, and greatly improves the production efficiency of game development; the configuration detection, limitation and verification pain points of the single table are solved, and the accuracy and the precision of game configuration are improved; the management problem of a multi-terminal tool chain such as a version management tool, Excel editing software, a game terminal and the like is solved, and cross-tool use is realized; data are edited by chain skipping across Excel table relationship chains, so that the editing efficiency is greatly improved; generally speaking, a tool communicated with Excel for editing is provided, and game configuration can be edited more efficiently.
According to an embodiment of the present invention, there is further provided an embodiment of an apparatus for updating a data table, where fig. 11 is a schematic diagram of an apparatus for updating a data table according to an embodiment of the present invention, and as shown in fig. 11, the apparatus includes: a first determining module 1101, an obtaining module 1103, a second determining module 1105, and an updating module 1107.
The first determining module 1101 is configured to determine a first target entry from a plurality of first entries, and determine a field to be linked from a plurality of fields included in the first target entry, where the plurality of first entries are a plurality of entries in a first data table displayed by a graphical user interface; an obtaining module 1103, configured to obtain a plurality of second entries associated with the fields to be linked, where the plurality of second entries are a plurality of entries in a second data table displayed by the graphical user interface, and the first data table is different from the second data table; a second determining module 1105 for determining a second target entry from the plurality of second entries; the updating module 1107 is configured to assign the key name corresponding to the second target entry to the field to be linked, and update the first data table.
It should be noted that the first determining module 1101, the obtaining module 1103, the second determining module 1105 and the updating module 1107 correspond to steps S202 to S208 in the foregoing embodiment, and the four modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in the foregoing embodiment.
Optionally, the apparatus for updating a data table further includes: and the first display module is used for displaying a plurality of first fields contained in the first target entry and key names corresponding to the plurality of first fields in the graphical user interface after assigning the key names corresponding to the second target entry to the fields to be linked, wherein the key names corresponding to the fields to be linked are the key names corresponding to the second target entry.
Optionally, the apparatus for updating a data table further includes: and the first response module is used for responding to a reset instruction after assigning the key name corresponding to the second target entry to the field to be linked, and restoring the first data table to the initial data table and/or restoring the entry in the first data table to the initial entry, wherein the initial data table is a data table before updating the first data table, and the initial entry is an entry before updating the entry in the first data table.
Optionally, the apparatus for updating a data table further includes: the second response module and the first loading module. The second response module is used for responding to the reload instruction after assigning the key name corresponding to the second target entry to the field to be linked, reading a third data table, and performing copy operation on the third data table to obtain a copied third data table, wherein the third data table is obtained after updating the first data table stored in the configuration file; and the first loading module is used for loading the copied third data table so as to carry out covering operation on the first data table.
Optionally, the apparatus for updating a data table further includes: the device comprises a third response module, a merging module, a first copying module and a second loading module. The third response module is used for responding to the pull instruction after assigning the key name corresponding to the second target entry to the field to be linked, and acquiring a fourth data table from the version control system; the merging module is used for merging the fourth data table and the third data table to obtain a merged data table, wherein the third data table is obtained after the first data table stored in the configuration file is updated; the first copying module is used for copying the merged data table to obtain a copied merged data table; and the second loading module is used for loading the copied merged data table so as to carry out covering operation on the first data table.
Optionally, the apparatus for updating a data table further includes: and the first updating module is used for storing the updated first data table after assigning the key name corresponding to the second target entry to the field to be linked, and uploading the updated first data table to the client and the server.
Optionally, the apparatus for updating a data table further includes: the device comprises a reading module, a splitting module and a second display module. The reading module is used for reading a data table file before determining a first target entry from a plurality of first entries, wherein the data table file comprises a plurality of data tables; the splitting module is used for splitting the data table files by taking the worksheets as units to obtain a plurality of data tables; and the second display module is used for displaying the table identifiers corresponding to the plurality of data tables in the first display area of the graphical user interface.
Optionally, the apparatus for updating a data table further includes: the system comprises a third determining module, a second copying module, a first analyzing module, a third displaying module and a fourth displaying module. The third determining module is configured to determine the first data table from the table identifiers corresponding to the multiple data tables after the table identifiers corresponding to the multiple data tables are displayed in the first display area of the graphical user interface; the second copying module is used for copying the first data table to obtain a copied first data table; the first analysis module is used for analyzing the copied first data table to obtain a plurality of first entries corresponding to the first data table and data corresponding to the plurality of first entries; a third presentation module for presenting a plurality of first items in a second presentation area of the graphical user interface; and the fourth display module is used for displaying the fields contained in the first target entry and the values corresponding to the fields in a third display area of the graphical user interface.
Optionally, the apparatus for updating a data table further includes: the device comprises a second analysis module, a fourth determination module, a fifth determination module and a conversion module. The second analysis module is used for analyzing a preset field at a preset position in the first data table after analyzing the copied first data table to obtain a plurality of first entries corresponding to the first data table and data corresponding to the first entries, and determining a target type corresponding to the preset field; the fourth determining module is used for determining the original type corresponding to the preset data input to the preset field; a fifth determining module, configured to determine a type conversion function according to preset data; and the conversion module is used for converting the original type into the target type according to the type conversion function.
Optionally, the apparatus for updating a data table further includes: the device comprises a detection module and a sixth determination module. The detection module is used for detecting whether data corresponding to a preset field at a preset position in the first data table is empty or not after the copied first data table is analyzed to obtain a plurality of first entries corresponding to the first data table and data corresponding to the first entries; and the sixth determining module is configured to determine that the data corresponding to the preset field is the preset data when it is detected that the data corresponding to the preset field is empty.
Optionally, the apparatus for updating a data table further includes: the device comprises a third analysis module, a first construction module, a seventh determination module, a second construction module and a third construction module. The third analysis module is used for analyzing the copied first data table to obtain a plurality of first fields corresponding to the first data table and values corresponding to the first fields, analyzing preset fields at preset positions in the first data table, and determining field functions corresponding to the preset fields; the first construction module is used for constructing a relation chain between the first data table and the second data table based on the preset field when the field function is the construction function of the relation chain; a seventh determining module, configured to determine, when the field function is a data range limiting function, a numerical range corresponding to the preset field based on a field type of the preset field; the second building module is used for building an association relationship between a third field and a second target entry when the field function is a field association function, wherein the third field is a field associated with the second target entry in the plurality of first fields; and the third construction module is used for constructing enumeration content corresponding to the preset field when the field function is an enumeration function.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned data table updating method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for running a program, wherein the program is arranged to perform the above-mentioned method of updating a data table when run.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.