Data processing method and device, electronic equipment and storage medium

By acquiring game path construction instruction parameters and building dependencies, the target construction path is determined and cost analysis is performed, solving the problem of low efficiency in urban construction system analysis and achieving efficient system analysis.

CN120960786APending Publication Date: 2025-11-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511028460.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

The system analysis efficiency of urban construction systems is relatively low, and design and adjustment rely on human experience and testing.

Method used

By acquiring the target game's path construction instruction parameters, including virtual resources and building dependencies, the system can determine the target construction path and construction sequence, analyze construction costs, and improve system analysis efficiency.

Benefits of technology

It enables the simulation of construction paths for virtual building modules under limited virtual resources, thereby improving the system analysis efficiency of urban construction systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120960786A_ABST
    Figure CN120960786A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: acquiring a path construction indication parameter corresponding to a target game; based on a plurality of candidate virtual building modules provided by the target game and a building dependency relationship between at least two candidate virtual building modules, determining a target construction path which can be realized based on the resource indication parameters, the target construction path is used for indicating target virtual building modules needing to be constructed and a construction sequence of the target virtual building modules, the target virtual building modules are composed of candidate virtual building modules, and the construction sequence of the target virtual building modules in the target construction path is a construction sequence conforming to a building dependency relationship; and analyzing the target construction path based on the target virtual resources consumed by the target virtual building module in the target construction path and / or the construction sequence to obtain an analysis result, so that the system analysis efficiency of the urban construction system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and specifically to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] The internet revolution, coupled with the continuous development and evolution of hardware and software technologies, has spurred the emergence of smart devices and software. Simultaneously, a vast number of games of diverse themes have sprung up to meet user needs. Furthermore, with the booming development of various technologies within the gaming industry, people are placing increasingly higher demands on game performance.

[0003] In the field of game development, city-building systems are a core gameplay element in many strategy games. These systems typically involve complex design considerations such as the construction, upgrading, resource consumption, and output of buildings within the game environment. Currently, city-building systems require design based on the experience of relevant personnel, manual testing, and analysis of test results to adjust the designed numerical values ​​to achieve the desired effect. This results in relatively low system analysis efficiency for city-building systems. Summary of the Invention

[0004] This application provides a data processing method, apparatus, electronic device, and storage medium that can improve the system analysis efficiency of urban construction systems.

[0005] In a first aspect, embodiments of this application provide a data processing method, the method comprising:

[0006] Obtain the path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters. The resource instruction parameters include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource.

[0007] Based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules, a target construction path that can be achieved based on the resource indication parameters is determined. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules. The construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship.

[0008] Based on the target virtual resources consumed by the target virtual building modules in the above target construction path, and / or the above construction sequence, the construction cost of the above target construction path is analyzed, and the cost analysis results are obtained.

[0009] Secondly, embodiments of this application provide a data processing apparatus, the apparatus comprising:

[0010] The parameter acquisition module is used to acquire the path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters, which include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource.

[0011] The path determination module is used to determine a target construction path that can be achieved based on the resource indication parameters, based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules. The construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship.

[0012] The analysis module is used to analyze the construction cost of the target construction path based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction sequence, and to obtain the cost analysis results.

[0013] Thirdly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; a processor loads instructions from the memory to execute the steps of any of the data processing methods provided in embodiments of this application.

[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps of any of the data processing methods provided in embodiments of this application.

[0015] Fifthly, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the data processing methods provided in embodiments of this application.

[0016] The solution adopted in this application embodiment can obtain path construction indication parameters corresponding to the target game. The path construction indication parameters include resource indication parameters, which include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource. Based on multiple candidate virtual building modules provided by the target game, and the building dependency relationship between at least two of the candidate virtual building modules, a target construction path that can be achieved based on the resource indication parameters is determined. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules, and the construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship. Based on the target virtual resources consumed by the target virtual building modules in the target construction path, and / or the construction order, the construction cost of the target construction path is analyzed to obtain cost analysis results. Thus, by simulating the construction path of virtual building modules with at least limited available virtual resources, cost analysis is performed on the simulated construction path to obtain cost analysis results, thereby improving the system analysis efficiency of the urban construction system. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic flowchart of one embodiment of the data processing method provided in this application.

[0019] Figure 2 This is a schematic diagram of the modules provided in the embodiments of this application;

[0020] Figure 3 This is a diagram showing the module construction consumption provided in the embodiments of this application;

[0021] Figure 4 This is a construction path timeline diagram provided in the embodiments of this application;

[0022] Figure 5 This is a schematic diagram illustrating the relevant construction information of the target virtual building module provided in the embodiments of this application;

[0023] Figure 6 This is a schematic diagram of the structure of the data processing device provided in the embodiments of this application;

[0024] Figure 7This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0026] This application provides a data processing method, apparatus, electronic device, and computer-readable storage medium.

[0027] Specifically, this embodiment will be described from the perspective of a data processing device, which can be integrated into an electronic device. That is, the data processing method of this embodiment can be executed by an electronic device. Optionally, the electronic device may include a terminal device. The terminal device may be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, or personal computer (PC), etc.

[0028] The data processing method provided in this application can be applied to data processing systems. These systems may include a player terminal device and a server. The terminal can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication over a bidirectional communication link. The player terminal device and the server can communicate bidirectionally via a network.

[0029] Optionally, the server can be a standalone server, or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. Cloud servers consist of a large number of computers or network servers based on cloud computing.

[0030] The following detailed description is provided in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings.

[0031] The data processing method of this embodiment obtains path construction indication parameters corresponding to the target game. These parameters include resource indication parameters, which include at least one virtual resource that can be used to construct virtual building modules, and the quantity of each virtual resource. Based on multiple candidate virtual building modules provided by the target game and the building dependencies between at least two candidate virtual building modules, a target construction path achievable based on the resource indication parameters is determined. This target construction path indicates the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules, and the construction order of the target virtual building modules in the target construction path conforms to the building dependencies. Based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, the construction cost of the target construction path is analyzed to obtain cost analysis results, which can improve the system analysis efficiency of the urban construction system.

[0032] Please refer to Figure 1 Taking a terminal as an example, this embodiment provides a data processing method. The specific flow of this data processing method can be described in the following steps 101 to 103, wherein:

[0033] Step 101: Obtain the path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters, which include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource.

[0034] Among them, the path construction indication parameter is used to indicate the parameters that need to be based on the simulation of the construction path. The path construction indication parameter includes at least the resource indication parameter to indicate the simulation of the construction path under a specific virtual resource.

[0035] Optionally, the aforementioned path construction instruction parameters may also include path instruction parameters, which are used to indicate the simulation of a specific construction path. The aforementioned path instruction parameters may include a fixed construction reference path composed of at least two fifth virtual building modules. The fifth virtual building module is a module among multiple candidate virtual building modules that the target game can provide. By limiting the fixed construction reference path, the terminal is instructed to give priority to planning the fixed construction reference path containing the fifth virtual building module when performing path planning.

[0036] It should be noted that when planning the construction path, it is necessary to simulate the virtual resources held by the player's account in the actual game scene, as well as the quantity of the virtual resources, in order to simulate the construction path that the player can take under limited resources. The virtual resources held by the player's account currently being simulated, as well as the quantity of the virtual resources, are at least one of the above resource indication parameters that can be used to construct virtual building modules, and the quantity of each of the above virtual resources.

[0037] It is understandable that the path construction indication parameters are used as constraints on the construction path in order to simulate the construction path under these parameters.

[0038] Specifically, automated data collection methods can be used to obtain the virtual resources held by the currently simulated player account, as well as the quantity of those virtual resources, through the client interface.

[0039] In some embodiments, the terminal can be configured with system settings, that is, by adopting a modular design for the steps processed by the terminal, a system composed of multiple modules can be generated to implement the above-mentioned data processing method. For example, a data acquisition module, a data preprocessing module, an automated testing module, a dynamic programming solution module, and a data visualization module can be modularly designed. Each module is used to process different steps of the data processing method, and the modules can interact with each other through standardized interfaces to realize the complete workflow of the above-mentioned data processing method.

[0040] Specifically, the aforementioned data acquisition module can obtain path construction instruction parameters corresponding to the target game, such as at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each of the aforementioned virtual resources. Users can input path construction instruction parameters through a client interface. Alternatively, if users do not input path construction instruction parameters through the client interface, the terminal can determine a simulated player account and obtain the production information of the virtual resources held by the currently simulated player account through the game service interface, such as the inherent production of the hangar and the production of occupied buildings in the game.

[0041] It is understandable that the virtual resources that users input through the client interface for constructing virtual building modules, and the corresponding resource quantity for each of these virtual resources, are given resources. In other words, the input resource information represents resource constraints, and the terminal needs to consume these given resources to solve for the construction path. The given resources input by the user and the production information of the virtual resources currently held by the account can be ANDed / ORed, meaning the terminal can simultaneously obtain both types of information to participate in simulating the construction path. The terminal can solve for the path using the given resources after detecting user input; otherwise, it will solve for the path based on the player's account's virtual resource production information within the game.

[0042] For example, users can input all types of virtual resources at once through the client interface. For instance, if a user wants to calculate the construction path that can be built with virtual resources of 100 ore and 100 metal, the input information when inputting all types of virtual resources can be: (ore = 100, metal = 100). If the input is split into two parts, the input information for the two parts can be: (ore = 100) and (metal = 100) respectively.

