[go: up one dir, main page]

CN119396874A - Game configuration table ID replacement method, system, electronic device and storage medium - Google Patents

Game configuration table ID replacement method, system, electronic device and storage medium Download PDF

Info

Publication number
CN119396874A
CN119396874A CN202411232751.6A CN202411232751A CN119396874A CN 119396874 A CN119396874 A CN 119396874A CN 202411232751 A CN202411232751 A CN 202411232751A CN 119396874 A CN119396874 A CN 119396874A
Authority
CN
China
Prior art keywords
replacement
replacing
original
mapping cache
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411232751.6A
Other languages
Chinese (zh)
Inventor
胡建平
钱利君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Electronic Soul Network Technology Co Ltd
Original Assignee
Hangzhou Electronic Soul Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Electronic Soul Network Technology Co Ltd filed Critical Hangzhou Electronic Soul Network Technology Co Ltd
Priority to CN202411232751.6A priority Critical patent/CN119396874A/en
Publication of CN119396874A publication Critical patent/CN119396874A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24558Binary matching operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Compared with the scheme of manually realizing ID replacement in the related art, the scheme of the application has the advantages that the efficiency is higher and the error probability is lower through an automatic tool based on an xml file. In addition, compared with the repeated replacement problem of the replacement tool in the prior art, the replacement method provided by the technical scheme of the application has the advantages that through designing a two-step replacement process, the original ID is replaced with the intermediate ID which is mutually different and has independence, and then the intermediate ID is replaced with the new ID in the second step, so that the problem of poor accuracy caused by the repeated replacement in the prior art is solved, and the accuracy of ID replacement is improved.

Description

