WO2022205824A1 - Map resource loading method and apparatus, storage medium, and electronic apparatus - Google Patents

Map resource loading method and apparatus, storage medium, and electronic apparatus Download PDF

Info

Publication number
WO2022205824A1
WO2022205824A1 PCT/CN2021/122122 CN2021122122W WO2022205824A1 WO 2022205824 A1 WO2022205824 A1 WO 2022205824A1 CN 2021122122 W CN2021122122 W CN 2021122122W WO 2022205824 A1 WO2022205824 A1 WO 2022205824A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
map
probability
region
game
Prior art date
Application number
PCT/CN2021/122122
Other languages
French (fr)
Chinese (zh)
Inventor
杨晓阳
张朋举
黄自睿
王岩
Original Assignee
完美世界(北京)软件科技发展有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 完美世界(北京)软件科技发展有限公司 filed Critical 完美世界(北京)软件科技发展有限公司
Publication of WO2022205824A1 publication Critical patent/WO2022205824A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5378Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for displaying an additional top view, e.g. radar screens or maps
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games

Definitions

  • the present invention relates to the field of computers, and in particular, to a method and device for loading map resources, a storage medium, and an electronic device.
  • a large world scene is also called a big map, which usually refers to a virtual world scene in a game whose length and width are greater than or equal to 4 kilometers.
  • the character operated by the player is in a large world scene, due to the limitation of hardware computing performance and storage performance, it is often impossible to convert related resources in the large map (including terrain resources, object resources in the scene, weather resources, and character resources in the scene. etc.) are all loaded at the same time.
  • the solution usually adopted is to divide the large map into several small regional components, and dynamically load the resources of the specified regional components according to the current state of the player during the running of the game. Experienced large map resource loading management is implemented.
  • the above part introduces the technical implementation of large map resource loading, but what is more important is the timing of resource loading behavior and the selection of sub-component areas that need to load resources.
  • the current selection method is relatively fixed, and there are often preloaded map areas that are not areas that players actually enter.
  • the present invention provides a map resource loading method and device, a storage medium, and an electronic device, so as to at least solve the technical problem of low accuracy of map area loading in the related art.
  • a method for loading map resources comprising: under the condition that a preloading condition of a game map is satisfied, determining a first area in the game map where a target character is currently located, wherein the game map is divided into There are multiple areas, the first area belongs to multiple areas, the preloading condition is used to trigger the execution of the operation of selecting the preloading area from multiple areas, and the target character is the game character controlled by the user terminal; the prediction is obtained according to the historical trajectory of the game character result, and determine the second area in the multiple areas according to the prediction result, wherein the prediction result is used to indicate the area to be entered by the target character in the multiple areas predicted by using the historical trajectory, and the second area is the area to be loaded with map resources , the second area is adjacent to the first area; the map resource of the second area is loaded in the user terminal.
  • a map resource loading device comprising: a search unit, configured to determine the first area in the game map where the target character is currently located under the condition that the preloading condition of the game map is satisfied , wherein the game map is divided into multiple areas, the first area belongs to multiple areas, the preload condition is used to trigger the execution of the operation of selecting the preload area from the multiple areas, and the target character is the game character controlled by the user terminal;
  • the unit is used to obtain the prediction result according to the historical trajectory of the game character, and determine the second area in the plurality of areas according to the prediction result, wherein the prediction result is used to indicate that the target character is to enter in the plurality of areas predicted by the historical trajectory.
  • area the second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area
  • the loading unit is used for loading the map resource of the second area in the user terminal.
  • a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the above-mentioned method.
  • an electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the above-mentioned method when the computer program is executed. step.
  • a computer program product comprising a computer program, which implements the steps of the above-mentioned method when the computer program is executed by a processor.
  • the beneficial effects of the present invention are: considering that with the passage of the game operation time and the increase of the total number of players, the group behavior trajectories of the characters controlled by the players on the big map will become more concentrated and regular.
  • the historical trajectory can be used to determine the results that conform to the above rules, and then the area that the player is about to enter can be determined, which can solve the technical problem of low accuracy of map area loading in the related art.
  • FIG. 1 schematically shows a schematic diagram of a hardware environment of a method for loading map resources according to an embodiment of the present invention
  • FIG. 2 schematically shows a flowchart of an optional map resource loading method according to an embodiment of the present invention
  • FIG. 3 schematically shows a schematic diagram of an optional map resource according to an embodiment of the present invention
  • FIG. 4 schematically shows a schematic diagram of an optional map resource loading solution according to an embodiment of the present invention
  • FIG. 5 schematically shows a schematic diagram of an optional map resource loading solution according to an embodiment of the present invention
  • FIG. 6 schematically shows a schematic diagram of an optional historical track according to an embodiment of the present invention.
  • FIG. 7 schematically shows a schematic diagram of an optional map resource loading apparatus according to an embodiment of the present invention.
  • FIG. 8 schematically shows a structural block diagram of a terminal according to an embodiment of the present invention.
  • Figure 9 schematically shows a block diagram of a computer device for implementing the method according to the invention.
  • Figure 10 schematically shows a block diagram of a computer program product implementing the method according to the invention.
  • the inventor realized that the large map area resource loading mode in the related art is designed by the game developer, and this loading strategy is a time-independent static strategy.
  • the loading mode of resources in the large map area based on the static loading strategy has some defects that are difficult to balance: for example, if the game designer designs the strategy to be relatively conservative (such as using a stable trigger mechanism with low resource waste), the map area Resource loading will be relatively lag; if the strategy is designed to be relatively aggressive (that can easily trigger resource loading), resource loading in the map area will cause a high probability of waste, because the probability of players entering the loaded area is relatively high. Small.
  • the group behavior trajectories of the characters controlled by the players on the big map will become more concentrated and regular.
  • the loading strategy often has a certain deviation, and the deviation will not generate negative feedback as the correction input of the loading strategy in real time, so the deviation will not be corrected spontaneously, and the current strategy lacks the ability to dynamically self-improve and correct.
  • a method embodiment of a method for loading a map resource is provided.
  • the above method can be applied to the hardware environment composed of the terminal 101 and the server 103 as shown in FIG. 1 .
  • the server 103 is connected to the terminal 101 through the network, which can be used to provide services (such as game services, etc.) for the terminal or the client installed on the terminal, and the database 105 can be set on the server or independently from the server, for
  • the above-mentioned networks include but are not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like.
  • the method according to the embodiment of the present invention may be executed by the server 103 , may also be executed by the terminal 101 , or may be executed jointly by the server 103 and the terminal 101 .
  • the following description will be given by taking the above method running on a terminal as an example.
  • the terminal 101 may also execute the method according to the embodiment of the present invention by a client installed on the terminal 101 .
  • Fig. 2 schematically shows a flowchart of an optional map resource loading method according to an embodiment of the present invention. As shown in Fig. 2, the method may include step S202, step S204 and step S206.
  • step S202 when the preloading condition of the game map is satisfied, the first area in the game map where the target character is currently located is determined, and the target character is the game character controlled by the user terminal.
  • the game client of the game application is installed on the user terminal, and the player can control the game characters in the game scene through the game client.
  • the above preloading condition is used to trigger the execution of an operation of selecting a preloading area from a plurality of areas (ie, an operation corresponding to a subsequent step).
  • step S204 a prediction result is obtained according to the historical trajectory of the game character, and a second area in the plurality of areas is determined according to the prediction result, and the prediction result is used to indicate the area to be entered by the target character in the plurality of areas predicted by the historical trajectory,
  • the second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area.
  • the region predicted by the prediction result can be directly used as the second region; or the region predicted by the prediction result and the region determined according to the static loading strategy can be comprehensively considered to determine the second region. area.
  • the historical trajectory of the above-mentioned game character includes the following situations: 1) the game character represents all game characters, that is, the trajectory of all game characters can be used as the historical trajectory; 2) the game character represents the target character, that is, only the trajectory of the target character is used. As a historical track; 3) The game character represents a similar character of the target character, that is, only the trajectory of the similar character of the target character is used as a historical track.
  • the eigenvalues of the game character in multiple feature dimensions can be determined, and the eigenvalues can be vector values obtained by mapping in the vector space.
  • the feature dimension corresponds to a weight, and the sum of the weights corresponding to all feature dimensions is 1;
  • the similarity P between each game character and the target character is calculated according to the following formula, n represents the number of multiple feature dimensions, ki represents the weight of the ith feature dimension, M i represents the feature value of the target character on the ith feature dimension, and N i represents the value of the game character on the ith feature dimension Eigenvalue, f(M i ,N i ) represents the Euclidean distance between the target character and the game character in the ith feature dimension.
  • a certain threshold such as 0.2
  • step S206 the map resource of the second area is loaded in the user terminal.
  • this solution mainly solves how to predict and load the map area resources that the user will use in the next step.
  • the real-time dynamic of the player's historical trajectory data on the loading strategy is added. Feedback correction to improve the prediction accuracy and resource usage rate of resource loading in the large map area.
  • the method for loading map resources of the present invention may include the following steps 1, 2, 3 and 4, and the technical solution of the present invention will be further described in detail below with reference to the specific steps.
  • step 1 the game map of the game scene is divided into multiple areas, for example, the game map can be divided into multiple box areas as shown in FIG. 3 .
  • step 2 when the player controls the game character to play the game, in the case of satisfying the preloading condition of the game map, determine the first area in the game map where the target character is currently located.
  • the preloading conditions include but are not limited to the following: when the target character enters the first area from one of the multiple areas, it is determined that the preloading conditions of the game map are satisfied; when the target character reaches the target in the first area When the location (for example, the depth of entering the first area reaches a certain depth or near the edge of the area), it is determined that the preloading conditions of the game map are satisfied; when the target character triggers a specific plot or a specific game mission, it is determined that the game map is satisfied.
  • the first region is associated with a specific plot or a specific game task, for example, the specific plot or a specific game task is developed in a series of regions, and the series of regions includes the first region.
  • step 3 the map loading strategy is triggered to determine the second area of the map resource to be loaded.
  • the map loading strategy includes a dynamic loading strategy and/or a static loading strategy, that is, a static loading strategy or a dynamic loading strategy may be used alone here, or a combined loading strategy of the two may be used.
  • the character controlled by the player when the character controlled by the player enters the current area, it often needs to perform several operations, such as triggering the buried point arranged in advance by the game developer, or completing the specified task, etc.
  • the trigger timing is often delayed. For example, if a trigger and a buried point are placed at a specified position, when the player enters the trigger area, the loading of resources in the specified map area will be triggered; according to the distance between the current camera and the boundary of the specified area, the detail level of the resource loading in the area will be determined; according to the player A series of trigger conditions are established by manipulating the character's level and the completion of game tasks. However, over time, the accumulation of player behavior in the game does not affect the loading strategy developed by the game developer.
  • the comprehensive loading strategy adopts a combination of dynamic loading strategy and static loading strategy to realize the loading of map area resources.
  • the overall implementation framework is shown in Figure 4.
  • the player's historical operation data that is, the historical trajectory corresponding to data
  • the division method of the big map area to determine the player's action trajectory in the big map, so as to dynamically strengthen and correct the regional resource loading strategy according to the action trajectory, and determine and load the regional resources that the player will use in the future.
  • the solution can be implemented through the following steps 31, 32 and 33:
  • step 31 the dynamic loading strategy is run, and the third area to be entered by the target character in the multiple areas is predicted by using the historical trajectory.
  • the first area sequence includes multiple map areas that the target character passes through in sequence, and the last map area in the first area sequence is the first area sequence.
  • An area; the area entered after passing through the first area according to the first target trajectory among the multiple areas is taken as the third area.
  • the maximum historical step size can be determined first, that is, the first area and the number of continuous areas that pass before the first area.
  • These continuous areas can be represented by the first area sequence, as shown in Figure 6, as the first area sequence includes
  • the multiple map areas that the target character passes through in sequence are D 0 , C 0 , C 1 , and B 1 , and it is determined that the track that has passed through each area in the first region sequence in the historical track is the first target track, and the first target track may include The difference between these multiple first target trajectories is that the next area (that is, the first candidate area) that passes through the first area is different.
  • the third area that may enter from B 1 is A 2 , C 2 .
  • step 32 when the target character satisfies the triggering condition of the static loading strategy in the first area, a sixth area to be entered by the target character is obtained.
  • step 33 the second area is selected from the area set including the third area and the sixth area.
  • step 33 may further include the following steps 331 , 332 , 333 and 334 .
  • the first candidate area determined according to the historical track is the first probability that the target character is to enter the area to be entered.
  • each first candidate region corresponds to a first target trajectory
  • the first number of times the game character can be obtained (that is, the cumulative number of times the game character has passed through all the first target trajectories) and the second number of times, where the second number of times is the first specified trajectory of the game character to all the first target trajectories (that is, the first target trajectory for which the first probability is currently to be calculated) ) of the accumulated times; the ratio between the second times and the first times is taken as the first probability of the current candidate area.
  • the current area is simultaneously connected to a maximum of 8 areas (these 8 areas are equivalent to the third area, and the third area may only be partially adjacent in the actual process).
  • area) adjacent as shown in Figure 6, the eight areas around B 1 , according to the dynamic loading strategy in the above way to calculate the predicted probability of all adjacent areas to enter, such as in the historical trajectory, the first possible entry from B 1
  • the number of times that the three areas have A 2 is 2, and the number of times that the third area that may be entered from B 1 has C 2 is 8 times, then the probability of the former is 20%, and the probability of the latter is 80%.
  • step 332 when the target character satisfies the trigger condition in the first area, a second probability that the first candidate area is the area to be entered by the target character is obtained.
  • the probability of entering all adjacent areas can be calculated according to the static loading strategy (common loading strategies formulated by game developers, including buried point triggering or task status, etc.).
  • step 333 the first product between the first probability and the weight ⁇ of the first probability, the second product between the second probability and the weight (1- ⁇ ) of the second probability are determined, and the third product and the fourth The sum of the products is used as the comprehensive predicted probability of the first candidate region.
  • a second region is selected from the set of regions according to the comprehensive predicted probability.
  • the region with the largest comprehensive prediction probability may be selected from the region set as the second region, that is, two sets of The probability data calculates the comprehensive prediction probability according to the strategy weights of ⁇ and (1- ⁇ ) respectively, and selects the target area (ie the second area) with the largest comprehensive prediction probability.
  • the region with the highest first probability is selected from the region set as the second region, or the region with the second largest probability is selected from the region set as the second region, or it can be selected from all the first regions.
  • the region corresponding to the largest probability among the first probability and the second probability is selected as the second region.
  • the prediction result represents the third area that the target character will enter among the multiple areas predicted by the historical trajectory, and select one of the third areas as the second area. For example, choose the one with the highest predicted probability.
  • the weight ⁇ is initially a fixed value (such as 0.5) and can be adjusted over time as follows:
  • prediction accuracy rate the number of times that the results predicted by the dynamic loading strategy are consistent with the results predicted by the comprehensive loading strategy/the total number of prediction times; if the prediction accuracy rate reaches a certain threshold (such as 80%) ), increase the value of the weight ⁇ (eg +0.1); if the prediction accuracy is within a certain range (eg 50%-80%), keep the value of the weight ⁇ ; if the prediction accuracy is lower than a certain threshold (eg 50 %), then reduce the value of the weight ⁇ (such as -0.1).
  • a certain threshold such as 80%
  • the resource loading behavior under the comprehensive loading strategy has a better prediction of the area that the player will enter next, so the resource loading behavior of the predicted area can be predicted earlier, and the resource loading under the comprehensive loading strategy can be loaded.
  • the trigger timing of the behavior is based on the level of timing advance or lag, including but not limited to the following three.
  • the first is that when the character controlled by the player enters the current area, the trigger calculation is performed and the resources of the next predicted area are loaded.
  • the loading time of this solution is the earliest, and the advantage is that it has the most sufficient time to slowly load the area, so that the computing performance cost during the loading process is minimal, and the impact on the player's operating experience is minimal.
  • the second is when the character controlled by the player enters the current area and the displacement relative to the entry point exceeds a specified threshold (such as 0.5 times the diagonal length of the square area), the trigger calculation is performed and the next prediction area is loaded.
  • a specified threshold such as 0.5 times the diagonal length of the square area
  • the loading timing of this scheme is moderate, and it has a relatively long time to load the area, so that the computing performance cost and the impact on the player's operating experience during the loading process are moderate. This timing represents ⁇ 100%.
  • the static loading strategy is added to correct the probability.
  • the third is that when the player leaves the current area, the trigger calculation is performed and the resources of the next prediction area are loaded.
  • This solution is a guaranteed solution. After the loading time, it has the least time to load the target area, and the player experience is relatively poor.
  • the advantage of this processing timing is that the prediction accuracy rate reaches 100%, so it can be used as a bottom-line solution.
  • game developers can choose the first solution plus the third trigger timing guarantee or the second plus the third trigger timing guarantee according to the specific situation of the map.
  • step 4 the map resource of the second area is loaded in the user terminal.
  • the method for loading map resources of the present invention may further include step 5: after selecting the second region with the highest comprehensive prediction probability from the plurality of regions, when the comprehensive maximum prediction probability is greater than or equal to a preset loading probability When the threshold value (such as 90%) is reached, the next area is predicted according to the trajectory and the resource loading operation is performed in advance (for the specific implementation, please refer to the above).
  • a preset loading probability such as 90%
  • step 5 may further include the following steps 51 , 52 , 53 and 54 .
  • step 51 the third and fourth times of the game character are obtained, where the third time is the cumulative number of times the game character has passed through all the second target trajectories, and the third time is the second designated trajectory of the game character to all the second target trajectories.
  • the second target trajectory is the trajectory that has passed through each map area in the second area sequence in the historical trajectory, and the second area sequence includes multiple map areas that the target character passes through in sequence and the last one in the second area sequence.
  • One map area is the second area
  • the second specified track is the track of all the second target trajectories passing through each map area in the second area sequence and the second candidate area in sequence
  • the second candidate area is the second candidate area among the multiple areas. Regions that are adjacent to each other.
  • step 52 the ratio between the fourth time and the third time is used as the third probability of the second candidate region.
  • step 53 a third product between the third probability and the weight of the third probability, and a fourth product between the fourth probability and the weight of the fourth probability are determined, and the sum of the third product and the fourth product is used as the second product The overall predicted probability of the candidate region.
  • a fourth region is selected from the plurality of second candidate regions according to the comprehensive prediction probability, where the fourth region is a map region to be loaded with map resources, and the selection method of the fourth region is similar to that of the second region.
  • the method for loading map resources of the present invention may further include step 6: after obtaining the prediction result according to the historical trajectory of the game character, and determining the second area in the multiple areas according to the prediction result, the target character In the case of moving to the area boundary of the first area and the area boundary is not the area boundary of the second area, that is, in the case of an error in prediction, the following scheme is adopted to make a bottom line: determine the fifth area adjacent to the area boundary; in the user terminal Load the map resource of the fifth area.
  • its player historical trajectory data is the sum of all the single historical behavior trajectory data previously passed by all players or the current player. In the case of all players, this data is stored on the game server, and in the case of the current player, the data can be stored on the local device.
  • a single player’s historical behavior track data refers to: a character controlled by the player enters the big map, the midway area identification, and the player leaves the big map (the way to leave includes: leaving from the exit, teleporting, closing the game, etc.) Trajectory chain of the region experienced. As shown in Figure 6, this trajectory has been walked 10 times in the player's historical trajectory:
  • the maximum number of area chains is recorded as a piece of historical data. Because when the number of map areas is m, the player may pass through an infinite number of area nodes continuously, so the strategy should only care about the historical data in the player's fixed mode, that is, the history of the maximum k steps before the current area node trajectory. It can be known that when the player is in a certain area, the number of historical trajectory possibilities Np_max has is:
  • N p_max m k
  • the prediction area can be calculated according to the dynamic loading strategy.
  • the probability can be calculated based on the prediction area of the player's historical behavior trajectory data.
  • the player's historical trajectory data continues to increase and accumulate, there is a preliminary scale of statistical data, and can continue to be enhanced based on new trajectory data.
  • the probability is shown in Table 2:
  • the current trajectory route is D 0 ⁇ C 0 ⁇ C 1 ⁇ B 1
  • the player may enter the A2 area or the C2 area next, according to the frequency statistics can be It is concluded that the probability of entering the A2 area is 0.8, which is the maximum probability prediction area in this trajectory. Therefore, the map resources in the A2 area are streamed. When the player enters the A2 area, the area resources are already loaded.
  • the dynamic prediction probability calculated by the dynamic loading strategy and the static prediction probability calculated by the static loading strategy will be calculated according to ⁇ and (1.
  • the weight of - ⁇ ) is used to calculate the weighted comprehensive prediction probability. If the predicted probability of the target area with the highest comprehensive predicted probability is lower than the trigger probability threshold, or if the player does not enter the predicted area (prediction failure), the traditional static loading strategy or the guaranteed loading timing method is adopted to ensure the correct experience for the player.
  • implementing a resource loading strategy in a large game scene area based on the player's historical behavior track data in the big map can improve the loading prediction accuracy and resource utilization rate, and make the game run more smoothly.
  • FIG. 7 schematically shows a schematic diagram of an optional map resource loading apparatus according to an embodiment of the present invention.
  • the apparatus may include a search unit 701 , a determination unit 703 and a loading unit 705 .
  • the search unit 701 is configured to determine the first area where the target character is currently located in the game map under the condition of satisfying the preloading condition of the game map, wherein the game map is divided into multiple areas, and the first area belongs to multiple areas,
  • the preloading condition is used to trigger the operation of selecting a preloading area from multiple areas, and the target character is a game character controlled by the user terminal.
  • the target character enters the first area from one of the plurality of areas, it is determined that the preloading condition of the game map is satisfied; when the target character reaches the target in the first area In the case of the location, it is determined that the preloading conditions of the game map are met; when the target character triggers a specific plot or a specific game mission, it is determined that the preloading conditions of the game map are met, wherein the first area exists with a specific plot or a specific game mission. association.
  • the determining unit 703 is used to obtain the result according to the historical trajectory of the game character, and determine the second area in the multiple areas according to the result, wherein the result is used to represent the area to be entered by the target character in the multiple areas obtained by using the historical trajectory,
  • the second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area.
  • the loading unit 705 is configured to load the map resource of the second area in the user terminal.
  • searching unit 701 in this embodiment may be used to perform step S202 in this embodiment of the present invention
  • determining unit 703 in this embodiment may be used to perform step S204 in this embodiment of the present invention
  • the loading unit 705 in can be used to perform step S206 in this embodiment of the present invention.
  • the above modules may run in the hardware environment as shown in FIG. 1 , and may be implemented by software or hardware.
  • the determining unit may be further configured to obtain a result according to the historical trajectory of the game character, and determine the second area in the plurality of areas according to the result, and use the historical trajectory for the plurality of areas
  • the third area to be entered by the target character in the three areas, and the second area is selected from the area set including the third area, wherein the area set further includes the result obtained when the target character satisfies the trigger condition in the first area Describe the area the target character is going to enter.
  • the determining unit may be further configured to, when using the third area in the plurality of areas of the historical trajectory to be entered by the target character, find out the sequence of the first areas that have passed through the first area sequence from the historical trajectory.
  • the first area sequence includes a plurality of map areas that the target character passes through in sequence, and the last map area in the first area sequence is the The first area; the area entered after passing through the first area according to the first target trajectory among the multiple areas is taken as the third area.
  • the determining unit may be further configured to use the historical track to use a third area to be entered by the target character in the plurality of areas, and select the area set including the third area.
  • the first probability and the second probability corresponding to each first candidate area in the area set are obtained.
  • the first probability is the first candidate determined according to the historical track.
  • the area is the probability of the area to be entered by the target character, and the second probability is that the first candidate area obtained when the target character satisfies the trigger condition in the first area is the target character the probability of entering the area; determine the first product between the first probability and the weight of the first probability, and the second product between the second probability and the weight of the second probability, The sum of the first product and the second product is used as the comprehensive probability of the first candidate region; the second region is selected from the region set according to the comprehensive probability.
  • the determining unit may be further configured to, when selecting the second region from the set of regions according to the integrated probability, select an integrated probability from the set of regions in the case that the integrated probability is greater than a target threshold The largest area is used as the second area; if the comprehensive probability is not greater than the target threshold, the area with the largest first probability is selected from the area set as the second area, or the area is selected from the area The region with the highest second probability in the set is selected as the second region.
  • the determining unit may be further configured to obtain the first probability corresponding to each first candidate region in the region set including determining the first probability corresponding to each of the first candidate regions in the following manner: obtaining a game character
  • the corresponding first and second times in some embodiments, the first number of times is the cumulative number of times the game character has passed all the first target trajectories, and the second number of times is the game character's cumulative pass times of all the first target trajectories.
  • the cumulative number of times of the first designated track in the track, the first designated track is the track that sequentially passes through each map area in the first region sequence and the current candidate area among all the first target tracks, and the current candidate track
  • the region is the currently processed candidate region in all the first candidate regions; the ratio between the second number of times and the first number of times is used as the first probability of the current candidate region.
  • the determining unit may be further configured to, after selecting the second area with the highest comprehensive probability from the area set, obtain the third area of the game character when the comprehensive probability is greater than the loading probability threshold.
  • the number of times and the fourth number of times in some embodiments, the third number of times is the cumulative number of times the game character passes through all the second target trajectories, and the third number of times is the second specified trajectory of the game character to all the second target trajectories.
  • the second target trajectory is a trajectory that has successively passed through each map area in the second area sequence in the historical trajectory, and the second area sequence includes a plurality of map areas that the target character has passed through in sequence And the last map area in the second area sequence is the second area, and the second designated trajectory is all the second target trajectories passing through each map area and the first area in the second area sequence in sequence.
  • the trajectory of two candidate regions, the second candidate region is the region adjacent to the second region among the multiple regions; the ratio between the fourth number of times and the third number of times is taken as the first The third probability of the second candidate area; determine the third product between the third probability and the weight of the third probability, and the fourth product between the fourth probability and the weight of the fourth probability, The sum of the product and the fourth product is used as the comprehensive probability of the second candidate region; the fourth region is selected from the plurality of second candidate regions according to the comprehensive probability, wherein the fourth region is the map resource to be loaded map area.
  • the determining unit may be further configured to obtain a result according to the historical trajectory of the game character, and after determining the second area in the plurality of areas according to the result, after the target character moves to the first area If the area boundary of the area is not the area boundary of the second area, determine a fifth area adjacent to the area boundary; load the map resource of the fifth area in the user terminal .
  • the above modules may run in the hardware environment as shown in FIG. 1 , and may be implemented by software or hardware, wherein the hardware environment includes a network environment.
  • a server or terminal for implementing the above method for loading map resources is also provided.
  • FIG. 8 schematically shows a structural block diagram of a terminal according to an embodiment of the present invention.
  • the terminal may include: one or more (only one is shown) a processor 801, a memory 803, As well as the transmission device 805, as shown in FIG. 8, the terminal may further include an input and output device 807.
  • the memory 803 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for loading map resources in the embodiments of the present invention.
  • the processor 801 executes the software programs stored in the memory 803 by running the software program and modules to perform various functional applications and data processing, that is, to implement the above-mentioned method for loading map resources.
  • Memory 803 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 803 may further include memory located remotely relative to the processor 801, and these remote memories may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the above-mentioned transmission device 805 is used for receiving or sending data via a network, and can also be used for data transmission between the processor and the memory.
  • Specific examples of the above-mentioned networks may include wired networks and wireless networks.
  • the transmission device 805 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable so as to communicate with the Internet or a local area network.
  • the transmission device 805 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • memory 803 is used to store application programs.
  • the processor 801 can call the application program stored in the memory 803 through the transmission device 805 to perform the following steps:
  • the first area in the game map where the target character is currently located is determined.
  • the game map is divided into multiple areas, the first area belongs to multiple areas, and the preloading The condition is used to trigger the operation of selecting a preloaded area from multiple areas, and the target character is the game character controlled by the user terminal;
  • the prediction result is obtained according to the historical trajectory of the game character, and the second area in the multiple areas is determined according to the prediction result.
  • the prediction result may be used to indicate the target character is to enter in the multiple areas predicted by using the historical trajectory.
  • area the second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area;
  • the processor 801 is further configured to perform the following steps:
  • the third and fourth times of the game character are obtained.
  • the third time is the cumulative number of times the game character passes through all the second target trajectories
  • the third time It is the cumulative number of times the game character has passed through the second specified trajectory in all second target trajectories.
  • the second target trajectory is the trajectory in the historical trajectory that has passed through each map area in the second area sequence
  • the second area sequence includes the target characters in sequence.
  • Multiple map areas that have passed through and the last map area in the second area sequence is the second area
  • the second designated track is all the second target trajectories that pass through each map area in the second area sequence and the second candidate area in turn.
  • the second candidate area is an area adjacent to the second area among the multiple areas;
  • a fourth area is selected from a plurality of the second candidate areas according to the comprehensive probability, wherein the fourth area is a map area to be loaded with a map resource.
  • FIG. 8 is for illustration only, and the terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a handheld computer, and a Mobile Internet Devices (MID), Terminal equipment such as PAD.
  • FIG. 8 does not limit the structure of the above electronic device.
  • the terminal may also include more or less components than those shown in FIG. 8 (eg, network interface, display device, etc.), or have a different configuration than that shown in FIG. 8 .
  • Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of the map resource loading apparatus according to the embodiment of the present invention.
  • DSP digital signal processor
  • the present invention can also be implemented as a program/instruction (e.g., computer program/instruction and computer program product) for an apparatus or apparatus for performing some or all of the methods described herein.
  • Such programs/instructions implementing the present invention may be stored on a computer readable medium, or may exist in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any form Available in other formats.
  • Embodiments of the present invention also provide a computer-readable medium.
  • the above-mentioned computer-readable medium can be used to execute the program code of the loading method of the map resource.
  • computer readable media including persistent and non-permanent, removable and non-removable media, can be implemented by any method or technology for information storage.
  • Information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • PRAM phase-change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM Electrically Erasable Programmable Read
  • FIG. 9 schematically shows a computer device that can implement the method for loading map resources according to the present invention.
  • the computer device includes a processor 910 and a computer-readable medium in the form of a memory 920 .
  • the memory 920 is an example of a computer-readable medium having a storage space 930 for storing the computer program 931 .
  • the computer program 931 is executed by the processor 910, each step in the method for loading map resources described above can be implemented.
  • Figure 10 schematically shows a block diagram of a computer program product implementing the method according to the invention.
  • the computer program product includes a computer program 1010 that, when executed by a processor such as the processor 910 shown in FIG. 9 , can implement the various steps in the above-described method for loading map resources .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Disclosed in the present invention are a map resource loading method and apparatus, a storage medium, and an electronic apparatus. The method comprises: when a preloading condition of a game map is satisfied, determining a first region, where a target character is currently located, in the game map, the game map being divided into multiple regions, the first region belonging to the multiple regions, the preloading condition being used for triggering execution of an operation of selecting a preloading region from the multiple regions, and the target character being a game character controlled by a user terminal; obtaining a prediction result according to a historical trajectory of the game character, and determining a second region among the multiple regions according to the prediction result, the prediction result being used for representing an region, where the target character is about to enter, among the multiple regions predicted by using the historical trajectory, the second region being an region where map resources are about to be loaded, and the second region being adjacent to the first region; and loading the map resources of the second region in the user terminal. The present invention solves the technical problem in the related art that the accuracy of map region loading is low.