[0043] Step 102: Based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules, determine the target construction path that can be achieved based on the resource indication parameters. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules. The construction order of the target virtual building modules in the target construction path is the construction order that conforms to the building dependency relationship.

[0044] In this embodiment, the target construction path that can be achieved under the constraints of the resource indication parameters can be determined based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules.

[0045] The aforementioned building dependency relationship is used to indicate the interrelationship between virtual building modules during construction. For example, a virtual building module needs to be constructed based on the virtual resources generated by another virtual building module after it has been constructed. Or, a virtual building module can only be constructed after another virtual building module has been unlocked.

[0046] It should be noted that a virtual building module can have a building dependency relationship with one other virtual building module, or it can have a building dependency relationship with two or more other virtual building modules.

[0047] The aforementioned target construction path can be the order of upgrading and / or building under limited resource indication parameters. Upgrading and / or building based on the target construction path can obtain the maximum and / or most virtual buildings under limited resource indication parameters. In order to better analyze potential problems in the design of the game construction system by building the maximum and / or most virtual buildings, such as the excessively long time interval between two adjacent virtual building modules on the path, or the large difference in resource consumption between two adjacent virtual building modules on the path.

[0048] Among them, the aforementioned candidate virtual building modules can be units that can participate in construction along the construction path. For example, they can be virtual buildings of a specific level in the game scene. For instance, a level 1 virtual building A can be used as a virtual building module to build virtual building A in the game scene, and then a level 2 virtual building A can be used as a virtual building module to upgrade virtual building A from level 1 to level 2 in the game scene.

[0049] For example, in a software development scenario, the above modules can be software functions / components, the virtual resources are development time and human resources, and the above dependencies are technical dependencies; in a manufacturing scenario, the above modules can be product components, the virtual resources are raw resources and machine production time requirements, and the above dependencies are assembly sequence requirements; in an educational curriculum design scenario, the above modules can be course units, the virtual resources are teaching time and teaching materials, and the above dependencies are knowledge prerequisite requirements.

[0050] It should be noted that, due to specific building dependencies between some candidate virtual building modules, these dependencies can serve as prerequisites for unlocking the modules before construction, such as... Figure 2 The "Small Dock" can only be unlocked at level 3 when the "Base" is at level 3 and the "Small Dock" module is at level 2. Upgrading and construction can be carried out when the "Base" is at level 3, the "Small Dock" module is at level 2, and the virtual resources required to upgrade the current "Small Dock" to level 3 are sufficient.

[0051] Understandably, since the aforementioned data acquisition module can also obtain path indication parameters, i.e. fixed construction reference paths, if a fixed construction reference path exists, then the relevant data of each candidate virtual building module in the fixed construction reference path is obtained, including but not limited to the module ID, the module's predecessor dependent modules (i.e., modules that have a building dependency relationship with the candidate virtual building module), the resource consumption of virtual resources required to build the module, and the construction time; if no fixed construction reference path exists, then the relevant data of all candidate virtual building modules is obtained, including but not limited to the module ID, the module's predecessor dependent modules (i.e., modules that have a building dependency relationship with the candidate virtual building module), the resource consumption of virtual resources required to build the module, and the construction time.

[0052] It should be noted that the above construction path refers to the order in which different types of functional modules (i.e., virtual building modules) in a specific construction system within the game project where the player's account is currently located are upgraded and / or constructed. These functional modules can be hangar modules, which in the game can provide services for vehicles such as airplanes and docks. By upgrading and / or constructing different hangar modules, different vehicle services, such as docking, repair, resupply, and modification, are made available to the player. At a specific base level, multiple hangar modules can be constructed. Therefore, there are multiple upgrade and construction orders for hangar modules, which will affect the opening time of different vehicle services.

[0053] Therefore, when designing the game's construction system, factors such as resource allocation, module upgrade construction resources and time consumption, and the attributes provided by modules can influence the player's progress in unlocking gameplay and their overall gaming experience. Because there are many modules, under the constraints of all building dependencies and path construction parameters, and the condition that each module only needs to be built once, there are numerous possible sequential upgrade and construction combinations for all modules in a level 1 base—for example, as many as 1,152,000 combinations.

[0054] The aforementioned construction system may employ a core game mechanism of an SLG game, in which players can collect at least one virtual resource (such as game resources) in the current game project to construct virtual building modules belonging to the player by consuming virtual resources and time, and upgrade the level of the constructed virtual building modules.

[0055] The virtual building modules used for upgrading must contain corresponding building dependencies. For example, different levels affect the construction and upgrading of virtual building modules, and a certain virtual building module can only be unlocked when a specific level is reached. Alternatively, unlocked virtual building modules can only be upgraded and constructed when virtual resources meet resource consumption requirements. Figure 2The "Small Dock" module can only be unlocked when the base is at level 01. When the virtual resources required for the "Small Dock" module are sufficient, the corresponding virtual resources can be spent to build and upgrade the "Small Dock" module.

[0056] Among these, the aforementioned hangar module is a module category used in game projects as part of a construction mechanism to unlock new gameplay features, such as... Figure 2 In the base construction, upgrading and building the "Blueprint Construction Center" is required to unlock the paid card draw gameplay to obtain blueprints for ship manufacturing; upgrading and building the "Small Shipyard" is required to manufacture and obtain small-tonnage ships; upgrading and building the "Basic Facility Management Station" is required to drive ships to occupy four types of resource gathering buildings, teleportation point buildings, and inter-map access buildings (star gates), etc.

[0057] In some embodiments, relevant parameters for simulating the construction path can be obtained through automated data acquisition methods and client interfaces, such as the consumption of virtual resources and the dependencies of virtual building modules that consume virtual resources.

[0058] In some embodiments, based on the multiple candidate virtual building modules provided by the target game and the building dependencies between at least two of the candidate virtual building modules, a dynamic programming algorithm can be used to solve for the optimal construction scheme, which is the target construction path. Then, resource consumption, output construction order and remaining resources can be calculated during the dynamic programming process.

[0059] The dynamic programming solution process involves traversing all possible candidate virtual building modules, checking whether the traversed candidate virtual building modules have been built, whether the virtual building modules that the traversed candidate virtual building modules depend on have been built, and whether the virtual resources required by the traversed candidate virtual building modules are sufficient. In order to update the remaining number of virtual resources when the corresponding conditions are met, and recursively calculate the remaining modules that have not been built or upgraded, and finally update the optimal solution.

[0060] The dynamic programming algorithm mentioned above is an optimization algorithm that reduces computational load by decomposing complex problems into overlapping subproblems and storing the solutions to these subproblems to avoid redundant calculations. In this embodiment, the dynamic programming algorithm is used to calculate the optimal construction order and number of modules under given resource constraints, in order to maximize resource utilization.

[0061] Specifically, dynamic programming algorithms can be used for construction path planning. The dynamic programming algorithm can be used to find the construction path that can build the most modules given the resources. Alternatively, with a fixed construction reference path, the algorithm can be used to find the way to build the most modules according to the fixed construction reference path given the resources. That is, the method that can build the most building modules based on the construction / upgrade order indicated by the planned construction path can be used.

[0062] In some embodiments, for scenarios without a fixed construction reference path, with limited virtual resources and a corresponding number of resources, all unbuilt virtual building modules can be considered. When the given virtual resources do not meet the consumption of all modules, the target construction path can be determined using the data processing method described above. For scenarios with a fixed construction reference path, limited virtual resources, and a corresponding number of resources, modules within the fixed construction reference path can be considered. When the given virtual resources do not meet the consumption of modules within the fixed construction reference path, or when the given virtual resources just meet the consumption of modules within the fixed construction reference path, the target construction path can be determined using the data processing method described above. This allows for finding the sequence of modules that can be built with the most modules under limited resource constraints. Resource constraint processing ensures that the construction order does not exceed the given resource limit, building dependency processing ensures that modules are built correctly according to building dependencies, and optimal solution search can be used to find the optimal solution.

[0063] In some embodiments, determining the target construction path achievable based on the resource indication parameters, based on the multiple candidate virtual building modules provided by the target game and the building dependencies between at least two of the candidate virtual building modules, may include: obtaining the construction reference order of the candidate virtual building modules; using the resource indication parameters as the resource consumption constraints corresponding to the construction path, and planning the construction path based on the construction reference order and the building dependencies between at least two of the candidate virtual building modules to obtain the target construction path.

[0064] The aforementioned construction reference order is used to indicate the order in which candidate virtual building modules are added to the construction path. Candidate virtual building modules that are earlier in the construction reference order are added to the construction path first, while candidate virtual building modules that are later in the order are added to the construction path later.

[0065] In this embodiment, by limiting the resource indication parameter to the constraint condition corresponding to resource consumption, the corresponding candidate virtual building modules are selected sequentially in the construction reference order to participate in the construction path planning. Candidate virtual building modules that meet the resource consumption constraint condition are added to the construction path until the resource consumption constraint condition is no longer met. Then, the currently obtained construction path is taken as the target construction path.

