A method, apparatus, device, and storage medium for dynamic scheduling of map scene resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-14
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本申请实施例提供一种地图场景资源动态调度方法、装置、设备及存储介质,解决了分块游戏地图的资源管理过程中,存在的场景加载不全、视野断层以及玩家在地图块边界往返移动时,对应地块被反复加载和销毁的问题
[0015]本申请实施例中,通过获取多个地图块的位置信息以及连续多帧玩家位置坐标,将连续多帧玩家位置坐标中的当前玩家位置坐标所属的地图块确定为中心地图块;基于连续多帧玩家位置坐标和多个地图块的位置信息确定与中心地图块对应的待加载地图块和待卸载地图块;加载待加载地图块,并对待卸载地图块进行延迟配置,以基于延迟配置的配置参数对待卸载地图块进行延迟卸载。上述,以玩家实时位置确定中心地图块,结合连续多帧玩家坐标预判移动状态,精准划分出待加载与待卸载地图块,并加载待加载模块,能够按需完成地图块资源加载,保证玩家视野内场景完整、画面衔接连贯,通过对待卸载地图块设置延迟卸载规则,并将待卸载地图块进行延时卸载,能够有效避免玩家在地块边界往返移动时出现地图块反复加载、卸载的问题,提升了地图资源调度的稳定性与合理性。
Smart Images