Description

地图资源的加载方法和装置、存储介质、电子装置Map resource loading method and device, storage medium, and electronic device
交叉引用cross reference
本申请要求2021年3月31日递交、申请号为202110351734.4,发明名称为“地图资源的加载方法和装置、存储介质、电子装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on March 31, 2021, with the application number of 202110351734.4 and the title of the invention being "Map resource loading method and device, storage medium, and electronic device", the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本发明涉及计算机领域,尤其涉及一种地图资源的加载方法和装置、存储介质、电子装置。The present invention relates to the field of computers, and in particular, to a method and device for loading map resources, a storage medium, and an electronic device.
背景技术Background technique
随着现有游戏引擎技术的成熟、游戏研发厂商技术的精进以及游戏运行设备硬件水准的提高,越来越多的游戏类型,诸如大型多人在线角色扮演游戏、大型生存竞技游戏、大型开放世界游戏开始使用大型世界场景。大型世界场景也叫大地图,通常指长宽大于等于4公里的游戏中虚拟世界场景。当玩家所操作的角色身处于大型世界场景中,由于硬件的计算性能和存储性能的限制,往往不能将大地图中的相关资源(包括地形资源、场景中物件资源、天气资源、场景中角色资源等)同时全部加载。通常采用的方案是,将大地图按照区域分块,将其分为若干小的区域构成部分,在游戏运行的过程中根据玩家当前状态动态加载指定区域构成部分的资源的方式,这使得满足玩家体验的大地图资源加载管理得以实现。With the maturity of the existing game engine technology, the advancement of the technology of game developers and the improvement of the hardware level of game operating equipment, more and more game types, such as massively multiplayer online role-playing games, large-scale survival competitive games, large-scale open world The game starts with a large world scene. A large world scene is also called a big map, which usually refers to a virtual world scene in a game whose length and width are greater than or equal to 4 kilometers. When the character operated by the player is in a large world scene, due to the limitation of hardware computing performance and storage performance, it is often impossible to convert related resources in the large map (including terrain resources, object resources in the scene, weather resources, and character resources in the scene. etc.) are all loaded at the same time. The solution usually adopted is to divide the large map into several small regional components, and dynamically load the resources of the specified regional components according to the current state of the player during the running of the game. Experienced large map resource loading management is implemented.
以上部分介绍了大地图资源加载的技术实现方式,但更重要的是资源加载行为进行的时机以及对需要加载资源的子构成区域的选取。目前的选取方式较为固定,经常存在预加载的地图区域并不是玩家真实进入的区域。The above part introduces the technical implementation of large map resource loading, but what is more important is the timing of resource loading behavior and the selection of sub-component areas that need to load resources. The current selection method is relatively fixed, and there are often preloaded map areas that are not areas that players actually enter.
针对上述的问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种地图资源的加载方法和装置、存储介质、电子装置,以至少解决相关技术中地图区域加载的准确率较低的技术问题。The present invention provides a map resource loading method and device, a storage medium, and an electronic device, so as to at least solve the technical problem of low accuracy of map area loading in the related art.
根据本发明的一个方面,提供了一种地图资源的加载方法,包括:在满足游戏地图的预加载条件的情况下,确定游戏地图中目标角色当前所在的第一区域,其中,游戏地图被划分为多个区域,第一区域属于多个区域,预加载条件用于触发执行从多个区域中选择预加载区域的操作,目标角色是用户终端控制的游戏角色;根据游戏角色的历史轨迹得到预测结果,并根据预测结果确定多个区域中的第二区域,其中,预测结果用于表示利用历史轨迹预测得到的多个区域中目标角色待进入的区域,第二区域为待加载地图资源的区域,第二区域与第一区域相邻;在用户终端中加载第二区域的地图资源。According to an aspect of the present invention, a method for loading map resources is provided, comprising: under the condition that a preloading condition of a game map is satisfied, determining a first area in the game map where a target character is currently located, wherein the game map is divided into There are multiple areas, the first area belongs to multiple areas, the preloading condition is used to trigger the execution of the operation of selecting the preloading area from multiple areas, and the target character is the game character controlled by the user terminal; the prediction is obtained according to the historical trajectory of the game character result, and determine the second area in the multiple areas according to the prediction result, wherein the prediction result is used to indicate the area to be entered by the target character in the multiple areas predicted by using the historical trajectory, and the second area is the area to be loaded with map resources , the second area is adjacent to the first area; the map resource of the second area is loaded in the user terminal.
根据本发明的另一个方面,还提供了一种地图资源的加载装置,包括:查找单元,用于 在满足游戏地图的预加载条件的情况下,确定游戏地图中目标角色当前所在的第一区域,其中,游戏地图被划分为多个区域,第一区域属于多个区域,预加载条件用于触发执行从多个区域中选择预加载区域的操作,目标角色是用户终端控制的游戏角色;确定单元,用于根据游戏角色的历史轨迹得到预测结果,并根据预测结果确定多个区域中的第二区域,其中,预测结果用于表示利用历史轨迹预测得到的多个区域中目标角色待进入的区域,第二区域为待加载地图资源的区域,第二区域与第一区域相邻;加载单元,用于在用户终端中加载第二区域的地图资源。According to another aspect of the present invention, there is also provided a map resource loading device, comprising: a search unit, configured to determine the first area in the game map where the target character is currently located under the condition that the preloading condition of the game map is satisfied , wherein the game map is divided into multiple areas, the first area belongs to multiple areas, the preload condition is used to trigger the execution of the operation of selecting the preload area from the multiple areas, and the target character is the game character controlled by the user terminal; The unit is used to obtain the prediction result according to the historical trajectory of the game character, and determine the second area in the plurality of areas according to the prediction result, wherein the prediction result is used to indicate that the target character is to enter in the plurality of areas predicted by the historical trajectory. area, the second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area; the loading unit is used for loading the map resource of the second area in the user terminal.
根据本发明的又一个方面,还提供了一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的方法的步骤。According to yet another aspect of the present invention, there is also provided a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the above-mentioned method.
根据本发明的再一个方面,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行所述计算机程序时实现上述的方法的步骤。According to yet another aspect of the present invention, an electronic device is also provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the above-mentioned method when the computer program is executed. step.
根据本发明的再一个方面,还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现上述的方法的步骤。According to another aspect of the present invention, there is also provided a computer program product, comprising a computer program, which implements the steps of the above-mentioned method when the computer program is executed by a processor.
本发明的有益效果为:考虑到随着游戏运营时间的推移以及玩家总数的增多,玩家们所操控的角色在该大地图上的群体行为轨迹路线会越发呈现集中性和规律性,通过上述技术方案,可利用历史轨迹来确定符合以上规律的结果,进而确定玩家即将进入的区域,可以解决相关技术中地图区域加载的准确率较低的技术问题。The beneficial effects of the present invention are: considering that with the passage of the game operation time and the increase of the total number of players, the group behavior trajectories of the characters controlled by the players on the big map will become more concentrated and regular. In the solution, the historical trajectory can be used to determine the results that conform to the above rules, and then the area that the player is about to enter can be determined, which can solve the technical problem of low accuracy of map area loading in the related art.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,本发明的上述及各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。在附图中:The above and various other advantages and benefits of the present invention will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. In the attached image:
图1示意性地示出了根据本发明一个实施例的地图资源的加载方法的硬件环境的示意图;FIG. 1 schematically shows a schematic diagram of a hardware environment of a method for loading map resources according to an embodiment of the present invention;
图2示意性地示出了根据本发明一个实施例的一种可选的地图资源的加载方法的流程图;FIG. 2 schematically shows a flowchart of an optional map resource loading method according to an embodiment of the present invention;
图3示意性地示出了根据本发明一个实施例的一种可选的地图资源的示意图;FIG. 3 schematically shows a schematic diagram of an optional map resource according to an embodiment of the present invention;
图4示意性地示出了根据本发明一个实施例的一种可选的地图资源加载方案的示意图;FIG. 4 schematically shows a schematic diagram of an optional map resource loading solution according to an embodiment of the present invention;
图5示意性地示出了根据本发明一个实施例的一种可选的地图资源加载方案的示意图;FIG. 5 schematically shows a schematic diagram of an optional map resource loading solution according to an embodiment of the present invention;
图6示意性地示出了根据本发明一个实施例的一种可选的历史轨迹的示意图;FIG. 6 schematically shows a schematic diagram of an optional historical track according to an embodiment of the present invention;
图7示意性地示出了根据本发明一个实施例的一种可选的地图资源的加载装置的示意图;以及,FIG. 7 schematically shows a schematic diagram of an optional map resource loading apparatus according to an embodiment of the present invention; and,
图8示意性地示出了根据本发明一个实施例的一种终端的结构框图;FIG. 8 schematically shows a structural block diagram of a terminal according to an embodiment of the present invention;
图9示意性地示出了用于实现根据本发明的方法的计算机设备的框图;以及Figure 9 schematically shows a block diagram of a computer device for implementing the method according to the invention; and
图10示意性地示出了实现根据本发明的方法的计算机程序产品的框图。Figure 10 schematically shows a block diagram of a computer program product implementing the method according to the invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二” 等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
发明人经过对相关技术进行分析认识到,相关技术中的大地图区域资源加载模式是由游戏研发者设计的,这种加载策略是时间不相关的静态策略。以静态加载策略为主的大地图区域资源的加载模式存在一些难以平衡的缺陷:譬如,若游戏设计者将该策略设计得相对保守(如采用稳健又低资源浪费的触发机制),则地图区域资源加载会相对滞后;若该策略设计得相对激进(即可轻易的触发资源加载),则地图区域资源加载会造成很高概率的浪费,因为玩家接下来进入该加载好的区域的概率相对较小。After analyzing the related technology, the inventor realized that the large map area resource loading mode in the related art is designed by the game developer, and this loading strategy is a time-independent static strategy. The loading mode of resources in the large map area based on the static loading strategy has some defects that are difficult to balance: for example, if the game designer designs the strategy to be relatively conservative (such as using a stable trigger mechanism with low resource waste), the map area Resource loading will be relatively lag; if the strategy is designed to be relatively aggressive (that can easily trigger resource loading), resource loading in the map area will cause a high probability of waste, because the probability of players entering the loaded area is relatively high. Small.
考虑到随着游戏运营时间的推移以及玩家总数的增多,玩家们所操控的角色在该大地图上的群体行为轨迹路线会越发呈现集中性和规律性,而该规律数据与游戏研发者设计的加载策略往往会存在一定的偏差,并且该偏差并不会实时作为加载策略的修正输入产生负反馈,因此偏差并不会自发被修正,目前的策略缺乏动态自我改良修正的能力。Considering that with the passage of game operation time and the increase of the total number of players, the group behavior trajectories of the characters controlled by the players on the big map will become more concentrated and regular. The loading strategy often has a certain deviation, and the deviation will not generate negative feedback as the correction input of the loading strategy in real time, so the deviation will not be corrected spontaneously, and the current strategy lacks the ability to dynamically self-improve and correct.
为了克服以上问题,根据本发明实施例的一方面,提供了一种地图资源的加载方法的方法实施例。In order to overcome the above problems, according to an aspect of the embodiments of the present invention, a method embodiment of a method for loading a map resource is provided.
在一些实施方式中,上述方法可以应用于如图1所示的由终端101和服务器103所构成的硬件环境中。如图1所示,服务器103通过网络与终端101进行连接,可用于为终端或终端上安装的客户端提供服务(如游戏服务等),可在服务器上或独立于服务器设置数据库105,用于为服务器103提供数据存储服务,上述网络包括但不限于:广域网、城域网或局域网,终端101并不限定于PC、手机、平板电脑等。In some embodiments, the above method can be applied to the hardware environment composed of the terminal 101 and the server 103 as shown in FIG. 1 . As shown in FIG. 1 , the server 103 is connected to the terminal 101 through the network, which can be used to provide services (such as game services, etc.) for the terminal or the client installed on the terminal, and the database 105 can be set on the server or independently from the server, for To provide data storage services for the server 103, the above-mentioned networks include but are not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like.
依据本发明实施例的方法可以由服务器103来执行,也可以由终端101来执行,还可以是由服务器103和终端101共同执行。后续以上述方法在终端上运行为例进行说明,终端101执行依据本发明实施例的方法也可以是由安装在其上的客户端来执行。The method according to the embodiment of the present invention may be executed by the server 103 , may also be executed by the terminal 101 , or may be executed jointly by the server 103 and the terminal 101 . The following description will be given by taking the above method running on a terminal as an example. The terminal 101 may also execute the method according to the embodiment of the present invention by a client installed on the terminal 101 .
图2示意性地示出了根据本发明一个实施例的一种可选的地图资源的加载方法的流程图,如图2所示,该方法可以包括步骤S202、步骤S204和步骤S206。Fig. 2 schematically shows a flowchart of an optional map resource loading method according to an embodiment of the present invention. As shown in Fig. 2, the method may include step S202, step S204 and step S206.
在步骤S202,在满足游戏地图的预加载条件的情况下,确定游戏地图中目标角色当前所在的第一区域,目标角色是用户终端控制的游戏角色。用户终端上安装有游戏应用的游戏客户端,玩家可通过游戏客户端控制游戏场景中的游戏角色。上述预加载条件用于触发执行从多个区域中选择预加载区域的操作(即后续步骤对应的操作)。In step S202, when the preloading condition of the game map is satisfied, the first area in the game map where the target character is currently located is determined, and the target character is the game character controlled by the user terminal. The game client of the game application is installed on the user terminal, and the player can control the game characters in the game scene through the game client. The above preloading condition is used to trigger the execution of an operation of selecting a preloading area from a plurality of areas (ie, an operation corresponding to a subsequent step).
在步骤S204,根据游戏角色的历史轨迹得到预测结果,并根据预测结果确定多个区域中的第二区域,预测结果用于表示利用历史轨迹预测得到的多个区域中目标角色待进入的区域,第二区域为待加载地图资源的区域,第二区域与第一区域相邻。In step S204, a prediction result is obtained according to the historical trajectory of the game character, and a second area in the plurality of areas is determined according to the prediction result, and the prediction result is used to indicate the area to be entered by the target character in the plurality of areas predicted by the historical trajectory, The second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area.
在根据预测结果确定多个区域中的第二区域时,可以直接将预测结果预测的区域作为第二区域;也可以综合考虑预测结果预测的区域和按照静态加载策略确定的区域,进而确定第二区 域。When determining the second region among the multiple regions according to the prediction result, the region predicted by the prediction result can be directly used as the second region; or the region predicted by the prediction result and the region determined according to the static loading strategy can be comprehensively considered to determine the second region. area.
上述游戏角色的历史轨迹包括以下几种情况:1)该游戏角色表示所有游戏角色,即所有游戏角色的轨迹均可作为历史轨迹;2)该游戏角色表示目标角色,即只将目标角色的轨迹作为历史轨迹;3)该游戏角色表示目标角色的同类角色,即只将目标角色的同类角色的轨迹作为历史轨迹。The historical trajectory of the above-mentioned game character includes the following situations: 1) the game character represents all game characters, that is, the trajectory of all game characters can be used as the historical trajectory; 2) the game character represents the target character, that is, only the trajectory of the target character is used. As a historical track; 3) The game character represents a similar character of the target character, that is, only the trajectory of the similar character of the target character is used as a historical track.
确定目标角色的同类角色时,可以确定游戏角色在多个特征维度(如地域、角色类型、角色属性等)上的特征值,该特征值可以为在向量空间进行映射得到的向量值,每个特征维度对应有一个权重,所有特征维度对应的权重之和为1;按照如下公式计算每个游戏角色与目标角色的相似度P,
Figure PCTCN2021122122-appb-000001
n表示多个特征维度的个数,k i表示第i个特征维度的权重,M i表示目标角色在第i个特征维度上的特征值,N i表示游戏角色在第i个特征维度上的特征值,f(M i,N i)表示目标角色在第i个特征维度上与游戏角色之间的欧式距离,对于计算出来的P,当P小于某个阈值(如0.2)时,相当于该游戏角色与目标角色相似,是同类角色,否则不是。
When determining similar characters of the target character, the eigenvalues of the game character in multiple feature dimensions (such as region, character type, character attribute, etc.) can be determined, and the eigenvalues can be vector values obtained by mapping in the vector space. The feature dimension corresponds to a weight, and the sum of the weights corresponding to all feature dimensions is 1; the similarity P between each game character and the target character is calculated according to the following formula,
Figure PCTCN2021122122-appb-000001
n represents the number of multiple feature dimensions, ki represents the weight of the ith feature dimension, M i represents the feature value of the target character on the ith feature dimension, and N i represents the value of the game character on the ith feature dimension Eigenvalue, f(M i ,N i ) represents the Euclidean distance between the target character and the game character in the ith feature dimension. For the calculated P, when P is less than a certain threshold (such as 0.2), it is equivalent to The game character is similar to the target character and is of the same kind, otherwise it is not.
在步骤S206,在用户终端中加载第二区域的地图资源。In step S206, the map resource of the second area is loaded in the user terminal.
考虑到随着游戏运营时间的推移以及玩家总数的增多,玩家们所操控的角色在该大地图上的群体行为轨迹路线会越发呈现集中性和规律性,通过上述技术方案,可利用历史轨迹来确定符合以上规律的结果,进而确定玩家即将进入的区域,可以解决相关技术中地图区域加载的准确率较低的技术问题。Considering that with the passage of game operation time and the increase of the total number of players, the group behavior trajectories of the characters controlled by the players on the big map will become more concentrated and regular. Determining the results conforming to the above rules, and then determining the area that the player is about to enter, can solve the technical problem of low accuracy of map area loading in the related art.
针对大地图区域资源加载的场景,本方案主要解决如何预测及加载用户下一步要使用的地图区域资源,且相对于相关技术中的静态加载策略,加入了玩家历史轨迹数据对加载策略的实时动态反馈修正,从而提升了大地图区域资源加载的预测准确率和资源使用率。For the scene of resource loading in the large map area, this solution mainly solves how to predict and load the map area resources that the user will use in the next step. Compared with the static loading strategy in related technologies, the real-time dynamic of the player's historical trajectory data on the loading strategy is added. Feedback correction to improve the prediction accuracy and resource usage rate of resource loading in the large map area.
在另一些实施方式中,本发明的地图资源的加载方法可以包括如下步骤1、步骤2、步骤3和步骤4,下文将结合具体步骤进一步详述本发明的技术方案。In other embodiments, the method for loading map resources of the present invention may include the following steps 1, 2, 3 and 4, and the technical solution of the present invention will be further described in detail below with reference to the specific steps.
在步骤1,将游戏场景的游戏地图划分为多个区域,例如,可以将游戏地图划分为如图3所示的多个方框区域。In step 1, the game map of the game scene is divided into multiple areas, for example, the game map can be divided into multiple box areas as shown in FIG. 3 .
在步骤2,在玩家操控游戏角色进行游戏的过程中,在满足游戏地图的预加载条件的情况下,确定游戏地图中目标角色当前所在的第一区域。In step 2, when the player controls the game character to play the game, in the case of satisfying the preloading condition of the game map, determine the first area in the game map where the target character is currently located.
预加载条件包括但不局限于如下几种:在目标角色从多个区域中的一个区域进入第一区域的情况下,确定满足游戏地图的预加载条件;在目标角色到达第一区域中的目标位置(如进入第一区域的深度达到某个特定深度、靠近区域边缘)的情况下,确定满足游戏地图的预加载条件;在目标角色触发特定剧情或者特定游戏任务的情况下,确定满足游戏地图的预加载条件,第一区域与特定剧情或者特定游戏任务存在关联,例如,特定剧情或者特定游戏任务是在一系列区域中展开的,而这一系列区域包括第一区域。The preloading conditions include but are not limited to the following: when the target character enters the first area from one of the multiple areas, it is determined that the preloading conditions of the game map are satisfied; when the target character reaches the target in the first area When the location (for example, the depth of entering the first area reaches a certain depth or near the edge of the area), it is determined that the preloading conditions of the game map are satisfied; when the target character triggers a specific plot or a specific game mission, it is determined that the game map is satisfied. In the preloading condition, the first region is associated with a specific plot or a specific game task, for example, the specific plot or a specific game task is developed in a series of regions, and the series of regions includes the first region.
在步骤3,触发地图加载策略,以确定待加载地图资源的第二区域。In step 3, the map loading strategy is triggered to determine the second area of the map resource to be loaded.
如图4所示,地图加载策略包括动态加载策略和/或静态加载策略,即此处可以单独使用静态加载策略或动态加载策略,也可以使用二者结合的综合加载策略。As shown in FIG. 4 , the map loading strategy includes a dynamic loading strategy and/or a static loading strategy, that is, a static loading strategy or a dynamic loading strategy may be used alone here, or a combined loading strategy of the two may be used.
方案一,单独运行静态加载策略Option 1, run the static loading strategy separately
在静态加载策略下,当玩家操控的角色进入当前区域时,往往需要进行若干操作,如触 发游戏研发者提前安排好的埋点,或是完成指定任务等,往往触发时机较为滞后。如在指定位置放置触发器和埋点,当玩家进入该触发器区域之后,则触发指定地图区域资源的加载;根据当前摄像机距离指定区域边界的距离,决定该区域资源加载的细节层级;根据玩家操控角色的等级和游戏任务的完成状况制定一系列触发条件。但是,随着时间的推移,玩家在游戏中的行为的累积并不会影响游戏研发者制定的加载策略。Under the static loading strategy, when the character controlled by the player enters the current area, it often needs to perform several operations, such as triggering the buried point arranged in advance by the game developer, or completing the specified task, etc. The trigger timing is often delayed. For example, if a trigger and a buried point are placed at a specified position, when the player enters the trigger area, the loading of resources in the specified map area will be triggered; according to the distance between the current camera and the boundary of the specified area, the detail level of the resource loading in the area will be determined; according to the player A series of trigger conditions are established by manipulating the character's level and the completion of game tasks. However, over time, the accumulation of player behavior in the game does not affect the loading strategy developed by the game developer.
方案二,单独运行动态加载策略Option 2, run the dynamic loading strategy separately
当玩家操作的角色在当前区域中触发加载预测区域资源的时机时,如图5所示,根据该游戏全部玩家或者玩家本人在该大地图中的历史轨迹数据,按照相同轨迹次数权重筛选出最大概率的未来路线,当该最大概率大于等于预设的加载概率阈值时,则按照该轨迹路线预测出下一个区域并提前进行资源加载行为,具体的使用动态加载策略的实现方式可以参考方案三中的描述。When the character operated by the player triggers the timing of loading the resources of the predicted area in the current area, as shown in Figure 5, according to the historical trajectory data of all players in the game or the player himself in the big map, the largest number of trajectories is selected according to the weight of the same trajectory times. Probabilistic future route. When the maximum probability is greater than or equal to the preset loading probability threshold, the next area is predicted according to the trajectory route and the resource loading behavior is performed in advance. For the specific implementation method of using the dynamic loading strategy, please refer to Scheme 3. description of.
方案三,运行综合加载策略Option 3: Run a comprehensive loading strategy
综合加载策略采用了动态加载策略和静态加载策略相结合的方式实现地图区域资源的加载,总体实现框架如图4所示,在综合加载策略中,可利用玩家的历史操作数据(即历史轨迹对应的数据)和大地图区域分割方式确定玩家在大地图中的行动轨迹,从而依据行动轨迹动态强化修正区域资源加载策略,判断并加载玩家未来将要使用的区域资源。该方案可以通过如下步骤31、步骤32和步骤33实现:The comprehensive loading strategy adopts a combination of dynamic loading strategy and static loading strategy to realize the loading of map area resources. The overall implementation framework is shown in Figure 4. In the comprehensive loading strategy, the player's historical operation data (that is, the historical trajectory corresponding to data) and the division method of the big map area to determine the player's action trajectory in the big map, so as to dynamically strengthen and correct the regional resource loading strategy according to the action trajectory, and determine and load the regional resources that the player will use in the future. The solution can be implemented through the following steps 31, 32 and 33:
在步骤31,运行动态加载策略,利用历史轨迹预测多个区域中目标角色待进入的第三区域。In step 31, the dynamic loading strategy is run, and the third area to be entered by the target character in the multiple areas is predicted by using the historical trajectory.
从历史轨迹中查找依次经过了第一区域序列中各个地图区域的第一目标轨迹,第一区域序列中包括目标角色依次经过的多个地图区域且第一区域序列中的最后一个地图区域为第一区域;将多个区域中按照第一目标轨迹经过第一区域后进入的区域作为第三区域。Find the first target track that has passed through each map area in the first area sequence from the historical track. The first area sequence includes multiple map areas that the target character passes through in sequence, and the last map area in the first area sequence is the first area sequence. An area; the area entered after passing through the first area according to the first target trajectory among the multiple areas is taken as the third area.
可先确定最大历史步长,即第一区域和在第一区域前经过的连续区域的个数,这些连续区域可以用第一区域序列表示,如图6所示,如第一区域序列中包括目标角色依次经过的多个地图区域为D 0、C 0、C 1、B 1,确定历史轨迹中依次经过了第一区域序列中各个区域的轨迹为第一目标轨迹,第一目标轨迹可以包括多条,这多条第一目标轨迹的区别在于在经过第一区域后经过的下一区域(也即第一候选区域)不同,如从B 1可能进入的第三区域有A 2、C 2The maximum historical step size can be determined first, that is, the first area and the number of continuous areas that pass before the first area. These continuous areas can be represented by the first area sequence, as shown in Figure 6, as the first area sequence includes The multiple map areas that the target character passes through in sequence are D 0 , C 0 , C 1 , and B 1 , and it is determined that the track that has passed through each area in the first region sequence in the historical track is the first target track, and the first target track may include The difference between these multiple first target trajectories is that the next area (that is, the first candidate area) that passes through the first area is different. For example, the third area that may enter from B 1 is A 2 , C 2 .
在步骤32,在目标角色在第一区域中满足静态加载策略的触发条件时得到目标角色待进入的第六区域。In step 32, when the target character satisfies the triggering condition of the static loading strategy in the first area, a sixth area to be entered by the target character is obtained.
在步骤33,从包括第三区域和第六区域的区域集合中选出第二区域。In step 33, the second area is selected from the area set including the third area and the sixth area.
在一些实施方式中,步骤33还可以包括如下步骤331、步骤332、步骤333和步骤334。In some embodiments, step 33 may further include the following steps 331 , 332 , 333 and 334 .
在步骤331,根据历史轨迹确定的第一候选区域为目标角色的待进入区域的第一概率。In step 331, the first candidate area determined according to the historical track is the first probability that the target character is to enter the area to be entered.
若存在多个第一候选区域(每个第一候选区域相当于对应一条第一目标轨迹),对于每个第一目标轨迹,在计算其第一概率时,可获取游戏角色的第一次数(即游戏角色对所有第一目标轨迹的累积经过次数)和第二次数,第二次数为游戏角色对所有第一目标轨迹中第一指定轨迹(即当前待计算第一概率的第一目标轨迹)的累积经过次数;将第二次数与第一次数之间的比值作为当前候选区域的第一概率。If there are multiple first candidate regions (each first candidate region corresponds to a first target trajectory), for each first target trajectory, when calculating its first probability, the first number of times the game character can be obtained (that is, the cumulative number of times the game character has passed through all the first target trajectories) and the second number of times, where the second number of times is the first specified trajectory of the game character to all the first target trajectories (that is, the first target trajectory for which the first probability is currently to be calculated) ) of the accumulated times; the ratio between the second times and the first times is taken as the first probability of the current candidate area.
例如,当玩家操作的角色在当前区域中触发加载预测区域资源的时机时,当前区域同时 与最多8块区域(这8个区域相当于第三区域,实际过程中第三区域可能只是部分邻接的区域)邻接,如图6所示的B 1周围的八个区域,按照上文方式根据动态加载策略计算出即将进入的所有邻接区域的预测概率,如历史轨迹中,从B 1可能进入的第三区域有A 2的次数为2次,从B 1可能进入的第三区域有C 2的次数为8次,那么前者的概率为20%,后者的概率为80%。 For example, when the character operated by the player triggers the timing of loading the predicted area resources in the current area, the current area is simultaneously connected to a maximum of 8 areas (these 8 areas are equivalent to the third area, and the third area may only be partially adjacent in the actual process). area) adjacent, as shown in Figure 6, the eight areas around B 1 , according to the dynamic loading strategy in the above way to calculate the predicted probability of all adjacent areas to enter, such as in the historical trajectory, the first possible entry from B 1 The number of times that the three areas have A 2 is 2, and the number of times that the third area that may be entered from B 1 has C 2 is 8 times, then the probability of the former is 20%, and the probability of the latter is 80%.
在步骤332,在目标角色在第一区域中满足触发条件时得到第一候选区域为目标角色的待进入区域的第二概率。In step 332, when the target character satisfies the trigger condition in the first area, a second probability that the first candidate area is the area to be entered by the target character is obtained.
可根据静态加载策略(游戏研发者制定的常用加载策略,包括埋点触发或者任务状态等)计算出即将进入的所有邻接区域的概率。The probability of entering all adjacent areas can be calculated according to the static loading strategy (common loading strategies formulated by game developers, including buried point triggering or task status, etc.).
在步骤333,确定第一概率与第一概率的权重α之间的第一乘积、第二概率与第二概率的权重(1-α)之间的第二乘积,将第三乘积与第四乘积之和作为第一候选区域的综合预测概率。In step 333, the first product between the first probability and the weight α of the first probability, the second product between the second probability and the weight (1-α) of the second probability are determined, and the third product and the fourth The sum of the products is used as the comprehensive predicted probability of the first candidate region.
在步骤334,根据综合预测概率从区域集合中选择出第二区域。At step 334, a second region is selected from the set of regions according to the comprehensive predicted probability.
可在所述综合预测概率大于目标阈值(目标阈值小于加载概率阈值,可为80%)的情况下,从所述区域集合中选择综合预测概率最大的区域作为所述第二区域,即将两套概率数据分别按照α和(1-α)的策略权重计算出综合预测概率,选出其中综合预测概率最大的目标区域(即第二区域)。When the comprehensive prediction probability is greater than the target threshold (the target threshold is smaller than the loading probability threshold, which can be 80%), the region with the largest comprehensive prediction probability may be selected from the region set as the second region, that is, two sets of The probability data calculates the comprehensive prediction probability according to the strategy weights of α and (1-α) respectively, and selects the target area (ie the second area) with the largest comprehensive prediction probability.
在综合预测概率不大于目标阈值的情况下,从区域集合中选择第一概率最大的区域作为第二区域,或从区域集合中选择第二概率最大的区域作为第二区域,也可从所有第一概率和第二概率中选择最大概率对应的区域为第二区域。In the case that the comprehensive prediction probability is not greater than the target threshold, the region with the highest first probability is selected from the region set as the second region, or the region with the second largest probability is selected from the region set as the second region, or it can be selected from all the first regions. The region corresponding to the largest probability among the first probability and the second probability is selected as the second region.
运行动态加载策略,根据游戏角色的历史轨迹得到预测结果,预测结果表示利用历史轨迹预测得到的多个区域中目标角色待进入的第三区域,并从第三区域中选择一个作为第二区域,如选择其中预测概率最高的一个。Run the dynamic loading strategy, and obtain the prediction result according to the historical trajectory of the game character. The prediction result represents the third area that the target character will enter among the multiple areas predicted by the historical trajectory, and select one of the third areas as the second area. For example, choose the one with the highest predicted probability.
需要说明的是,考虑到用户的行为轨迹会呈现规律性,如一段时间内会到指定位置参加特定活动,而该活动结束后用户的行为会发生变化,因此,前一段时间的规律可能就不适用于后一段时间的预测。权重α在初始时是一个固定值(如0.5),可以随着时间的变化进行如下调整:It should be noted that, considering that the user's behavioral trajectory will show regularity, for example, he will go to a designated location to participate in a specific activity for a period of time, and the user's behavior will change after the activity ends. Therefore, the regularity of the previous period may not be the same. Applies to forecasts for a later period of time. The weight α is initially a fixed value (such as 0.5) and can be adjusted over time as follows:
获取前一段时间(如前一周)的预测准确率:预测准确率=动态加载策略预测的结果与综合加载策略预测的结果一致的次数/总预测次数;若预测准确率达到一定阈值(如80%),则增加权重α的数值(如+0.1);若预测准确率在某个范围内(如50%-80%),则保持权重α的数值;若预测准确率低于一定阈值(如50%),则降低权重α的数值(如-0.1)。Obtain the prediction accuracy rate of the previous period (such as the previous week): prediction accuracy rate = the number of times that the results predicted by the dynamic loading strategy are consistent with the results predicted by the comprehensive loading strategy/the total number of prediction times; if the prediction accuracy rate reaches a certain threshold (such as 80%) ), increase the value of the weight α (eg +0.1); if the prediction accuracy is within a certain range (eg 50%-80%), keep the value of the weight α; if the prediction accuracy is lower than a certain threshold (eg 50 %), then reduce the value of the weight α (such as -0.1).
相对于静态加载策略,综合加载策略下的资源加载行为,由于对玩家接下来将要进入的区域有更好的预测,因此可以更早地进行预测区域的资源加载行为,综合加载策略下的资源加载行为的触发时机按照时机提前或滞后的水准,包括但不局限于如下三种。Compared with the static loading strategy, the resource loading behavior under the comprehensive loading strategy has a better prediction of the area that the player will enter next, so the resource loading behavior of the predicted area can be predicted earlier, and the resource loading under the comprehensive loading strategy can be loaded. The trigger timing of the behavior is based on the level of timing advance or lag, including but not limited to the following three.
第一种是玩家操控的角色进入当前区域时,即进行触发计算并加载下一预测区域的资源。该方案加载时机最靠前,优势是拥有最充足的时长来缓慢加载区域,使得该加载过程中计算性能开支最小,对玩家操作体验影响最小。但该时机代表α=100%,是百分之百的动态加载策略,缺少静态加载策略作为决策辅助。The first is that when the character controlled by the player enters the current area, the trigger calculation is performed and the resources of the next predicted area are loaded. The loading time of this solution is the earliest, and the advantage is that it has the most sufficient time to slowly load the area, so that the computing performance cost during the loading process is minimal, and the impact on the player's operating experience is minimal. However, this timing represents α=100%, which is a 100% dynamic loading strategy and lacks a static loading strategy as a decision aid.
第二种是当玩家操控的角色进入当前区域,并且相对于进入点的位移超过了指定阈值(比如该正方形区域的对角线长度的0.5倍)时,即进行触发计算并加载下一预测区域的资源。该方 案加载时机适中,拥有相对长的时长来加载区域,使得该加载过程中计算性能开支和对玩家操作体验影响适中。该时机代表α<100%,在动态加载策略的预测概率基础上,加入了静态加载策略进行概率修正。The second is when the character controlled by the player enters the current area and the displacement relative to the entry point exceeds a specified threshold (such as 0.5 times the diagonal length of the square area), the trigger calculation is performed and the next prediction area is loaded. Resources. The loading timing of this scheme is moderate, and it has a relatively long time to load the area, so that the computing performance cost and the impact on the player's operating experience during the loading process are moderate. This timing represents α<100%. On the basis of the predicted probability of the dynamic loading strategy, the static loading strategy is added to correct the probability.
第三种是当玩家离开当前区域时,即进行触发计算并加载下一预测区域的资源。该方案作为保底方案,加载时机之后,拥有最少的时间来加载目标区域,玩家体验相对不好。但是该处理时机的优势是预测正确率达到了100%,所以可以作为保底方案。The third is that when the player leaves the current area, the trigger calculation is performed and the resources of the next prediction area are loaded. This solution is a guaranteed solution. After the loading time, it has the least time to load the target area, and the player experience is relatively poor. However, the advantage of this processing timing is that the prediction accuracy rate reaches 100%, so it can be used as a bottom-line solution.
综上,游戏开发者可以根据地图的具体情况选择第一种加第三种触发时机保底的方案、或是第二种加第三种触发时机保底的方案。To sum up, game developers can choose the first solution plus the third trigger timing guarantee or the second plus the third trigger timing guarantee according to the specific situation of the map.
在步骤4,在用户终端中加载第二区域的地图资源。In step 4, the map resource of the second area is loaded in the user terminal.
在一些实施方式中,本发明的地图资源的加载方法还可以包括步骤5,在从多个区域中选择综合预测概率最高的为第二区域之后,当综合最大预测概率大于等于预设的加载概率阈值(如90%)时,则按照该轨迹路线预测出下一个区域并提前进行资源加载操作(具体的实现方式可以参考上文)。In some embodiments, the method for loading map resources of the present invention may further include step 5: after selecting the second region with the highest comprehensive prediction probability from the plurality of regions, when the comprehensive maximum prediction probability is greater than or equal to a preset loading probability When the threshold value (such as 90%) is reached, the next area is predicted according to the trajectory and the resource loading operation is performed in advance (for the specific implementation, please refer to the above).
在一些实施方式中,步骤5还可以包括如下步骤51、步骤52、步骤53和步骤54。In some embodiments, step 5 may further include the following steps 51 , 52 , 53 and 54 .
在步骤51,获取游戏角色的第三次数和第四次数,第三次数为游戏角色对所有第二目标轨迹的累积经过次数,第三次数为游戏角色对所有第二目标轨迹中第二指定轨迹的累积经过次数,第二目标轨迹为历史轨迹中依次经过了第二区域序列中各个地图区域的轨迹,第二区域序列中包括目标角色依次经过的多个地图区域且第二区域序列中的最后一个地图区域为第二区域,第二指定轨迹为所有第二目标轨迹中依次经过第二区域序列中的各个地图区域和第二候选区域的轨迹,第二候选区域为多个区域中与第二区域相邻的区域。In step 51, the third and fourth times of the game character are obtained, where the third time is the cumulative number of times the game character has passed through all the second target trajectories, and the third time is the second designated trajectory of the game character to all the second target trajectories. The second target trajectory is the trajectory that has passed through each map area in the second area sequence in the historical trajectory, and the second area sequence includes multiple map areas that the target character passes through in sequence and the last one in the second area sequence. One map area is the second area, the second specified track is the track of all the second target trajectories passing through each map area in the second area sequence and the second candidate area in sequence, and the second candidate area is the second candidate area among the multiple areas. Regions that are adjacent to each other.
在步骤52,将第四次数与第三次数之间的比值作为第二候选区域的第三概率。In step 52, the ratio between the fourth time and the third time is used as the third probability of the second candidate region.
在步骤53,确定第三概率与第三概率的权重之间的第三乘积、第四概率与第四概率的权重之间的第四乘积,将第三乘积与第四乘积之和作为第二候选区域的综合预测概率。In step 53, a third product between the third probability and the weight of the third probability, and a fourth product between the fourth probability and the weight of the fourth probability are determined, and the sum of the third product and the fourth product is used as the second product The overall predicted probability of the candidate region.
在步骤54,根据综合预测概率从多个第二候选区域中选择第四区域,第四区域为待加载地图资源的地图区域,此处第四区域的选择方式与第二区域的选择方式类似。In step 54, a fourth region is selected from the plurality of second candidate regions according to the comprehensive prediction probability, where the fourth region is a map region to be loaded with map resources, and the selection method of the fourth region is similar to that of the second region.
在另一些实施方式中,本发明的地图资源的加载方法还可以包括步骤6,在根据游戏角色的历史轨迹得到预测结果,并根据预测结果确定多个区域中的第二区域之后,在目标角色移动至第一区域的区域边界且区域边界不是第二区域的区域边界的情况下,即预测错误的情况下,采用如下方案进行兜底:确定与区域边界相邻的第五区域;在用户终端中加载第五区域的地图资源。In other embodiments, the method for loading map resources of the present invention may further include step 6: after obtaining the prediction result according to the historical trajectory of the game character, and determining the second area in the multiple areas according to the prediction result, the target character In the case of moving to the area boundary of the first area and the area boundary is not the area boundary of the second area, that is, in the case of an error in prediction, the following scheme is adopted to make a bottom line: determine the fifth area adjacent to the area boundary; in the user terminal Load the map resource of the fifth area.
由前述关于相关技术的分析可以看出,地图区域资源加载最终是服务于玩家在地图中的穿行位移体验,但是整个策略的制定却未采纳玩家的实际操作和使用数据。那么,使用玩家在大地图中的实际行为轨迹数据来反馈到大地图区域资源加载策略,以此来提升加载的预测准确率和资源使用率,具有较高的应用意义。It can be seen from the aforementioned analysis of related technologies that the loading of resources in the map area ultimately serves the player's experience of moving through the map, but the actual operation and usage data of the player is not adopted in the formulation of the entire strategy. Then, using the player's actual behavioral trajectory data in the big map to feed back the resource loading strategy of the big map area, so as to improve the loading prediction accuracy and resource utilization rate, has high application significance.
作为一种可选的实施例,下文结合具体实施方式进一步详述本发明的技术方案:As an optional embodiment, the technical solution of the present invention is further described in detail below in conjunction with the specific embodiments:
针对动态加载策略中玩家历史行为轨迹数据模型和处理存储,对于一张特定的大地图,其玩家历史轨迹数据是所有玩家或当前玩家先前所经过的所有单条历史行为轨迹数据的总和。如果是所有玩家,该数据存储于游戏服务器中,如果是当前玩家,该数据可存储于本地设备中。For the player's historical behavior trajectory data model and processing storage in the dynamic loading strategy, for a particular large map, its player historical trajectory data is the sum of all the single historical behavior trajectory data previously passed by all players or the current player. In the case of all players, this data is stored on the game server, and in the case of the current player, the data can be stored on the local device.
单条玩家历史行为轨迹数据指的是:玩家操控的角色进入该大地图、中途途径区域标识、玩家离开该大地图(离开的方式包括:从出口离开、传送离开、关闭游戏等)所经历的一条所经历的区域的轨迹链。如图6所示,玩家的历史轨迹中这条轨迹走过了10次:A single player’s historical behavior track data refers to: a character controlled by the player enters the big map, the midway area identification, and the player leaves the big map (the way to leave includes: leaving from the exit, teleporting, closing the game, etc.) Trajectory chain of the region experienced. As shown in Figure 6, this trajectory has been walked 10 times in the player's historical trajectory:
D 0→C 0→B 0→A 0→B 1→B 2→A 3 D 0 →C 0 →B 0 →A 0 →B 1 →B 2 →A 3
由于在同一张大地图中,玩家的不同时期行为模式、以及不同玩家的行为模式多种多样,因此会有各种可能性的历史轨迹,并且呈现集中趋势。如图6所示,玩家的历史轨迹中,走到了B1点之后产生了两种分歧,第一种轨迹走到了A2,这条轨迹走过了4次:Because in the same big map, the behavior patterns of players in different periods and the behavior patterns of different players are diverse, so there will be various possible historical trajectories, and there will be a centralized trend. As shown in Figure 6, in the player's historical trajectory, there are two divergences after reaching point B1. The first trajectory goes to A2, and this trajectory has gone through 4 times:
D 0→C 0→C 1→B 1→A 2 D 0 →C 0 →C 1 →B 1 →A 2
第二种轨迹走到了C2,这条轨迹走过了16次:The second trajectory goes to C2, and this trajectory travels 16 times:
D 0→C 0→C 1→B 1→C 2 D 0 →C 0 →C 1 →B 1 →C 2
有了若干单条玩家轨迹数据集合之后,需要对这些数据进行统计建模处理,基本思路是若玩家曾经大量按照这条轨迹行进,则以此为基准预测玩家接下来即将到达的区域。也就是在图6中当玩家所操控的角色当前走过了某条路径时,则按照历史数据预测接下来最大可能进入的区域。After there are several sets of individual player trajectory data, statistical modeling processing is required for these data. The basic idea is that if the player has followed this trajectory in large numbers, use this as a benchmark to predict the area that the player will reach next. That is, in FIG. 6 , when the character controlled by the player currently walks a certain path, the area that is most likely to be entered next is predicted according to historical data.
在计算过程中,为了衡量曾经的轨迹长短的参考标准,需要引入最大历史步长概念:以最大多少个区域链记为一条历史数据。因为当地图区域数目为m时,玩家有可能连续路过了无穷大个数量的区域节点,则该策略只应关心玩家固定模式下的历史数据,也就是在当下区域节点之前最大k步都有哪些历史轨迹。可以得知,当玩家处于某区域时,具有的历史轨迹可能性数目Np_max为:In the calculation process, in order to measure the reference standard of the past trajectory length, the concept of the maximum historical step size needs to be introduced: the maximum number of area chains is recorded as a piece of historical data. Because when the number of map areas is m, the player may pass through an infinite number of area nodes continuously, so the strategy should only care about the historical data in the player's fixed mode, that is, the history of the maximum k steps before the current area node trajectory. It can be known that when the player is in a certain area, the number of historical trajectory possibilities Np_max has is:
N p_max=m kN p_max =m k ,
表1Table 1
Np_maxNp_max m=9m=9 m=16m=16 m=25m=25
k=2k=2 8181 256256 625625
k=3k=3 729729 40964096 1562515625
k=4k=4 65616561 6553665536 390625390625
如表1所示,可以看到,当大地图区域数目和最大历史步长数目增加时,可能的路线种类也在大幅增加,需要存储统计的数据也就越复杂,因此需要按照情况合理选取最大历史步长。通常选取3或者4为最大历史步长。As shown in Table 1, it can be seen that when the number of large map areas and the maximum number of historical steps increase, the types of possible routes are also greatly increased, and the data that needs to be stored and statistics is more complicated. history step. Usually 3 or 4 is selected as the maximum historical step size.
在拥有了指定大地图中已存储的玩家历史行为轨迹数据和确定的最大历史步长之后,则可以按照动态加载策略进行预测区域的计算。After having the stored player's historical behavior trajectory data in the specified big map and the determined maximum historical step size, the prediction area can be calculated according to the dynamic loading strategy.
在动态加载策略中,可基于玩家历史行为轨迹数据的预测区域计算概率,当玩家历史轨迹数据不断增加累积后,有了初步规模的统计数据,并且可以继续根据新的轨迹数据进行强化。以上述地图6为例,假设最大历史轨迹步长为3,概率如表2所示:In the dynamic loading strategy, the probability can be calculated based on the prediction area of the player's historical behavior trajectory data. When the player's historical trajectory data continues to increase and accumulate, there is a preliminary scale of statistical data, and can continue to be enhanced based on new trajectory data. Taking the above map 6 as an example, assuming that the maximum historical trajectory step size is 3, the probability is shown in Table 2:
表2Table 2
当前子区域current subregion 轨迹路线track route 预测子区域predictor subregion 历史轨迹频次Historical track frequency 历史轨迹概率Historical Trajectory Probability
B 1 B 1 D 0→C 0→C 1 D 0 →C 0 →C 1 A 2 A 2 44 0.20.2
B 1 B 1 D 0→C 0→C 1 D 0 →C 0 →C 1 C 2 C 2 1616 0.80.8
B 1 B 1 C 0→B 0→A 0 C 0 →B 0 →A 0 B 2 B 2 2525 1.01.0
如表2所示,假设玩家当前刚进入B1区域,当前轨迹路线为D 0→C 0→C 1→B 1,按照历史轨迹统计,玩家接下来可能进入A2区域或者C2区域,按照频次统计可以得出,进入A2区域的概率为0.8,为该条轨迹中的最大概率预测区域。因此即流式加载A2区域的地图资源,当玩家进入A2区域时,区域资源已呈现加载完成状态。 As shown in Table 2, assuming that the player has just entered the B1 area, the current trajectory route is D 0 →C 0 →C 1 →B 1 , according to the historical trajectory statistics, the player may enter the A2 area or the C2 area next, according to the frequency statistics can be It is concluded that the probability of entering the A2 area is 0.8, which is the maximum probability prediction area in this trajectory. Therefore, the map resources in the A2 area are streamed. When the player enters the A2 area, the area resources are already loaded.
综合加载策略的补充,根据前文所述,综合加载策略在指定加载时机触发时,会根据动态加载策略所计算出的动态预测概率、以及静态加载策略所计算出的静态预测概率按照α和(1-α)的权重进行加权综合预测概率的计算。若综合预测概率最大的目标区域的预测概率低于触发概率阈值,或者玩家最终没有进入预估区域(预测失败)时,则采用传统静态加载策略或者保底加载时机的方式,确保玩家的体验正确。In addition to the comprehensive loading strategy, according to the above, when the comprehensive loading strategy is triggered at the specified loading time, the dynamic prediction probability calculated by the dynamic loading strategy and the static prediction probability calculated by the static loading strategy will be calculated according to α and (1. The weight of -α) is used to calculate the weighted comprehensive prediction probability. If the predicted probability of the target area with the highest comprehensive predicted probability is lower than the trigger probability threshold, or if the player does not enter the predicted area (prediction failure), the traditional static loading strategy or the guaranteed loading timing method is adopted to ensure the correct experience for the player.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. As in accordance with the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在本发明的技术方案中,基于玩家在大地图中的历史行为轨迹数据实现大型游戏场景区域资源加载策略能够提升加载的预测准确率和资源使用率,使游戏运行更加流畅。In the technical solution of the present invention, implementing a resource loading strategy in a large game scene area based on the player's historical behavior track data in the big map can improve the loading prediction accuracy and resource utilization rate, and make the game run more smoothly.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
根据本发明实施例的另一个方面,还提供了一种用于实施上述地图资源的加载方法的地图资源的加载装置。图7示意性地示出了根据本发明一个实施例的一种可选的地图资源的加载装置的示意图,如图7所示,该装置可以包括查找单元701、确定单元703和加载单元705。According to another aspect of the embodiments of the present invention, there is also provided a map resource loading apparatus for implementing the above-mentioned map resource loading method. FIG. 7 schematically shows a schematic diagram of an optional map resource loading apparatus according to an embodiment of the present invention. As shown in FIG. 7 , the apparatus may include a search unit 701 , a determination unit 703 and a loading unit 705 .
查找单元701,用于在满足游戏地图的预加载条件的情况下,确定游戏地图中目标角色当前所在的第一区域,其中,游戏地图被划分为多个区域,第一区域属于多个区域,预加载条件用于触发执行从多个区域中选择预加载区域的操作,目标角色是用户终端控制的游戏角色。The search unit 701 is configured to determine the first area where the target character is currently located in the game map under the condition of satisfying the preloading condition of the game map, wherein the game map is divided into multiple areas, and the first area belongs to multiple areas, The preloading condition is used to trigger the operation of selecting a preloading area from multiple areas, and the target character is a game character controlled by the user terminal.
在所述目标角色从所述多个区域中的一个区域进入所述第一区域的情况下,确定满足所述游戏地图的预加载条件;在所述目标角色到达所述第一区域中的目标位置的情况下,确定满足游戏地图的预加载条件;在目标角色触发特定剧情或者特定游戏任务的情况下,确定满足游戏地图的预加载条件,其中,第一区域与特定剧情或者特定游戏任务存在关联。In the case that the target character enters the first area from one of the plurality of areas, it is determined that the preloading condition of the game map is satisfied; when the target character reaches the target in the first area In the case of the location, it is determined that the preloading conditions of the game map are met; when the target character triggers a specific plot or a specific game mission, it is determined that the preloading conditions of the game map are met, wherein the first area exists with a specific plot or a specific game mission. association.
确定单元703,用于根据游戏角色的历史轨迹得到结果,并根据结果确定多个区域中的第二区域,其中,结果用于表示利用历史轨迹得到的多个区域中目标角色待进入的区域,第二区域 为待加载地图资源的区域,第二区域与第一区域相邻。The determining unit 703 is used to obtain the result according to the historical trajectory of the game character, and determine the second area in the multiple areas according to the result, wherein the result is used to represent the area to be entered by the target character in the multiple areas obtained by using the historical trajectory, The second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area.
加载单元705,用于在用户终端中加载第二区域的地图资源。The loading unit 705 is configured to load the map resource of the second area in the user terminal.
需要说明的是,该实施例中的查找单元701可以用于执行本发明实施例中的步骤S202,该实施例中的确定单元703可以用于执行本发明实施例中的步骤S204,该实施例中的加载单元705可以用于执行本发明实施例中的步骤S206。It should be noted that the searching unit 701 in this embodiment may be used to perform step S202 in this embodiment of the present invention, and the determining unit 703 in this embodiment may be used to perform step S204 in this embodiment of the present invention. The loading unit 705 in can be used to perform step S206 in this embodiment of the present invention.
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所发明的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content of the inventions in the above embodiments. It should be noted that, as a part of the device, the above modules may run in the hardware environment as shown in FIG. 1 , and may be implemented by software or hardware.
考虑到随着游戏运营时间的推移以及玩家总数的增多,玩家们所操控的角色在该大地图上的群体行为轨迹路线会越发呈现集中性和规律性,通过上述技术方案,可利用历史轨迹来确定符合以上规律的结果,进而确定玩家即将进入的区域,可以解决相关技术中地图区域加载的准确率较低的技术问题。Considering that with the passage of game operation time and the increase of the total number of players, the group behavior trajectories of the characters controlled by the players on the big map will become more concentrated and regular. Determining the results conforming to the above rules, and then determining the area that the player is about to enter, can solve the technical problem of low accuracy of map area loading in the related art.
在一些实施方式中,确定单元还可用于在根据游戏角色的历史轨迹得到结果,并根据所述结果确定所述多个区域中的第二区域时,可利用所述历史轨迹所述多个区域中所述目标角色待进入的第三区域,并从所述第三区域中选择一个作为所述第二区域;或可利用所述历史轨迹所述多个区域中所述目标角色待进入的第三区域,并从包括所述第三区域的区域集合中选出所述第二区域,其中,所述区域集合还包括在所述目标角色在所述第一区域中满足触发条件时得到的所述目标角色待进入的区域。In some implementations, the determining unit may be further configured to obtain a result according to the historical trajectory of the game character, and determine the second area in the plurality of areas according to the result, and use the historical trajectory for the plurality of areas The third area to be entered by the target character in the three areas, and the second area is selected from the area set including the third area, wherein the area set further includes the result obtained when the target character satisfies the trigger condition in the first area Describe the area the target character is going to enter.
在一些实施方式中,确定单元还可用于在利用所述历史轨迹所述多个区域中所述目标角色待进入的第三区域时,从所述历史轨迹中查找依次经过了第一区域序列中各个地图区域的第一目标轨迹,在一些实施方式中,所述第一区域序列中包括所述目标角色依次经过的多个地图区域且所述第一区域序列中的最后一个地图区域为所述第一区域;将所述多个区域中按照所述第一目标轨迹经过所述第一区域后进入的区域作为所述第三区域。In some embodiments, the determining unit may be further configured to, when using the third area in the plurality of areas of the historical trajectory to be entered by the target character, find out the sequence of the first areas that have passed through the first area sequence from the historical trajectory. The first target trajectory of each map area. In some embodiments, the first area sequence includes a plurality of map areas that the target character passes through in sequence, and the last map area in the first area sequence is the The first area; the area entered after passing through the first area according to the first target trajectory among the multiple areas is taken as the third area.
在一些实施方式中,确定单元还可用于在利用所述历史轨迹所述多个区域中所述目标角色待进入的第三区域,并从包括所述第三区域的区域集合中选出所述第二区域时,获取所述区域集合中各个第一候选区域对应的第一概率和第二概率,在一些实施方式中,所述第一概率为根据所述历史轨迹确定的所述第一候选区域为所述目标角色的待进入区域的概率,所述第二概率为在所述目标角色在所述第一区域中满足所述触发条件时得到的所述第一候选区域为所述目标角色的待进入区域的概率;确定所述第一概率与所述第一概率的权重之间的第一乘积、所述第二概率与所述第二概率的权重之间的第二乘积,将所述第一乘积与所述第二乘积之和作为所述第一候选区域的综合概率;根据综合概率从所述区域集合中选择所述第二区域。In some implementations, the determining unit may be further configured to use the historical track to use a third area to be entered by the target character in the plurality of areas, and select the area set including the third area. When the second area is used, the first probability and the second probability corresponding to each first candidate area in the area set are obtained. In some embodiments, the first probability is the first candidate determined according to the historical track. The area is the probability of the area to be entered by the target character, and the second probability is that the first candidate area obtained when the target character satisfies the trigger condition in the first area is the target character the probability of entering the area; determine the first product between the first probability and the weight of the first probability, and the second product between the second probability and the weight of the second probability, The sum of the first product and the second product is used as the comprehensive probability of the first candidate region; the second region is selected from the region set according to the comprehensive probability.
在一些实施方式中,确定单元还可用于在根据综合概率从所述区域集合中选择所述第二区域时,在所述综合概率大于目标阈值的情况下,从所述区域集合中选择综合概率最大的区域作为所述第二区域;在所述综合概率不大于所述目标阈值的情况下,从所述区域集合中选择第一概率最大的区域作为所述第二区域,或从所述区域集合中选择第二概率最大的区域作为所述第二区域。In some embodiments, the determining unit may be further configured to, when selecting the second region from the set of regions according to the integrated probability, select an integrated probability from the set of regions in the case that the integrated probability is greater than a target threshold The largest area is used as the second area; if the comprehensive probability is not greater than the target threshold, the area with the largest first probability is selected from the area set as the second area, or the area is selected from the area The region with the highest second probability in the set is selected as the second region.
在一些实施方式中,确定单元还可用于在获取所述区域集合中各个第一候选区域对应的 第一概率包括按照如下方式确定每个所述第一候选区域对应的第一概率:获取游戏角色对应的第一次数和第二次数,在一些实施方式中,所述第一次数为游戏角色对所有第一目标轨迹的累积经过次数,所述第二次数为游戏角色对所有第一目标轨迹中第一指定轨迹的累积经过次数,所述第一指定轨迹为所有所述第一目标轨迹中依次经过所述第一区域序列中的各个地图区域和当前候选区域的轨迹,所述当前候选区域为所有第一候选区域中当前处理的候选区域;将所述第二次数与所述第一次数之间的比值作为所述当前候选区域的第一概率。In some embodiments, the determining unit may be further configured to obtain the first probability corresponding to each first candidate region in the region set including determining the first probability corresponding to each of the first candidate regions in the following manner: obtaining a game character The corresponding first and second times, in some embodiments, the first number of times is the cumulative number of times the game character has passed all the first target trajectories, and the second number of times is the game character's cumulative pass times of all the first target trajectories. The cumulative number of times of the first designated track in the track, the first designated track is the track that sequentially passes through each map area in the first region sequence and the current candidate area among all the first target tracks, and the current candidate track The region is the currently processed candidate region in all the first candidate regions; the ratio between the second number of times and the first number of times is used as the first probability of the current candidate region.
在一些实施方式中,确定单元还可用于在从所述区域集合中选择综合概率最高的为所述第二区域之后,在所述综合概率大于加载概率阈值的情况下,获取游戏角色的第三次数和第四次数,在一些实施方式中,所述第三次数为游戏角色对所有第二目标轨迹的累积经过次数,所述第三次数为游戏角色对所有第二目标轨迹中第二指定轨迹的累积经过次数,所述第二目标轨迹为所述历史轨迹中依次经过了第二区域序列中各个地图区域的轨迹,所述第二区域序列中包括所述目标角色依次经过的多个地图区域且所述第二区域序列中的最后一个地图区域为所述第二区域,所述第二指定轨迹为所有所述第二目标轨迹中依次经过所述第二区域序列中的各个地图区域和第二候选区域的轨迹,所述第二候选区域为所述多个区域中与所述第二区域相邻的区域;将所述第四次数与所述第三次数之间的比值作为所述第二候选区域的第三概率;确定所述第三概率与第三概率的权重之间的第三乘积、第四概率与所述第四概率的权重之间的第四乘积,将所述第三乘积与所述第四乘积之和作为所述第二候选区域的综合概率;根据综合概率从多个所述第二候选区域中选择第四区域,其中,所述第四区域为待加载地图资源的地图区域。In some embodiments, the determining unit may be further configured to, after selecting the second area with the highest comprehensive probability from the area set, obtain the third area of the game character when the comprehensive probability is greater than the loading probability threshold The number of times and the fourth number of times, in some embodiments, the third number of times is the cumulative number of times the game character passes through all the second target trajectories, and the third number of times is the second specified trajectory of the game character to all the second target trajectories. The second target trajectory is a trajectory that has successively passed through each map area in the second area sequence in the historical trajectory, and the second area sequence includes a plurality of map areas that the target character has passed through in sequence And the last map area in the second area sequence is the second area, and the second designated trajectory is all the second target trajectories passing through each map area and the first area in the second area sequence in sequence. The trajectory of two candidate regions, the second candidate region is the region adjacent to the second region among the multiple regions; the ratio between the fourth number of times and the third number of times is taken as the first The third probability of the second candidate area; determine the third product between the third probability and the weight of the third probability, and the fourth product between the fourth probability and the weight of the fourth probability, The sum of the product and the fourth product is used as the comprehensive probability of the second candidate region; the fourth region is selected from the plurality of second candidate regions according to the comprehensive probability, wherein the fourth region is the map resource to be loaded map area.
在一些实施方式中,确定单元还可用于在根据游戏角色的历史轨迹得到结果,并根据所述结果确定所述多个区域中的第二区域之后,在所述目标角色移动至所述第一区域的区域边界且所述区域边界不是所述第二区域的区域边界的情况下,确定与所述区域边界相邻的第五区域;在所述用户终端中加载所述第五区域的地图资源。In some embodiments, the determining unit may be further configured to obtain a result according to the historical trajectory of the game character, and after determining the second area in the plurality of areas according to the result, after the target character moves to the first area If the area boundary of the area is not the area boundary of the second area, determine a fifth area adjacent to the area boundary; load the map resource of the fifth area in the user terminal .
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所发明的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现,其中,硬件环境包括网络环境。It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content of the inventions in the above embodiments. It should be noted that, as a part of the device, the above modules may run in the hardware environment as shown in FIG. 1 , and may be implemented by software or hardware, wherein the hardware environment includes a network environment.
根据本发明实施例的另一个方面,还提供了一种用于实施上述地图资源的加载方法的服务器或终端。According to another aspect of the embodiments of the present invention, a server or terminal for implementing the above method for loading map resources is also provided.
图8示意性地示出了根据本发明一个实施例的一种终端的结构框图,如图8所示,该终端可以包括:一个或多个(仅示出一个)处理器801、存储器803、以及传输装置805,如图8所示,该终端还可以包括输入输出设备807。FIG. 8 schematically shows a structural block diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 8 , the terminal may include: one or more (only one is shown) a processor 801, a memory 803, As well as the transmission device 805, as shown in FIG. 8, the terminal may further include an input and output device 807.
在一些实施方式中,存储器803可用于存储软件程序以及模块,如本发明实施例中的地图资源的加载方法和装置对应的程序指令/模块,处理器801通过运行存储在存储器803内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的地图资源的加载方法。存储器803可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器803可进一步包括相对于处理器801远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。In some embodiments, the memory 803 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for loading map resources in the embodiments of the present invention. The processor 801 executes the software programs stored in the memory 803 by running the software program and modules to perform various functional applications and data processing, that is, to implement the above-mentioned method for loading map resources. Memory 803 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 803 may further include memory located remotely relative to the processor 801, and these remote memories may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
上述的传输装置805用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置805包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置805为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。The above-mentioned transmission device 805 is used for receiving or sending data via a network, and can also be used for data transmission between the processor and the memory. Specific examples of the above-mentioned networks may include wired networks and wireless networks. In one example, the transmission device 805 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable so as to communicate with the Internet or a local area network. In an example, the transmission device 805 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.
在一些实施方式中,存储器803用于存储应用程序。In some implementations, memory 803 is used to store application programs.
处理器801可以通过传输装置805调用存储器803存储的应用程序,以执行下述步骤:The processor 801 can call the application program stored in the memory 803 through the transmission device 805 to perform the following steps:
在满足游戏地图的预加载条件的情况下,确定游戏地图中目标角色当前所在的第一区域,在一些实施方式中,游戏地图被划分为多个区域,第一区域属于多个区域,预加载条件用于触发执行从多个区域中选择预加载区域的操作,目标角色是用户终端控制的游戏角色;In the case that the preloading condition of the game map is satisfied, the first area in the game map where the target character is currently located is determined. In some embodiments, the game map is divided into multiple areas, the first area belongs to multiple areas, and the preloading The condition is used to trigger the operation of selecting a preloaded area from multiple areas, and the target character is the game character controlled by the user terminal;
根据游戏角色的历史轨迹得到预测结果,并根据预测结果确定多个区域中的第二区域,在一些实施方式中,预测结果可用于表示利用历史轨迹预测得到的多个区域中目标角色待进入的区域,第二区域为待加载地图资源的区域,第二区域与第一区域相邻;The prediction result is obtained according to the historical trajectory of the game character, and the second area in the multiple areas is determined according to the prediction result. In some embodiments, the prediction result may be used to indicate the target character is to enter in the multiple areas predicted by using the historical trajectory. area, the second area is the area where the map resource is to be loaded, and the second area is adjacent to the first area;
在用户终端中加载第二区域的地图资源。Load the map resource of the second area in the user terminal.
处理器801还用于执行下述步骤:The processor 801 is further configured to perform the following steps:
在综合预测概率大于加载概率阈值的情况下,获取游戏角色的第三次数和第四次数,在一些实施方式中,第三次数为游戏角色对所有第二目标轨迹的累积经过次数,第三次数为游戏角色对所有第二目标轨迹中第二指定轨迹的累积经过次数,第二目标轨迹为历史轨迹中依次经过了第二区域序列中各个地图区域的轨迹,第二区域序列中包括目标角色依次经过的多个地图区域且第二区域序列中的最后一个地图区域为第二区域,第二指定轨迹为所有第二目标轨迹中依次经过第二区域序列中的各个地图区域和第二候选区域的轨迹,第二候选区域为多个区域中与第二区域相邻的区域;In the case that the comprehensive predicted probability is greater than the loading probability threshold, the third and fourth times of the game character are obtained. In some embodiments, the third time is the cumulative number of times the game character passes through all the second target trajectories, and the third time It is the cumulative number of times the game character has passed through the second specified trajectory in all second target trajectories. The second target trajectory is the trajectory in the historical trajectory that has passed through each map area in the second area sequence, and the second area sequence includes the target characters in sequence. Multiple map areas that have passed through and the last map area in the second area sequence is the second area, and the second designated track is all the second target trajectories that pass through each map area in the second area sequence and the second candidate area in turn. track, the second candidate area is an area adjacent to the second area among the multiple areas;
将第四次数与第三次数之间的比值作为第二候选区域的第三概率;Taking the ratio between the fourth time and the third time as the third probability of the second candidate region;
确定所述第三概率与第三概率的权重之间的第三乘积、第四概率与所述第四概率的权重之间的第四乘积,将所述第三乘积与所述第四乘积之和作为所述第二候选区域的综合概率;determining a third product between the third probability and the weight of the third probability, a fourth product between the fourth probability and the weight of the fourth probability, and summing the third product and the fourth product and as the comprehensive probability of the second candidate region;
根据综合概率从多个所述第二候选区域中选择第四区域,其中,所述第四区域为待加载地图资源的地图区域。A fourth area is selected from a plurality of the second candidate areas according to the comprehensive probability, wherein the fourth area is a map area to be loaded with a map resource.
在一些实施方式中,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。In some implementation manners, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, and details are not described herein again in this embodiment.
本领域普通技术人员可以理解,图8所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图8其并不对上述电子装置的结构造成限定。例如,终端还可包括比图8中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图8所示不同的配置。Those of ordinary skill in the art can understand that the structure shown in FIG. 8 is for illustration only, and the terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a handheld computer, and a Mobile Internet Devices (MID), Terminal equipment such as PAD. FIG. 8 does not limit the structure of the above electronic device. For example, the terminal may also include more or less components than those shown in FIG. 8 (eg, network interface, display device, etc.), or have a different configuration than that shown in FIG. 8 .
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的地图资源的加载装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设 备或者装置的程序/指令(例如,计算机程序/指令和计算机程序产品)。这样的实现本发明的程序/指令可以存储在计算机可读介质上,或者可以一个或者多个信号的形式存在,这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of the map resource loading apparatus according to the embodiment of the present invention. The present invention can also be implemented as a program/instruction (e.g., computer program/instruction and computer program product) for an apparatus or apparatus for performing some or all of the methods described herein. Such programs/instructions implementing the present invention may be stored on a computer readable medium, or may exist in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any form Available in other formats.
本发明的实施例还提供了一种计算机可读介质。在一些实施方式中,上述计算机可读介质可以用于执行地图资源的加载方法的程序代码。Embodiments of the present invention also provide a computer-readable medium. In some embodiments, the above-mentioned computer-readable medium can be used to execute the program code of the loading method of the map resource.
在一些实施方式中,计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。In some embodiments, computer readable media, including persistent and non-permanent, removable and non-removable media, can be implemented by any method or technology for information storage. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
图9示意性地示出了可以实现根据本发明的地图资源的加载方法的计算机设备,在一些实施方式中,该计算机设备包括处理器910和以存储器920形式的计算机可读介质。存储器920是计算机可读介质的一个示例,其具有用于存储计算机程序931的存储空间930。当所述计算机程序931由处理器910执行时,可实现上文所描述的地图资源的加载方法中的各个步骤。FIG. 9 schematically shows a computer device that can implement the method for loading map resources according to the present invention. In some embodiments, the computer device includes a processor 910 and a computer-readable medium in the form of a memory 920 . The memory 920 is an example of a computer-readable medium having a storage space 930 for storing the computer program 931 . When the computer program 931 is executed by the processor 910, each step in the method for loading map resources described above can be implemented.
图10示意性地示出了实现根据本发明的方法的计算机程序产品的框图。所述计算机程序产品包括计算机程序1010,当所述计算机程序1010被诸如图9所示的处理器910之类的处理器执行时,可实现上文所描述的地图资源的加载方法中的各个步骤。Figure 10 schematically shows a block diagram of a computer program product implementing the method according to the invention. The computer program product includes a computer program 1010 that, when executed by a processor such as the processor 910 shown in FIG. 9 , can implement the various steps in the above-described method for loading map resources .
上文对本说明书特定实施例进行了描述,其与其它实施例一并涵盖于所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定遵循示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可行的或者有利的。Specific embodiments of this specification have been described above, and other embodiments are intended to be included within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily follow the specific order shown, or sequential order, to achieve desirable results. In certain embodiments, multitasking and parallel processing are also possible or advantageous.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article of manufacture, or device that includes the element.
应可理解,以上所述实施例仅为举例说明本发明之目的而并非对本发明进行限制。在不脱离本发明基本精神及特性的前提下,本领域技术人员还可以通过其他方式来实施本发明。本发明的范围当以后附的权利要求为准,凡在本说明书一个或多个实施例的精神和原则之内所做的任何修改、等同替换、改进等,皆应涵盖其中。It should be understood that the above-mentioned embodiments are only for the purpose of illustrating the present invention and not for limiting the present invention. Those skilled in the art can also implement the present invention in other ways without departing from the basic spirit and characteristics of the present invention. The scope of the present invention shall be determined by the appended claims, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be covered therein.