[0066] Specifically, the terminal can perform construction path planning at least once. If the terminal performs construction path planning only once, the construction path planned by the terminal is the target construction path. If the terminal performs construction path planning at least twice, the terminal selects at least two construction paths to use as the target construction path. The selection of the at least two construction paths planned by the terminal includes, but is not limited to, selecting the longest path (selecting the construction path with the most virtual building modules) or selecting the path that consumes the fewest virtual resources. The specific settings can be configured according to the requirements and are not limited here.

[0067] In some embodiments, obtaining the construction reference order of the candidate virtual building modules includes: determining the construction reference order of the candidate virtual building modules based on the resource consumption of each candidate virtual building module for the virtual resources, wherein the candidate virtual building module with smaller resource consumption is placed before the candidate virtual building module with larger resource consumption in the construction reference order.

[0068] It is understandable that by sorting the candidate virtual building modules according to their resource consumption, the construction reference order of the candidate virtual building modules is determined, thereby prioritizing the construction of the candidate virtual building modules. That is, the construction of modules with less resource consumption is prioritized, so as to reduce the state space that needs to be explored and improve the efficiency of the algorithm.

[0069] For example, suppose there are three virtual building modules: module A, module B, and module C. Module A has resource consumption of {ore: 100, metal: 200, crystal: 50}, meaning its total resource consumption is 350. Module B has resource consumption of {ore: 50, metal: 50}, meaning its total resource consumption is 100. Module C has resource consumption of {crystal: 200, gas: 100}, meaning its total resource consumption is 300. Therefore, the recommended construction order for modules A, B, and C is module B, module C, and module A.

[0070] Specifically, the above-mentioned data preprocessing module can be used to perform the step of determining the construction reference order of the candidate virtual building modules based on the resource consumption of each candidate virtual building module for the above-mentioned virtual resources.

[0071] It is understandable that, for candidate virtual building modules, there are modules that upgrade a certain virtual building. For modules that upgrade the same virtual building, the modules that upgrade the same virtual building can be identified as the same type of virtual building module. Then, the resource consumption of virtual resources corresponding to the same type of modules but different levels can be that the higher the level, the greater the resource consumption of virtual resources.

[0072] Therefore, the sorting method corresponding to the above construction reference order follows the aforementioned pattern, such as sorting from smallest to largest, prioritizing modules with lower total resource consumption to achieve greedy strategy optimization. That is, with limited resources, try building modules with lower consumption first, which can maximize the number of completed modules, conforming to the intuitive strategy of "building the easiest to build first" and "building the lowest level first". Moreover, it can also improve the efficiency of dynamic programming. Under the same dependency conditions, prioritizing modules with lower resource consumption can reduce unnecessary branch exploration, making it easier to find a better solution and reduce the amount of computation. In addition, as a preprocessing of dynamic programming, it can provide a reasonable search order. It can achieve a higher overall module upgrade construction rate. That is, under resource constraints, prioritizing the completion of smaller modules can ensure that resources are fully utilized and reduce the situation where resources are "stuck" on large modules and cannot be advanced.

[0073] For example, suppose there are two candidate virtual building modules, both of which are used to upgrade the level of virtual building A, and the types of virtual resources they require are ore, metal, crystal, and gas, respectively. The resource consumption pattern of the candidate virtual building modules can be ore >> metal > crystal > gas, with ore accounting for a much larger proportion than the other three.

[0074] Furthermore, for virtual building A, two candidate virtual building modules can be named "3XXX001" and "3XXX002" respectively. The last three digits of the ID are used to indicate the level of virtual building A being upgraded. The resource consumption for "3XXX001" is {Ore: 5000, Metal: 100, Crystal: 10, Gas: 0}, and the resource consumption for "3XXX002" is {Ore: 15000, Metal: 200, Crystal: 20, Gas: 10}. The smaller the value of the last three digits of the ID, the easier it is for players to unlock and upgrade the building.

[0075] In some embodiments, the above-mentioned resource consumption constraints corresponding to the construction path, based on the above-mentioned construction reference order and the building dependency relationships between at least two of the above-mentioned candidate virtual building modules, are used to plan the construction path to obtain the target construction path, including:

[0076] First, based on the above construction reference order, the first virtual building module to be constructed in the construction path under the current recursive round is selected from the above candidate virtual building modules. That is, in this step, a virtual building module to be added to the construction path needs to be selected from the construction reference order. The selected virtual building module is the virtual building module that has been traversed in the construction reference order. That is, the virtual building modules before the selected virtual building module have been traversed and added to the construction path. The selected virtual building module is the first virtual building module.

[0077] Secondly, after obtaining the first virtual building module, it is necessary to determine whether the first virtual building module is a virtual building module that has already been built on the construction path. It is understandable that since the first virtual building module may have a building dependency relationship with the virtual building module that is located before the first virtual building module in the construction reference order, that is, if you want to build the first virtual building module, you need to build the first virtual building module first. Therefore, it is necessary to determine whether the virtual building module currently being traversed has been built.

[0078] If the first virtual building module is a virtual building module that has already been built on the construction path, then a new recursive round is entered, and the above steps are continued to be executed based on the above construction reference order, selecting the first virtual building module to be built on the construction path in the current recursive round from the above candidate virtual building modules, that is, selecting the virtual building module that is located after and adjacent to the first virtual building module.

[0079] If the first virtual building module is a virtual building module that has not been built on the construction path, then from the building dependencies between the at least two candidate virtual building modules, at least one second virtual building module that has a corresponding building dependency relationship with the first virtual building module is determined, that is, the module that needs to be built before the first virtual building module. For example, for building A, if the first virtual building module is to upgrade the level of building A to level 3, then the virtual building module that has a building dependency relationship with the first virtual building module can be to upgrade the level of building A to level 2.

[0080] Then, after obtaining the second virtual building module, it is necessary to determine whether the second virtual building module is a virtual building module that has already been built on the construction path. The determination logic for the second virtual building module is the same as that for the first virtual building module. Specifically, if the second virtual building module is a virtual building module that has already been built on the construction path (meaning that a virtual building module with a dependency relationship with the first virtual building module has been built), and the remaining virtual resources indicated by the resource indicator parameter meet the resource consumption of the first virtual building module, then the first virtual building module is built on the construction path.

[0081] Finally, after constructing the first virtual building module in the construction path, a new recursive round can be entered to continue executing the steps described above, which are based on the construction reference order and select the first virtual building module to be constructed in the current recursive round from the candidate virtual building modules. That is, select the virtual building module that is adjacent to the first virtual building module, until the number of remaining virtual resources indicated by the resource indicator parameter does not meet the construction consumption of the candidate virtual building modules, thus obtaining the target construction path.

[0082] Understandably, if the remaining virtual resources indicated by the above resource indicator parameters do not meet the resource consumption of the virtual building modules that currently meet other conditions, the simulation of the construction path will stop, the remaining virtual resources will be updated, the number of modules and the construction order on the construction path will be calculated, and the obtained data will be cached and sent to specific modules for data analysis.

[0083] In this embodiment, the terminal can use auxiliary functions to check the feasibility of the construction path and update the virtual resources. The feasibility check of the construction path includes checking the dependency conditions of the traversed modules (whether the module has modules with building dependencies) and checking the resource sufficiency of the traversed modules (whether the current remaining virtual theater resources are sufficient for the construction of the module). The resource update of virtual resources is the dynamic adjustment of the remaining virtual resources for each newly added virtual building module during the simulated construction path process.

[0084] In some embodiments, if the second virtual building module is a virtual building module that has already been built on the construction path, and the resource quantity of the remaining virtual resources indicated by the resource indication parameter satisfies the resource consumption of the first virtual building module, then before building the first virtual building module on the construction path, the method further includes: if there is a third virtual building module among the second virtual building modules that has not been built on the construction path, indicating that in order to ensure the construction of the first virtual building module, the third virtual building module needs to be built first, then from the building dependency relationships between the at least two candidate virtual building modules, at least one fourth virtual building module that has a corresponding building dependency relationship with the third virtual building module is determined.

[0085] Then, after obtaining the fourth virtual building module, it is necessary to determine whether the fourth virtual building module is a virtual building module that has been built on the construction path. The judgment logic for the fourth virtual building module is the same as the judgment logic for the first virtual building module and the second virtual building module.

[0086] If the fourth virtual building module is a virtual building module that has been built on the construction path (meaning that a virtual building module that has a dependency relationship with the third virtual building module has been built), and the remaining virtual resources indicated by the resource indication parameter meet the resource consumption of the third virtual building module, then the third virtual building module is built on the construction path so that the second virtual building module is a virtual building module that has been built on the construction path.

[0087] If the fourth virtual building module is a virtual building module that has not been built on the construction path, it means that the virtual building module that has a dependency relationship with the third virtual building module has not been built. In this case, it is necessary to continue to determine the virtual building modules that have a building dependency relationship with the fourth virtual building module in order to build the fourth virtual building module. This will enable the construction of the third virtual building module after the fourth virtual building module has been built.

[0088] In some embodiments, if the second virtual building module is a virtual building module already constructed on the construction path, and the resource quantity of the remaining virtual resources indicated by the resource indication parameter satisfies the resource consumption of the first virtual building module, then before constructing the first virtual building module in the construction path, the method further includes: obtaining a resource consumption dictionary, the resource consumption dictionary including resource field information corresponding to each of the candidate virtual building modules, the resource field information being used to indicate the resource consumption of the candidate virtual building module for the virtual resources; determining the target resource consumption corresponding to the first virtual building module from the resource consumption dictionary, comparing the resource quantity of the remaining virtual resources indicated by the resource indication parameter with the target resource consumption, and determining whether the resource quantity of the remaining virtual resources satisfies the resource consumption of the first virtual building module based on the comparison result.

