Data configuration export method, device and electronic equipment
By visually displaying the file directory and automatically obtaining the export path and storage type during game development, the problem of low efficiency and poor flexibility in data configuration export in existing technologies is solved, and an efficient and flexible data export process is achieved.
Patent Information
- Application Number
- CN202110429989.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-21
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-04-21
AI Technical Summary
Existing technologies are inefficient and lack flexibility in the data configuration export process during game development, requiring manual setting of export information and being prone to errors.
By visually displaying file directory information, users can select the directory to be exported, automatically obtain the export path and storage type, support modification of custom directory information, and use operation configuration files to store export information to improve efficiency.
It improves the accuracy and efficiency of data export, supports flexible export of any type of file, reduces the need for manual settings by users, and saves manpower and resources.
Smart Images

Figure CN112933607B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method and device for exporting data configuration. Background Art
[0002] At present, a large amount of data needs to be configured in the process of game development, but in the early stage, Excel is usually used to set the configuration information. In order to meet the needs of the game, the configuration information in the Excel table needs to be exported into a document format that meets the needs of the game.
[0003] However, in the prior art, when performing configuration information export, a corresponding export program is usually written for each Excel table, and each Excel table is exported separately, or a corresponding export program is written for each type of Excel table, and each type of Excel table is exported.
[0004] The export efficiency of the first method mentioned above is very low. Although the second method improves the export efficiency, the export flexibility is poor. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a data export method device and an electronic device, which facilitates users to select a second directory to be exported by visually displaying a first directory in a first file, so that users no longer need to manually set export information, thereby improving accuracy and data export efficiency. In addition, the method is highly versatile and can be applied to any type of file, and users can arbitrarily set the content they want to export without having to write a separate program.
[0006] An embodiment of the present invention discloses a data export method, comprising:
[0007] When a first file of a first storage type is received, content of the first file is read; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0008] Display the first directory information of the first file;
[0009] Reading the second directory information selected by the user from the first directory information;
[0010] Get the export path and the second storage type of the export;
[0011] The data included in the second directory information is stored in a second storage type according to the export path.
[0012] Optionally, also include:
[0013] Modify the page signature and / or field name in the second directory information; the second directory information includes: the page signature, and the field name contained in each page signature;
[0014] Establishing a correspondence between the modified target page signature and the original page signature in the first file; the original page signature is the name of the target page signature before modification;
[0015] A correspondence between the modified target field name and the original field name in the first file is established; the original field name is the name of the target field name before modification.
[0016] Optionally, also include:
[0017] Saving the second target information, the export path, and the second storage type into an operation configuration file;
[0018] Obtaining a storage path of the first file;
[0019] The operation configuration file is saved according to the first storage path.
[0020] Optionally, also include:
[0021] When a first file in a first format is received, content of the first file is read; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0022] In the case where the operation configuration file of the first file is detected, the content of the operation configuration file is read to obtain the second directory information and the second storage type to be exported;
[0023] The data included in the second directory information is stored in a second storage type according to the export path.
[0024] Optionally, the second format includes lua or ini.
[0025] The embodiment of the present invention discloses a data export device, comprising:
[0026] A first reading unit is used to read the content of a first file of a first storage type when receiving the first file of the first storage type; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0027] A display unit, used for displaying first directory information of a first file;
[0028] A second reading unit, used for reading the second directory information selected by the user from the first directory information;
[0029] A first acquisition unit, used to acquire an export path and a second storage type of the export;
[0030] An export unit is used to store the data included in the second directory information in a second storage type according to the export path.
[0031] Optionally, also include:
[0032] A modification unit, used to modify the page signature and / or field name in the second directory information; the second directory information includes: the page signature, and the field name contained in each page signature;
[0033] A first relationship establishing unit, used to establish a corresponding relationship between the modified target page signature and the original page signature in the first file; the original page signature is the name of the target page signature before modification;
[0034] The second association establishing unit is used to establish a corresponding relationship between the modified target field name and the original field name in the first file; the original field name is the name of the target field name before modification.
[0035] Optionally, also include:
[0036] an operation configuration file saving unit, configured to save the second target information, the export path, and the second storage type into an operation configuration file;
[0037] A second obtaining unit, used to obtain a storage path of the first file;
[0038] A saving unit is used to save the operation configuration file according to the first storage path.
[0039] Optionally, also include:
[0040] A third reading unit is used to read the content of the first file when receiving the first file in the first format; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0041] A fourth reading unit is used to read the content of the operation configuration file in case the operation configuration file of the first file is detected, and obtain the second directory information and the second storage type to be exported;
[0042] The data included in the second directory information is stored in a second storage type according to the export path.
[0043] An embodiment of the present invention discloses an electronic device, including:
[0044] Memory and processor;
[0045] The memory is used to store programs, and when the processor is used to execute the programs in the memory, at least the following data export method is executed:
[0046] When a first file of a first storage type is received, content of the first file is read; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0047] Display the first directory information of the first file;
[0048] Reading the second directory information selected by the user from the first directory information;
[0049] Get the export path and the second storage type of the export;
[0050] The data included in the second directory information is stored in a second storage type according to the export path.
[0051] The embodiment of the present invention discloses a data export method, including: reading the content of a first file, and displaying the first directory information in the read content on a display interface, reading the second directory information selected by the user from the first directory information, obtaining the export path and the second storage type of the export, and storing the data contained in the export path and the second directory information in the second storage type. Thus, by visually displaying the first directory in the first file, it is convenient for the user to select the second directory to be exported, so that the user does not need to manually set the export information, thereby improving the accuracy and data export efficiency. In addition, the method is highly versatile and can be applied to any type of file, and the user can arbitrarily set the content to be exported without the need to write a separate program. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0053] Figure 1 A schematic diagram of a flow chart of a data export method provided by an embodiment of the present invention is shown;
[0054] Figure 2 A schematic diagram of directory information in an Excel spreadsheet is shown;
[0055] Figure 3 Another schematic diagram of a process of exporting data provided by an embodiment of the present invention is shown;
[0056] Figure 4 Another schematic diagram of a process of exporting data provided by an embodiment of the present invention is shown;
[0057] Figure 5 A schematic diagram of the structure of a data export device provided by an embodiment of the present invention is shown;
[0058] Figure 6 A structural schematic diagram of an electronic device disclosed in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] In actual application scenarios, in the field of game development, relevant data required for the game is usually created, such as the game scene name, game character name, etc. Game developers need to import the pre-set game related data into the configuration file of the scene, but the format of the data in the configuration file of the game scene is different from the format of the data pre-configured by the user. When sending the data to the storage address of the game scene, it needs to be converted into the data format of the configuration file required by the game scene.
[0061] In the prior art, in order to achieve data format conversion, a commonly used method is that a technician manually converts the format of a preset file into the format of a configuration file required by a game scene. Another commonly used method is to take an Excel table as an example and write a corresponding export program for each Excel table or each type of Excel table, thereby achieving data format conversion during the data export process. However, since the Excel table contains a large amount of data, the data required by each technician or the data required for each game scene is different. The export flexibility of these two methods is very poor, and if the user wants to set a separate export program for each table or each type of table, the export efficiency is also very low.
[0062] In order to solve the above problems, the data can be exported flexibly while improving the export efficiency. Figure 1 , shows a flow chart of a data export method provided by an embodiment of the present invention. In this embodiment, the method includes:
[0063] S101: when receiving a first file of a first storage type, reading content of the first file;
[0064] In this embodiment, the first storage type of the first file may be any file format for storing data, for example, it may be a storage type of .xls.
[0065] In a specific implementation, it is possible to support users uploading data, that is, the user can set the storage address of the first file so that the system can read the first file through the storage address of the first file.
[0066] The first file usually contains: directory information and specific data corresponding to the directory information. Directory information can be understood as the location of the content of the first file. Taking an Excel spreadsheet as an example, an Excel file will contain multiple Excel spreadsheets, each Excel spreadsheet represents a page tab, and each page tab contains the field name of the data. Then the directory of the Excel spreadsheet includes: page signature and field name. For example, Figure 2 As shown, part 201 represents the page tab, and part 202 represents the field name.
[0067] S102: Displaying first directory information of a first file;
[0068] In this embodiment, in order to allow users to flexibly select the data to be exported, the data of the first file is displayed. However, in order to improve data processing efficiency and facilitate user operation, in one implementation, only the first directory information is displayed in this embodiment.
[0069] S103: Reading the second directory information selected by the user from the first directory information;
[0070] In the prior art, users are usually required to set directory information of data to be exported. In one case, users need to manually input directory information of data to be exported. This method is not only inefficient but also prone to errors.
[0071] In order to solve the above problem, in this embodiment, the user can directly select the second directory information to be exported from the first directory information, and the system directly reads the second directory information selected by the user from the first directory information.
[0072] For example, when a user selects the second directory information to be exported from the first directory information, the system can mark the second target information selected by the user in a preset marking manner, and identify the second target information selected by the user through the preset mark.
[0073] Through the above method, the user does not need to set the second target information to be exported, and the selection is made in this visual way, which not only improves the data processing efficiency but also improves the accuracy of data processing.
[0074] S104: Obtain an export path and a second storage type of the export;
[0075] In this embodiment, different users have different export paths for data, and the exported storage types may also be different. For example, the exported storage type may be .lua or .ini.
[0076] In order to meet the export requirements of different users, in this embodiment, the user can set or select the export path and the second storage type.
[0077] S105: Storing the data included in the second directory information in a second storage type according to the export path.
[0078] When the export path and the second storage type of the export are set, in one implementation, S105 includes:
[0079] Reading data contained in the second directory information;
[0080] The data included in the second target information is stored in a second storage type.
[0081] In this embodiment, by reading the content of the first file, and displaying the first directory information in the read content on the display interface, the second directory information selected by the user is read from the first directory information, the export path and the second storage type of the export are obtained, and the data contained in the export path and the second directory information are stored in the second storage type. Thus, by visually displaying the first directory in the first file, it is convenient for the user to select the second directory to be exported, so that the user does not need to manually set the export information, which improves the accuracy and data export efficiency. In addition, the method is highly versatile and can be applied to any type of file, and the user can arbitrarily set the content to be exported without the need to write a separate program.
[0082] In an actual scenario, some directory information in the first file pre-configured by the technician may not match the name in the game scenario, or the technician may need to modify the name in the directory information when there is a special need. Taking an Excel spreadsheet as an example, the page signature and field name may need to be modified. For this reason, this embodiment provides a function of customizing the directory information, specifically, also including:
[0083] The page signature and / or field name in the second directory information is modified.
[0084] In an actual scenario, the technician may continuously update the information of the first file, so it is necessary to continuously import the data in the first file into the location where the game configuration file is stored. In other words, the export operation needs to be repeatedly performed. In order to improve the data processing efficiency and avoid unnecessary labor of the technician, in this embodiment, after setting the export information once, the set export information can be saved, and the export information can be directly retrieved when the export operation is performed next time to perform the export operation. Specifically, it also includes:
[0085] Saving the second target information, the export path, and the second storage type into an operation configuration file;
[0086] Obtaining a storage path of the first file;
[0087] The operation configuration file is saved according to the first storage path.
[0088] From this, it can be seen that the export information includes: the second export directory and the second storage type and export path when exporting data. The export information is stored in the operation configuration file, and the operation configuration file is stored in the first storage path. In this way, when the data export operation needs to be performed on the first file again, the operation configuration file corresponding to the first file can be directly called up without the user having to make export settings again. This not only improves processing efficiency, but also saves manpower and material resources.
[0089] From the above introduction, it can be known that the user can modify the second directory information by user. If the modified second target information is stored in the operation configuration file, since the directory information in the first file has not changed, if the data corresponding to the modified second directory information in the first file is to be directly used, then it is also necessary to establish a corresponding relationship between the modified directory information and the directory information before the modification, specifically, it also includes:
[0090] Establishing a correspondence between the modified target page signature and the original page signature in the first file; the original page signature is the name of the target page signature before modification;
[0091] A correspondence between the modified target field name and the original field name in the first file is established; the original field name is the name of the target field name before modification.
[0092] Based on the above operations, when the export operation is performed again, it is necessary to detect whether there is an operation configuration file. If there is an operation configuration file, the export operation is performed based on the operation configuration file. For details, refer to Figure 3 , shows another flow chart of a data export method provided by an embodiment of the present invention. In this embodiment, the method includes:
[0093] S301: when receiving a first file in a first format, reading the content of the first file; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0094] S302: When an operation configuration file of the first file is detected, read the content of the operation configuration file to obtain second directory information and second storage type to be exported;
[0095] S303: Store the data included in the second directory information in a second storage type according to the export path.
[0096] It can be seen that in this embodiment, the process of export operation is simplified and the efficiency of data export is improved through the pre-set operation configuration file.
[0097] refer to Figure 4 , shows another flow chart of a data export method provided by an embodiment of the present invention. In this embodiment, the method includes:
[0098] S401: When a first file of a first storage type is received, read the content of the first file; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0099] S402: Detect whether there is an operation configuration file of the first file;
[0100] S403: If the operation configuration file of the first file is not detected, display the first directory information of the first file;
[0101] S404: Reading the second directory information selected by the user from the first directory information;
[0102] S405: Obtain an export path and a second storage type of the export;
[0103] S406: Store the data included in the second directory information in a second storage type according to the export path.
[0104] S407: If an operation configuration file of the first file is detected, read the content of the operation configuration file, obtain the second directory information and the second storage type to be exported, and store the data included in the second directory information in the second storage type according to the export path.
[0105] The embodiment of the present invention discloses a data export method, including: reading the content of a first file, and displaying the first directory information in the read content on a display interface, reading the second directory information selected by the user from the first directory information, obtaining the export path and the second storage type of the export, and storing the data contained in the export path and the second directory information in the second storage type. Thus, by visually displaying the first directory in the first file, it is convenient for the user to select the second directory to be exported, so that the user does not need to manually set the export information, thereby improving the accuracy and data export efficiency. In addition, the method is highly versatile and can be applied to any type of file, and the user can arbitrarily set the content to be exported without the need to write a separate program. In addition, through the set operation configuration file, when the data export operation needs to be performed on the first file again, the operation configuration file corresponding to the first file can be directly called, without the user having to perform the export setting again, which not only improves the processing efficiency, but also saves manpower and material resources.
[0106] refer to Figure 5 , shows a schematic diagram of the structure of a data export device provided by an embodiment of the present invention. In this embodiment, the device includes:
[0107] The first reading unit 501 is used to read the content of the first file when receiving the first file of the first storage type; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0108] A display unit 502, used to display first directory information of a first file;
[0109] The second reading unit 503 is used to read the second directory information selected by the user from the first directory information;
[0110] A first acquisition unit 504, used to acquire an export path and a second storage type of the export;
[0111] The export unit 505 is configured to store the data included in the second directory information in a second storage type according to the export path.
[0112] Optionally, also include:
[0113] A modification unit, used to modify the page signature and / or field name in the second directory information; the second directory information includes: the page signature, and the field name contained in each page signature;
[0114] A first relationship establishing unit, used to establish a corresponding relationship between the modified target page signature and the original page signature in the first file; the original page signature is the name of the target page signature before modification;
[0115] The second association establishing unit is used to establish a corresponding relationship between the modified target field name and the original field name in the first file; the original field name is the name of the target field name before modification.
[0116] Optionally, also include:
[0117] an operation configuration file saving unit, configured to save the second target information, the export path, and the second storage type into an operation configuration file;
[0118] A second obtaining unit, used to obtain a storage path of the first file;
[0119] A saving unit is used to save the operation configuration file according to the first storage path.
[0120] Optionally, also include:
[0121] A third reading unit is used to read the content of the first file when receiving the first file in the first format; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0122] A fourth reading unit is used to read the content of the operation configuration file in case the operation configuration file of the first file is detected, and obtain the second directory information and the second storage type to be exported;
[0123] The data included in the second directory information is stored in a second storage type according to the export path.
[0124] Optionally, the second format includes lua or ini.
[0125] Through the device of this embodiment, by reading the content of the first file, and displaying the first directory information in the read content on the display interface, the second directory information selected by the user is read from the first directory information, the export path and the second storage type of the export are obtained, and the data contained in the export path and the second directory information are stored in the second storage type. Thus, by visually displaying the first directory in the first file, it is convenient for the user to select the second directory to be exported, so that the user does not need to manually set the export information, which improves the accuracy and data export efficiency. In addition, the method is highly versatile and can be applied to any type of file, and the user can arbitrarily set the content to be exported without the need to write a separate program.
[0126] refer to Figure 6 , showing a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention, in this embodiment, the electronic device includes:
[0127] Memory 601 and processor 602;
[0128] The memory is used to store programs, and when the processor is used to execute the programs in the memory, at least the following data export method is executed:
[0129] When a first file of a first storage type is received, content of the first file is read; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0130] Display the first directory information of the first file;
[0131] Reading the second directory information selected by the user from the first directory information;
[0132] Get the export path and the second storage type of the export;
[0133] The data included in the second directory information is stored in a second storage type according to the export path.
[0134] Optionally, also include:
[0135] Modify the page signature and / or field name in the second directory information; the second directory information includes: the page signature, and the field name contained in each page signature;
[0136] Establishing a correspondence between the modified target page signature and the original page signature in the first file; the original page signature is the name of the target page signature before modification;
[0137] A correspondence between the modified target field name and the original field name in the first file is established; the original field name is the name of the target field name before modification.
[0138] Optionally, also include:
[0139] Saving the second target information, the export path, and the second storage type into an operation configuration file;
[0140] Obtaining a storage path of the first file;
[0141] The operation configuration file is saved according to the first storage path.
[0142] Optionally, also include:
[0143] When a first file in a first format is received, content of the first file is read; the content of the first file includes: directory information of the first file and data corresponding to the directory information;
[0144] In the case where the operation configuration file of the first file is detected, the content of the operation configuration file is read to obtain the second directory information and the second storage type to be exported;
[0145] The data included in the second directory information is stored in a second storage type according to the export path.
[0146] Optionally, the second format includes lua or ini.
[0147] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0148] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data export method, characterized in that: include: When receiving a first file of a first storage type, reading content of the first file; The content of the first file includes: directory information of the first file and data corresponding to the directory information; Display the first directory information of the first file; Reading the second directory information selected by the user from the first directory information; Get the export path and the second storage type of the export; The data included in the second directory information is stored in a second storage type according to the export path.
2. The method according to claim 1, characterized in that Also includes: Modify the page signature and / or field name in the second directory information; The second directory information includes: page signature, field names contained in each page signature; Establishing a correspondence between the modified target page signature and the original page signature in the first file; the original page signature is the name of the target page signature before modification; A correspondence between the modified target field name and the original field name in the first file is established; the original field name is the name of the target field name before modification.
3. The method according to claim 1 or 2, characterized in that: Also includes: Saving the second target information, the export path, and the second storage type into an operation configuration file; Obtaining a storage path of the first file; The operation configuration file is saved according to the first storage path.
4. The method according to claim 1, characterized in that: Also includes: When receiving a first file in a first format, reading content of the first file; The content of the first file includes: directory information of the first file and data corresponding to the directory information; In the case where the operation configuration file of the first file is detected, the content of the operation configuration file is read to obtain the second directory information and the second storage type to be exported; The data included in the second directory information is stored in a second storage type according to the export path.
5. A data export device, characterized in that: include: A first reading unit, configured to read content of a first file of a first storage type when receiving the first file; The content of the first file includes: directory information of the first file and data corresponding to the directory information; A display unit, used for displaying first directory information of a first file; A second reading unit, used for reading the second directory information selected by the user from the first directory information; A first acquisition unit, used to acquire an export path and a second storage type of the export; An export unit is used to store the data included in the second directory information in a second storage type according to the export path.
6. The device according to claim 5, characterized in that Also includes: A modification unit, used to modify the page signature and / or field name in the second directory information; The second directory information includes: page signature, field names contained in each page signature; A first relationship establishing unit, used to establish a corresponding relationship between the modified target page signature and the original page signature in the first file; the original page signature is the name of the target page signature before modification; The second association establishing unit is used to establish a corresponding relationship between the modified target field name and the original field name in the first file; the original field name is the name of the target field name before modification.
7. The device according to claim 5 or 6, characterized in that Also includes: an operation configuration file saving unit, configured to save the second target information, the export path, and the second storage type into an operation configuration file; A second obtaining unit, used to obtain a storage path of the first file; A saving unit is used to save the operation configuration file according to the first storage path.
8. The device according to claim 5, characterized in that Also includes: A third reading unit, configured to read content of a first file in a first format when receiving the first file; The content of the first file includes: directory information of the first file and data corresponding to the directory information; A fourth reading unit is used to read the content of the operation configuration file in case the operation configuration file of the first file is detected, and obtain the second directory information and the second storage type to be exported; The data included in the second directory information is stored in a second storage type according to the export path.
9. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs, and when the processor is used to execute the programs in the memory, at least the following data export method is executed: When receiving a first file of a first storage type, reading content of the first file; The content of the first file includes: directory information of the first file and data corresponding to the directory information; Display the first directory information of the first file; Reading the second directory information selected by the user from the first directory information; Get the export path and the second storage type of the export; The data included in the second directory information is stored in a second storage type according to the export path.
Citation Information
Patent Citations
Table format conversion method, device, apparatus, and storage medium
CN109117466A