Claims (13)

  1. 一种地图资源的加载方法,包括:A method for loading map resources, including:
    在满足游戏地图的预加载条件的情况下,确定所述游戏地图中目标角色当前所在的第一区域,所述游戏地图被划分为多个区域,所述第一区域属于所述多个区域,所述预加载条件用于触发执行从所述多个区域中选择预加载区域的操作,所述目标角色是用户终端控制的游戏角色;In the case that the preloading condition of the game map is satisfied, the first area in the game map where the target character is currently located is determined, the game map is divided into multiple areas, and the first area belongs to the multiple areas, The preloading condition is used to trigger and execute an operation of selecting a preloading area from the multiple areas, and the target character is a game character controlled by the user terminal;
    根据游戏角色的历史轨迹得到预测结果,并根据所述预测结果确定所述多个区域中的第二区域,所述预测结果用于表示利用所述历史轨迹预测得到的所述多个区域中所述目标角色待进入的区域,所述第二区域为待加载地图资源的区域,所述第二区域与所述第一区域相邻;A prediction result is obtained according to the historical trajectory of the game character, and a second area in the plurality of areas is determined according to the prediction result, and the prediction result is used to represent all areas in the plurality of areas predicted by using the historical trajectory the area to be entered by the target character, the second area is an area to be loaded with map resources, and the second area is adjacent to the first area;
    在所述用户终端中加载所述第二区域的地图资源。Load the map resource of the second area in the user terminal.
  2. 根据权利要求1所述的方法,其中,根据游戏角色的历史轨迹得到预测结果,并根据所述预测结果确定所述多个区域中的第二区域包括:The method according to claim 1, wherein obtaining a prediction result according to the historical trajectory of the game character, and determining the second area in the plurality of areas according to the prediction result comprises:
    利用所述历史轨迹预测所述多个区域中所述目标角色待进入的第三区域,并从所述第三区域中选择一个作为所述第二区域;或,Use the historical trajectory to predict a third area in the plurality of areas that the target character is to enter, and select one of the third areas as the second area; or,
    利用所述历史轨迹预测所述多个区域中所述目标角色待进入的第三区域,并从包括所述第三区域的区域集合中选出所述第二区域,所述区域集合还包括所述目标角色在所述第一区域中满足触发条件时得到的所述目标角色待进入的其他区域。Predicting a third area to be entered by the target character in the plurality of areas by using the historical trajectory, and selecting the second area from an area set including the third area, where the area set further includes the other areas to be entered by the target character obtained when the target character satisfies the trigger condition in the first area.
  3. 根据权利要求2所述的方法,其中,利用所述历史轨迹预测所述多个区域中所述目标角色待进入的第三区域包括:The method according to claim 2, wherein predicting a third area to be entered by the target character in the plurality of areas using the historical trajectory comprises:
    从所述历史轨迹中查找依次经过了第一区域序列中各个地图区域的第一目标轨迹,所述第一区域序列中包括所述目标角色依次经过的多个地图区域且所述第一区域序列中的最后一个地图区域为所述第一区域;Find a first target trajectory that has passed through each map area in the first area sequence from the historical trajectory, where the first area sequence includes a plurality of map areas that the target character passes through in sequence, and the first area sequence The last map area in is the first area;
    将所述多个区域中按照所述第一目标轨迹经过所述第一区域后进入的区域作为所述第三区域。An area of the plurality of areas that enters after passing through the first area according to the first target trajectory is taken as the third area.
  4. 根据权利要求2或3所述的方法,其中,利用所述历史轨迹预测所述多个区域中所述目标角色待进入的第三区域,并从包括所述第三区域的区域集合中选出所述第二区域包括:The method according to claim 2 or 3, wherein a third area to be entered by the target character in the plurality of areas is predicted by using the historical trajectory, and selected from a set of areas including the third area The second area includes:
    获取所述区域集合中各个第一候选区域对应的第一概率和第二概率,所述第一概率为根据所述历史轨迹确定的所述第一候选区域为所述目标角色的待进入区域的预测概率,所述第二概率为在所述目标角色在所述第一区域中满足所述触发条件时得到的所述第一候选区域为所述目标角色的待进入区域的概率;Obtain a first probability and a second probability corresponding to each of the first candidate regions in the region set, where the first probability is the probability that the first candidate region determined according to the historical trajectory is the to-be-entered region of the target character. prediction probability, the second probability is the probability that the first candidate area obtained when the target character satisfies the trigger condition in the first area is the area to be entered by the target character;
    确定所述第一概率与所述第一概率的权重之间的第一乘积、所述第二概率与所述第二概率的权重之间的第二乘积,将所述第一乘积与所述第二乘积之和作为所述第一候选区域的综合预测概率;determining a first product between the first probability and the weight of the first probability, a second product between the second probability and the weight of the second probability, and combining the first product with the The sum of the second products is used as the comprehensive prediction probability of the first candidate region;
    根据综合预测概率从所述区域集合中选择所述第二区域。The second region is selected from the set of regions according to an integrated predicted probability.
  5. 根据权利要求4所述的方法,其中,根据综合预测概率从所述区域集合中选择所述第二区域包括:5. The method of claim 4, wherein selecting the second region from the set of regions according to an integrated predicted probability comprises:
    在所述综合预测概率大于目标阈值的情况下,从所述区域集合中选择综合预测概率最大的区域作为所述第二区域;In the case that the comprehensive prediction probability is greater than the target threshold, the region with the largest comprehensive prediction probability is selected from the region set as the second region;
    在所述综合预测概率不大于所述目标阈值的情况下,从所述区域集合中选择第一概率最大的区域作为所述第二区域,或从所述区域集合中选择第二概率最大的区域作为所述第二区域。Under the condition that the comprehensive prediction probability is not greater than the target threshold, select the region with the highest first probability from the region set as the second region, or select the region with the second highest probability from the region set as the second region.
  6. 根据权利要求4所述的方法,其中,获取所述区域集合中各个第一候选区域的第一概率包括按照如下方式确定每个所述第一候选区域的第一概率:The method of claim 4, wherein obtaining the first probability of each first candidate region in the set of regions comprises determining the first probability of each of the first candidate regions as follows:
    获取游戏角色对应的第一次数和第二次数,所述第一次数为游戏角色对所有第一目标轨迹的累积经过次数,所述第二次数为游戏角色对所有第一目标轨迹中第一指定轨迹的累积经过次数,所述第一指定轨迹为所有所述第一目标轨迹中依次经过第一区域序列中的各个地图区域和当前候选区域的轨迹,所述当前候选区域为所有第一候选区域中当前处理的候选区域;Acquire the first and second times corresponding to the game character, where the first time is the cumulative number of times the game character has passed to all the first target trajectories, and the second time is the number of times the game character has passed through all the first target trajectories. The cumulative number of times of a specified trajectory, the first specified trajectory is the trajectory that passes through each map area in the first area sequence and the current candidate area in sequence among all the first target trajectories, and the current candidate area is all the first target trajectories. The currently processed candidate region in the candidate region;
    将所述第二次数与所述第一次数之间的比值作为所述当前候选区域的第一概率。The ratio between the second number of times and the first number of times is used as the first probability of the current candidate region.
  7. 根据权利要求4所述的方法,其中,在从所述区域集合中选择综合预测概率最高的为所述第二区域之后,所述方法还包括:The method according to claim 4, wherein after selecting the second region with the highest comprehensive prediction probability from the region set, the method further comprises:
    在所述综合预测概率大于加载概率阈值的情况下,获取游戏角色对应的第三次数和第四次数,所述第三次数为游戏角色对所有第二目标轨迹的累积经过次数,所述第三次数为游戏角色对所有第二目标轨迹中第二指定轨迹的累积经过次数,所述第二目标轨迹为所述历史轨迹中依次经过了第二区域序列中各个地图区域的轨迹,所述第二区域序列中包括所述目标角色依次经过的多个地图区域且所述第二区域序列中的最后一个地图区域为所述第二区域,所述第二指定轨迹为所有所述第二目标轨迹中依次经过所述第二区域序列中的各个地图区域和第二候选区域的轨迹,所述第二候选区域为所述多个区域中与所述第二区域相邻的区域;In the case that the comprehensive predicted probability is greater than the loading probability threshold, the third and fourth times corresponding to the game character are obtained, where the third time is the cumulative number of times the game character passes through all the second target trajectories, and the third The number of times is the cumulative number of times the game character has passed through the second specified trajectory in all second target trajectories. The region sequence includes a plurality of map regions that the target character passes through in sequence, and the last map region in the second region sequence is the second region, and the second designated track is one of all the second target tracks. Passing through the tracks of each map area and a second candidate area in the second area sequence in sequence, where the second candidate area is an area adjacent to the second area in the plurality of areas;
    将所述第四次数与所述第三次数之间的比值作为所述第二候选区域的第三概率;taking the ratio between the fourth time and the third time as the third probability of the second candidate region;
    确定所述第三概率与第三概率的权重之间的第三乘积、第四概率与所述第四概率的权重之间的第四乘积,将所述第三乘积与所述第四乘积之和作为所述第二候选区域的综合预测概率;determining a third product between the third probability and the weight of the third probability, a fourth product between the fourth probability and the weight of the fourth probability, and summing the third product and the fourth product and as the comprehensive predicted probability of the second candidate region;
    根据综合预测概率从多个所述第二候选区域中选择第四区域,所述第四区域为待加载地图资源的地图区域。A fourth area is selected from a plurality of the second candidate areas according to the comprehensive prediction probability, where the fourth area is a map area to be loaded with a map resource.
  8. 根据权利要求1至3中任意一项所述的方法,其中,在根据游戏角色的历史轨迹得到预测结果,并根据所述预测结果确定所述多个区域中的第二区域之后,所述方法还包括:The method according to any one of claims 1 to 3, wherein after obtaining a prediction result according to the historical trajectory of the game character, and determining the second area in the plurality of areas according to the prediction result, the method Also includes:
    在所述目标角色移动至所述第一区域的区域边界且所述区域边界不是所述第二区域的区域边界的情况下,确定与所述区域边界相邻的第五区域;In the case that the target character moves to the area boundary of the first area and the area boundary is not the area boundary of the second area, determining a fifth area adjacent to the area boundary;
    在所述用户终端中加载所述第五区域的地图资源。Load the map resource of the fifth area in the user terminal.
  9. 根据权利要求1至3中任意一项所述的方法,还包括以下之一:The method according to any one of claims 1 to 3, further comprising one of the following:
    在所述目标角色从所述多个区域中的一个区域进入所述第一区域的情况下,确定满足所述游戏地图的预加载条件;In the case that the target character enters the first area from one of the plurality of areas, determining that the preloading condition of the game map is satisfied;
    在所述目标角色到达所述第一区域中的目标位置的情况下,确定满足所述游戏地图的预加载条件;When the target character reaches the target position in the first area, determining that the preloading condition of the game map is satisfied;
    在所述目标角色触发特定剧情或者特定游戏任务的情况下,确定满足所述游戏地图的预加载条件,所述第一区域与所述特定剧情或者所述特定游戏任务存在关联。When the target character triggers a specific plot or a specific game task, it is determined that the preloading condition of the game map is satisfied, and the first area is associated with the specific plot or the specific game task.
  10. 一种地图资源的加载装置,包括:A device for loading map resources, comprising:
    查找单元,用于在满足游戏地图的预加载条件的情况下,确定所述游戏地图中目标角色当前所在的第一区域,所述游戏地图被划分为多个区域,所述第一区域属于所述多个区域,所述预加载条件用于触发执行从所述多个区域中选择预加载区域的操作,所述目标角色是用户终端控制的游戏角色;A search unit, configured to determine the first area in the game map where the target character is currently located under the condition that the preloading condition of the game map is satisfied, the game map is divided into multiple areas, and the first area belongs to the the multiple areas, the preloading condition is used to trigger the execution of an operation of selecting a preloading area from the multiple areas, and the target character is a game character controlled by the user terminal;
    确定单元,用于根据游戏角色的历史轨迹得到预测结果,并根据所述预测结果确定所述多个区域中的第二区域,所述预测结果用于表示利用所述历史轨迹预测得到的所述多个区域中所述目标角色待进入的区域,所述第二区域为待加载地图资源的区域,所述第二区域与所述第一区域相邻;A determination unit, configured to obtain a prediction result according to the historical trajectory of the game character, and determine a second area in the plurality of areas according to the prediction result, where the prediction result is used to represent the predicted result obtained by using the historical trajectory an area to be entered by the target character in multiple areas, the second area is an area to be loaded with map resources, and the second area is adjacent to the first area;
    加载单元,用于在所述用户终端中加载所述第二区域的地图资源。A loading unit, configured to load the map resource of the second area in the user terminal.
  11. 一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现根据权利要求1至9任一项中所述的方法的步骤。A computer readable medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.
  12. 一种电子装置,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现根据权利要求1至9任一项中所述的方法的步骤。An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the computer program according to any one of claims 1 to 9 when the processor executes the computer program The steps of the method described in .
  13. 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现根据权利要求1至9中任一项所述的方法的步骤。A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.