[0089] If the number of remaining virtual resources indicated by the above resource indication parameters is greater than or equal to the target resource consumption, then it is determined that the number of remaining virtual resources indicated by the above resource indication parameters satisfies the resource consumption of the first virtual building module.

[0090] If the number of remaining virtual resources indicated by the above resource indication parameters is less than the target resource consumption, then it is determined that the number of remaining virtual resources indicated by the above resource indication parameters does not meet the resource consumption of the first virtual building module.

[0091] In some embodiments, in order to better record relevant information during the simulated construction path process, the terminal can maintain a construction data set (denoted as built_projects). This construction data set can track the construction status, record the module IDs of all virtual building modules that have been built in the current recursive state, and can also perform dependency checks based on this construction data set. That is, before building a module, it can be determined whether other virtual building modules that the module depends on have been built by checking the virtual building modules that have been built in the construction data set. Moreover, it can also avoid duplicate construction based on this construction data set, that is, ensure that the same module will not be calculated and built repeatedly. Finally, it can also pass the status, that is, during recursive calls, by adding the newly built module to the set and passing it to the next level of recursion.

[0092] Specifically, the above method further includes: obtaining a construction data set corresponding to the construction path planning, wherein the construction data set is used to record the virtual building modules that have been constructed on the construction path; judging the virtual building modules in the construction data set; if the first virtual building module does not exist in the construction data set, then the first virtual building module is determined to be a virtual building module that has not been constructed on the construction path; if the first virtual building module exists in the construction data set, then a new recursive round is entered, and the above steps of selecting the first virtual building module to be constructed on the construction path in the current recursive round from the candidate virtual building modules based on the above construction reference order are continued, until all the candidate virtual building modules exist in the above construction data set.

[0093] In some embodiments, in order to better record relevant information during the simulated construction path process, the terminal can also maintain a memo (denoted as memo). This memo can be used for dynamic programming caching. That is, the memo can be a dictionary and used as a memo in the dynamic programming algorithm. By caching the already calculated states and their results, repeated calculations are avoided, and the algorithm efficiency is significantly improved.

[0094] Among them, the built module set can be converted into a hashable key memo_key by performing state encoding in the memo, and related results can also be stored, that is, the optimal solution of each state can be stored by memo[memo_key] = (max_count, max_order, remaining_materials), where max_count corresponds to the maximum number of modules, max_order corresponds to the specific path, and remaining_materials corresponds to the remaining virtual resources. In addition, fast retrieval can be performed, that is, by retrieving memo_key, related results can be retrieved to achieve state lookup with O(1) time complexity.

[0095] For example, based on the memo and the construction dataset, the recursive entry point does not provide these two parameters on the first call and will be initialized to an empty set and an empty dictionary, respectively. Then, as the recursion deepens, `built_projects` will continuously accumulate newly built modules to realize the transfer of state. Each unique `built_projects` state will only be fully calculated once. When the same state is encountered later, the result is directly obtained from the memo, thereby realizing the construction of the optimal solution (target construction path). That is, by comparing the results of the construction paths under different states, the construction path that can build the most modules is recorded and returned. Additional memory space can be used to store intermediate results, which greatly reduces the amount of computation and improves the computation time. Moreover, it can also ensure that the algorithm will not repeatedly explore the same combination of states, avoiding repeated exploration. Finally, it can find the solution that can build the most modules under given constraints, realizing the global optimal solution.

[0096] Among them, dynamic programming algorithms avoid redundant calculations and improve solution efficiency through memoization techniques. They also avoid the inability to effectively find the optimal construction scheme under given resource constraints due to the lack of algorithmic support for construction path optimization; or, they avoid the difficulty in predicting the optimal construction path and completion time under given resource conditions.

[0097] In some embodiments, the above-mentioned path construction indication parameters further include path indication parameters, which include a fixed construction reference path composed of at least two fifth virtual building modules. That is, the path indication parameters can indicate that a fixed construction reference path to be built is defined in this simulated construction path. The fixed construction reference path can be fully simulated into the construction path or partially simulated into the construction path, which can be determined according to the resources constrained.

[0098] When multiple construction modules to be built are not given, the algorithm considers whether the given resources meet the resource consumption of all modules and solves the longest and optimal construction path that can be built with the current resources. The consumption and time of each module in the path will be displayed in the result. When multiple construction modules to be built are given, the algorithm considers whether the given resources meet the resource consumption of the given modules. If the resources are sufficient, it solves the longest and optimal construction path that can be built by consuming all the given resources. If the resources are insufficient, it outputs the modules that can be built, the unfinished modules, and the remaining resources.

[0099] Specifically, obtaining the construction reference order of the candidate virtual building modules includes: filtering the candidate virtual building modules based on the path indication parameters to obtain a set of filtered modules, wherein the set of filtered modules includes the fifth virtual building module and candidate virtual building modules that have a building dependency relationship with the fifth virtual building module; and obtaining the construction reference order of each candidate virtual building module in the set of filtered modules corresponding to the path indication parameters.

[0100] In this embodiment, the candidate virtual building modules that can participate in the simulated construction path are limited by the path indication parameter, namely, the virtual building modules related to the fifth virtual building module on the fixed construction reference path, such as the fifth virtual building module and the virtual building modules that have a building dependency relationship with the fifth virtual building module. Then, the construction reference order of the candidate virtual building modules limited by the path indication parameter is planned, so as to select the candidate virtual building modules limited by the path indication parameter to participate in the simulated construction path based on the construction reference order.

[0101] In some embodiments, the above-mentioned filtering of candidate virtual building modules based on the path indication parameters to obtain a filtered module set includes: obtaining a module dependency dictionary, the module dependency dictionary including dependency field information corresponding to each candidate virtual building module, the dependency field information being used to indicate at least one virtual building module that the candidate virtual building module depends on under the building dependency relationship, so as to filter the candidate virtual building modules based on the path indication parameters and the module dependency dictionary to obtain candidate virtual building modules that have a building dependency relationship with the fifth virtual building module; and obtaining a filtered module set based on the fifth virtual building module and the candidate virtual building modules that have a building dependency relationship with the fifth virtual building module.

[0102] Specifically, based on the aforementioned fixed construction reference path, the fifth virtual building module to be added to the filter module set in the current recursive round is selected from the aforementioned candidate virtual building modules. If the aforementioned fifth virtual building module is not added to the filter module set, then the fifth virtual building module is added to the filter module set, and it is determined whether there is a virtual building module that has a building dependency relationship with the fifth virtual building module.

[0103] If there is a virtual building module that has a building dependency relationship with the fifth virtual building module, then the virtual building module that has a building dependency relationship with the fifth virtual building module is added to the set of filtering modules, and a new recursive round is entered. The above steps of selecting the fifth virtual building module to be built in the current recursive round in the construction path are continued until all candidate virtual building modules in the above fixed construction reference path are selected as candidate virtual building modules.

[0104] If the fifth virtual building module has been added to the set of filtering modules, then a new recursive round is entered, and the steps of selecting the fifth virtual building module to be built in the current recursive round in the construction path are continued, until all the candidate virtual building modules in the fixed construction reference path are selected as candidate virtual building modules.

[0105] In some embodiments, to improve data processing, for example, when path indication parameters exist, since only the virtual building modules defined by the path indication parameters need to be considered, the "dependency pruning" function can be implemented through the aforementioned data preprocessing module to avoid interference from other data. That is, when a fixed reference construction path exists, a dependency graph pruning operation can be performed to generate a subset containing the fifth virtual building module on the fixed reference construction path and virtual building modules that have building dependencies on the fifth virtual building module. In other words, only the relevant information of the fifth virtual building module and virtual building modules that have building dependencies on the fifth virtual building module is retained, while irrelevant module data is removed to form a minimal dependency set. This reduces computational complexity, thereby resolving functional abnormalities, improving user experience, reducing the dynamic programming search state space, and saving computational costs.

[0106] Specifically, firstly, a resource consumption dictionary (denoted as `projects`) containing data for all virtual building modules and a module dependency dictionary (denoted as `dependencies`) are obtained. This is achieved by calling the game client interface to retrieve all module data, such as a list of module IDs. The module ID list is then used to retrieve the upgrade and construction resource consumption and time data for each module, forming the resource consumption dictionary. The module ID list is also used to retrieve modules that have building dependencies on the current module, forming the module dependency dictionary. Then, dependency trimming is performed to obtain the processed resource consumption dictionary and module dependency dictionary.

[0107] For example, for a module dependency dictionary, the unprocessed module dependency dictionary can be {a1:[a0], a2:[a1], a3:[a2]}, and the processed module dependency dictionary can be {a1:[a0], a2:[a1,a0], a3:[a2,a1,a0]}. Here, an represents the IDs of different modules.

[0108] For example, the resource consumption dictionary can be {a1:{resource1: resource1 consumption value, resource2: resource2 consumption value}, a2:{resource1: resource1 consumption value, resource2: resource2 consumption value, resource3: resource3 consumption value, resource4: resource4 consumption value}}.