Game configuration table ID replacement method, system, electronic device and storage medium
Technical Field
The present application relates to the field of game development, and in particular, to a method, a system, an electronic device, and a computer-readable storage medium for replacing a game configuration table ID.
Background
Game configuration tables are important tools in game development for managing and configuring game elements, which are typically one or more tables containing data for various systems, objects, parameters, and attributes in the game. These data are read and parsed by the program to guide the play and performance of the game. By defining and configuring parameters and attributes of these systems, game planning can control aspects of game difficulty, balance, flow, etc. to achieve game design goals.
In the related art, when the game configuration table needs to be updated, the game is planned to manually operate Excel for replacement, and when the Excel is manually operated for replacement of the ID, the replacement omission or the replacement mistake is inevitably caused, or further, some other tables for drinking the ID are omitted, and when the automatic tool is used for replacement, the IDs with the same fields are replaced, and other IDs with the preconditions cannot be replaced or cannot be replaced correctly.
Currently, no effective solution has been proposed for the problem of error-prone substitution of game configuration table IDs in the related art.
Disclosure of Invention
The embodiment of the application provides a game configuration table ID replacement method, a system, computer equipment and a computer readable storage medium, which at least solve the problem that the replacement of the game configuration table ID is easy to make mistakes in the related technology.
In a first aspect, an embodiment of the present application provides a game configuration table ID replacement method, including:
Reading an original ID and a new ID from an ID replacement list, and establishing a first mapping cache between the original ID and the new ID;
In the first replacing step, copying a game configuration table in a game configuration directory file to a temporary replacement directory through a replacing program, and replacing an original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to the first mapping cache;
And in a second replacement step, traversing the temporary replacement catalog through the replacement program, replacing the intermediate ID with the new ID based on the first mapping cache, and covering all table files related to replacement under the temporary replacement catalog to the game configuration catalog.
In some embodiments, before the original ID and the new ID are read from the ID list file, the method further includes:
Constructing an xml configuration file, and defining a plurality of different configuration information in the xml configuration file;
in the xml configuration file, a table name, a table field name, and the table field name including a condition field associated with a subsequent replacement task are defined.
In some of these embodiments, the method further comprises:
Reading the xml configuration file through the replacement program to obtain information to be replaced, wherein the information to be replaced comprises a table name, a table field name and a condition field of the table field name;
and establishing a second mapping cache between all the table field names needing to be replaced and the corresponding table index numbers.
In some of these embodiments, replacing the original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to the first mapping cache includes:
traversing all data lines of each table file in the temporary replacement directory in sequence through a replacement program, and identifying the data lines needing replacement according to the information to be replaced;
replacing the original ID of the data line with an intermediate ID according to the first mapping cache, judging whether a condition field exists in the data line, and if not, directly replacing the table field name in the data line based on the second mapping cache;
If yes, based on the second mapping cache, acquiring whether a condition value corresponding to the table field name in the data line meets a replacement condition, and if yes, replacing the table field name in the data line.
In some of these embodiments, traversing the temporary replacement directory by the replacement program, replacing the intermediate ID with the new ID based on the first mapping cache includes:
Establishing an updated first mapping cache between the intermediate ID and the new ID according to the first mapping cache and the intermediate ID;
Traversing each table file in the temporary replacement directory in sequence through a replacement program, traversing all data lines in all table files, and identifying the data lines to be replaced according to the information to be replaced;
Replacing the middle ID of the data line with a new ID according to the second mapping cache, judging whether a condition field exists in the data line, and if not, replacing the table field name in the data line based on the second mapping cache;
If yes, based on the second mapping cache, acquiring whether a condition value corresponding to the table field name in the data line meets a replacement condition, and if yes, replacing the table field name in the data line.
In some of these embodiments, the intermediate IDs of the various columns of data in the game configuration table are independent of each other and are not duplicated from the original ID or the new ID, the intermediate IDs being generated by adding special characters to the original ID.
In a second aspect, the embodiment of the application also provides a game configuration table ID replacing system, which comprises a preprocessing module and a replacing module, wherein:
the preprocessing module is used for reading an original ID and a new ID from an ID replacement list, and establishing a first mapping cache between the original ID and the new ID;
The replacing module is used for copying the game configuration table in the game configuration directory file to a temporary replacement directory through a replacing program in a first replacing step, and replacing an original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to the first mapping cache;
And in a second replacement step, traversing the temporary replacement catalog through the replacement program, replacing the intermediate ID with the new ID based on the first mapping cache, and covering all table files related to replacement under the temporary replacement catalog to the game configuration catalog.
In some of these embodiments, the preprocessing module is further configured to construct an xml configuration file in which a plurality of different configuration information is defined, prior to the reading of the original ID and the new ID from the ID list file;
And defining a table name, a table field name and the table field name containing a condition field associated with a subsequent replacement task in the xml configuration file.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method according to the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as described in the second aspect above.
Compared with the related art, the game configuration table ID replacement method provided by the embodiment of the application has the advantages that compared with the scheme of manually realizing ID replacement in the related art, the scheme of the application has higher efficiency and lower error probability through an automatic tool based on an xml file. In addition, compared with the repeated replacement problem of the replacement tool in the prior art, the replacement method provided by the technical scheme of the application has the advantages that through designing a two-step replacement process, the original ID is replaced with the intermediate ID which is mutually different and has independence, and then the intermediate ID is replaced with the new ID in the second step, so that the problem of poor accuracy caused by the repeated replacement in the prior art is solved, and the accuracy of ID replacement is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a game configuration table ID replacement method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an ID replacement list according to an embodiment of the application;
FIG. 3 is a schematic diagram of a game configuration table with presence status fields according to an embodiment of the present application;
FIG. 4 is a block diagram of a game configuration table ID replacement system according to an embodiment of the present application;
Fig. 5 is a schematic view of an internal structure of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprises," "comprising," "includes," "including," or any other variation 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 modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes the association relationship of the association object, and indicates that three relationships may exist, for example, "a and/or B" may indicate that a exists alone, a and B exist simultaneously, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
Game configuration tables are an important tool in game development for managing and configuring game elements. It is typically one or more tables containing data for various systems, objects, parameters and attributes in the game. These data are read and parsed by the program to guide the play and performance of the game. The design of the game configuration table covers a plurality of aspects including, but not limited to, systems of level, skill, combat, tasks, props, etc., and by defining and configuring parameters and attributes of these systems, the game plan can control aspects of game difficulty, balance, flow, etc. to achieve the goal of game design.
In a game configuration table, ID is a key concept, which generally represents some unique identifier (Unique Identifier). Specifically, the ID is used to uniquely identify a game element or object in the configuration table. For example, a checkpoint configuration table may have multiple checkpoint entries, each with a unique ID to distinguish between the different checkpoints, and a prop configuration table may also include multiple prop entries, each with a unique ID to identify the identity.
Typically, the game planner manually manipulates excel for replacement, and human replacement can result in missing or erroneous replacement, as well as some of the tables that are referenced by other tables. Another type of tool replacement can cause some other fields to be replaced with the same ID, and some other IDs with preconditions cannot be replaced or are replaced correctly;
in view of the above problems, an embodiment of the present application provides a method for replacing a game configuration table ID, and fig. 1 is a flowchart of a method for replacing a game configuration table ID according to an embodiment of the present application, as shown in fig. 1, the flowchart includes the following steps:
s101, reading an original ID and a new ID from an ID replacement list, and establishing a first mapping cache between the original ID and the new ID;
Before step S101, an xml configuration file needs to be first constructed, and a plurality of different table configuration information is defined in the xml configuration file;
Wherein the specific details of the alternative are written in an XML configuration file, XML (extensible markup language) is a format for storing and transmitting data, which is well structured and easy to parse, and thus widely used in configuration files, which is particularly suitable for describing the structure of data.
Further, the XML configuration file may support multiple table configurations, and each function ID substitution may define different configuration information, e.g., an item ID substitution may be defined as configuration information item. XML, and a task ID substitution may be defined as configuration information task. XML;
In addition, when partial table field names relate to replacement conditions, a replacement condition field is designed, wherein the same replacement field name can be used for configuring a plurality of condition fields;
The following are examples of xml configuration files according to embodiments of the present application:
it will be appreciated that the xml configuration file described above is the basic support for implementing alternatives that require the use of xml files, details of which form data needs to be replaced, the conditions of the replacement, and the specific replacement rules.
Further, an ID replacement list "id.xlsx" is also required to be constructed, and fig. 2 is a schematic diagram of an ID replacement list according to an embodiment of the present application, where the ID replacement list includes an original ID and a new ID after replacement, as shown in fig. 2. In addition, the original ID and the new ID can be read from the id.xlsx file and a mapping cache is built. This cache will be used for subsequent data processing and replacement operations, ensuring accuracy and consistency of the data. In particular, the creation of the mapping cache may be implemented by pandas and openpyxl libraries.
S102, in a first replacement step, copying a game configuration table in a game configuration directory file to a temporary replacement directory through a replacement program, and replacing an original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to a first mapping cache;
wherein, the game configuration table is an important tool for managing and configuring game elements in game development, and is usually one or more tables containing data of various systems, objects, parameters and attributes in the game;
it will be appreciated that the temporary replacement directory is a directory specifically designed for the ID replacement task, and that in order to avoid direct modification of the original game configuration files during the replacement process, it is first necessary to copy those files to a temporary replacement directory. This allows the replacement operation to be safely performed in the temporary directory without affecting the original file.
Further, before the first step of replacement is executed, the replacement program also needs to read an xml configuration file to obtain information to be replaced, wherein the information to be replaced comprises a table name, a table field name and a condition field of the table field name;
For example, if the field name that needs replacement is defined in the item.xml file as ItemID, and this field name may be associated with some condition field name (e.g., itemType), the program will record this information and perform a replacement operation for these field names subsequently.
In addition, a second mapping buffer is established between all table field names to be replaced and corresponding table index numbers, in this embodiment, when an Excel file is read, the program will record the file names, and the index numbers of each column in the table are obtained by analyzing the header (i.e. the first row of the table), and a mapping relationship is established between the index numbers and the field names. The purpose of this step is to quickly access and modify a particular column in the table in a subsequent step.
For example, in a table, itemID may be in the second column and ItemType may be in the fourth column. The program will cache the index numbers of these columns to quickly locate the data that needs replacement for subsequent replacement.
By reading the header, the program generates a second mapping buffer containing the table field names and corresponding column numbers, which is frequently used in subsequent reading of the data of each column of each row of the table. This greatly increases the efficiency of the replacement operation, as the program no longer needs to re-parse the header each time it is operated.
The data preparation before the replacement is completed through the steps, specifically, the first round of data ID replacement comprises the following subdivision steps:
Step1, traversing each table file in the temporary replacement directory in sequence through a replacement program, traversing all data lines in all table files, and identifying the data lines to be replaced according to the information to be replaced;
Wherein all table files (e.g., excel files) in the temporary replacement directory are opened one by one and all rows of data in the table files are traversed, all rows in each table file are processed to check whether the data in these rows need replacement.
And further determines which data rows need ID replacement according to the information to be replaced read in step S102. Typically based on some identifier or condition, such as a particular ID column or field value.
In this embodiment, the intermediate ID is unique and does not repeat with any original ID or new ID. This uniqueness ensures that no ID collision occurs during the replacement process, thereby avoiding erroneous replacement. For example, if the original ID A001 is to be replaced with a new ID B001, the intermediate ID may be set to 0001, this ID will not be used elsewhere.
Step2, replacing the original ID of the data line with the intermediate ID according to the first mapping cache, judging whether a condition field exists in the data line, and if not, replacing the table field name in the data line based on the second mapping cache;
The first mapping cache is a mapping relation containing an original ID and a corresponding intermediate ID, and for the data line which is identified to be replaced, the original ID in the data line is replaced by the intermediate ID according to the first mapping cache; for example, A001 to B001, an intermediate ID name of 0001 would be created.
In addition, it is further checked whether the current data line contains a condition field, which refers to a field that needs to satisfy a specific condition to be replaced. If the data line has no condition field, the table field names (column names) in the data line are replaced directly based on the second mapping cache, namely, the old field names are mapped to new field names through the second mapping cache and are replaced by the new field names.
Step3, if yes, based on the second mapping cache, acquiring whether the condition value corresponding to the table field name in the data line meets the replacement condition, and if yes, replacing the table field name in the data line.
If the data line contains the condition fields, it is further determined whether the values of the fields meet the replacement conditions. And extracting the value of the condition field from the data row, acquiring the condition value of the corresponding navigation to judge, and replacing the table field name (column name) in the data row with a new field name based on the second mapping cache if the condition is met. If the condition is not satisfied, the replacement is not performed, and the original field name is reserved.
For example, data a must be a skin unlock card, data a can be replaced with a001, data a is a task, data a cannot be replaced with a001, and the following are code implementations of this step replacement:
< re col name= "value a" >)
< Comd col name = "data a" cond= "skin disarming card"/>
< Comd col name = "data" cond= "pet skill book type"/>
</re col>
Fig. 3 is a schematic diagram of a game configuration table of presence condition fields according to an embodiment of the present application. Through the above step S102, the original ID is replaced with the intermediate ID according to the first mapping cache, whether the condition field exists is checked, whether the field name is replaced is determined according to the condition field, it is ensured that the ID and the field name in the data line are correctly replaced, and all relevant conditions are satisfied.
S103, in the second replacement step, traversing the temporary replacement catalog through a replacement program, replacing the intermediate ID with a new ID based on the first mapping cache, and covering the temporary replacement catalog with the game configuration catalog by downloading all the table files related to replacement.
Second, in the second round of replacement, the program will replace the intermediate ID introduced in the first round of replacement with the final new ID;
Before starting the second round of replacement, the program will again load the ID mapping defined in the id.xlsx file. This mapping contains a mapping from the intermediate ID to the new ID, e.g., a mapping of B001 to 0001. In addition, the program will again confirm the table field information contained in the first mapping cache, ensuring that the same table and fields are used in the second round of replacement as in the first round.
And further traversing all Excel files in the temporary replacement directory again. Each file has replaced the original ID with an intermediate ID in the first round of replacement, and it is now necessary to further replace the intermediate ID with the final new ID.
Specifically, similar to the first round of replacement, the program will cache lock the fields that need replacement according to the first mapping. A particular column (e.g., itemID) in each Excel file may contain intermediate IDs that need to be replaced with the final new ID at this step.
For example, the program may read the data in the table row by row. For each line, the program will check if there is a field value that is an intermediate ID, e.g., $0001$. If a matching intermediate ID is found (e.g., $0001$), the program looks up its corresponding final new ID (e.g., B001) and replaces it.
In addition, the judgment and replacement steps for the condition field name are the same as those in step S102, and therefore, the description thereof is omitted in this embodiment.
After the second replacement step, all original IDs are replaced with new IDs, in this case, all the table files related to replacement under the temporary replacement directory are copied to the original game configuration directory file again, and the table with the same sequence in the original file is covered, so that the whole replacement process is completed.
Through the steps S101 to S103 described above, compared with the scheme of manually implementing ID replacement in the related art, the present application provides an automated tool based on xml files, which is not only more efficient, but also has a lower error probability.
In addition, compared with the repeated replacement problem existing in the replacement tool in the prior art, for example, for the replacement task that a003 is replaced with a001 and a001 is replaced with a002, the existing replacement tool is adopted, if no treatment is performed, after a003 is replaced with a001, all a001 is replaced with a002, and as a result, a001 and a003 are replaced with a002;
According to the replacement method provided by the technical scheme of the application, through designing a two-step replacement process, the original ID is replaced with the intermediate ID with independence, and then the intermediate ID is replaced with the new ID, so that the problem of poor accuracy caused by repeated replacement in the prior art is solved, and the accuracy of ID replacement is improved.
For example, to prevent the duplication of the original ID with the new ID from causing a replacement error, the program generates an intermediate ID to perform two-step replacement to prevent errors. For example, when A001 to B001 are used, an intermediate ID name of 0001 is created, A001 is replaced by 0001 in the replacing process, and after all ID tables are replaced, 0001 is replaced by B001.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The application also provides a game configuration table ID replacing system, and FIG. 4 is a block diagram of a game configuration table ID replacing system according to an embodiment of the application, as shown in FIG. 4, the system comprises a preprocessing module 40 and a replacing module 41, wherein:
The preprocessing module 40 is configured to read an original ID and a new ID from the ID replacement list, and establish a first mapping cache between the original ID and the new ID;
The replacing module 41 is configured to copy, in a first replacing step, the game configuration table in the game configuration directory file to a temporary replacement directory through a replacing program, and replace an original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to the first mapping cache;
and in the second replacement step, traversing the temporary replacement directory through a replacement program, replacing the intermediate ID with a new ID based on the first mapping cache, and covering the temporary replacement directory with the game configuration directory by downloading all the table files related to the replacement.
Through the system, a two-step replacement process is designed, the original ID is replaced with the intermediate ID with independence, and then the intermediate ID is replaced with the new ID, so that the problem of poor accuracy caused by repeated replacement in the prior art is solved, and the accuracy of ID replacement is improved.
In one embodiment, fig. 5 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application, and as shown in fig. 5, an electronic device, which may be a server, and an internal structure diagram thereof may include a processor, a memory, a network interface, and a database connected through a system bus, as in fig. 5, is provided. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the electronic device is for storing data. The network interface of the electronic device is used for communicating with an external terminal through a network connection. The computer program is executed by the processor to implement a game configuration table ID replacement method.
It will be appreciated by those skilled in the art that the structure of fig. 5 is merely a block diagram of a portion of the structure associated with the present application and is not intended to limit the electronic device to which the present application is applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be understood by those skilled in the art that the technical features of the above-described embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above-described embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A game configuration table ID replacement method, the method comprising:
Reading an original ID and a new ID from an ID replacement list, and establishing a first mapping cache between the original ID and the new ID;
In the first replacing step, copying a game configuration table in a game configuration directory file to a temporary replacement directory through a replacing program, and replacing an original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to the first mapping cache;
And in a second replacement step, traversing the temporary replacement catalog through the replacement program, replacing the intermediate ID with the new ID based on the first mapping cache, and covering all table files related to replacement under the temporary replacement catalog to the game configuration catalog.
2. The method of claim 1, wherein prior to reading the original ID and the new ID from the ID list file, the method further comprises:
Constructing an xml configuration file, and defining a plurality of different configuration information in the xml configuration file;
in the xml configuration file, a table name, a table field name, and the table field name including a condition field associated with a subsequent replacement task are defined.
3. The method according to claim 2, wherein the method further comprises:
Reading the xml configuration file through the replacement program to obtain information to be replaced, wherein the information to be replaced comprises a table name, a table field name and a condition field of the table field name;
and establishing a second mapping cache between all the table field names needing to be replaced and the corresponding table index numbers.
4. The method of claim 3, wherein replacing the original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to the first mapping cache comprises:
traversing all data lines of each table file in the temporary replacement directory in sequence through a replacement program, and identifying the data lines needing replacement according to the information to be replaced;
replacing the original ID of the data line with an intermediate ID according to the first mapping cache, judging whether a condition field exists in the data line, and if not, directly replacing the table field name in the data line based on the second mapping cache;
If yes, based on the second mapping cache, acquiring whether a condition value corresponding to the table field name in the data line meets a replacement condition, and if yes, replacing the table field name in the data line.
5. The method of claim 3, wherein traversing the temporary replacement directory by the replacement program to replace the intermediate ID with the new ID based on the first mapping cache comprises:
Establishing an updated first mapping cache between the intermediate ID and the new ID according to the first mapping cache and the intermediate ID;
Traversing each table file in the temporary replacement directory in sequence through a replacement program, traversing all data lines in all table files, and identifying the data lines to be replaced according to the information to be replaced;
Replacing the middle ID of the data line with a new ID according to the second mapping cache, judging whether a condition field exists in the data line, and if not, replacing the table field name in the data line based on the second mapping cache;
If yes, based on the second mapping cache, acquiring whether a condition value corresponding to the table field name in the data line meets a replacement condition, and if yes, replacing the table field name in the data line.
6. The method according to claim 1, wherein intermediate IDs of respective data columns in the game configuration table are independent of each other and are not repeated with the original ID or the new ID, the intermediate IDs being generated by adding special characters in the original ID.
7. A game configuration table ID replacement system, comprising a preprocessing module and a replacement module, wherein:
the preprocessing module is used for reading an original ID and a new ID from an ID replacement list, and establishing a first mapping cache between the original ID and the new ID;
The replacing module is used for copying the game configuration table in the game configuration directory file to a temporary replacement directory through a replacing program in a first replacing step, and replacing an original ID in the game configuration table with an intermediate ID in the temporary replacement directory according to the first mapping cache;
And in a second replacement step, traversing the temporary replacement catalog through the replacement program, replacing the intermediate ID with the new ID based on the first mapping cache, and covering all table files related to replacement under the temporary replacement catalog to the game configuration catalog.
8. The system of claim 7, wherein the preprocessing module is further configured to construct an xml configuration file before the original ID and the new ID are read from the ID list file, wherein a plurality of different configuration information is defined in the xml configuration file;
And defining a table name, a table field name and the table field name containing a condition field associated with a subsequent replacement task in the xml configuration file.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the computer program.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 6.
CN202411232751.6A 2024-09-04 2024-09-04 Game configuration table ID replacement method, system, electronic device and storage medium Pending CN119396874A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411232751.6A CN119396874A (en) 2024-09-04 2024-09-04 Game configuration table ID replacement method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411232751.6A CN119396874A (en) 2024-09-04 2024-09-04 Game configuration table ID replacement method, system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN119396874A true CN119396874A (en) 2025-02-07

