Method, device, storage medium and electronic device for querying table data in games
By using registration events and search dictionary in the table data query method in the game, the problem of inefficiency in searching data by game developers is solved, and efficient data query and simple operation process are achieved.
Patent Information
- Application Number
- CN202410820064.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-06-24
AI Technical Summary
When game developers edit data, they need to find the rows of the ID corresponding to the original worksheet referenced by the data based on the configured data. The existing methods rely on manual memory and search, resulting in inefficient query.
In the table data query method in the game, it responds to the user's operation instructions for selecting a cell, triggers the registration event, uses the forward and reverse search dictionary to find relevant workbooks, and filters out the target query data from it, simplifying the query process.
It improves the efficiency of game developers in querying game-related configuration data, reduces time and labor costs, and simplifies the operation process.
Smart Images

Figure CN118673097B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of game data query, and in particular to a method, device, storage medium and electronic device for querying table data in a game. Background Art
[0002] In the process of game software development, Excel spreadsheets are often used to query game static data.
[0003] Currently, when editing data, game developers often need to find the row with the ID corresponding to the original worksheet referenced by the configured data based on the configured data. Currently, when searching for data, developers can only rely on the worksheet name referenced by the data to manually find the corresponding worksheet, and then manually search for the ID to find the corresponding row. However, the reference relationship of the data is relatively complex, and it takes a lot of time for developers to search.
[0004] Therefore, how to provide a technical solution for an efficient method for querying table data in games has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of some embodiments of the present application is to provide a method, device, storage medium and electronic device for querying table data in a game. The technical solutions of the embodiments of the present application can improve the efficiency of developers in querying game-related configuration data. The query method is simple and efficient, and the time cost is reduced.
[0006] In a first aspect, some embodiments of the present application provide a method for querying table data in a game, comprising: in response to a user's selection operation instruction for any cell in a worksheet, triggering a registration event corresponding to the any cell; searching a related workbook according to a lookup dictionary corresponding to the type of the registration event, wherein the type includes: primary key and field, and the lookup dictionary includes: forward lookup dictionary and reverse lookup dictionary; and filtering out target query data related to the cell data of the any cell from the related workbook.
[0007] Some embodiments of the present application trigger a corresponding registration event after selecting any cell, search the relevant workbook by the type of the registration event and the corresponding search dictionary, and finally filter out the target query data corresponding to the cell data from the relevant workbook. Some embodiments of the present application can improve the efficiency of developers in querying game-related configuration data, and the query method is simple and efficient, reducing time and labor costs.
[0008] In some embodiments, before responding to the user's selection operation instruction for any cell, the method also includes: configuring the reference relationship in the worksheet and determining the relationship configuration data; wherein the relationship configuration data includes: source workbook name, source worksheet name, source field name, target workbook name, and target worksheet name.
[0009] Some embodiments of the present application configure reference relationships in a workbook to facilitate subsequent accurate and efficient queries.
[0010] In some embodiments, before responding to the user's selection operation instruction for any cell, the method also includes: after starting the plug-in corresponding to the worksheet, loading the relationship configuration data; generating the lookup dictionary based on the relationship configuration data, wherein the lookup keys of the forward lookup dictionary and the reverse lookup dictionary are different; and registering corresponding events for cells in the worksheet in response to the user's operation instruction.
[0011] Some embodiments of the present application load the relationship configuration data after starting the plug-in, generate a search dictionary, and register corresponding events in the cell, thereby providing effective support for subsequent efficient data query.
[0012] In some embodiments, searching the related workbook according to the lookup dictionary corresponding to the type of the registration event includes: when it is confirmed that the type of the registration event is the field, searching in the forward lookup dictionary according to the field lookup key to obtain the related workbook, wherein the field lookup key is constructed by the source workbook name, source worksheet name, and source field name of any of the cells; when it is confirmed that the type of the registration event is the primary key, searching in the reverse lookup dictionary according to the primary key lookup key to obtain the related workbook, wherein the field lookup key is constructed by the target workbook name and target worksheet name of any of the cells.
[0013] Some embodiments of the present application confirm that the registration event type is a field or a primary key, and then use different search keys to search in the worksheet through a search dictionary to obtain the relevant workbook. This can be achieved without human intervention, which is simple and efficient.
[0014] In some embodiments, searching for the relevant workbook according to the lookup dictionary corresponding to the type of the registration event includes: after finding the relevant workbook, popping up a menu item corresponding to the type; and jumping to the relevant workbook in response to the user's selection operation instruction of the menu item.
[0015] Some embodiments of the present application jump to the corresponding workbook through a pop-up menu item, which is simple to operate.
[0016] In some embodiments, target query data related to the cell data of any cell is filtered out from the related workbook, including: when the type of the registered event is the field, the related workbook is a target workbook in the same directory; obtaining a target worksheet under the target workbook; querying the row corresponding to the cell data according to the primary key column of the target worksheet; activating and selecting the target workbook, the target worksheet and the row corresponding to the cell data, wherein the target workbook, the target worksheet and the row constitute the target query data.
[0017] In some embodiments of the present application, when the type of the registration event is a field, the target workbook is searched, the target worksheet is obtained, and then the row corresponding to the cell data is obtained, so that the target query data can be quickly obtained with low time cost.
[0018] In some embodiments, target query data related to the cell data of any cell is filtered out from the related workbook, including: when the type of the registration event is the primary key, the related workbook is a source workbook; filtering out all source field cells in the source field column of the source worksheet in the source workbook that contain the cell data; activating and selecting the source workbook, the source worksheet, and all the source field cells, wherein the source workbook, the source worksheet, and all the source field cells constitute the target query data.
[0019] In some embodiments of the present application, when the type of the registration event is the primary key, the source workbook is searched, the source worksheet is obtained, and then all source field cells are obtained, so that the target query data can be obtained quickly with low time cost.
[0020] In a second aspect, some embodiments of the present application provide a device for querying table data in a game, including: a trigger module, used to trigger a registration event corresponding to any cell in a worksheet in response to a user's selection operation instruction; a search module, used to search for relevant workbooks according to a search dictionary corresponding to the type of the registration event, wherein the type includes: primary key and field, and the search dictionary includes: forward search dictionary and reverse search dictionary; a screening module, used to filter out target query data related to the cell data of any cell from the relevant workbook.
[0021] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.
[0022] In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement a method as described in any embodiment of the first aspect when executing the program.
[0023] In a fifth aspect, some embodiments of the present application provide a computer program product, wherein the computer program product comprises a computer program, wherein the computer program, when executed by a processor, can implement the method described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 SDSkill representations provided for some embodiments of the present application;
[0026] Figure 2 One of the schematic diagrams of the workbook Z combat_skills.xlsx provided for some embodiments of the present application;
[0027] Figure 3 Schematic diagram 2 of workbook Z combat_skills.xlsx provided for some embodiments of the present application;
[0028] Figure 4 One of the flow charts of the method for querying table data in a game provided by some embodiments of the present application;
[0029] Figure 5 A schematic diagram of a menu item of "Goto" provided for some embodiments of the present application;
[0030] Figure 6 One of the schematic diagrams of related workbook pages provided for some embodiments of the present application;
[0031] Figure 7 A schematic diagram of a Scan menu item provided for some embodiments of the present application;
[0032] Figure 8 A second schematic diagram of a related workbook page provided for some embodiments of the present application;
[0033] Fig. 9 A third schematic diagram of a related workbook page provided for some embodiments of the present application;
[0034] Fig.10 A second flow chart of a method for querying table data in a game provided in some embodiments of the present application;
[0035] Fig.11 A block diagram of a device for querying table data in a game provided by some embodiments of the present application;
[0036] Fig.12 A schematic diagram of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0038] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0039] In the related art, in the process of game software development, Excel tables are often used to configure the static data of the game. Each worksheet has a column of data as the primary key, and the other columns are configured for the corresponding fields. These fields may configure the ID of the current worksheet or other worksheets. Figure 1 As shown in the figure, in the SDSkill table, column A is the primary key, and the data configured in column J is the primary key that references SDSkillView. When editing data, game developers can only rely on memory or experience to get the worksheet name referenced by the configured data to be queried, and then manually find the corresponding worksheet, and then manually search for this ID to find the corresponding row. Figure 2 and Figure 3 As shown in the figure, the SourceEffectTrigger data in the worksheet SDSkillBehavior{C} of the workbook Z Combat_Skill.xlsx refers to the primary key of the worksheet SDEffectTrigger of the workbook Z Combat_Special Effect.xlsx. When developers jump, they need to open the workbook where SDEffectTrigger is located before they can operate.
[0040] As can be seen from the above related technologies, the existing solutions need to spend a lot of time searching and locating workbooks, worksheets and primary key cells when editing tables. Moreover, if you want to know which other data reference a primary key ID of a worksheet, you need to spend more energy to check all related workbooks and worksheets, which is very inefficient.
[0041] In view of this, some embodiments of the present application provide a method for querying table data in a game. After completing the relationship configuration of the data in the worksheet, the method can trigger a corresponding registration event in response to the user's instruction to select any cell; then use the type of the registration event to find the relevant workbook using its corresponding search dictionary; finally, filter out the target query data corresponding to the cell data from the relevant workbook. Some embodiments of the present application can improve the query efficiency of configuration data with reference relationships in game development scenarios, avoid programmers spending a lot of time on data location, and are easy to operate and highly universal.
[0042] The following is combined with Figure 4 The implementation process of table data query in a game performed by a terminal device provided by some embodiments of the present application is exemplified.
[0043] Please see attached Figure 4 , Figure 4 A flowchart of a method for querying table data in a game provided in some embodiments of the present application, the method for querying table data in the game may include:
[0044] S410, in response to a user's selection operation instruction for any cell in the worksheet, triggering a registration event corresponding to the any cell, for example, triggering a registered SheetSelectionChange event (as a specific example of a registration event).
[0045] For example, in some embodiments of the present application, after the user selects any cell, a registration event corresponding to the cell will be triggered to facilitate targeted data query.
[0046] In some embodiments of the present application, before executing S410, the method for querying table data in the game may also include: configuring the reference relationship in the worksheet and determining the relationship configuration data; wherein the relationship configuration data includes: source workbook name, source worksheet name, source field name, target workbook name, and target worksheet name.
[0047] For example, in some embodiments of the present application, it is first necessary to configure the reference relationship existing in the worksheet. The reference relationship configuration format is as shown in the following format:
[0048] Z protagonist SDCharacterProfile Renovation D multi-language SDLocalization
[0049] Z protagonist SDCharacterProfile Battlestyle D multi-language SDLocalization
[0050] Z protagonist SDCharacterProfile Weapon D multi-language SDLocalization
[0051] Z protagonist SDCharacterProfile Openingline D multi-language SDLocalization
[0052] Each row is a reference relationship data (as a specific example of relationship configuration data). Specifically, it is filled in the order of source workbook name, source worksheet name, source field name, target workbook name, and target worksheet name, separated by spaces. Taking the first row as an example, it represents the data configured in the field Renovation of the worksheet SDCharacterProfile of workbook Z character.xlsx, which references the primary key of the worksheet SDLocalization of workbook D multilingual.xlsx.
[0053] In some embodiments of the present application, before executing S410, the method for querying table data in the game may also include: after starting the plug-in corresponding to the worksheet, loading the relationship configuration data; generating the search dictionary based on the relationship configuration data, wherein the search keys of the forward search dictionary and the reverse search dictionary are different; and registering corresponding events for cells in the worksheet in response to the user's operation instructions.
[0054] For example, in some embodiments of the present application, after the reference relationship configuration is completed, the workbook is opened, and the plug-in is started, and the configuration of the reference relationship (i.e., the relationship configuration data) is loaded. And two query dictionaries for forward search and reverse search are generated according to the configuration of the reference relationship. Among them, the forward search dictionary is the combination of the three source data in the reference relationship configuration (i.e., the source workbook name, the source worksheet name, and the source field name) as the search key, and the reference relationship data is the value (that is, the query result). The reverse search dictionary is the combination of the two target data in the reference relationship configuration (i.e., the target workbook name and the target worksheet name) as the search key, and the reference relationship data is the value. After the configuration is loaded, the SheetSelectionChange event of the current Excel.Application is registered on the cell, and this event will be triggered every time the user selects a cell.
[0055] It should be noted that the above configuration format is only a specific example of the present application. Under the premise of adopting other configuration methods, if the forward search dictionary and the reverse search dictionary can be generated accordingly, other configuration methods can also be used. The embodiments of the present application are not limited to this.
[0056] S420, searching for relevant workbooks according to a search dictionary corresponding to the type of the registration event, wherein the type includes: a primary key and a field, and the search dictionary includes: a forward search dictionary and a reverse search dictionary.
[0057] For example, in some embodiments of the present application, by the type corresponding to the registration event, it is determined whether to use a forward lookup dictionary or a reverse lookup dictionary to search for the corresponding related workbook to achieve accurate query of data. For example, when an event (that is, a registration event) is triggered, it is determined whether the column where the cell where the registration event occurs (that is, any cell above) is located is a primary key or a field, and different processing is performed according to the result.
[0058] In some embodiments of the present application, S420 may include: when confirming that the type of the registration event is the field, searching in the forward search dictionary according to the field search key to obtain the relevant workbook, wherein the field search key is constructed by the source workbook name, source worksheet name, and source field name of any cell.
[0059] For example, in some embodiments of the present application, if the column where any cell is located is a field, a field search key is jointly constructed based on the source workbook name, source worksheet name, and source field name where any cell is located, so as to search in the forward search dictionary and obtain relevant results (as a specific example of a related workbook).
[0060] In other embodiments of the present application, S420 may include: when confirming that the type of the registration event is the primary key, searching in the reverse lookup dictionary according to the primary key lookup key to obtain the relevant workbook, wherein the field lookup key is constructed by the target workbook name and target worksheet name of any cell.
[0061] For example, in some embodiments of the present application, if the column where any cell is located is the primary key, the primary key search key is jointly constructed based on the target workbook name and target worksheet name where any cell is located, and the reverse lookup dictionary is searched to obtain relevant results.
[0062] In some embodiments of the present application, S420 may include: after finding the relevant workbook, popping up a menu item corresponding to the type; and in response to the user's selection operation instruction for the menu item, jumping to the relevant workbook.
[0063] For example, in some embodiments of the present application, Figure 5 As shown in the figure, when the event type is field, after finding the relevant workbook, the "Goto" menu item pops up, and the user can click to select to jump to the following Figure 6 For example, Figure 7As shown in the figure, when the event type is the primary key, the Scan menu item pops up after the relevant workbook is found. The user clicks the "Scan All" button under the menu to jump to the following Figure 8 All workbook pages related to "ID 15022" are shown. Click again Figure 8 "Z Combat_Skill->SDSkillActionCommand->15021->[part]EventID" to jump to Fig. 9 It should be noted that, in addition to the pop-up menu item, other shortcut buttons can also be used to achieve the jump, and the embodiment of the present application is not limited thereto.
[0064] S430, filtering out target query data related to the cell data of any cell from the related workbook.
[0065] For example, in some embodiments of the present application, target query data that has a reference relationship with cell data is automatically filtered out in an opened related workbook.
[0066] In some embodiments of the present application, S430 may include: when the type of the registered event is the field, the related workbook is a target workbook under the same directory; obtaining the target worksheet under the target workbook; querying the row corresponding to the cell data according to the primary key column of the target worksheet; activating and selecting the target workbook, the target worksheet and the row corresponding to the cell data, wherein the target workbook, the target worksheet and the row constitute the target query data.
[0067] For example, in some embodiments of the present application, after opening the target workbook in the same directory, the target worksheet under the target workbook can be automatically found, and then the ID (that is, the cell data, such as the ID of the cell) that needs to be jumped to can be automatically found in the primary key column of the target worksheet. Figure 5 If the query is successful, the target workbook, target worksheet, and target primary key cell row (as a specific example of the row corresponding to the cell data) are activated and selected.
[0068] In other embodiments of the present application, S430 may include: when the type of the registration event is the primary key, the related workbook is the source workbook; filtering out all source field cells in the source field column of the source worksheet in the source workbook that contain the cell data; activating and selecting the source workbook, the source worksheet, and all the source field cells, wherein the source workbook, the source worksheet, and all the source field cells constitute the target query data.
[0069] For example, in some other embodiments of the present application, when Scan All is selected in the menu, all relevant source workbooks are opened, otherwise the next search operation is directly performed. Among all currently opened source workbooks, all cells (i.e., all source field cells) containing selected cell data in the source field column of the source worksheet related to the reverse lookup dictionary query result are automatically screened out. These cells are the results of the reverse lookup, and these results are popped up in the form of a menu, and the source workbook, source worksheet, and source field cell are activated and selected according to the user's selection result at this time.
[0070] The following is combined with Fig.10 The specific process of querying table data in the game provided by some embodiments of the present application is exemplified.
[0071] Please see attached Fig.10 , Fig.10 A flowchart of a method for querying table data in a game provided for some embodiments of the present application. It should be noted that when performing the following data query operation, the relationship configuration data in the worksheet has been configured; after starting the plug-in, the forward search dictionary and the reverse search dictionary have been generated accordingly, and the event registration of the cell has been completed.
[0072] The above process is explained below as an example.
[0073] S510, in response to a user's selection operation instruction on any cell in the worksheet, triggering a corresponding registration event.
[0074] S520, determine whether the type of the registration event is a field, if so, execute S530, otherwise execute S540.
[0075] S530, construct a field search key consisting of the source workbook name, source worksheet name, and source field name of any cell.
[0076] S531, search in the forward search dictionary according to the field search key, and after finding the relevant workbook, pop up the menu item corresponding to the field.
[0077] S532, in response to the user's selection operation instruction for the menu item, jump to the target workbook in the same directory.
[0078] S533, obtaining the target worksheet under the target workbook, and searching for the row corresponding to the cell data according to the primary key column of the target worksheet.
[0079] S534, activate and select the target workbook, target worksheet and the row corresponding to the cell data.
[0080] S540, construct a primary key search key consisting of the target workbook name and target worksheet name of any cell.
[0081] S541, searching in the reverse lookup dictionary according to the primary key search key, after finding the relevant workbook, popping up a menu item corresponding to the primary key.
[0082] S542: In response to the user's selection operation instruction for the menu item, jump to the source workbook.
[0083] S543, filter out all source field cells that contain cell data in the source field column of the source worksheet in the source workbook.
[0084] S544, activate and select the source workbook, source worksheet and all source field cells.
[0085] It should be noted that the specific implementation process of S510 to S544 can refer to the method embodiment provided above, and in order to avoid repetition, the detailed description is appropriately omitted here.
[0086] It can be seen from some of the above-mentioned embodiments of the present application that, compared with the cumbersome retrieval jump process of the existing solution, the present application only requires one click of a button to complete the corresponding operation, which greatly reduces the workload of data table editors, simplifies the user's repetitive and complex operations into simple and intuitive operations, and greatly improves the data query efficiency in the game development process.
[0087] Please refer to Fig.11 , Fig.11 The block diagram of the composition of the apparatus for querying table data in a game provided by some embodiments of the present application is shown. It should be understood that the apparatus for querying table data in the game corresponds to the above method embodiment and can execute each step involved in the above method embodiment. The specific functions of the apparatus for querying table data in the game can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.
[0088] Fig.11 The device for querying table data in the game includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the device for querying table data in the game. The device for querying table data in the game includes: a trigger module 610, which is used to trigger a registration event corresponding to any cell in the worksheet in response to a user's selection operation instruction; a search module 620, which is used to search for related workbooks according to a search dictionary corresponding to the type of the registration event, wherein the type includes: primary key and field, and the search dictionary includes: forward search dictionary and reverse search dictionary; a screening module 630, which is used to screen out target query data related to the cell data of any cell from the related workbook.
[0089] In some embodiments of the present application, before triggering module 610, the device for querying table data in the game also includes: a configuration module (not shown in the figure): used to configure the reference relationship in the worksheet and determine the relationship configuration data; wherein the relationship configuration data includes: source workbook name, source worksheet name, source field name, target workbook name, target worksheet name.
[0090] In some embodiments of the present application, the trigger module 610 is used to load the relationship configuration data after starting the plug-in corresponding to the worksheet; generate the lookup dictionary based on the relationship configuration data, wherein the lookup keys of the forward lookup dictionary and the reverse lookup dictionary are different; and register corresponding events for cells in the worksheet in response to the user's operation instructions.
[0091] In some embodiments of the present application, the search module 620 is used to confirm that the type of the registration event is the field, and then search in the forward search dictionary according to the field search key to obtain the related workbook, wherein the field search key is constructed by the source workbook name, source worksheet name, and source field name of any cell; when it is confirmed that the type of the registration event is the primary key, then search in the reverse search dictionary according to the primary key search key to obtain the related workbook, wherein the field search key is constructed by the target workbook name and target worksheet name of any cell.
[0092] In some embodiments of the present application, the search module 620 is used to pop up a menu item corresponding to the type after finding the relevant workbook; and jump to the relevant workbook in response to the user's selection operation instruction for the menu item.
[0093] In some embodiments of the present application, the filtering module 630 is used to, when the type of the registration event is the field, the related workbook is the target workbook under the same directory; obtain the target worksheet under the target workbook; query the row corresponding to the cell data according to the primary key column of the target worksheet; activate and select the target workbook, the target worksheet and the row corresponding to the cell data, wherein the target workbook, the target worksheet and the row constitute the target query data.
[0094] In some embodiments of the present application, the filtering module 630 is used to, when the type of the registration event is the primary key, the related workbook is the source workbook; filter out all source field cells in the source field column of the source worksheet in the source workbook that contain the cell data; activate and select the source workbook, the source worksheet and all the source field cells, wherein the source workbook, the source worksheet and all the source field cells constitute the target query data.
[0095] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.
[0096] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the operations of the method corresponding to any of the above methods provided in the above embodiments.
[0097] Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations corresponding to any of the above methods provided in the above embodiments.
[0098] like Fig.12 As shown, some embodiments of the present application provide an electronic device 700, which includes: a memory 710, a processor 720, and a computer program stored in the memory 710 and executable on the processor 720, wherein the processor 720 can implement a method as described in any of the above embodiments when reading the program from the memory 710 through a bus 730 and executing the program.
[0099] Processor 720 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 720 can be a microprocessor.
[0100] The memory 710 may be used to store instructions executed by the processor 720 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 720 of the disclosed embodiment may be used to execute instructions in the memory 710 to implement the method shown above. The memory 710 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.
[0101] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0102] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0103] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for querying table data in a game, characterized in that: include: In response to a user's selection operation instruction on any cell in the worksheet, triggering a registration event corresponding to the any cell; Searching for a related workbook according to a search dictionary corresponding to the type of the registration event, wherein the type includes: a primary key and a field, and the search dictionary includes: a forward search dictionary and a reverse search dictionary; Filtering target query data related to the cell data of any cell from the related workbook; The searching for the related workbook according to the search dictionary corresponding to the type of the registration event includes: when it is confirmed that the type of the registration event is the field, searching in the forward search dictionary according to the field search key to obtain the related workbook, wherein the field search key is constructed by the source workbook name, source worksheet name, and source field name of any cell; when it is confirmed that the type of the registration event is the primary key, searching in the reverse search dictionary according to the primary key search key to obtain the related workbook, wherein the field search key is constructed by the target workbook name and target worksheet name of any cell; The step of filtering out target query data related to the cell data of any cell from the related workbook includes: When the type of the registered event is the field, the related workbook is a target workbook in the same directory; a target worksheet under the target workbook is obtained; a row corresponding to the cell data is queried according to the primary key column of the target worksheet; the target workbook, the target worksheet and the row corresponding to the cell data are activated and selected, wherein the target workbook, the target worksheet and the row corresponding to the cell data constitute the target query data; When the type of the registration event is the primary key, the related workbook is the source workbook; all source field cells in the source field column of the source worksheet in the source workbook that contain the cell data are filtered out; the source workbook, the source worksheet and all the source field cells are activated and selected, wherein the source workbook, the source worksheet and all the source field cells constitute the target query data.
2. The method according to claim 1, characterized in that Before responding to the user's selection operation instruction on any cell, the method further includes: The reference relationship in the worksheet is configured to determine relationship configuration data; wherein the relationship configuration data includes: a source workbook name, a source worksheet name, a source field name, a target workbook name, and a target worksheet name.
3. The method according to claim 2, characterized in that Before responding to the user's selection operation instruction on any cell, the method further includes: After starting the plug-in corresponding to the worksheet, the relationship configuration data is loaded; generating the lookup dictionary based on the relationship configuration data, wherein the lookup keys of the forward lookup dictionary and the reverse lookup dictionary are different; In response to the user's operation instruction, a corresponding event is registered for a cell in the worksheet.
4. The method according to any one of claims 1 to 3, characterized in that The searching for the relevant workbook according to the search dictionary corresponding to the type of the registration event includes: After the relevant workbook is found, a menu item corresponding to the type is popped up; In response to the user's selection operation instruction for the menu item, jump to the related workbook.
5. A device for querying table data in a game, characterized in that: The device is used to perform the method according to claim 1, and the device comprises: A trigger module, configured to trigger a registration event corresponding to any cell in response to a user's selection operation instruction on any cell in the worksheet; A search module, used to search for related workbooks according to a search dictionary corresponding to the type of the registration event, wherein the type includes: a primary key and a field, and the search dictionary includes: a forward search dictionary and a reverse search dictionary; A screening module is used to screen out target query data related to the cell data of any cell from the related workbook.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program executes the method according to any one of claims 1 to 4 when executed by a processor.
7. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program executes the method according to any one of claims 1 to 4 when being run by the processor.
Citation Information
Patent Citations
Historical record viewing method and device for cells, equipment and storage medium
CN117251432A
Work support apparatus, system, method, and program
JP2022094428A