[0109] In the dependency pruning process, the recursion basis is first set up by checking whether the current module has been added to the output set. If it has, the process returns directly (to avoid duplicate processing and prevent infinite recursion). If it has not been added, the module is added by adding the current module and its resource requirements to the resource consumption dictionary. Then, dependency processing is performed by checking whether the current module has any dependencies. If so, the dependencies are added to the "module dependency dictionary". Then, each dependency is recursively called to ensure that all direct and indirect dependencies are added, thus obtaining the processed module dependency dictionary and the processed resource consumption dictionary, which are then used in dynamic programming.

[0110] Understandably, employing the "dependency pruning" feature significantly reduces time complexity; for example, the worst-case time complexity is O(N+E), where N is the total number of modules and E is the total number of dependencies. Furthermore, each module is processed at most once (by checking before addition to prevent duplication), and each dependency is checked at most once. The space complexity required by "dependency pruning" is O(N+E), representing the space needed to store the output module and its dependencies. The maximum recursion depth required by "dependency pruning" is equal to the length of the longest path in the subsequent directed graph.

[0111] For example, suppose there are the following modules and dependencies: Module A: requires resource X; Module B: requires resource Y, depends on module A; Module C: requires resource Z, depends on module B; Module D: requires resource W, has no dependency.

[0112] So, if dependency pruning logic is used, module C will be added during recursion. Then, it will be found that module C depends on module B, so module B will be added during the next recursion. Then, it will be found that module B depends on module A, so module A will be added during the next recursion.

[0113] Return results: output_projects={'A':{'X':10},'B':{'Y':20},'C':{'Z':30}};output_dependencies={'B':['A'],'C':['B']}.

[0114] In some embodiments, due to the complex dependencies between different modules along the construction path, a large number of modules, module consumption, and dependencies may be involved. Manual testing is labor-intensive and error-prone, for example, testing the correctness of the configuration of dependencies between modules. Modifications to dependencies typically involve additions, deletions, and updates. The following issues need to be tested: ① Broken dependency chains: In a dependency chain of A->B->C->D, deleting module C during game construction system design without addressing D's prerequisite dependencies prevents D from being built; ② Redundant dependencies: Adding new dependencies to D results in multiple identical dependencies (B, B) causing functional abnormalities, or redundant dependencies (A, B) causing data redundancy and increasing resource consumption and time costs when the construction code judges dependencies; ③ Incorrectly looping dependency chains: A->B->D is incorrectly configured as A->B->D->A, causing a series of modules to fail to meet unlocking conditions and thus preventing construction, severely impacting gameplay. Manual testing requires visually inspecting each module's dependency conditions line by line to ensure the module IDs are entered correctly. Meanwhile, the functionality (name, resources, dependency unlocking conditions) of building modules are distributed across multiple tables. When problems are discovered, follow-up requires cross-table lookup to find the corresponding module ID, demanding extreme focus from testers; otherwise, they are easily interrupted, leading to errors.

[0115] To address this, a corresponding error message mechanism can be set up. The resource indicator parameters mentioned above are used as the resource consumption constraints corresponding to the construction path. Based on the construction reference order mentioned above and the building dependency relationship between at least two of the above candidate virtual building modules, the construction path is planned. Before obtaining the target construction path, a dependency error message is given.

[0116] Specifically, the automated testing module implementation process for the aforementioned building dependencies may include: obtaining the module ID, obtaining all building dependencies, constructing a directed graph, detecting circular dependencies, outputting circular dependency paths, checking for duplicate pre-dependent modules in the module, checking for modules of the same type with building dependencies in the module, collecting duplicate and redundant preconditions, outputting the check results, and finally, returning the collected data.

[0117] For example, the configuration table shows that 1455 modules had dependency issues in their prerequisite modules. By implementing deduplication and redundancy removal measures, the number of modules with building dependencies was reduced from approximately 4400 to approximately 2900, a reduction of about 33%. For instance, after checking the dependency conditions corresponding to 1037 building dependencies, the device successfully identified 3 modules with duplicate dependency configurations. The device reduced the original test time of 16 minutes to 4 seconds, a 99% reduction, and the number of operations was reduced from nearly 500 to just one device operation. The device directly reads in-game data, and the results are fixed in the client logs for easy organization and analysis.

[0118] In some embodiments, before planning the construction path based on the resource consumption constraints corresponding to the construction path using the resource indication parameters, the construction reference order, and the building dependency relationship between at least two candidate virtual building modules to obtain the target construction path, the method further includes: if the dependency field information includes at least two candidate virtual building modules of the same type, then a dependency exception prompt is given to avoid the process of testing the building dependency relationship between different modules being cumbersome, error-prone, and affecting the game experience.

[0119] Understandably, duplicate prerequisite modules and modules of the same type with building dependencies within a module can affect the game's ability to predict the time required for resource generation to meet module upgrade and construction needs, and also negatively impact the player experience. For example, module 3000900007L has building dependencies on modules 30000000007L and 30000000005L. These are different levels of the same type of module; that is, upgrading and constructing module 30000000007L will always upgrade and construct 30000000005L. Therefore, it is unnecessary to include modules with building dependencies within module 3000900007L. The correct configuration should be: modules with building dependencies for module 3000900007L are [3000900006L, 30000000007L].

[0120] In some embodiments, before planning the construction path based on the resource consumption constraints corresponding to the construction path using the resource indication parameters, the construction reference order, and the building dependencies between at least two candidate virtual building modules to obtain the target construction path, the method further includes: constructing a directed graph based on the building dependencies between the at least two candidate virtual building modules, wherein the nodes of the directed graph are used to indicate the candidate virtual building modules, and the edges between two adjacent nodes are used to indicate the dependencies between the candidate virtual building modules; performing cyclic dependency detection on each node in the directed graph to determine the detection result corresponding to each node; if the detection result indicates the existence of a directed cycle, then providing a dependency anomaly warning based on the node path corresponding to the directed cycle, so as to avoid the process of testing the building dependencies between different modules being cumbersome, error-prone, and affecting the game experience.

[0121] In this embodiment, a graph theory algorithm is used for detection, that is, the building dependencies of modules are converted into a graph structure, and Depth-First Search (DFS) is used to check for cycles to prevent circular dependencies, i.e., circular references, in the building dependencies of modules. Specifically, a depth-first search algorithm can be used to detect whether there are circular references in the building dependencies of modules. The aforementioned depth-first search (DFS) is an algorithm used to traverse or search a tree or graph.

[0122] It should be noted that if a cycle is detected, the code will throw an error indicating that all module IDs of the cycle are in the preceding dependency. This reduces the test time for checking module building dependencies from the original 16 minutes to 4 seconds, a 99% reduction in time consumption, and reduces the number of operations from nearly 500 to 1, greatly improving test efficiency.

[0123] The aforementioned circular dependency specifically refers to a situation where the dependencies of module unlocking conditions are "connected end to end." For example, in the ABD module arranged in ascending order of level from left to right, A is the lowest level module. B depends on module A to unlock, D depends on module B, but A depends on the highest level module D to unlock.

[0124] Specifically, the aforementioned data preprocessing module reconstructs building dependencies. Based on the pruned dependency graph, it reconstructs the matrix of pre-dependent modules between hangar modules, ensuring that the dynamic programming algorithm only considers necessary dependency constraints and detects circular dependencies and duplicate dependencies. The building dependency processing procedure is as follows: traverse all module IDs, analyze the building dependencies between each module ID, construct a directed graph to represent the building dependencies between modules, and then use depth-first search to detect whether circular dependencies exist.

[0125] For example, the directed graph described above can be represented using an adjacency list, where: key: is the module ID; value: is a set containing all the IDs of the modules that the module depends on; the direction of the edge indicates the "who depends on whom" relationship: if module A depends on module B, then there is a directed edge from A to B in the graph.

[0126] Specifically, in the process of detecting circular dependencies in a directed graph using depth-first search, two sets can be used to track node states: the visited set and the rec_stack set. The visited set records nodes that have been fully processed, i.e., all their neighbors have been explored. The rec_stack set records nodes in the current recursive call stack, i.e., nodes on the current DFS path.

[0127] The core idea of ​​DFS cycle detection is that if a node already in the current recursive stack is encountered during traversal, then a cycle is found. That is, each node in the graph is used as the starting point, and for each unvisited node, the visit function is called to perform DFS. If a cycle is detected in any DFS, True is returned immediately.

[0128] Specifically, first, a recursive stack is marked: when a node is visited, it is added to the `rec_stack` set, indicating that the node is on the current DFS path. Second, a loop condition is executed: if an encountered node is already in `rec_stack`, it means that the search path started from that node and returned to it, forming a cycle. Finally, backtracking is performed: after exploring all neighbors of a node, the node is removed from `rec_stack`, indicating that the search path has left that node. Visited node optimization can be performed: if a node is already in the `visited` set but not in `rec_stack`, it means that previous searches have confirmed that starting from that node will not form a cycle, and `False` is returned directly.

[0129] For example, if A points to B, B points to C, C points to D, D points to E, and E points to C, then the DFS execution process is as follows: Starting from A, rec_stack = (A); visiting B, rec_stack = (A, B); visiting C, rec_stack = (A, B, C); visiting D, rec_stack = (A, B, C, D); visiting E, rec_stack = (A, B, C, D, E). E's neighbor is C, and it is found that B is already in rec_stack, i.e., a cycle is detected, indicating a circular dependency: B→C→D→E→B. The time complexity is O(V+E), where V is the number of nodes and E is the number of edges. The space complexity is O(V), used to store the visited and rec_stack sets.