Family

ID=94417342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411232751.6A Pending CN119396874A (en) 2024-09-04 2024-09-04 Game configuration table ID replacement method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN119396874A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7257597B1 (en) * 2001-12-18 2007-08-14 Siebel Systems, Inc. Table substitution
CN104092726A (en) * 2014-06-09 2014-10-08 乐视网信息技术(北京)股份有限公司 Automatic replacing method and apparatus of same-name file
CN104113535A (en) * 2014-07-03 2014-10-22 株洲南车时代电气股份有限公司 Identity updating method, identity updating system, identity management server and link device
CN107526530A (en) * 2016-06-21 2017-12-29 伊姆西公司 Data processing method and equipment
WO2018181834A1 (en) * 2017-03-30 2018-10-04 日本電気株式会社 Management server, management system, control method for management server, and program
CN109388644A (en) * 2017-08-09 2019-02-26 北京国双科技有限公司 A kind of data-updating method and device
US11522864B1 (en) * 2019-09-27 2022-12-06 Amazon Technologies, Inc. Secure identity transfer
CN116627409A (en) * 2023-04-28 2023-08-22 深圳前海环融联易信息科技服务有限公司 Method, device, equipment and storage medium for replacing fields of low-code page

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7257597B1 (en) * 2001-12-18 2007-08-14 Siebel Systems, Inc. Table substitution
CN104092726A (en) * 2014-06-09 2014-10-08 乐视网信息技术(北京)股份有限公司 Automatic replacing method and apparatus of same-name file
CN104113535A (en) * 2014-07-03 2014-10-22 株洲南车时代电气股份有限公司 Identity updating method, identity updating system, identity management server and link device
CN107526530A (en) * 2016-06-21 2017-12-29 伊姆西公司 Data processing method and equipment
WO2018181834A1 (en) * 2017-03-30 2018-10-04 日本電気株式会社 Management server, management system, control method for management server, and program
CN109388644A (en) * 2017-08-09 2019-02-26 北京国双科技有限公司 A kind of data-updating method and device
US11522864B1 (en) * 2019-09-27 2022-12-06 Amazon Technologies, Inc. Secure identity transfer
CN116627409A (en) * 2023-04-28 2023-08-22 深圳前海环融联易信息科技服务有限公司 Method, device, equipment and storage medium for replacing fields of low-code page