Figure CN122558073A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and in particular to a method, apparatus, device and storage medium for dynamic scheduling of map scene resources. Background Technology
[0002] With the continuous development of the mobile game industry, there is an increasing number of game products featuring large-scale continuous scenes and loop-based progression modes. Due to the limitations of mobile device memory, computing power, and loading speed, large and complete maps cannot be fully loaded and kept running indefinitely. Therefore, map tile resource scheduling technology has become a core technology to ensure the smooth operation of large-scale games. How to dynamically manage the loading and unloading of each map tile based on the player's location is key to improving the gaming experience.
[0003] In related technologies, resource management for segmented game maps typically adopts a scheduling mode of fixed-range loading and immediate unloading. It loads surrounding map tiles only based on a preset fixed area, and immediately unloads resources when a map tile leaves the loading range. This results in incomplete scene loading, visual gaps, and the repeated loading and destruction of corresponding tiles when players move back and forth at the boundaries of map tiles, affecting the continuity of game scene loading. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for dynamic scheduling of map scene resources. It solves the problems of incomplete scene loading, view gaps, and repeated loading and unloading of corresponding plots when players move back and forth along map plot boundaries during resource management in segmented game maps. It can load map plot resources on demand, ensuring the integrity of the scene within the player's field of view and smooth visual transitions. It also effectively avoids the problem of repeated loading and unloading of map plots when players move back and forth along plot boundaries, thus improving the stability and rationality of map resource scheduling.
[0005] In a first aspect, embodiments of this application provide a method for dynamic scheduling of map scene resources, including: Obtain the location information of multiple map tiles and the player position coordinates of multiple consecutive frames, and determine the map tile to which the current player position coordinates belong in the multiple consecutive frames of player position coordinates as the center map tile; Based on the player's position coordinates in the consecutive multiple frames and the position information of the multiple map tiles, determine the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile; Load the map tile to be loaded and configure a delay for the map tile to be uninstalled, so as to delay the uninstallation of the map tile based on the configuration parameters of the delay configuration.
[0006] Optionally, determining the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile based on the player's position coordinates in the consecutive multiple frames and the position information of the multiple map tiles includes: Based on the player's position coordinates in the continuous multi-frames, movement trend prediction is performed to obtain predicted path information, which includes the player's movement direction. Using the current player position coordinates in the continuous multi-frame player position coordinates as the starting point of the line of sight, a cone-shaped line of sight range in the player's movement direction is determined based on preset visual projection parameters; Map blocks that overlap with the cone-shaped line of sight among the multiple map blocks are identified as map blocks to be loaded, and map blocks to be unloaded are determined based on the multiple non-overlapping map blocks.
[0007] Optionally, the step of predicting movement trends based on the player's position coordinates across multiple consecutive frames to obtain predicted path information includes: Outlier filtering is performed on the player position coordinates of the consecutive multiple frames to obtain multiple valid position coordinates. Then, based on the collection timestamp of each player position coordinate, the valid position coordinates are time-weighted to obtain a valid data set. Based on the effective data set, a trajectory fitting operation is performed to obtain an initial movement trajectory. The motion state parameters of the initial movement trajectory are identified, and the initial movement trajectory is extended differentially based on the motion state parameters to obtain the target movement trajectory. Match the coordinates of obstacle elements in the preset loaded resources with the target movement trajectory, and determine the coordinates to be corrected on the target movement trajectory based on the matching results; The target's trajectory is optimized based on the coordinates to be corrected to obtain predicted path information.
[0008] Optionally, the differentiated trajectory extension based on the motion state parameters of the initial movement trajectory includes: Determine the extension coefficient and extension rule corresponding to the motion state parameters; Based on the extension coefficient and the extension rule, the motion state parameters are extended along the tangent direction at the end of the initial movement trajectory. The motion state parameters include at least one of the following: high-speed straight-line state parameters, low-speed change-of-direction state parameters, reversal state parameters, and uniform speed fine-tuning movement state parameters.
[0009] Optionally, the effective data set is obtained by performing time-series weighting on the collection timestamps of the player's position coordinates, including: Calculate the time interval between the collection timestamp of each player's position coordinate and the current collection timestamp, and assign a corresponding weight coefficient to each valid position coordinate based on the time interval; Each valid location coordinate is bound to its corresponding weight coefficient to generate a valid data set containing each valid location coordinate and its corresponding weight coefficient.
[0010] Optionally, determining the map tile to be unloaded based on multiple non-overlapping map tiles includes: Multiple non-overlapping map tiles are identified as non-visual map tiles, and each non-visual map tile is matched with the predicted path information; Non-visual map blocks that do not overlap with the predicted paths in the predicted path information are identified as map blocks to be unloaded.
[0011] Optionally, there are multiple map tiles to be loaded. After determining the map tiles that overlap with the cone-shaped line-of-sight range among the multiple map tiles as the map tiles to be loaded, the method further includes: Calculate the distance between the current player's position coordinates and each of the map tiles, as well as the overlap between each of the map tiles and the predicted path in the predicted path information; The loading priority of each map tile to be loaded is determined based on the distance value and the overlap. Accordingly, loading the map tile to be loaded includes: Each of the map tiles to be loaded is loaded based on the loading priority.
[0012] In a second aspect, embodiments of this application provide a dynamic scheduling device for map scene resources, comprising: The location information acquisition module is used to acquire the location information of multiple map tiles and the player's position coordinates over multiple consecutive frames; The center map tile determination module is used to determine the map tile to which the current player position coordinates belong in the player position coordinates of the continuous multi-frame player position coordinates as the center map tile; The map tile type determination module is used to determine the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile based on the player position coordinates of the continuous multi-frames and the position information of the multiple map tiles; The map tile resource scheduling module is used to load the map tile to be loaded, configure the map tile to be uninstalled with a delay, and perform delayed uninstallation of the map tile to be uninstalled based on the configuration parameters of the delay configuration.
[0013] In a third aspect, embodiments of this application provide an electronic device, the device comprising: one or more processors; and a storage device configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the map scene resource dynamic scheduling method described in the first aspect.
[0014] In a fourth aspect, embodiments of this application provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the map scene resource dynamic scheduling method as described in the first aspect.
[0015] In this embodiment, by acquiring the location information of multiple map tiles and the player's position coordinates across multiple consecutive frames, the map tile to which the current player's position coordinates belong in the player's position coordinates across multiple consecutive frames is determined as the center map tile. Based on the player's position coordinates across multiple consecutive frames and the location information of multiple map tiles, the map tiles to be loaded and to be unloaded corresponding to the center map tile are determined. The map tiles to be loaded are loaded, and the map tiles to be unloaded are configured with a delay, and the unloading of the map tiles to be unloaded is delayed based on the configuration parameters of the delay configuration. As described above, by determining the center map tile based on the player's real-time position and predicting the movement state by combining the player's coordinates across multiple consecutive frames, the map tiles to be loaded and to be unloaded are accurately divided, and the modules to be loaded are loaded. This allows map tile resource loading to be completed on demand, ensuring the integrity of the scene within the player's field of vision and the smooth transition of the screen. By setting a delayed unloading rule for the map tiles to be unloaded and delaying the unloading of the map tiles to be unloaded, the problem of repeated loading and unloading of map tiles when the player moves back and forth to the tile boundaries can be effectively avoided, improving the stability and rationality of map resource scheduling. Attached Figure Description
[0016] Figure 1 This is a flowchart of a dynamic scheduling method for map scene resources provided in an embodiment of this application; Figure 2 This is a flowchart of a map tile type determination method provided in an embodiment of this application; Figure 3 This is a flowchart of a method for determining predicted path information provided in an embodiment of this application; Figure 4 This is a schematic diagram of a cone-shaped line of sight provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a map scene resource dynamic scheduling device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a map scene resource dynamic scheduling device provided in an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0018] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0019] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0020] The following description, in conjunction with the accompanying drawings, details the map scene resource dynamic scheduling method, apparatus, equipment, and medium provided in this application through specific embodiments and application scenarios.
[0021] The map scene resource dynamic scheduling method provided in this application embodiment is used for the scenario of managing large-scale segmented game map resources on mobile terminals. Based on the above application scenario, it can be understood that the executing entity of each step can be a computer device. The computer device refers to any electronic device with data computing, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers and other terminal devices, or it can be a server or other devices. This application embodiment does not limit it in this way.
[0022] Figure 1 This is a flowchart of a dynamic scheduling method for map scene resources provided in an embodiment of this application, such as... Figure 1 As shown, it includes: S101. Obtain the location information of multiple map tiles and the player position coordinates of multiple consecutive frames, and determine the map tile to which the current player position coordinates belong in the player position coordinates of multiple consecutive frames as the center map tile.
[0023] In this context, a map tile refers to an independent unit that divides the large, complete game map into regions; it is the smallest unit for loading and managing map resources. Location information refers to spatial data used to identify each map tile's coordinates, range, and boundaries within the global map. Continuous multi-frame player position coordinates refer to the sequence of spatial coordinates of the player character on the map captured across multiple consecutive frames during game execution, reflecting the player's movement trajectory. The current player position coordinates refer to the spatial coordinates of the player character in the latest frame. The central map tile refers to the map tile where the current player is located; this central map tile serves as the core reference area for map resource scheduling.
[0024] In one embodiment, the method for obtaining the location information of multiple map tiles and the player's position coordinates for multiple consecutive frames can be as follows: read and store the location information such as the boundary coordinates, area range, and number of all map tiles after the entire game map is divided in advance, construct a global map tile location data table, and collect the spatial coordinates of the player character in the global map frame by frame in real time according to the screen rendering frame rate during game operation, continuously collect point data for multiple consecutive frames, and form a time-seriesd sequence of player position coordinates.
[0025] In one embodiment, determining the map tile to which the current player's position coordinates belong in a series of consecutive player position coordinates is as the center map tile. This can be achieved by: extracting the current player's position coordinates from the latest frame of a series of consecutive player position coordinates; traversing all pre-stored map tile position range data; comparing the current player's position coordinates with the position range data of each map tile to determine which map tile's boundary the coordinates fall within; and identifying the map tile containing the current player's position coordinates as the center map tile. For example, the global map is divided into multiple square map tiles, numbered A1, A2, A3, B1, and B2. If the current player's coordinates fall within the coordinate range of map tile B2, then B2 is the center map tile for this resource scheduling.
[0026] S102. Based on the player's position coordinates and the position information of multiple map tiles in consecutive frames, determine the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile.
[0027] In this context, "map tiles to be loaded" refers to map tiles that, based on the player's position and movement trend, are about to enter the player's field of vision or movement path, and therefore require resource loading and rendering. "Map tiles to be unloaded" refers to map tiles that have left the player's field of vision and are no longer on the predicted movement path, and therefore do not need to retain resources and are ready to be unloaded.
[0028] In one embodiment, the method for determining the map blocks to be loaded and the map blocks to be unloaded corresponding to the central map block based on the player's position coordinates and the position information of multiple map blocks in consecutive frames can be as follows: statistically analyze the distribution range of the player's position coordinates in consecutive frames, determine the player's current activity range based on the extreme values of the horizontal and vertical coordinates of the distribution range, determine the permanent area based on the coordinate distribution density in the player's position coordinates in consecutive frames, expand the current activity range according to a preset first expansion area, expand the permanent area according to a preset second expansion area, stitch the expanded areas together to obtain the complete activity area, divide the map blocks in the complete activity area that have not yet completed resource loading into map blocks to be loaded, and divide the map blocks that are not in the player's activity range and have completed loading into map blocks to be unloaded.
[0029] Optionally, determining the map block to be unloaded based on multiple non-overlapping map blocks includes: identifying multiple non-overlapping map blocks as non-visual map blocks and matching each non-visual map block with the predicted path information; and identifying non-visual map blocks that do not overlap with the predicted path in the predicted path information as map blocks to be unloaded.
[0030] In this context, non-visible map tiles refer to map tiles that are not within the player's current field of view and will not be rendered or displayed in real time. Matching refers to comparing the spatial extent of each individual non-visible map tile with its predicted path to determine if there is any spatial overlap.
[0031] In one embodiment, the method for identifying multiple non-overlapping map tiles as non-visual map tiles and matching each non-visual map tile with the predicted path information can be as follows: taking the player's current position as the origin of the coordinate system and combining it with the player's current viewing direction to define a cone-shaped visible range, counting all map tiles not within this cone-shaped visible range and defining them as non-visual map tiles; traversing all non-visual map tiles, extracting the coordinate range of each non-visual map tile one by one, matching this coordinate range with each coordinate on the predicted path in the predicted path information, and recording the coordinate matching result of each non-visual map tile with the predicted path.
[0032] In one embodiment, the method for identifying non-visual map tiles that do not overlap with the predicted path in the predicted path information as map tiles to be uninstalled can be as follows: traverse the matching results of each non-visual map tile. If the coordinate range of the non-visual map tile does not overlap with any part of the predicted path, it means that the player will not enter the map tile area in the short term. Directly mark the non-visual map tile as a map tile to be uninstalled and put it into the uninstallation queue for subsequent processing.
[0033] The above method first filters out non-visible map blocks that are not within the player's visible range, then performs overlap verification between the non-visible map blocks and the corrected predicted path, marking map blocks that are neither in the visible area nor on the player's predicted path as map blocks to be unloaded. This method can accurately identify scene resources that will not be accessed in the short term, release idle memory and video memory resources in a timely manner, reduce resource consumption during game operation, reduce screen stuttering, and retain only map blocks in the visible area and along the predicted path to maintain normal scene loading and rendering, thus balancing the integrity of scene display and program performance.
[0034] Optionally, there are multiple map tiles to be loaded. After determining the map tiles that overlap with the cone-shaped line of sight among the multiple map tiles as the map tiles to be loaded, the method further includes: calculating the distance value between the current player's position coordinates and each map tile, and the overlap degree between each map tile and the predicted path in the predicted path information; determining the loading priority of each map tile to be loaded based on the distance value and the overlap degree; and loading the map tiles to be loaded, including: loading each map tile to be loaded based on the loading priority.
[0035] The distance value refers to the straight-line distance between the player's current coordinates and the center / boundary point of a single map tile. Overlap refers to the percentage of the area intersecting the predicted path's spatial extent; a larger overlap area indicates higher overlap. Loading priority refers to the weight of the loading order assigned to each map tile; higher priority means resources need to be loaded first.
[0036] In one embodiment, the distance between the current player's position coordinates and each map tile can be calculated by: extracting the center coordinates of each map tile to be loaded, calculating the Euclidean distance between the center coordinates and the current player's position coordinates, and using the calculated Euclidean distance as the distance value corresponding to the map tile to be loaded.
[0037] In one embodiment, the method for calculating the overlap between each map tile and the predicted path in the predicted path information can be as follows: calculate the spatial extent of each map tile to be loaded and the intersection area of the predicted path, and determine the ratio of the intersection area to the area of the map tile itself as the overlap between the map tile to be loaded and the predicted path.
[0038] In one embodiment, the method for determining the loading priority of each map tile to be loaded based on distance value and overlap can be as follows: after calculating the distance value and overlap, normalize the distance value and overlap respectively, set distance weight and overlap weight, multiply the normalized distance value by the corresponding distance weight, multiply the normalized overlap by the corresponding overlap weight, and add them together to obtain the priority score of the map tile to be loaded. Sort the map tiles to be loaded from high to low according to the score to obtain the loading priority of each map tile to be loaded. The higher the score, the higher the loading priority.
[0039] In one embodiment, the method of loading each map tile to be loaded based on loading priority can be as follows: the resource loading interface is called sequentially from high to low according to the obtained loading priority, the resource data of the corresponding map tile is read and the loading and rendering are completed, and the resource loading of high priority map tiles is prioritized to ensure that the map resources in the player's direction of movement and the nearby range are loaded in a timely manner.
[0040] The above-mentioned method comprehensively determines the loading priority of map tiles by simultaneously measuring two dimensions: the distance between the player's current coordinates and each map tile, and the overlap between the map tile and the predicted path. Map resources are then loaded in order of priority, prioritizing map tiles that are close to the player and have a high degree of overlap with the predicted path to ensure that there are no blank gaps in the scene during the player's movement. Map tiles that are far away and have less path overlap are loaded later to avoid instantaneous performance peaks caused by loading a large number of scene resources at once. This method also balances the hardware loading computing power, effectively reducing issues such as screen stuttering and texture latency, and taking into account both the continuity of scene rendering and the smoothness of game operation.
[0041] Figure 2 This is a flowchart of a map tile type determination method provided in an embodiment of this application, such as... Figure 2 As shown, it includes: S1021. Based on the player's position coordinates in multiple consecutive frames, predict the movement trend to obtain the predicted path information, which includes the player's movement direction.
[0042] Movement trend prediction refers to the process of analyzing and deducing the movement patterns of a player character over a period of time, such as direction, speed, and probability of change of direction, based on collected historical location data. Predicted path information refers to the comprehensive set of results output after movement trend prediction, which includes the player's movement direction. The player's movement direction refers to the player character's primary subsequent movement location, and can be represented as a direction vector, angle, or azimuth range in the map coordinate system.
[0043] In one embodiment, the method for predicting the predicted path information based on the player's position coordinates in multiple consecutive frames can be as follows: determine the displacement vector based on the adjacent coordinates in the player's position coordinates in multiple consecutive frames, calculate the average direction vector based on multiple sets of continuous displacement vectors, and use the average direction vector to determine the player's current direction of travel.
[0044] Figure 3 This is a flowchart of a method for determining predicted path information provided in an embodiment of this application, such as... Figure 3 As shown, it includes: S10211. Filter outliers from player position coordinates across multiple consecutive frames to obtain multiple valid position coordinates. Then, perform time-series weighting on each valid position coordinate based on the timestamp of each player position coordinate's acquisition to obtain a valid data set.
[0045] Outlier filtering refers to removing erroneous points such as those exhibiting lag, missampling, or coordinate jumps that do not reflect actual movement states through data validation rules. Valid location coordinates refer to the filtered coordinate data that accurately reflects the player's normal movement state. Collection timestamps record the time each location coordinate was collected by the system, used to distinguish the freshness of the data. Time-series weighting assigns corresponding weights to different valid coordinates based on their chronological order, typically with more recent coordinates receiving higher weights. The valid dataset refers to a standardized dataset composed of the filtered and weighted valid location coordinates.
[0046] In one embodiment, the method for filtering outliers from player position coordinates across multiple consecutive frames to obtain multiple valid position coordinates can be as follows: All player position coordinates collected frame by frame are aggregated; the displacement deviation of the player is calculated based on the player position coordinates of two adjacent frames; and the displacement difference between the player position coordinates of two adjacent frames is compared with a pre-set maximum inter-frame movement distance threshold. If the displacement difference between a certain frame coordinate and the preceding and following frames exceeds the pre-set maximum inter-frame movement distance threshold, then that frame coordinate is identified as a sampling outlier and directly removed. For example, the continuously collected player position coordinates are A(10,20), B(12,22), C(80,90), and D(14,24), with the maximum normal inter-frame movement distance set to 10 meters. The calculated displacement of point C far exceeds the threshold and is therefore determined to be an outlier and deleted. Finally, A, B, and D are retained as valid position coordinates.
[0047] In one embodiment, the effective data set can be obtained by weighting each valid position coordinate based on the collection timestamp of each player's position coordinate in a time sequence. This can be done by first sorting all valid position coordinates from farthest to closest according to the collection timestamp, then dividing them into gradient levels according to the sorting order, setting a fixed weight value that decreases sequentially for each level, associating each valid coordinate with its corresponding weight, and finally integrating them to form an effective data set containing coordinate and weight information.
[0048] Optionally, based on the collection timestamp of each player's position coordinate, time-series weighting is performed on each valid position coordinate to obtain a valid data set, including: calculating the time interval between the collection timestamp of each player's position coordinate and the current collection timestamp, assigning corresponding weight coefficients to each valid position coordinate based on the time interval; binding each valid position coordinate with the corresponding weight coefficient to generate a valid data set containing each valid position coordinate and the corresponding weight coefficient.
[0049] Here, the time interval refers to the time difference obtained by subtracting the acquisition timestamp of a single valid coordinate from the current acquisition timestamp. The weight coefficient refers to the value assigned to each valid coordinate based on the size of the time interval, used to distinguish the reference priority of different points during trajectory fitting. Binding refers to establishing a one-to-one association between a single valid position coordinate and its corresponding weight coefficient.
[0050] In one embodiment, the time interval between the collection timestamp of each player's position coordinate and the current collection timestamp can be calculated as follows: subtract the collection timestamp of the latest player's position coordinate from the collection timestamp of each valid position coordinate, and take the absolute value to obtain the time interval value corresponding to that coordinate.
[0051] In one embodiment, assigning corresponding weight coefficients to each valid location coordinate based on time intervals can be achieved by setting a negative correlation between the weight coefficient and the time interval; that is, the larger the time interval, the smaller the weight coefficient of the corresponding coordinate, and vice versa. Each valid location coordinate is then assigned a corresponding weight coefficient according to this rule. For example, each time interval is first normalized, and then the weight coefficient is calculated using a linear function: weight coefficient = maximum preset weight coefficient / (1 + time interval), ensuring that the weight coefficient is within a reasonable range.
[0052] In one embodiment, the method of binding each valid location coordinate with its corresponding weight coefficient to generate a valid data set containing each valid location coordinate and its corresponding weight coefficient can be as follows: establish structured data units, each data unit stores a valid location coordinate and its corresponding weight coefficient separately, and then summarize and organize all structured data units and store them as a valid data set that can be directly used for subsequent calculations.
[0053] As described above, by calculating the time interval between the sampling time of each coordinate and the latest sampling time, assigning differentiated weight coefficients based on the time proximity, and binding coordinates with weights to form an effective data set, the interference of old sampling points on trajectory calculation can be weakened, the reference priority of recent player position data can be amplified, and subsequent trajectory fitting calculations can better match the player's current real movement trend, thereby improving the accuracy of trajectory fitting and movement prediction results.
[0054] S10212. Perform trajectory fitting calculation based on the effective data set to obtain the initial movement trajectory, identify the motion state parameters of the initial movement trajectory, and perform differentiated trajectory extension on the initial movement trajectory based on the motion state parameters to obtain the target movement trajectory.
[0055] Trajectory fitting refers to the process of using mathematical algorithms to fit curves / straight lines to discrete coordinate points, reconstructing a player's continuous movement route. The initial movement trajectory refers to the original movement path generated solely based on historical points, obtained through fitting. Motion state parameters refer to the numerical values representing the player's movement characteristics extracted from the initial trajectory, including movement speed, direction of travel, frequency of direction changes, and whether a turnback occurs. Differentiated trajectory extension refers to expanding and extrapolating the end of the original trajectory using different extension rules and lengths based on different movement states. The target movement trajectory refers to the final, complete predicted movement path obtained after targeted extensions based on the initial trajectory.
[0056] In one embodiment, the initial movement trajectory can be obtained by performing trajectory fitting based on a valid dataset: A valid dataset containing coordinates and corresponding weights is retrieved, and a weighted least squares method is used to fit the discrete coordinate points to a curve. The shape of the fitted curve is then adjusted based on the weight of each point to reconstruct the player's actual movement route. For example, the valid dataset contains weighted coordinate points (2,3), (5,6), (9,8), and (13,9). The coordinates closer to the timestamp of the most recently collected player position coordinates have higher weights; that is, the weight of coordinate (13,9) is greater than that of coordinate (9,8), the weight of coordinate (9,8) is greater than that of coordinate (5,6), and the weight of coordinate (5,6) is greater than that of coordinate (2,3). The fitting algorithm will prioritize fitting the high-weight coordinates to generate a smooth and continuous line, which is the player's initial movement trajectory.
[0057] In one embodiment, the motion state parameters of the initial movement trajectory can be identified as follows: the player's displacement per unit time is calculated based on the initial movement trajectory to obtain the movement speed; the average direction of travel is determined according to the tangent direction of the initial movement trajectory; the curvature change of the trajectory is statistically analyzed to obtain the change frequency; and the overlap between the trajectory coordinate points and the traversed area is detected to determine whether there is a return state.
[0058] In one embodiment, the method of obtaining the target trajectory by differentially extending the initial trajectory based on motion state parameters can be as follows: analyze the motion state parameters such as speed and direction change frequency corresponding to the initial trajectory, determine the extension length corresponding to each parameter according to a preset mapping relationship, extend the trajectory at the end of the initial trajectory based on the extension length along the trajectory forward direction to obtain the target trajectory.
[0059] Optionally, the initial moving trajectory is extended in a differentiated manner based on motion state parameters, including: determining the extension coefficient and extension rule corresponding to the motion state parameters; extending the initial moving trajectory along the tangent direction at the end of the trajectory based on the extension coefficient and extension rule, wherein the motion state parameters include at least one of high-speed straight-line state parameters, low-speed turning state parameters, turning-back state parameters, and uniform speed fine-tuning moving state parameters.
[0060] The extension coefficient refers to a numerical parameter used to control the length and magnitude of the trajectory extension, with different coefficient values corresponding to different movement states. The extension rule refers to the trajectory extension logic defined for various movement states, specifying constraints such as extension angle, step length, and shape. The trajectory end refers to the position point on the initial movement trajectory representing the player's current endpoint. The tangent direction refers to the tangent direction at the end of the initial movement trajectory, used to indicate the overall forward direction of the trajectory. The high-speed straight-line state parameter refers to the state data corresponding to when the player moves quickly and the direction remains largely unchanged. The low-speed change-of-direction state parameter refers to the state data corresponding to when the player moves slowly and frequently changes direction. The reversal state parameter refers to the state data corresponding to when the player's direction reverses. The uniform-speed fine-tuning movement state parameter refers to the state data corresponding to when the player maintains a stable speed and only slightly adjusts the direction.
[0061] In one embodiment, the method for determining the extension coefficient and extension rule corresponding to the motion state parameters can be as follows: after parsing at least one of the parameters included in the current player's motion state parameters—high-speed straight-line state parameters, low-speed change-of-direction state parameters, turn-back state parameters, and uniform-speed fine-tuning movement state parameters—the corresponding parameters and rules are matched according to the corresponding extension coefficients and corresponding extension rules pre-set for different motion state parameters. For example, the high-speed straight-line state parameter corresponds to a larger extension coefficient, and the extension rule is to extend in a straight line along the tangent direction without angular offset; the low-speed change-of-direction state parameter corresponds to a smaller extension coefficient, and the extension rule is to extend in a fan shape within a certain angle range on both sides of the tangent direction, centered on the end point, covering all possible directions of travel; the turn-back state parameter corresponds to a medium extension coefficient, and the extension rule is to extend along the reverse tangent direction, covering the area the player may pass through after turning back; the uniform-speed fine-tuning movement state parameter corresponds to a medium extension coefficient, and the extension rule is to extend within a small angle range along the tangent direction, conforming to the player's movement characteristics of fine-tuning the direction.
[0062] In one embodiment, the method of extending the initial trajectory along the tangent direction at the end of the trajectory based on the extension coefficient and extension rule can be as follows: For high-speed straight-line state, the product of the corresponding extension coefficient and the current moving speed is determined as the extension length, and the initial moving trajectory is extended in a straight line along the tangent direction at the end of the initial moving trajectory to obtain a straight path; For low-speed change-of-direction state, the end point of the initial moving trajectory is taken as the vertex, and a fan-shaped area is drawn within a preset angle range to the left and right of the tangent direction. The product of the corresponding extension coefficient and the current moving speed is determined as the radius length of the fan, and the coverage area of the fan, i.e., the extended prediction range, is calculated based on the radius length. For example, if the vertex coordinates (10, 1... 0), the tangent is in the positive X-axis direction, with a left and right deflection angle of 30° and a radius R=15; the tangent vector (1,0) is rotated 30° to the left and 30° to the right to obtain two sides. The points on the two sides 15 meters away from the vertex are the two ends of the arc. The area enclosed by the two rays and the arc with a radius of 15 is the fan-shaped prediction range corresponding to the low-speed change of direction; for the return state, the length extended along the opposite direction of the tangent is the straight path of the extension coefficient multiplied by the current moving speed; for the uniform speed fine-tuning movement state, a narrow fan-shaped area is drawn within a preset small angle range to the left and right along the tangent direction. The radius of the fan-shaped area is the product of the extension coefficient and the current moving speed. The final extension path is combined with the initial movement trajectory to form a complete target movement trajectory.
[0063] As mentioned above, specific extension coefficients and rules are matched for different player movement states. Differentiated trajectory extension logic can be used for various movement scenarios such as high-speed straight movement, low-speed change of direction, turning back, and uniform speed fine adjustment. A larger extension coefficient can be set for high-speed straight movement to achieve long-distance linear prediction. Low-speed change of direction adopts fan-shaped interval extension to adapt to the characteristics of multiple directions. Turning back and uniform speed fine adjustment are matched with corresponding constraint rules to accurately match the player's real movement behavior and improve the prediction accuracy of the target movement trajectory.
[0064] S10213. Match the coordinates of the obstacle elements in the preset loaded resources with the target movement trajectory, and determine the coordinates to be corrected on the target movement trajectory based on the matching results.
[0065] Among them, "pre-loaded resources" refers to a collection of various scene resource data that are pre-loaded and have their location information recorded in the game scene. "Obstacle element coordinates" refers to the spatial coordinates of objects such as walls, rocks, buildings, and vegetation that obstruct the character's passage within the scene. "Coordinates to be corrected" refers to trajectory points that conflict with the positions of obstacles, preventing the character from passing normally and requiring adjustment of their positions.
[0066] In one embodiment, the method for matching the coordinates of obstacle elements in the preset loaded resources with the target movement trajectory can be as follows: traverse all trajectory points on the target movement trajectory, compare each trajectory point with the range of obstacle element coordinates recorded in the preset loaded resources one by one, and detect whether each point falls within the passable blocking area of any obstacle. If there is a trajectory point that falls into the blocking area, then mark the point as the coordinates to be corrected.
[0067] In one embodiment, the method for determining the coordinates to be corrected on the target movement trajectory based on the matching results can be as follows: extract all trajectory points that fall into the obstacle blocking area, count the positions and distribution ranges of these points, obtain the set of all coordinates that need to be corrected on the target movement trajectory, and mark the relative positions and adjacent point information of these coordinates in the target movement trajectory for subsequent trajectory correction.
[0068] S10214. Optimize the target movement trajectory based on the coordinates to be corrected to obtain the predicted path information.
[0069] Among them, optimization processing can refer to the correction operation of adjusting the coordinate position of conflict points, replanning the route, avoiding obstacles and ensuring the continuity of the path.
[0070] In one embodiment, the method for optimizing the target movement trajectory based on the coordinates to be corrected to obtain the predicted path information is as follows: determine the distribution position of the coordinates to be corrected on the target movement trajectory; if the coordinates to be corrected are concentrated at the end of the trajectory, directly adjust the target movement trajectory to the shortest passable path around the obstacle, and extend it to the end to obtain the corrected path; if the coordinates to be corrected appear in the middle of the trajectory, plan a detour path from the upstream normal point to the downstream normal point through the obstacle avoidance algorithm, replace the conflict segment of the original target movement trajectory containing the coordinates to be corrected, and ensure that the corrected path does not conflict with the obstacle throughout the entire process, and finally obtain the path information of the passable target movement trajectory, that is, the predicted path information.
[0071] The above-mentioned approach first filters out anomalies and weights the player position data according to time series to improve the reliability of the original data. Then, it generates a preliminary movement trajectory through trajectory fitting and differential extension. Combined with scene obstacles, it determines the conflict points and completes trajectory correction. Finally, it outputs accurate predicted path information, which can match the player's real movement habits, avoid scene obstacles, and greatly improve the accuracy of movement trend prediction. This effectively ensures the rationality of game map resource scheduling and the continuity of scene display.
[0072] S1022. Using the current player position coordinates in multiple consecutive player position coordinates as the starting point of the line of sight, determine the cone-shaped line of sight range in the player's movement direction based on preset visual projection parameters.
[0073] Here, "starting point of view" refers to the initial position of the simulated game camera / player's field of view. "Preset visual projection parameters" refers to pre-configured field-of-view parameters, including field of view angle, maximum viewing distance, and projection method, used to define the boundaries of the field of view. "Conical field of view range" refers to the cone-shaped visual area extending along the player's movement direction with the starting point of view as its apex, corresponding to the player's normally visible map field of view within the game.
[0074] Figure 4 This is a schematic diagram of a cone-shaped line-of-sight range provided in an embodiment of this application, such as... Figure 4As shown, it includes: the current player position coordinates O, → indicating the player's movement direction, the maximum visible distance m, and a field of view angle of 60°. In one embodiment, the method of determining the cone-shaped field of view range in the player's movement direction based on preset visual projection parameters, using the current player position coordinates O in a series of consecutive player position coordinates as the starting point of the line of sight, can be as follows: using the current player position coordinates as the apex of the cone, along the calculated player movement direction, the field of view boundary is expanded according to the field of view angle of 60° specified in the preset visual projection parameters, extending to the preset maximum visible distance m, and delineating a cone-shaped area that conforms to the projection rules. This area is the player's current cone-shaped field of view range. For example, if the player's position coordinates in the game are (50,50,50), the current movement direction is directly forward, the field of view angle is set to 90 degrees, and the maximum visible distance is 100 meters, then using the player's position as the apex of the cone, along the directly forward direction, the field of view boundary is expanded at an angle of 90 degrees, extending to a distance of 100 meters, forming a cone-shaped area.
[0075] S1023. Determine the map blocks that overlap with the cone-shaped line of sight from among multiple map blocks as the map blocks to be loaded, and determine the map blocks to be unloaded based on multiple non-overlapping map blocks.
[0076] Overlapping map tiles refer to map tiles whose spatial extent intersects with the cone-shaped line of sight. Non-overlapping map tiles refer to map tiles whose spatial extent is completely outside the cone-shaped line of sight.
[0077] In one embodiment, map tiles that overlap with the cone-shaped view area are identified as map tiles to be loaded. The method for determining map tiles to be unloaded based on multiple non-overlapping map tiles can be as follows: traverse all the divided map tiles, read the spatial boundary coordinates of each map tile in sequence, and combine the vertex coordinates, field of view, and farthest distance of the cone-shaped view area with parameters such as the vertex coordinates, field of view angle, and farthest distance. Then, use a spatial geometric collision detection algorithm to determine whether a single map tile intersects or overlaps with the cone-shaped visible area. If the detection result is an overlap, the map tile is marked as a map tile to be loaded; if the detection result is a non-overlap, the map tile is marked as a map tile to be unloaded.
[0078] As described above, the player's movement direction is predicted based on the player's position coordinates in multiple consecutive frames, and a cone-shaped field of view is defined to determine the map blocks to be loaded and unloaded. This allows for precise matching of the player's field of view and movement needs to complete map resource scheduling, facilitating the preloading of map blocks ahead of the player. This ensures the integrity and continuity of the scene within the field of view, avoids screen breaks, improves the smoothness of scene loading, and allows for targeted management of resources in non-visible areas, reducing the persistence of invalid resources.
[0079] S103. Load the map blocks to be loaded and configure the map blocks to be uninstalled with a delay, and uninstall the map blocks to be uninstalled with a delay based on the configuration parameters of the delay configuration.
[0080] Delay configuration refers to setting delay-related rules and parameters for map tiles to be unloaded individually. Configuration parameters can include preset delay duration, status judgment conditions, resource retention thresholds, and other control parameters. Delayed unloading means that after a map tile meets the unloading conditions, its resources are not immediately cleared, but rather released after a set duration or when the corresponding conditions are triggered.
[0081] In one embodiment, the method for loading the map block to be loaded can be as follows: according to the preset resource scheduling logic, read various resource files such as models, textures, scene objects and so on of the map block to be loaded from local storage or server, write them into device memory and video memory, and perform scene initialization, coordinate matching and rendering parameter association binding so that the map block can be synchronously connected to the game screen for normal display.
[0082] In one embodiment, the method of delaying the unloading of a map block based on the configuration parameters of the delay configuration can be as follows: obtain a preset default delay duration as a configuration parameter, mark the unloading status and delayed unloading start time of the map block to be unloaded, retain the resources loaded by the map block without releasing them immediately, check the difference between the current time and the delayed unloading start time during resource scheduling in each frame, if the difference does not reach the delay duration, continue to retain the resources of the map block, and at the same time determine whether the player re-enters the map block to be unloaded. If the player re-enters, directly cancel the unloading mark of the map block and restore its normal resource retention state; if the difference reaches the delay duration and the player still has not entered the map block, perform the resource unloading operation, clear the memory and video memory space occupied by the map block to complete the resource release.
[0083] In this embodiment, by acquiring the location information of multiple map tiles and the player's position coordinates across multiple consecutive frames, the map tile to which the current player's position coordinates belong in the player's position coordinates across multiple consecutive frames is determined as the center map tile. Based on the player's position coordinates across multiple consecutive frames and the location information of multiple map tiles, the map tiles to be loaded and to be unloaded corresponding to the center map tile are determined. The map tiles to be loaded are loaded, and the map tiles to be unloaded are configured with a delay, and the unloading of the map tiles to be unloaded is delayed based on the configuration parameters of the delay configuration. As described above, by determining the center map tile based on the player's real-time position and predicting the movement state by combining the player's coordinates across multiple consecutive frames, the map tiles to be loaded and to be unloaded are accurately divided, and the modules to be loaded are loaded. This allows map tile resource loading to be completed on demand, ensuring the integrity of the scene within the player's field of vision and the smooth transition of the screen. By setting a delayed unloading rule for the map tiles to be unloaded and delaying the unloading of the map tiles to be unloaded, the problem of repeated loading and unloading of map tiles when the player moves back and forth to the tile boundaries can be effectively avoided, improving the stability and rationality of map resource scheduling.
[0084] Figure 5 This is a schematic diagram of the structure of a dynamic scheduling device for map scene resources provided in an embodiment of this application, as shown below. Figure 5 As shown, it includes: Location information acquisition module 21 is used to acquire the location information of multiple map tiles and the player's position coordinates for multiple consecutive frames; The center map tile determination module 22 is used to determine the map tile to which the current player position coordinates belong in the player position coordinates of the continuous multi-frame player position coordinates as the center map tile; The map tile type determination module 23 is used to determine the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile based on the player position coordinates of the continuous multi-frames and the position information of the multiple map tiles; The map tile resource scheduling module 24 is used to load the map tile to be loaded, configure the map tile to be uninstalled with a delay, and perform delayed uninstallation of the map tile to be uninstalled based on the configuration parameters of the delay configuration.
[0085] In this embodiment, by acquiring the location information of multiple map tiles and the player's position coordinates across multiple consecutive frames, the map tile to which the current player's position coordinates belong in the player's position coordinates across multiple consecutive frames is determined as the center map tile. Based on the player's position coordinates across multiple consecutive frames and the location information of multiple map tiles, the map tiles to be loaded and to be unloaded corresponding to the center map tile are determined. The map tiles to be loaded are loaded, and the map tiles to be unloaded are configured with a delay, and the unloading of the map tiles to be unloaded is delayed based on the configuration parameters of the delay configuration. As described above, by determining the center map tile based on the player's real-time position and predicting the movement state by combining the player's coordinates across multiple consecutive frames, the map tiles to be loaded and to be unloaded are accurately divided, and the modules to be loaded are loaded. This allows map tile resource loading to be completed on demand, ensuring the integrity of the scene within the player's field of vision and the smooth transition of the screen. By setting a delayed unloading rule for the map tiles to be unloaded and delaying the unloading of the map tiles to be unloaded, the problem of repeated loading and unloading of map tiles when the player moves back and forth to the tile boundaries can be effectively avoided, improving the stability and rationality of map resource scheduling.
[0086] In one possible embodiment, the map tile type determination module 23 is used for: Based on the player's position coordinates in the continuous multi-frames, movement trend prediction is performed to obtain predicted path information, which includes the player's movement direction. Using the current player position coordinates in the continuous multi-frame player position coordinates as the starting point of the line of sight, a cone-shaped line of sight range in the player's movement direction is determined based on preset visual projection parameters; Map blocks that overlap with the cone-shaped line of sight among the multiple map blocks are identified as map blocks to be loaded, and map blocks to be unloaded are determined based on the multiple non-overlapping map blocks.
[0087] In one possible embodiment, the map tile type determination module 23 is used for: Outlier filtering is performed on the player position coordinates of the consecutive multiple frames to obtain multiple valid position coordinates. Then, based on the collection timestamp of each player position coordinate, the valid position coordinates are time-weighted to obtain a valid data set. Based on the effective data set, a trajectory fitting operation is performed to obtain an initial movement trajectory. The motion state parameters of the initial movement trajectory are identified, and the initial movement trajectory is extended differentially based on the motion state parameters to obtain the target movement trajectory. Match the coordinates of obstacle elements in the preset loaded resources with the target movement trajectory, and determine the coordinates to be corrected on the target movement trajectory based on the matching results; The target's trajectory is optimized based on the coordinates to be corrected to obtain predicted path information.
[0088] In one possible embodiment, the map tile type determination module 23 is used for: Determine the extension coefficient and extension rule corresponding to the motion state parameters; Based on the extension coefficient and the extension rule, the motion state parameters are extended along the tangent direction at the end of the initial movement trajectory. The motion state parameters include at least one of the following: high-speed straight-line state parameters, low-speed change-of-direction state parameters, reversal state parameters, and uniform speed fine-tuning movement state parameters.
[0089] In one possible embodiment, the map tile type determination module 23 is used for: Calculate the time interval between the collection timestamp of each player's position coordinate and the current collection timestamp, and assign a corresponding weight coefficient to each valid position coordinate based on the time interval; Each valid location coordinate is bound to its corresponding weight coefficient to generate a valid data set containing each valid location coordinate and its corresponding weight coefficient.
[0090] In one possible embodiment, the map tile type determination module 23 is used for: Multiple non-overlapping map tiles are identified as non-visual map tiles, and each non-visual map tile is matched with the predicted path information; Non-visual map blocks that do not overlap with the predicted paths in the predicted path information are identified as map blocks to be unloaded.
[0091] In one possible embodiment, there are multiple map tiles to be loaded, and the system further includes a loading priority determination module for: Calculate the distance between the current player's position coordinates and each of the map tiles, as well as the overlap between each of the map tiles and the predicted path in the predicted path information; The loading priority of each map tile to be loaded is determined based on the distance value and the overlap. Correspondingly, the map tile resource scheduling module 24 is used for: Each of the map tiles to be loaded is loaded based on the loading priority.
[0092] This application also provides an electronic device that can integrate a map scene resource dynamic scheduling device provided in this application. Figure 6 This is a schematic diagram of the structure of a map scene resource dynamic scheduling device provided in an embodiment of this application, with reference to... Figure 6 The map scene resource dynamic scheduling device includes: an input device 33, an output device 34, a memory 32, and one or more processors 31; the memory 32 is used to store one or more programs; when one or more programs are executed by one or more processors 31, the one or more processors 31 implement the map scene resource dynamic scheduling method provided in the above embodiments. The input device 33, output device 34, memory 32, and processors 31 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0093] The memory 32, as a computing device-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the map scene resource dynamic scheduling method provided in any embodiment of this application. The memory 32 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on device usage. Furthermore, the memory 32 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 32 may further include memory remotely located relative to the processor 31, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0094] Input device 33 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 34 may include display devices such as a display screen.
[0095] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 32, thereby realizing the above-mentioned dynamic scheduling method for map scene resources.
[0096] The map scene resource dynamic scheduling device, equipment, and computer provided above can be used to execute the map scene resource dynamic scheduling method provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0097] This application embodiment also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute the map scene resource dynamic scheduling method provided in the above embodiment. The map scene resource dynamic scheduling method includes: acquiring the location information of multiple map tiles and the player position coordinates of multiple consecutive frames; determining the map tile to which the current player position coordinates belong in the player position coordinates of the multiple consecutive frames are the center map tile; determining the map tile to be loaded and the map tile to be unloaded corresponding to the center map tile based on the player position coordinates of the multiple consecutive frames and the location information of multiple map tiles; loading the map tile to be loaded and configuring a delay for the map tile to be unloaded, and performing delayed unloading of the map tile to be unloaded based on the configuration parameters of the delay configuration.
[0098] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROMs, floppy disks, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. Furthermore, storage media may reside in a first computer system in which a program is executed, or may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage media may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0099] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the dynamic scheduling method for map scene resources as described above, but can also execute related operations in the dynamic scheduling method for map scene resources provided in any embodiment of this application.
[0100] The map scene resource dynamic scheduling device, equipment, and storage medium provided in the above embodiments can execute the map scene resource dynamic scheduling method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the map scene resource dynamic scheduling method provided in any embodiment of this application.
[0101] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A method for dynamic scheduling of map scene resources, characterized in that, include: Obtain the location information of multiple map tiles and the player position coordinates of multiple consecutive frames, and determine the map tile to which the current player position coordinates belong in the multiple consecutive frames of player position coordinates as the center map tile; Based on the player's position coordinates in the consecutive multiple frames and the position information of the multiple map tiles, determine the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile; Load the map tile to be loaded and configure a delay for the map tile to be uninstalled, so as to delay the uninstallation of the map tile based on the configuration parameters of the delay configuration.
2. The method for dynamic scheduling of map scene resources according to claim 1, characterized in that, The step of determining the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile based on the player's position coordinates in the continuous multi-frames and the position information of the multiple map tiles includes: Based on the player's position coordinates in the continuous multi-frames, movement trend prediction is performed to obtain predicted path information, which includes the player's movement direction. Using the current player position coordinates in the continuous multi-frame player position coordinates as the starting point of the line of sight, a cone-shaped line of sight range in the player's movement direction is determined based on preset visual projection parameters; Map blocks that overlap with the cone-shaped line of sight among the multiple map blocks are identified as map blocks to be loaded, and map blocks to be unloaded are identified based on the multiple non-overlapping map blocks.
3. The method for dynamic scheduling of map scene resources according to claim 2, characterized in that, The step of predicting movement trends based on the player's position coordinates across multiple consecutive frames to obtain predicted path information includes: Outlier filtering is performed on the player position coordinates of the consecutive multiple frames to obtain multiple valid position coordinates. Then, based on the collection timestamp of each player position coordinate, the valid position coordinates are time-weighted to obtain a valid data set. Based on the effective data set, a trajectory fitting operation is performed to obtain an initial movement trajectory. The motion state parameters of the initial movement trajectory are identified, and the initial movement trajectory is extended differentially based on the motion state parameters to obtain the target movement trajectory. Match the coordinates of obstacle elements in the preset loaded resources with the target movement trajectory, and determine the coordinates to be corrected on the target movement trajectory based on the matching result; The target's trajectory is optimized based on the coordinates to be corrected to obtain predicted path information.
4. The method for dynamic scheduling of map scene resources according to claim 3, characterized in that, The differentiated trajectory extension based on the motion state parameters of the initial movement trajectory includes: Determine the extension coefficient and extension rule corresponding to the motion state parameters; Based on the extension coefficient and the extension rule, the motion state parameters are extended along the tangent direction at the end of the initial movement trajectory. The motion state parameters include at least one of the following: high-speed straight-line state parameters, low-speed change-of-direction state parameters, reversal state parameters, and uniform speed fine-tuning movement state parameters.
5. The method for dynamic scheduling of map scene resources according to claim 3, characterized in that, The effective data set is obtained by weighting the valid location coordinates based on the collection timestamps of the player's location coordinates, including: Calculate the time interval between the collection timestamp of each player's position coordinate and the current collection timestamp, and assign a corresponding weight coefficient to each valid position coordinate based on the time interval; Each valid location coordinate is bound to its corresponding weight coefficient to generate a valid data set containing each valid location coordinate and its corresponding weight coefficient.
6. The method for dynamic scheduling of map scene resources according to claim 2, characterized in that, The process of determining the map tile to be unloaded based on multiple non-overlapping map tiles includes: Multiple non-overlapping map tiles are identified as non-visual map tiles, and each non-visual map tile is matched with the predicted path information; Non-visual map blocks that do not overlap with the predicted paths in the predicted path information are identified as map blocks to be unloaded.
7. The method for dynamic scheduling of map scene resources according to claim 2, characterized in that, The map tiles to be loaded are multiple. After determining the map tiles that overlap with the cone-shaped line-of-sight range among the multiple map tiles as the map tiles to be loaded, the method further includes: Calculate the distance between the current player's position coordinates and each of the map tiles, as well as the overlap between each of the map tiles and the predicted path in the predicted path information; The loading priority of each map tile to be loaded is determined based on the distance value and the overlap. Accordingly, loading the map tile to be loaded includes: Each of the map tiles to be loaded is loaded based on the loading priority.
8. A dynamic scheduling device for map scene resources, characterized in that, include: The location information acquisition module is used to acquire the location information of multiple map tiles and the player's position coordinates over multiple consecutive frames; The center map tile determination module is used to determine the map tile to which the current player position coordinates belong in the player position coordinates of the continuous multi-frame player position coordinates as the center map tile; The map tile type determination module is used to determine the map tile to be loaded and the map tile to be unloaded corresponding to the central map tile based on the player position coordinates of the continuous multi-frames and the position information of the multiple map tiles; The map tile resource scheduling module is used to load the map tile to be loaded, configure the map tile to be uninstalled with a delay, and perform delayed uninstallation of the map tile to be uninstalled based on the configuration parameters of the delay configuration.
9. An electronic device, characterized in that, The device includes: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement the map scene resource dynamic scheduling method as described in any one of claims 1-7.
10. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the map scene resource dynamic scheduling method as described in any one of claims 1-7.