[0130] Step 103: Based on the target virtual resources consumed by the target virtual building modules in the above target construction path, and / or the above construction sequence, analyze the construction cost of the above target construction path and obtain the cost analysis results.

[0131] In this embodiment, by analyzing the aforementioned target construction path, problems in the design can be quickly identified and located, such as excessive module construction consumption, uneven resource consumption ratio, and unreasonable distribution of construction time, providing data support for design optimization and improving the system analysis efficiency of the urban construction system.

[0132] Furthermore, while improving the system analysis efficiency of the urban construction system, the analysis results can be visualized, such as converting the calculation results into CSV files and charts to intuitively display relevant information such as construction path, resource consumption and time distribution, helping relevant staff to discover and solve problems such as uneven resource consumption ratio and unreasonable construction time.

[0133] It should be noted that due to the inherent limitations of human design and testing, city-building systems are prone to balance issues, especially in large-scale games. Complex building dependencies and resource cycles exist between building modules, leading to high time costs in designing construction paths. Designing game construction systems requires trial and error through actual gameplay experience. Furthermore, the lack of effective simulation tools makes data collection (such as module time consumption, resource consumption, and resource output) difficult, and finding the optimal construction path remains challenging. Simultaneously, construction gameplay is the starting point for all gameplay in applicable projects. Unlocking different modules is linked to the host library level, and building dependencies exist between modules; new modules can only be unlocked after the prerequisite modules are built. Modules control the unlocking of new gameplay, such as card draws, ship and equipment construction and attribute bonuses, building competition, and resource production. Construction paths influence the timing of gameplay unlocks. If imbalances in numerical design are difficult to identify intuitively, such as excessively high resource consumption or unreasonable construction times for certain modules, the efficiency of system analysis for city-building systems will be low.

[0134] In this embodiment, by simulating and analyzing the aforementioned target construction path, the efficiency of construction path design is significantly improved, the balance of the city construction system is optimized, the player's gaming experience is enhanced, and frustration caused by uneven resource allocation is avoided. Furthermore, it supports parameter adjustments for different game design needs, exhibiting strong versatility and scalability.

[0135] It should be noted that the project planning and optimization problem under abstract resource constraints is applicable to solving the following types of problems: resource constraint optimization problem, that is, finding the optimal execution order and combination of modules under limited resources; building dependency decision problem, that is, handling the building dependencies between modules to ensure that the modules are executed in the correct order; dynamic programming resource allocation problem: that is, maximizing output under limited resources.

[0136] In some embodiments, the terminal can implement a result output function, that is, integrate the above modules, complete the calculation, and output the calculation results. The output of these results includes, but is not limited to, information such as the target virtual building modules on the target construction path, the construction order of the target virtual building modules, the target virtual resources consumed by the target virtual building modules, the remaining virtual resources, and the remaining modules that have not been upgraded and constructed, presented to the user in an intuitive form. For example, it can display resource indicator parameters (e.g., prerequisite requirement: Central level 10, Large hull level 4), modules that meet the required construction order, construction interruption locations (e.g., Central level 4), completed modules, incomplete modules, and the amount of resources remaining after construction, finally generating a CSV file.

[0137] In some embodiments, the above-mentioned analysis of the construction cost of the target construction path based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, to obtain cost analysis results, includes: generating a module construction consumption graph based on the target virtual resources consumed by the target virtual building modules in the target construction path and the construction order, wherein the horizontal axis of the module construction consumption graph is used to indicate the construction order corresponding to the target construction path, and the vertical axis is used to indicate the amount of target virtual resources consumed by the target virtual building modules.

[0138] In this embodiment, by generating a module construction consumption diagram, the information required when designing a game construction system can be displayed intuitively, and problems can be exposed.

[0139] For example, such as Figure 3 As shown, Figure 3 The target virtual building modules in the target construction path shown in the module construction consumption diagram are A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B1, B2, B3, B4, B5, C1, C2, C3, C4, C5, and C6. Figure 3 The amount of target virtual resources consumed by each target virtual building module can be seen in the image.

[0140] Among them, from Figure 3 As can be seen, the resource consumption of modules C1, C2, C3, C4, C5, and C6 is significantly lower than that of modules A7, A8, A9, A10, B1, B2, B3, B4, and B5. This significantly raises the construction threshold for players and hinders later gameplay aspects of module construction. For example, after constructing virtual building A, it is quite difficult to upgrade the level of virtual building A. Furthermore, among the four virtual resources, ore consumption is also much higher than the other three, affecting players' resource allocation strategies within a limited time.

[0141] In this regard, relevant staff can, according to Figure 3The system optimizes information such as adjusting the resource allocation of modules to reduce over-reliance on ores, giving players more choices and strategies when gathering resources; it also optimizes the difficulty of module construction, indirectly increasing the challenge of the season by adjusting the construction difficulty of each module, encouraging players to explore different construction paths and strategies; and it rationalizes module resource consumption by redesigning the resource allocation of modules during the design of the game's construction system to ensure that all resource types have their reasonable uses, avoiding the surplus or shortage of certain resources. These adjustments improve the overall player experience, prevent frustration caused by uneven resource allocation, and increase the playability and long-term appeal of the season.

[0142] In some embodiments, the above-mentioned analysis of the construction cost of the target construction path based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, to obtain cost analysis results, includes: determining the construction time of the target virtual building modules in the target construction path; generating a construction path timeline based on the construction time and construction order of the target virtual building modules in the target construction path, wherein the horizontal axis of the construction path timeline is used to indicate the construction time corresponding to the target construction path.

[0143] For example, such as Figure 4 As shown, Figure 4 The X-axis in the construction path timeline diagram shows the time sequence of the module construction path, where the density of the module spacing reflects the number of modules that can be completed within a certain period of time. The Y-axis is the construction sequence number, which is used to indicate the construction order of the virtual building modules. For example, the virtual building module with construction sequence number 1 is the first to be built, and the virtual building module with construction sequence number 2 is the second to be built. Figure 4 The target virtual building modules in the target construction path of the construction path timeline diagram shown are A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B1, B2, B3, B4, B5, C1, C2, C3, C4, C5, and C6. Figure 4 The construction time of each target virtual building module can be seen in the image.

[0144] Among them, from Figure 4As can be seen, the construction time for modules A1, A2, A3, and A4 is relatively concentrated, with a very short construction time compared to subsequent modules. However, the construction time for modules A5, A6, A7, A8, A9, and A10 is significantly longer, accounting for a higher proportion of the total construction time. Meanwhile, modules B5, C1, C2, C3, C4, C5, and C6 are concentrated in a short period but are the last in the order, resulting in an unreasonable construction time. Adjusting the construction order of the target virtual construction modules and / or lengthening or shortening their construction time could improve the player's gaming experience, avoid frustration caused by uneven construction time, and increase the season's playability and long-term appeal.

[0145] Furthermore, such as Figure 5 As shown, Figure 5 The middle shows Figure 3 and Figure 4 The relevant construction information of the target virtual building modules, namely the construction time (time_point), sequence number, and the amount of virtual resources consumed for each of the target virtual building modules A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B1, B2, B3, B4, B5, C1, C2, C3, C4, C5, and C6.

[0146] In some embodiments, the data visualization and result output module described above can perform module name conversion, that is, convert the module ID into a readable name to improve the user experience. Here, the module ID is a type ID. By calling the client interface for converting type IDs to names within the game, the module ID can be converted into a readable name. Specifically, the corresponding information can be obtained by querying the hangar module data table and retrieving the corresponding dictionary of module IDs and readable names.

[0147] As can be seen from the above, by obtaining the path construction indication parameters corresponding to the target game, including resource indication parameters, which include at least one virtual resource that can be used to construct virtual building modules and the resource quantity corresponding to each virtual resource; based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules, a target construction path that can be achieved based on the resource indication parameters is determined. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules, and the construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship; based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, the construction cost of the target construction path is analyzed to obtain cost analysis results. Thus, by simulating the construction path of virtual building modules with at least limited available virtual resources, and analyzing the simulated construction path to obtain analysis results, the system analysis efficiency of the urban construction system is improved.

[0148] This embodiment also provides a data processing device, which can be specifically integrated into a terminal device. For example, such as Figure 6 As shown, the data processing apparatus may include:

[0149] The parameter acquisition module 601 is used to acquire the path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters, which include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource.

[0150] The path determination module 602 is used to determine a target construction path that can be achieved based on the resource indication parameters, based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules. The construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship.

[0151] Analysis module 603 is used to analyze the construction cost of the target construction path based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction sequence, and to obtain cost analysis results.

[0152] In some embodiments, the path determination module 602 is specifically used for:

[0153] Obtain the construction reference order for the above candidate virtual building modules;

[0154] Using the aforementioned resource indication parameters as the resource consumption constraints corresponding to the construction path, and based on the aforementioned construction reference order and the building dependency relationships between at least two of the aforementioned candidate virtual building modules, a construction path is planned to obtain the target construction path.

[0155] In some embodiments, the path determination module 602 is specifically used for:

[0156] Based on the resource consumption of each candidate virtual building module for the aforementioned virtual resources, a construction reference order for the candidate virtual building modules is determined, wherein the candidate virtual building module with lower resource consumption is placed before the candidate virtual building module with higher resource consumption in the aforementioned construction reference order.

[0157] In some embodiments, the path determination module 602 is specifically used for:

[0158] Based on the above construction reference order, select the first virtual building module to be constructed in the construction path under the current recursive round from the above candidate virtual building modules;

[0159] If the first virtual building module is a virtual building module that has not been built on the construction path, then from the building dependency relationships between the at least two candidate virtual building modules, at least one second virtual building module that has a corresponding building dependency relationship with the first virtual building module is determined.

[0160] If the second virtual building module is a virtual building module that has already been built on the construction path, and the remaining virtual resources indicated by the resource indication parameter meet the resource consumption of the first virtual building module, then the first virtual building module is built on the construction path.

[0161] Entering a new recursive round, continue executing the steps described above, which are based on the above construction reference order, to select the first virtual building module to be constructed in the construction path under the current recursive round from the above candidate virtual building modules, until the number of remaining virtual resources indicated by the above resource indicator parameters is insufficient to meet the construction consumption of the candidate virtual building modules, thus obtaining the target construction path.

[0162] In some embodiments, the data processing apparatus further includes a module determining module, which is specifically used for:

[0163] If there is a third virtual building module in the second virtual building module that is not built on the construction path, then at least one fourth virtual building module that has a corresponding building dependency relationship with the third virtual building module is determined from the building dependency relationships between the at least two candidate virtual building modules.

[0164] If the fourth virtual building module is a virtual building module that has already been built on the construction path, and the remaining virtual resources indicated by the resource indication parameter satisfy the resource consumption of the third virtual building module, then the third virtual building module is built on the construction path so that the second virtual building module is a virtual building module that has already been built on the construction path.

[0165] In some embodiments, the above method and the above data processing apparatus further include a determination module, which is specifically used for:

[0166] Obtain a resource consumption dictionary, which includes resource field information corresponding to each of the above-mentioned candidate virtual building modules. The resource field information is used to indicate the resource consumption of the above-mentioned candidate virtual building modules for the above-mentioned virtual resources.

[0167] Determine the target resource consumption corresponding to the first virtual building module from the above resource consumption dictionary;

[0168] If the number of remaining virtual resources indicated by the above resource indication parameters is greater than or equal to the target resource consumption, then it is determined that the number of remaining virtual resources indicated by the above resource indication parameters satisfies the resource consumption of the first virtual building module.

[0169] In some embodiments, the data processing apparatus further includes a set acquisition module, which is specifically used for:

[0170] Obtain the construction data set corresponding to the construction path planning. The construction data set is used to record the virtual building modules that have been constructed on the construction path.

[0171] If the first virtual building module does not exist in the above construction data set, then the first virtual building module is determined to be a virtual building module that has not been constructed on the above construction path;

[0172] If the first virtual building module exists in the aforementioned construction data set, a new recursive round is entered, and the steps of selecting the first virtual building module to be constructed in the construction path under the current recursive round from the candidate virtual building modules based on the aforementioned construction reference order are continued until all the candidate virtual building modules exist in the aforementioned construction data set.

[0173] In some embodiments, the path construction indication parameters further include path indication parameters, which include a fixed construction reference path composed of at least two fifth virtual building modules. The path determination module 602 is specifically used for:

[0174] Based on the above path indication parameters, the above candidate virtual building modules are filtered to obtain a set of filtered modules. The set of filtered modules includes the above fifth virtual building module and candidate virtual building modules that have a building dependency relationship with the above fifth virtual building module.

[0175] Obtain the construction reference order of each candidate virtual building module in the above-mentioned set of filtering modules corresponding to the above path indication parameters.

[0176] In some embodiments, the path determination module 602 is specifically used for:

[0177] Obtain the module dependency dictionary, which includes dependency field information corresponding to each of the candidate virtual building modules. The dependency field information is used to indicate at least one virtual building module that the candidate virtual building module depends on under the building dependency relationship.

[0178] Based on the aforementioned path indication parameters and the aforementioned module dependency dictionary, the aforementioned candidate virtual building modules are filtered to obtain candidate virtual building modules that have a building dependency relationship with the aforementioned fifth virtual building module; based on the aforementioned fifth virtual building module and the candidate virtual building modules that have a building dependency relationship with the aforementioned fifth virtual building module, a filtered module set is obtained.

[0179] In some embodiments, the above method and the above data processing apparatus further include an error notification module, which is specifically used for:

[0180] If the above dependency field information includes at least two candidate virtual building modules of the same type, a dependency exception message will be displayed.

[0181] In some embodiments, the above-mentioned exception notification module is further specifically used for:

[0182] A directed graph is constructed based on the building dependency relationship between at least two of the above-mentioned candidate virtual building modules. The nodes of the directed graph are used to indicate the candidate virtual building modules, and the edges between two adjacent nodes are used to indicate the dependency relationship between the candidate virtual building modules.

[0183] Perform cycle dependency detection on each node in the above directed graph and determine the detection result for each node;

[0184] If the above detection result indicates the existence of a directed cycle, a dependency anomaly warning will be issued based on the node path corresponding to the directed cycle.

[0185] In some embodiments, the analysis module 603 is specifically used for:

[0186] Based on the target virtual resources consumed by the target virtual building modules in the above target construction path and the above construction order, a module construction consumption diagram is generated. The horizontal axis of the module construction consumption diagram is used to indicate the construction order corresponding to the above target construction path, and the vertical axis is used to indicate the amount of target virtual resources consumed by the target virtual building modules.

[0187] In some embodiments, the analysis module 603 is specifically used for:

[0188] Determine the construction time of the target virtual building modules in the above-mentioned target construction path;

[0189] Based on the construction time and construction sequence of the target virtual building modules in the above target construction path, a construction path timeline is generated. The horizontal axis of the construction path timeline is used to indicate the construction time corresponding to the above target construction path.

[0190] As can be seen from the above, by obtaining the path construction indication parameters corresponding to the target game, including resource indication parameters, which include at least one virtual resource that can be used to construct virtual building modules and the resource quantity corresponding to each virtual resource; based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules, a target construction path that can be achieved based on the resource indication parameters is determined. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules, and the construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship; based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, the construction cost of the target construction path is analyzed to obtain cost analysis results. Thus, by simulating the construction path of virtual building modules with at least limited available virtual resources, and analyzing the simulated construction path to obtain analysis results, the system analysis efficiency of the urban construction system is improved.

[0191] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Alternatively, the electronic device can be a server.

[0192] like Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 700 includes a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, and a computer program stored on the memory 702 and executable on the processor. The processor 701 and the memory 702 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0193] The processor 701 is the control center of the electronic device 700. It connects various parts of the electronic device 700 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 702, and by calling data stored in the memory 702, it executes various functions and processes data of the electronic device 700, thereby providing overall monitoring of the electronic device 700. The processor 701 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0194] In this embodiment, the processor 701 in the electronic device 700 loads the instructions corresponding to the processes of one or more applications into the memory 702 according to the following steps, and the processor 701 runs the applications stored in the memory 702 to realize various functions, such as:

[0195] Obtain the path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters. The resource instruction parameters include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource.

[0196] Based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules, a target construction path that can be achieved based on the resource indication parameters is determined. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules. The construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship.

[0197] Based on the target virtual resources consumed by the target virtual building modules in the above target construction path, and / or the above construction sequence, the construction cost of the above target construction path is analyzed, and the cost analysis results are obtained.

[0198] Therefore, the electronic device 700 provided in this embodiment can bring the following technical effects: improve the system analysis efficiency of the urban construction system.

[0199] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0200] Optional, such as Figure 7 As shown, the electronic device 700 also includes: a touch display screen 703, a radio frequency circuit 704, an audio circuit 705, an input unit 706, and a power supply 707. The processor 701 is electrically connected to the touch display screen 703, the radio frequency circuit 704, the audio circuit 705, the input unit 706, and the power supply 707. Those skilled in the art will understand that... Figure 7 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0201] The touch display screen 703 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 703 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 701. It can also receive and execute commands from the processor 701. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 701 to determine the type of touch event. Subsequently, the processor 701 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 703 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 703 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 703 can also be used as part of the input unit 706 to achieve input functions.

[0202] The radio frequency circuit 704 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.

[0203] Audio circuitry 705 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 705 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 705, converted back into audio data, and then processed by processor 701 before being transmitted via radio frequency circuitry 704 to, for example, another electronic device, or output to memory 702 for further processing. Audio circuitry 705 may also include an earphone jack to facilitate communication between peripheral headphones and electronic devices.

[0204] The input unit 706 can be used to receive input numbers, character information or user feature information (such as fingerprints, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0205] Power supply 707 is used to supply power to various components of electronic device 700. Optionally, power supply 707 can be logically connected to processor 701 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 707 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0206] although Figure 7 As not shown in the diagram, the electronic device 700 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0207] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0208] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0209] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute any of the data processing methods provided in embodiments of this application. The computer program can execute the steps of the following data processing method:

[0210] Obtain the path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters. The resource instruction parameters include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource.

[0211] Based on the multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules, a target construction path that can be achieved based on the resource indication parameters is determined. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules. The construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship.