Similar Documents

Publication Publication Date Title
CN112199366B (en) Data table processing method, device and equipment
CN112036144B (en) Data analysis method, device, computer equipment and readable storage medium
CN102224492B (en) data maintenance system
CN112818937B (en) Excel file identification method and device, electronic equipment and readable storage medium
WO2021174830A1 (en) Management method and apparatus for code versions of multi-module system, and computer device
CN117238433B (en) Method for automatically isolating document data based on Libreoffice
CN115470191A (en) Database updating system, method and corresponding computer equipment and storage medium
CN112286934A (en) Database table import method, device, equipment and medium
CN111176882A (en) Specific data processing method, specific data processing device, computer equipment and storage medium
CN119396874A (en) Game configuration table ID replacement method, system, electronic device and storage medium
JP6194714B2 (en) Universal IC card and security attribute verification method
CN113342647A (en) Test data generation method and device
CN117709362B (en) Method, device, computer equipment and storage medium for modifying multilingual resources
CN110543465B (en) Directory operation method and device, computer equipment and storage medium
CN106897434A (en) A kind of data lead-in method, apparatus and system
CN116702720A (en) File processing method and device, electronic equipment and storage medium
CN117082042A (en) Conversion method and system for CAN communication matrix and DBC file
CN115579096B (en) A method, system and storage medium for automatic generation and analysis verification of pharmacovigilance E2B R3 standard report
CN116433188A (en) Data processing method, device, equipment and storage medium
KR102786241B1 (en) System for fabricating personal tailored insurance policy
CN110471791A (en) The storage method and device and equipment of the bad block message of a kind of pair of flash memory
CN112579079B (en) File processing method, device, computer equipment and storage medium
CN120492690B (en) A method and system for attribute management in a graph database
CN111930349B (en) Program package generation method and device, electronic equipment and storage medium
CN110162507B (en) Snapshot overwriting method, device, computer equipment and storage medium

Legal Events

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