PCT/CN2021/122122 2021-03-31 2021-09-30 Map resource loading method and apparatus, storage medium, and electronic apparatus WO2022205824A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110351734.4A CN113018866A (en) 2021-03-31 2021-03-31 Map resource loading method and device, storage medium and electronic device
CN202110351734.4 2021-03-31

Publications (1)

Publication Number Publication Date
WO2022205824A1 true WO2022205824A1 (en) 2022-10-06

Family

ID=76453230

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/122122 WO2022205824A1 (en) 2021-03-31 2021-09-30 Map resource loading method and apparatus, storage medium, and electronic apparatus

Country Status (2)

Country Link
CN (1) CN113018866A (en)
WO (1) WO2022205824A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113018866A (en) * 2021-03-31 2021-06-25 完美世界(北京)软件科技发展有限公司 Map resource loading method and device, storage medium and electronic device
CN113694532B (en) * 2021-09-01 2023-10-27 深圳市乐天堂科技有限公司 Method, system, storage medium and terminal for multiplexing resources in resource manager
CN113934808B (en) * 2021-10-22 2024-05-28 广东汇天航空航天科技有限公司 Map data acquisition method and device and aircraft
CN113877207A (en) * 2021-10-26 2022-01-04 北京字跳网络技术有限公司 Game map loading method and device, electronic equipment and storage medium
CN114428921A (en) * 2022-01-12 2022-05-03 腾讯科技(深圳)有限公司 Resource preloading method and device, storage medium and electronic equipment
CN116700994B (en) * 2023-08-02 2024-03-12 深圳尚米网络技术有限公司 Resource acceleration method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070200855A1 (en) * 2006-02-22 2007-08-30 Kabushiki Kaisha Square Enix (Also Trading As Square Enix Co.,Ltd.) Video game apparatus for displaying information indicating boundary between fields
CN111389014A (en) * 2020-03-16 2020-07-10 深圳市腾讯信息技术有限公司 Game resource data monitoring method and device, computer equipment and storage medium
CN111729305A (en) * 2020-06-23 2020-10-02 网易(杭州)网络有限公司 Map scene preloading method, model training method, device and storage medium
CN113018866A (en) * 2021-03-31 2021-06-25 完美世界(北京)软件科技发展有限公司 Map resource loading method and device, storage medium and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503238B (en) * 2016-11-07 2019-09-03 王昱淇 A kind of network map region clustering forecasting method of intensified learning driving
CN106600708B (en) * 2016-12-15 2019-01-08 北京金山软件有限公司 A kind of processing method and system of map
CN110543543A (en) * 2019-09-10 2019-12-06 苏州大学 user movement behavior prediction method and device based on multi-granularity neural network
CN111857134B (en) * 2020-06-29 2022-09-16 江苏大学 Target obstacle vehicle track prediction method based on Bayesian network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070200855A1 (en) * 2006-02-22 2007-08-30 Kabushiki Kaisha Square Enix (Also Trading As Square Enix Co.,Ltd.) Video game apparatus for displaying information indicating boundary between fields
CN111389014A (en) * 2020-03-16 2020-07-10 深圳市腾讯信息技术有限公司 Game resource data monitoring method and device, computer equipment and storage medium
CN111729305A (en) * 2020-06-23 2020-10-02 网易(杭州)网络有限公司 Map scene preloading method, model training method, device and storage medium
CN113018866A (en) * 2021-03-31 2021-06-25 完美世界(北京)软件科技发展有限公司 Map resource loading method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN113018866A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
WO2022205824A1 (en) Map resource loading method and apparatus, storage medium, and electronic apparatus
US11082301B2 (en) Forecasting computer resources demand
CN108304440B (en) Game pushing method and device, computer equipment and storage medium
KR102523888B1 (en) Method, Apparatus and Device for Scheduling Virtual Objects in a Virtual Environment
CN108920221B (en) Game difficulty adjusting method and device, electronic equipment and storage medium
CN110070117B (en) Data processing method and device
CN110520868B (en) Method, program product and storage medium for distributed reinforcement learning
EP2999527B1 (en) Game availability in a remote gaming environment
CN113434212B (en) Cache auxiliary task cooperative unloading and resource allocation method based on meta reinforcement learning
CN108106624B (en) Multi-user reservation scheduling path planning method and related device
CN107335220B (en) Negative user identification method and device and server
CN111803959B (en) Object control method, device, game server and medium
US20160314484A1 (en) Method and system for mining churn factor causing user churn for network application
US20210097443A1 (en) Population-based training of machine learning models
EP3929823A1 (en) Program, learning method, and information processing apparatus
US20230311003A1 (en) Decision model training method and apparatus, device, storage medium, and program product
CN111931916A (en) Exploration method and device of deep learning model
JP2022525880A (en) Server load prediction and advanced performance measurement
Han et al. A game strategy model in the digital curling system based on NFSP
CN110909878A (en) Training method and device of neural network model for estimating resource usage share
Huang et al. Bootstrap estimated uncertainty of the environment model for model-based reinforcement learning
CN113827978A (en) Loss user prediction method and device and computer readable storage medium
US11478716B1 (en) Deep learning for data-driven skill estimation
CN114003306B (en) Video memory optimization method, device, equipment and storage medium
CN113326902A (en) Online learning-based strategy acquisition method, device and equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21934461

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21934461

Country of ref document: EP

Kind code of ref document: A1