[0212] Based on the target virtual resources consumed by the target virtual building modules in the above target construction path, and / or the above construction sequence, the construction cost of the above target construction path is analyzed, and the cost analysis results are obtained.

[0213] As can be seen, a computer program can be loaded by a processor to execute any of the data processing methods provided in the embodiments of this application, thereby bringing about the following technical effects: improving the system analysis efficiency of the urban construction system.

[0214] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0215] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0216] Since the computer program stored in the computer-readable storage medium can execute any of the data processing methods provided in the embodiments of this application, the beneficial effects that any of the data processing methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0217] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0218] In the above embodiments of the data processing apparatus, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the data processing apparatus, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to the description of the data processing method in the above embodiments, and will not be repeated here.

[0219] The foregoing has provided a detailed description of a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data processing method, characterized in that, The method includes: Obtain the path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters, which include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource. Based on the multiple candidate virtual building modules provided by the target game, and the building dependency relationship between at least two of the candidate virtual building modules, a target construction path that can be achieved based on the resource indication parameters is determined. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules, and the construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship. Based on the target virtual resources consumed by the target virtual building modules in the target construction path, and / or the construction sequence, the construction cost of the target construction path is analyzed to obtain cost analysis results.

2. The data processing method as described in claim 1, characterized in that, The determination of the target construction path achievable based on the resource indication parameters, based on multiple candidate virtual building modules provided by the target game and the building dependencies between at least two of the candidate virtual building modules, includes: Obtain the construction reference order of the candidate virtual building modules; Using the resource indication parameters as the resource consumption constraints corresponding to the construction path, and based on the construction reference order and the building dependency relationship between at least two candidate virtual building modules, a construction path is planned to obtain the target construction path.

3. The data processing method as described in claim 2, characterized in that, The step of obtaining the construction reference order of the candidate virtual building modules includes: Based on the resource consumption of each candidate virtual building module for the virtual resource, a construction reference order for the candidate virtual building modules is determined, wherein the candidate virtual building module with a smaller resource consumption is placed before the candidate virtual building module with a larger resource consumption in the construction reference order.

4. The data processing method as described in claim 2, characterized in that, The process of planning a construction path based on the resource consumption constraints corresponding to the construction path using the resource indication parameters, the construction reference order, and the building dependencies between at least two candidate virtual building modules to obtain the target construction path includes: Based on the construction reference order, select the first virtual building module to be constructed in the construction path under the current recursive round from the candidate virtual building modules; If the first virtual building module is a virtual building module that has not been built on the construction path, then from the building dependency relationships between the at least two candidate virtual building modules, at least one second virtual building module that has a corresponding building dependency relationship with the first virtual building module is determined. If the second virtual building module is a virtual building module that has already been built on the construction path, and the resource quantity of the remaining virtual resources indicated by the resource indication parameter meets the resource consumption of the first virtual building module, then the first virtual building module is built on the construction path. Entering a new recursive round, continue executing the step of selecting the first virtual building module to be built in the construction path from the candidate virtual building modules based on the construction reference order, until the number of remaining virtual resources indicated by the resource indicator parameter is insufficient to meet the construction consumption of the candidate virtual building module, thus obtaining the target construction path.

5. The data processing method as described in claim 4, characterized in that, If the second virtual building module is a virtual building module already constructed on the construction path, and the remaining virtual resources indicated by the resource indication parameter satisfy the resource consumption of the first virtual building module, then before constructing the first virtual building module on the construction path, the method further includes: If there is a third virtual building module in the second virtual building module that is not built on the construction path, then at least one fourth virtual building module that has a corresponding building dependency relationship with the third virtual building module is determined from the building dependency relationships between the at least two candidate virtual building modules. If the fourth virtual building module is a virtual building module that has already been built on the construction path, and the resource quantity of the remaining virtual resources indicated by the resource indication parameter satisfies the resource consumption of the third virtual building module, then the third virtual building module is built on the construction path so that the second virtual building module is a virtual building module that has already been built on the construction path.

6. The data processing method as described in claim 4, characterized in that, If the second virtual building module is a virtual building module already constructed on the construction path, and the remaining virtual resources indicated by the resource indication parameter satisfy the resource consumption of the first virtual building module, then before constructing the first virtual building module on the construction path, the method further includes: Obtain a resource consumption dictionary, which includes resource field information corresponding to each of the candidate virtual building modules. The resource field information is used to indicate the resource consumption of the candidate virtual building module for the virtual resource. Determine the target resource consumption amount corresponding to the first virtual building module from the resource consumption dictionary; If the number of remaining virtual resources indicated by the resource indication parameter is greater than or equal to the target resource consumption, then it is determined that the number of remaining virtual resources indicated by the resource indication parameter satisfies the resource consumption of the first virtual building module.

7. The data processing method as described in claim 4, characterized in that, The method further includes: Obtain the construction data set corresponding to the construction path planning, wherein the construction data set is used to record the virtual building modules that have been constructed on the construction path; If the first virtual building module does not exist in the construction data set, then the first virtual building module is determined to be a virtual building module that has not been constructed on the construction path; If the first virtual building module exists in the construction data set, a new recursive round is entered, and the step of selecting the first virtual building module to be constructed in the construction path under the current recursive round from the candidate virtual building modules based on the construction reference order is continued until all candidate virtual building modules exist in the construction data set.

8. The data processing method as described in claim 2, characterized in that, The path construction indication parameters also include path indication parameters, which include a fixed construction reference path composed of at least two fifth virtual building modules. Obtaining the construction reference order of the candidate virtual building modules includes: Based on the path indication parameters, the candidate virtual building modules are filtered to obtain a filtered module set. The filtered module set includes the fifth virtual building module and candidate virtual building modules that have a building dependency relationship with the fifth virtual building module. Obtain the construction reference order of each candidate virtual building module in the set of filtering modules corresponding to the path indication parameter.

9. The data processing method as described in claim 8, characterized in that, The process of filtering the candidate virtual building modules based on the path indication parameters to obtain a filtered module set includes: Obtain a module dependency dictionary, which includes dependency field information corresponding to each candidate virtual building module. The dependency field information is used to indicate at least one virtual building module that the candidate virtual building module depends on under the building dependency relationship. Based on the path indication parameters and the module dependency dictionary, the candidate virtual building modules are filtered to obtain candidate virtual building modules that have a building dependency relationship with the fifth virtual building module; based on the fifth virtual building module and the candidate virtual building modules that have a building dependency relationship with the fifth virtual building module, a filtered module set is obtained.

10. The data processing method as described in claim 9, characterized in that, Before obtaining the target construction path by planning the construction path based on the resource consumption constraints corresponding to the construction path using the resource indication parameters, the construction reference order, and the building dependencies between at least two candidate virtual building modules, the method further includes: If the dependency field information includes at least two candidate virtual building modules of the same type, a dependency exception message will be displayed.

11. The data processing method as described in claim 2, characterized in that, Before obtaining the target construction path by planning the construction path based on the resource consumption constraints corresponding to the construction path using the resource indication parameters, the construction reference order, and the building dependencies between at least two candidate virtual building modules, the method further includes: A directed graph is constructed based on the building dependencies between the at least two candidate virtual building modules. The nodes of the directed graph are used to indicate the candidate virtual building modules, and the edges between two adjacent nodes are used to indicate the dependencies between the candidate virtual building modules. Perform cycle dependency detection on each node in the directed graph and determine the detection result for each node; If the detection result indicates the existence of a directed cycle, a dependency anomaly warning will be issued based on the node path corresponding to the directed cycle.

12. The data processing method according to any one of claims 1 to 11, characterized in that, The construction cost of the target construction path is analyzed based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, to obtain cost analysis results, including: Based on the target virtual resources consumed by the target virtual building modules in the target construction path and the construction order, a module construction consumption map is generated. The horizontal axis of the module construction consumption map is used to indicate the construction order corresponding to the target construction path, and the vertical axis is used to indicate the amount of target virtual resources consumed by the target virtual building modules.

13. The data processing method according to any one of claims 1 to 11, characterized in that, The construction cost of the target construction path is analyzed based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, to obtain cost analysis results, including: Determine the construction time of the target virtual building module in the target construction path; Based on the construction time and construction order of the target virtual building modules in the target construction path, a construction path timeline is generated, and the horizontal axis of the construction path timeline is used to indicate the construction time corresponding to the target construction path.

14. A data processing apparatus, characterized in that, The device includes: The parameter acquisition module is used to acquire path construction instruction parameters corresponding to the target game. The path construction instruction parameters include resource instruction parameters, which include at least one virtual resource that can be used to construct virtual building modules, and the resource quantity corresponding to each virtual resource. The path determination module is used to determine a target construction path that can be achieved based on the resource indication parameters, based on multiple candidate virtual building modules provided by the target game and the building dependency relationship between at least two of the candidate virtual building modules. The target construction path is used to indicate the target virtual building modules to be constructed and the construction order of each target virtual building module. The target virtual building modules are composed of the candidate virtual building modules, and the construction order of the target virtual building modules in the target construction path is a construction order that conforms to the building dependency relationship. The analysis module is used to analyze the construction cost of the target construction path based on the target virtual resources consumed by the target virtual building modules in the target construction path and / or the construction order, and to obtain the cost analysis results.

15. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the data processing method as described in any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the data processing method as described in any one of claims 1 to 13.