CN107803030B - Refreshing method and device for resource site on virtual map - Google Patents

Refreshing method and device for resource site on virtual map Download PDF

Info

Publication number
CN107803030B
CN107803030B CN201711233543.8A CN201711233543A CN107803030B CN 107803030 B CN107803030 B CN 107803030B CN 201711233543 A CN201711233543 A CN 201711233543A CN 107803030 B CN107803030 B CN 107803030B
Authority
CN
China
Prior art keywords
map
resource
building
data point
grade
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711233543.8A
Other languages
Chinese (zh)
Other versions
CN107803030A (en
Inventor
潘弋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Chengdu Co Ltd
Original Assignee
Tencent Technology Chengdu Co Ltd
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 Tencent Technology Chengdu Co Ltd filed Critical Tencent Technology Chengdu Co Ltd
Priority to CN201711233543.8A priority Critical patent/CN107803030B/en
Publication of CN107803030A publication Critical patent/CN107803030A/en
Priority to PCT/CN2018/117769 priority patent/WO2019105352A1/en
Application granted granted Critical
Publication of CN107803030B publication Critical patent/CN107803030B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a method and a device for refreshing resource sites on a virtual map, and belongs to the field of computers. The method comprises the following steps: acquiring attribute data of the building objects in the map block, wherein the map block corresponds to an area in the virtual map, and the attribute data is used for indicating the current distribution condition of the building objects in the map block; determining the refresh data of the resource sites in the map block according to the attribute data of the building object, wherein the refresh data is used for indicating the distribution condition of the refreshed resource sites in the map block; and refreshing the resource sites in the map blocks according to the refreshing data. According to the method and the device, the distribution situation of the resource data points needing to be refreshed in the map block is determined based on the current distribution situation of the building objects in the map block, so that the resource data points can be refreshed in a self-adaptive mode according to the current distribution situation of the building objects, and the refreshing efficiency of the resource data points is improved.

Description

Refreshing method and device for resource site on virtual map
Technical Field
The embodiment of the application relates to the field of computers, in particular to a method and a device for refreshing resource sites on a virtual map.
Background
A Simulation strategy Game (SLG) is a Game that provides a plurality of resource sites on a virtual map, and allows players to collect virtual resources on the resource sites to upgrade and develop building objects created by the players.
In the related art, the method for refreshing the resource sites on the virtual map generally includes: refreshing each resource site on the virtual map in a preset mode every other preset time period, wherein the preset mode is used for indicating that each resource site is uniformly distributed in the virtual map, so that a player acquires virtual resources on the resource sites by dispatching virtual game characters in the building objects.
However, in the above method, since the resource sites on the virtual map are uniformly distributed, it is highly likely that no building objects exist near a plurality of resource sites, so that the number of resource sites is far greater than the number of building objects, resulting in low refresh efficiency of the resource sites.
Disclosure of Invention
The embodiment of the application provides a method and a device for refreshing a resource site on a virtual map, which can solve the problem of low refreshing efficiency of the resource site in the related art. The technical scheme is as follows:
in a first aspect, a method for refreshing resource sites on a virtual map is provided, the method comprising:
acquiring attribute data of building objects in a map block, wherein the map block corresponds to an area in the virtual map, and the attribute data is used for indicating the current distribution condition of the building objects in the map block;
determining refresh data of the resource sites in the map block according to the attribute data of the building object, wherein the refresh data is used for indicating the distribution condition of the resource sites in the map block after refreshing;
and refreshing the resource data points in the map block according to the refreshing data.
In a second aspect, a device for refreshing resource sites on a virtual map is provided, the device comprising:
the acquisition module is used for acquiring attribute data of the building objects in a map block, wherein the map block corresponds to an area in the virtual map, and the attribute data is used for indicating the current distribution condition of the building objects in the map block;
the determining module is used for determining the refresh data of the resource data points in the map block according to the attribute data of the building object, wherein the refresh data is used for indicating the distribution condition of the refreshed resource data points in the map block;
and the refreshing module is used for refreshing the resource data points in the map block according to the refreshing data.
In a third aspect, a terminal device is provided, where the terminal device includes a processor and a memory, where the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for refreshing resource sites on a virtual map provided in the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the refresh method for resource sites on a virtual map provided in the first aspect.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
the method comprises the steps that attribute data of building objects in a map block are obtained, wherein the attribute data are used for indicating the current distribution condition of the building objects in the map block, refreshing data of resource sites in the map block are determined according to the attribute data of the building objects, the refreshing data are used for indicating the distribution condition of the resource sites in the map block after refreshing, and the resource sites in the map block are refreshed according to the refreshing data; the method and the device have the advantages that the terminal device can self-adaptively determine the distribution condition of the resource data points needing to be refreshed in the map block based on the current distribution condition of the building objects in the map block, the condition that the resource data points are uniformly distributed on the virtual map to cause lower refreshing efficiency of the resource data points in the related technology is avoided, the resource data points can self-adaptively refresh according to the current distribution condition of the building objects, the invalid refreshing of the resource data points is greatly reduced, and the refreshing efficiency of the resource data points is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a virtual map provided in the related art;
FIG. 2 is a schematic illustration of a virtual map provided by an exemplary embodiment of the present application;
FIG. 3 is a flow diagram of a refresh method for resource sites on a virtual map according to one embodiment of the present application;
FIG. 4 is a flow diagram of a refresh method for resource sites on a virtual map according to another embodiment of the present application;
fig. 5 is a schematic diagram of a corresponding relationship between the total number of buildings and the total number of target data points according to another embodiment of the present application;
FIG. 6 is a flow diagram of a refresh method for resource sites on a virtual map according to another embodiment of the present application;
FIG. 7 is a schematic representation of attribute data for an architectural object in accordance with another embodiment of the present application;
FIG. 8 is a schematic illustration of a correspondence between a building level range and a site level range according to another embodiment of the present application;
FIG. 9 is a flow diagram of a refresh method for resource sites on a virtual map according to another embodiment of the present application;
FIG. 10 is a diagram illustrating correspondence between a site level, a predetermined weight, and a second predetermined ratio according to another embodiment of the present application;
FIG. 11A is a schematic diagram illustrating a method for refreshing resource sites on a virtual map according to an embodiment of the present application;
FIG. 11B is a schematic interface diagram of a method for refreshing resource sites on a virtual map according to an embodiment of the present application;
FIG. 12 is a schematic structural diagram of a refreshing apparatus for resource sites on a virtual map according to an embodiment of the present application;
FIG. 13 is a schematic structural diagram of a refreshing apparatus for resource sites on a virtual map according to another embodiment of the present application;
fig. 14 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
For convenience of understanding, terms appearing in the embodiments of the present invention are explained below.
Map block: corresponding to an area in the virtual map. At least one building object and/or at least one resource site is included in the map tile. One virtual map may be divided into at least two map tiles. The shape and size of each map block may be the same or different.
The virtual map may be a two-dimensional virtual map, a 2.5D virtual map, or a three-dimensional virtual map. This is not limited in the examples of the present application.
Architectural objects are map points used to manufacture, camp and/or train virtual game characters. For example, the building object is a city pool.
Attribute data of the building object: for indicating the current distribution of the architectural objects in the map block. Wherein the attribute data of the building object comprises the total number of the current buildings in the map block. Optionally, the attribute data further includes a current building grade range in the map block. The building grade range comprises n different building grades, and n is a positive integer. Optionally, the attribute data further includes: the number of buildings corresponding to each of the n building grades in the map block.
A resource site is a map point used to provide a virtual resource. For example, the resource site may be a map site such as a virtual farmland, a virtual iron mine, a virtual wood mine, or the like.
Refresh data for resource site: used for indicating the distribution condition of the refreshed resource sites in the map block.
Wherein the refresh data of the resource data point comprises the total number of the target data points in the map block. Optionally, the refresh data further includes a range of data levels in the map tile. Wherein, the data point grade range comprises m different data point grades, and m is a positive integer. Optionally, the refreshing data further includes: the number of data points corresponding to the m data point levels in the map block.
It should be noted that the total number of the target data points, the data point level range, and the data point number corresponding to each of the m data point levels are all data after refreshing the resource data points in the map block, for example, the total number of the target data points does not refer to the total number of the current resource data points of the resource data points in the map block, but refers to the total number of the resource data points after refreshing the resource data points in the map block.
In the related art, as shown in fig. 1, a virtual map 10 includes at least one building object 14 and a plurality of resource sites 16. The plurality of resource sites 16 are evenly distributed on the virtual map 10, i.e., the distance between any two resource sites 16 in the plurality of resource sites 16 is the same. The computer refreshes each resource site 16 on the virtual map 10 at predetermined intervals in a preset manner for instructing each resource site 16 to be evenly distributed in the virtual map 10 so that the player collects virtual resources on the resource sites 16 by dispatching virtual game characters in the building objects 14.
However, if the virtual map 10 only includes 2 building objects 14, only about 2 resource data points 16 are actually needed to meet the requirement of the player for collecting virtual resources, and the distribution of the building objects 14 is not considered in the refresh method for the resource data points 16 on the virtual map 10 in the related art, so that a plurality of resource data points 16 uniformly distributed still exist on the refreshed virtual map 10, and the number of the resource data points is far greater than the number of the building objects, that is, part of the resource data points 16 are invalid resource data points, and the setting and refreshing of the part of the invalid resource data points greatly wastes the computing resources of the terminal device, resulting in low refresh efficiency of the resource data points.
Therefore, in the embodiment of the application, the distribution situation of the resource data points needing to be refreshed in the map block is determined in a self-adaptive manner based on the current distribution situation of the building objects in the map block, so that the situation that the resource data points are uniformly distributed on the virtual map to cause lower refreshing efficiency of the resource data points in the related art is avoided, the resource data points can be refreshed in a self-adaptive manner based on the current distribution situation of the building objects, the refreshing of invalid resource data points is greatly reduced, and the refreshing efficiency of the resource data points is improved. The following description will be made by using exemplary embodiments.
Please refer to fig. 2, which illustrates a schematic diagram of a virtual map 20 provided in an embodiment of the present application.
The virtual map 20 is divided into K map tiles 22, K being a positive integer or a positive integer greater than 1. At least two of the K pieces 22 have the same size, or any two pieces 22 have different sizes, or any two pieces 22 have the same size.
The shape of a map piece 22 in which at least one map piece 22 exists among the K map pieces 22 is a predetermined shape including at least one of a rectangle, a triangle, a circle, and an ellipse. This embodiment is not limited thereto. In the following, only K rectangular ground tiles 22 with the same size are taken as an example for explanation.
Optionally, the virtual map 20 is divided according to a predetermined size to obtain K map blocks 22. Wherein each map tile 22 is a predetermined size, the predetermined size comprising a predetermined length and a predetermined width. For example, each map 22 is a rectangular area of 20 × 20.
The number of data points of resource data points 26 in at least two of the K map tiles 22 is different, and/or the range of data point levels in at least two of the K map tiles 22 is different.
The map 22 in the embodiment of the present application is any one of the K map 22. At least one building object 24 and/or at least one resource site 26 is included in map tile 22.
In fig. 2, in order to distinguish the building object 24 from the resource site 26, only the building object 24 is schematically represented in a triangular shape, and the resource site 26 is schematically represented in a circular shape, but the actual shapes of the building object 24 and the resource site 26 are not limited in the embodiment of the present application.
Referring to fig. 3, a flowchart of a method for refreshing resource sites on a virtual map according to an embodiment of the present application is shown, where the embodiment takes the method as an example for use in the virtual map 20 shown in fig. 2, and the method includes:
step 301, obtaining attribute data of the building objects in the map block, where the map block corresponds to a region in the virtual map, and the attribute data is used to indicate the current distribution condition of the building objects in the map block.
And the terminal equipment determines a map block to be refreshed from the virtual map and acquires attribute data of the building object in the map block.
The terminal device divides the virtual map according to a preset size to obtain K map blocks, counts the total number of the map blocks to obtain K, and determines the map blocks to be refreshed from the virtual map in the following two possible modes:
a first possible determination: the terminal equipment randomly selects one map block from the K map blocks and determines the map block as a map block to be refreshed;
a second possible determination: the terminal equipment numbers the K map blocks, and sequentially determines one map block as the map block to be refreshed from small to large according to the number, namely sequentially refreshing. The present embodiment does not limit the determination method of the map block.
Optionally, the terminal device obtains attribute data of the building object in the map block at intervals of a predetermined refresh time. Wherein the predetermined refresh time interval is a value set in advance for the cyclic refresh.
For example, the refresh time interval is 45 minutes or 1 hour. This embodiment is not limited thereto.
Wherein the attribute data of the building object comprises the total number of the current buildings in the map block.
Step 302, according to the attribute data of the building object, determining the refresh data of the resource sites in the map block, wherein the refresh data is used for indicating the distribution condition of the refreshed resource sites in the map block.
And the terminal equipment determines the refresh data of the resource site in the map block by adopting a preset refresh rule according to the attribute data of the building object, wherein the preset refresh rule is used for indicating the corresponding relation between the attribute data and the refresh data. The preset refresh rule can refer to the related description in the following embodiments, which will not be introduced here.
The refresh data of the resource data point comprises the total number of the target data points of the resource data point in the map block.
And 303, refreshing the resource site in the map block according to the refreshing data.
And the terminal equipment refreshes the resource sites in the map block according to the refreshing data to obtain the refreshed map block.
Optionally, the refreshed map block includes at least two resource data points, and the at least two resource data points are randomly distributed or uniformly distributed in the refreshed map block. The present embodiment does not limit the positions of the at least two resource sites in the refreshed map block.
And the terminal equipment refreshes the resource data points in the map block according to the total number of the target data points of the resource data points in the map block to obtain a refreshed map block, wherein the number of the resource data points in the refreshed map block is the total number of the target data points.
For example, the total number of the target data points of the resource data points in the map block a is 10, and the terminal device refreshes the resource data points in the map block a, that is, the number of the resource data points in the refreshed map block a is adjusted to 10.
It should be noted that K map blocks in the virtual map block may be refreshed simultaneously, or at least two map blocks may be refreshed simultaneously, or any two map blocks in the K map blocks are not refreshed simultaneously, that is, each map block in the K map blocks is refreshed one by one. In order to reduce the computational burden of the terminal device, the following description will only take the case where each of the K map blocks is refreshed one by one.
In summary, in this embodiment, by obtaining attribute data of a building object in a map block, where the attribute data is used to indicate a current distribution situation of the building object in the map block, refresh data of resource sites in the map block is determined according to the attribute data of the building object, and the refresh data is used to indicate a distribution situation after refreshing of the resource sites in the map block, and refresh the resource sites in the map block according to the refresh data; the terminal equipment can determine the distribution condition of the resource data points needing to be refreshed in the map block based on the current distribution condition of the building objects in the map block, the condition that the resource data points are uniformly distributed on a virtual map to cause lower refreshing efficiency of the resource data points in the related technology is avoided, the resource data points can be refreshed in a self-adaptive mode according to the current distribution condition of the building objects, the refreshing of invalid resource data points is greatly reduced, and the refreshing efficiency of the resource data points is improved.
Referring to fig. 4, a flowchart of a method for refreshing resource sites on a virtual map according to an embodiment of the present application is shown, where the embodiment takes the method as an example for use in the virtual map 20 shown in fig. 2, and the method includes:
step 401, detecting whether the current refresh countdown is finished.
And the terminal equipment presets a refresh countdown according to a preset refresh time interval. Optionally, the refresh countdown is cycle-countdown, i.e. when the refresh countdown is over, the countdown is restarted again.
The terminal equipment detects whether the current refresh countdown is finished in real time or not, or detects whether the current refresh countdown is finished at intervals of preset detection time.
For example, the refresh count-down is 45 minutes or 1 hour, and the predetermined detection time interval is 30 seconds or 1 minute. The present embodiment does not limit the values of the refresh countdown and the predetermined detection time interval.
When the terminal device detects that the end of the current refresh countdown is "0 min 0 sec", executing step 402; when the terminal device detects that the current refresh countdown is not over, the step 401 is continuously executed.
And 402, dividing the virtual map according to a preset size when the refresh countdown is finished.
And when the refresh countdown is finished, the terminal equipment divides the virtual map according to the preset size to obtain K map blocks. Optionally, the number of the K map blocks is numbered, and the number range of the K map blocks is from "0" to "K-1".
And step 403, counting the total number K of the map blocks into which the virtual map is divided.
And the terminal device counts the total number of the map blocks divided into the virtual map to be K.
It should be noted that steps 402 to 403 may be executed after step 401, or may be executed before step 401, that is, the terminal device first divides the virtual map according to a predetermined size, counts the total number of map blocks into which the virtual map is divided, then detects whether the current refresh countdown is finished, and when the refresh countdown is finished, executes step 404.
And step 404, determining the ith map block as the map block refreshed this time, wherein the initial value of i is 0.
And the terminal equipment determines the ith map block as the refreshed map block at this time. The details of steps 402 to 404 can refer to the description in the above embodiments, and are not repeated herein.
And step 405, acquiring the total number of the current buildings in the map block.
The terminal equipment detects the current building object in the map and obtains the total number of the current buildings in the map block.
And 406, obtaining the total number of the target data points in the map block according to the total number of the buildings and a first preset refreshing rule, wherein the first preset refreshing rule is used for indicating the corresponding relation between the total number of the buildings and the total number of the target data points.
The terminal device obtains the total number of the target data points in the map block by adopting a first preset refreshing rule according to the total number of the buildings, and the method includes but is not limited to the following two possible implementation modes.
In a first possible implementation manner, the terminal device stores a corresponding relationship between the total number of buildings and the total number of target data points in advance, and searches the total number of the target data points corresponding to the total number of buildings according to the corresponding relationship.
Schematically, the correspondence is shown in fig. 5. In fig. 5, the total number of the target data points is "7" when the total number of the buildings is "8", the total number of the target data points is "10" when the total number of the buildings is "9", and the total number of the target data points is "11" when the total number of the buildings is "10". For example, based on the corresponding relationship between the total number of buildings and the total number of target data points provided in fig. 5, the total number of current buildings is 10, and the total number of target data points corresponding to the total number of buildings "10" searched by the terminal device is "11".
In a second possible implementation manner, the terminal device presets a first preset proportion, and when the terminal device obtains the total number of the current buildings in the map block, the total number of the buildings is multiplied by the first preset proportion to obtain the total number of the target data points in the map block.
For example, if the total number of the current buildings is 10 and the first preset proportion is 120%, the terminal device multiplies the total number of the buildings by the first preset proportion by "10 × 120%" to obtain the total number of the target data points in the map block as 12.
And step 407, refreshing the resource data points in the map block according to the total number of the target data points.
And the terminal equipment refreshes the resource data points in the map block according to the total number of the target data points to obtain a refreshed map block, wherein the number of the resource data points in the refreshed map block is the total number of the target data points.
Optionally, the terminal device obtains the total number of current target data points of the resource data points in the map block, determines the number of data points that need to be increased or decreased according to the total number of current target data points of the resource data points and the total number of target data points, and refreshes the resource data points in the map block.
For example, the total number of the current target data points of the resource data points in the map block a is 7, the total number of the target data points is 10, the terminal device determines that 3 resource data points need to be added, and refreshes the resource data points in the map block a, that is, the number of the resource data points in the map block a is increased by 3.
And step 408, after adding 1 to i, judging whether i is smaller than K.
And the terminal equipment adds 1 to i and then judges whether i is smaller than K.
If the number of the map blocks is less than K, the number of the map blocks is at least one, and the terminal device continues to execute step 404, that is, the ith map block is determined to be the map block.
For example, i is 0, K is 8, i is added with 1 to obtain 1, and when 1 is judged to be smaller than 8, the step of determining the 1 st map block as the map block is performed.
If i is not less than K, it indicates that all the K map blocks have been refreshed, and step 401 is restarted, i.e. a step of detecting whether the current refresh countdown is finished in real time.
For another example, if i is 7, K is 8, i is added by 1 to obtain 8, and when it is determined that 8 is equal to 8, the step of detecting whether the current refresh countdown is finished in real time is restarted.
In summary, the embodiment of the application further obtains the total number of the target data points in the map block according to the total number of the buildings and the first preset refresh rule, and refreshes the resource data points in the map block according to the total number of the target data points; the terminal equipment can determine the total number of the target data points of the resource data points needing to be refreshed in the map block based on the total number of the buildings of the building objects in the map block, so that the number of the resource data points in the refreshed map block is approximately equal to the number of the building objects, and the refreshing efficiency of the resource data points is improved.
Since the attribute data further includes: the current building class range and the number of buildings corresponding to each of the n building classes in the map block, so the above steps 405 to 407 can be alternatively implemented as the following steps, as shown in fig. 6:
step 601, obtaining the total number of the current buildings and the range of the current building grade in the map block.
The terminal equipment acquires attribute data of the building objects, wherein the attribute data comprise the total number of the current buildings in the map block and the building grade range to which the current multiple building objects belong, and the building grade range comprises n different building grades.
Wherein the n different building grades are n consecutive different building grades or n discontinuous and different building grades.
For example, the terminal device obtains that the current building grade range in the map block is "10-18", and the building grade range "10-18" includes 9 consecutive different building grades.
For another example, the terminal device obtains that the current building grade range in the map block is "10-18", where the building grade range "10-18" includes 5 discontinuous building grades, which are respectively building grade "10", building grade "12", building grade "13", building grade "16", and building grade "18".
Optionally, the terminal device obtains attribute data of the building object, where the attribute data further includes the number of buildings corresponding to each of the n building classes. Schematically, the attribute data of the building object acquired by the terminal device is shown in fig. 7. In fig. 7, the map block includes 5 different building grades, namely building grade "10", building grade "12", building grade "13", building grade "16", and building grade "18"; here, the number of buildings for the building object having the building level "10" is "2", the number of buildings for the building object having the building level "12" is "8", the number of buildings for the building object having the building level "13" is "6", the number of buildings for the building object having the building level "16" is "3", and the number of buildings for the building object having the building level "18" is "7".
Step 602, obtaining the total number of target data points in the map block according to the total number of the buildings and a first preset refresh rule, where the first preset refresh rule is used to indicate a corresponding relationship between the total number of the buildings and the total number of the target data points.
For the details of obtaining the total number of the target data points in the map block according to the total number of the buildings and the first preset refresh rule, reference may be made to the description in the above embodiments, and details are not repeated here.
Step 603, according to the building grade range, obtaining a site grade range of the resource site in the map block by using a second preset refreshing rule, wherein the second preset refreshing rule is used for indicating a corresponding relation between the building grade range and the site grade range.
Step 603 may be executed before step 602, or may be executed in parallel with step 602. This is not limited in the examples of the present application.
And the terminal equipment obtains the site grade range of the resource sites in the map block by adopting a second preset refreshing rule according to the building grade range, wherein the site grade range comprises but is not limited to the following two possible implementation modes.
In a first possible implementation manner, the terminal device stores a corresponding relationship between the building level range and the site level range in advance, and searches the site level range corresponding to the building level range according to the corresponding relationship.
Schematically, the correspondence is shown in fig. 8. In fig. 8, the site rating range corresponding to the building rating range of "1 to 9" is "2 to 10", the site rating range corresponding to the building rating range of "10 to 18" is "11 to 19", and the site rating range corresponding to the building rating range of "19 to 27" is "20 to 28". For example, based on the correspondence between the building level range and the site level range provided in fig. 8, the current building level range is "10 to 18", and the terminal device searches for the site level range corresponding to the building level range "10 to 18" as "11 to 19".
In a second possible implementation manner, the terminal device sets a preset threshold in advance, and when the terminal device obtains n building grades and the number of buildings corresponding to the n building grades, sums the products of each building grade in the n building grades and the number of buildings in the building grades to obtain a first sum value; dividing the first sum value by the total number of the buildings and rounding to obtain a grade evaluation value; subtracting the grade evaluation value from a preset threshold value to obtain a grade minimum value, and adding the grade evaluation value and the preset threshold value to obtain a grade maximum value; and obtaining the site grade range of the resource sites in the map block according to the grade minimum value and the grade maximum value.
For example, based on the n building levels provided in fig. 7 and the building numbers corresponding to the n building levels, the level evaluation value zone _ level | ∑ (10 × 2+12 × 8+13 × 6+16 × 3+18 × 7)/26| ═ 14 is calculated by the following formula. Subtracting the preset threshold value "2" from the level evaluation value "14" to obtain a level minimum value "12", and adding the level evaluation value "14" to the preset threshold value "2" to obtain a level maximum value "16"; and obtaining a site grade range of the resource sites in the map block from 12 to 16 according to the grade minimum value of 12 and the grade maximum value of 16.
And step 604, refreshing the resource data points in the map block according to the total number of the target data points and the data point grade range.
And the terminal equipment determines m different data point grades according to the data point grade range, and refreshes the resource data points in the map block according to the total quantity of the target data points and the m data point grades.
Wherein the m different data point levels are m continuous different data point levels or m discontinuous and different data point levels.
For example, the terminal device determines 5 consecutive different site levels based on the site level range "12-16".
For another example, the terminal device randomly determines 3 discontinuous and different base levels, namely, the base level "13", the base level "15" and the base level "16", according to the base level range "12-16".
This embodiment is not limited thereto. In the following description, only m different spot levels are described as an example, which are m consecutive different spot levels.
Optionally, the terminal device randomly determines the data point number corresponding to each of the m data point grades according to the total number of the target data points and the m data point grades, so as to refresh the resource data points in the map block.
For example, the terminal device randomly determines, according to the target data point total number "26" and 5 data point levels, the data point number corresponding to each of the 5 data point levels, that is, the data point number of the data point level "12" is 2, the data point number of the data point level "13" is 3, the data point number of the data point level "14" is 5, the data point number of the data point level "15" is 10, and the data point number of the data point level "16" is 6.
In summary, in this embodiment, a second preset refresh rule is adopted to obtain a site level range of the resource sites in the map block according to the building level range, and the resource sites in the map block are refreshed according to the total number of the target sites and the site level range; the terminal equipment can determine the site grade range of the resource site needing to be refreshed in the map block based on the building grade range in the map block, so that the building grade range in the refreshed map block is approximately equivalent to the site grade range, and the refreshing effect of refreshing the resource site in the map block is improved.
It should be noted that, in the above method, there is a great randomness in the number of data points corresponding to each of m data point levels randomly determined by the terminal device, and the quantitative ratio of each data point level in the total number of target data points is not necessarily appropriate, in order to be able to determine the appropriate quantitative ratio of m data point levels in the total number of target data points, the above steps 601 to 604 further include the following steps, as shown in fig. 9:
step 901, the terminal device obtains attribute data of the building objects in the map block, where the attribute data includes the total number of the current buildings, n building grades, and the number of buildings corresponding to each of the n building grades.
And 902, the terminal equipment obtains the total number of the target data points in the map block according to the total number of the buildings and a first preset refreshing rule, wherein the first preset refreshing rule is used for indicating the corresponding relation between the total number of the buildings and the total number of the target data points.
Step 903, the terminal device obtains a site level range of the resource sites in the map block by using a second preset refresh rule according to the building level range, wherein the second preset refresh rule is used for indicating a corresponding relationship between the building level range and the site level range, and the site level range includes m different site levels.
For details of steps 901 to 903, reference may be made to the descriptions in the above embodiments, and details are not repeated here.
And 904, the terminal device obtains the quantity ratio corresponding to each of the m data point levels according to the m data point levels and a third preset refresh rule, wherein the third preset refresh rule is used for indicating the corresponding relation between the data point levels and the quantity ratio.
The terminal equipment obtains the quantity ratio corresponding to each of the m data point grades according to the m data point grades and a third preset refreshing rule, and the quantity ratio comprises the following steps: and for each data point grade in the m data point grades, multiplying the preset weight corresponding to the data point grade by a second preset proportion to obtain a product value of the data point grade, summing the product values corresponding to the m data point grades to obtain a second sum value, and for each data point grade, dividing the product value of the data point grade by the second sum value to obtain the number ratio of the data point grade.
Optionally, the terminal device prestores a correspondence between the site level, the preset weight, and the second preset proportion, and searches for the preset weight and the second preset proportion corresponding to the site level according to the correspondence.
Schematically, the correspondence is shown in fig. 10. In fig. 10, the preset weight corresponding to the point level "10" is "0.4", and the corresponding second preset proportion is "60%"; according to the point level "11", the corresponding preset weight is "0.6", and the corresponding second preset proportion is "80%"; according to the point level "12", the corresponding preset weight is "0.5", and the corresponding second preset proportion is "120%".
For example, based on the correspondence among the data point levels, the preset weight, and the second preset ratio provided in fig. 10, when the terminal device determines that m data point levels include 3 data point levels, which are the data point level "10", the data point level "11", and the data point level "12", respectively, through the formula: 0.4 × 60%/(0.4 × 60% +0.6 × 80% +0.5 × 120%), calculated to give a ratio of the number of data points "10" equal to about 19%; by the formula: 0.6 × 80%/(0.4 × 60% +0.6 × 80% +0.5 × 120%), calculated to give a ratio of the number of data points "11" equal to about 36%; by the formula: 0.5 × 120%/(0.4 × 60% +0.6 × 80% +0.5 × 120%), the number of data points "12" was calculated to be equal to about 45%.
Step 905, the terminal device obtains the data point quantity corresponding to each of the m data point grades according to the ratio of the total quantity of the target data points to the quantity corresponding to each of the m data point grades.
For example, the total number of target data points is 100, the number of data points in the data point rank "10" is 19%, the number of data points in the data point rank "10" is 36%, the number of data points in the data point rank "10" is 45%, the number of data points in the data point rank "10" is 100 × 19% — 19, the number of data points in the data point rank "11" is 100 × 36% — 36, and the number of data points in the data point rank "12" is 100 × 45% — 45.
And 906, the terminal equipment refreshes the resource data points in the map block according to the data point quantity corresponding to each of the m data point grades.
And the terminal equipment refreshes the resource data points in the map block according to the data point quantity corresponding to each of the m data point grades, the quantity of the resource data points in the refreshed map block is the total quantity of the target data points, and the total quantity of the target data points comprises the data point quantity corresponding to each of the m data point grades.
In one illustrative example, the building object is a city block, as shown in FIG. 11A. The map block 110 originally includes 2 city pools 111 and 2 resource data points 112, then a city pool 113 exists for migration, the map block is migrated into the map block 111, when the refresh countdown is finished, the terminal device obtains the total number of the current city pools in the map block 110 to be 3, and according to the detected city pool grades of the 3 city pools, the current city pool grade range in the map block 110 is obtained through statistics to be 10-11, namely the map block includes 3 city pool grades, the number of the city pools of the city pool grade "10" is 2, and the number of the city pools of the city pool grade "11" is 1. The terminal equipment determines the total number of target data points to be 3 according to the current total number of the urban pools to be 3; according to the respective corresponding city pool numbers of the 2 city pool levels and the 2 city pool levels, the respective corresponding data point numbers of the 2 data point levels and the 2 data point levels are determined, namely the city pool number of the data point level '11' is 2, and the city pool number of the data point level '12' is '1'. Before the terminal device performs refresh, the site levels of the current 2 resource sites 112 in the map block 110 are obtained as the site level "9" and the site level "10", respectively, so that when the refresh is started, the terminal device adjusts the current 2 resource sites 112 to the resource sites 114 of which the site levels are all "11" according to the obtained data and the determined refresh data, and adds one resource site 114 of which the site level is "12" to the map block 110. The interface schematic diagram of the refreshed map block 110 is shown in fig. 11B.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 12, a schematic structural diagram of a refresh apparatus for a resource site on a virtual map according to an embodiment of the present application is shown. The refreshing device for the resource site on the virtual map can be realized to be all or part of refreshing equipment through a special hardware circuit or the combination of software and hardware, and comprises the following components: an acquisition module 1210, a determination module 1220, and a refresh module 1230.
An obtaining module 1210 configured to implement at least one of the steps 301, 405, 601, and 901.
A determining module 1220, configured to implement at least one of the steps 302, 406, 602, 603, 902, and 903.
A refresh module 1230 for implementing at least one of the steps 303, 407, 604.
In an alternative embodiment provided based on the embodiment shown in fig. 12, as shown in fig. 13, the building grade range includes n different building grades, and the attribute data further includes: the number of buildings corresponding to the n building grades respectively, wherein n is a positive integer;
the determining module 1220 further includes: a first processing unit 1221, a second processing unit 1222, and a third processing unit 1223;
the first processing unit 1221 is configured to sum products of each building level of the n building levels and the number of buildings of the building level to obtain a first sum value; dividing the first sum value by the total number of the buildings and rounding to obtain a grade evaluation value;
a second processing unit 1222 subtracting the rating evaluation value from a preset threshold to obtain a minimum rating value, and adding the rating evaluation value to the preset threshold to obtain a maximum rating value;
and the third processing unit 1223 is configured to obtain a location level range of the resource location in the map block according to the minimum level value and the maximum level value.
In an alternative embodiment provided based on the embodiment shown in FIG. 12, as shown in FIG. 13, the range of site levels includes m different site levels, where m is a positive integer;
the refresh module 1230 further includes: a fourth processing unit 1231, a fifth processing unit 1232, and a refresh unit 1233;
a fourth processing unit 1231 configured to implement step 904 described above.
A fifth processing unit 1232 configured to implement step 905 as described above.
A refresh unit 1233 for implementing the step 906.
In an alternative embodiment provided based on the embodiment shown in fig. 12, as shown in fig. 13, the fourth processing unit 1231 is further configured to, for each data point level of the m data point levels, multiply the preset weight corresponding to the data point level by a second preset proportion to obtain a product value of the data point level; summing the product values corresponding to the m data point grades to obtain a second sum value; and for each data point grade, dividing the product value of the data point grades with the second sum value to obtain the number ratio of the data point grades.
The relevant details may be combined with the method embodiments described with reference to fig. 2-11B. The obtaining module 1210 is further configured to implement any other implicit or public functions related to the obtaining step in the foregoing method embodiment; the determining module 1220 is further configured to implement any other implicit or disclosed functionality related to the determining step in the above method embodiments; the refresh module 1230 is further configured to implement any other implicit or disclosed functionality related to the refresh step in the above method embodiments.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The embodiment of the application provides a terminal device, which comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the refreshing method for the resource site on the virtual map provided by the above method embodiments.
It should be noted that the terminal device may be the terminal 1400 provided in fig. 14 as follows, or may be the server 1500 provided in fig. 15 as follows.
Please refer to fig. 14, which illustrates a schematic structural diagram of a terminal 1400 according to an embodiment of the present application.
The terminal 1400 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1400 can also be referred to as user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other names.
In general, terminal 1400 includes: a processor 1401, and a memory 1402.
Processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1401 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, processor 1401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 1402 may include one or more computer-readable storage media, which may be non-transitory. Memory 1402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1402 is used to store at least one instruction for execution by processor 1401 to implement the refresh method for resource sites on a virtual map provided by method embodiments herein.
In some embodiments, terminal 1400 may further optionally include: a peripheral device interface 1403 and at least one peripheral device. The processor 1401, the memory 1402, and the peripheral device interface 1403 may be connected by buses or signal lines. Each peripheral device may be connected to the peripheral device interface 1403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1404, a touch display 1405, a camera 1406, audio circuitry 1407, a positioning component 1408, and a power supply 1409.
The peripheral device interface 1403 can be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 1401 and the memory 1402. In some embodiments, the processor 1401, memory 1402, and peripheral interface 1403 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 1401, the memory 1402, and the peripheral device interface 1403 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 1404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 1404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 1404 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1404 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 1404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1405 is a touch display screen, the display screen 1405 also has the ability to capture touch signals at or above the surface of the display screen 1405. The touch signal may be input to the processor 1401 for processing as a control signal. At this point, the display 1405 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 1405 may be one, providing the front panel of the terminal 1400; in other embodiments, display 1405 may be at least two, respectively disposed on different surfaces of terminal 1400 or in a folded design; in still other embodiments, display 1405 may be a flexible display disposed on a curved surface or on a folded surface of terminal 1400. Even further, the display 1405 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display 1405 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 1406 is used to capture images or video. Optionally, camera assembly 1406 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1406 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1407 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1401 for processing or inputting the electric signals to the radio frequency circuit 1404 to realize voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided, each at a different location of terminal 1400. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is then used to convert electrical signals from the processor 1401 or the radio frequency circuit 1404 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuit 1407 may also include a headphone jack.
The positioning component 1408 serves to locate the current geographic position of the terminal 1400 for navigation or LBS (Location Based Service). The Positioning component 1408 may be based on the Positioning component of the GPS (Global Positioning System) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 1409 is used to power the various components of terminal 1400. The power source 1409 may be alternating current, direct current, disposable or rechargeable. When the power source 1409 comprises a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1400 also includes one or more sensors 1410. The one or more sensors 1410 include, but are not limited to: acceleration sensor 1411, gyroscope sensor 1412, pressure sensor 1413, fingerprint sensor 1414, optical sensor 1415, and proximity sensor 1416.
The acceleration sensor 1411 may detect the magnitude of acceleration on three coordinate axes of a coordinate system established with the terminal 1400. For example, the acceleration sensor 1411 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1401 can control the touch display 1405 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1411. The acceleration sensor 1411 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 1412 may detect a body direction and a rotation angle of the terminal 1400, and the gyro sensor 1412 and the acceleration sensor 1411 may cooperate to collect a 3D motion of the user on the terminal 1400. The processor 1401 can realize the following functions according to the data collected by the gyro sensor 1412: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 1413 may be disposed on the side bezel of terminal 1400 and/or underlying touch display 1405. When the pressure sensor 1413 is disposed on the side frame of the terminal 1400, the user's holding signal of the terminal 1400 can be detected, and the processor 1401 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1413. When the pressure sensor 1413 is disposed at the lower layer of the touch display 1405, the processor 1401 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 1405. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1414 is used for collecting a fingerprint of a user, and the processor 1401 identifies the user according to the fingerprint collected by the fingerprint sensor 1414, or the fingerprint sensor 1414 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 1401 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for, and changing settings, etc. Fingerprint sensor 1414 may be disposed on the front, back, or side of terminal 1400. When a physical button or vendor Logo is provided on terminal 1400, fingerprint sensor 1414 may be integrated with the physical button or vendor Logo.
The optical sensor 1415 is used to collect ambient light intensity. In one embodiment, processor 1401 can control the display brightness of touch display 1405 based on the ambient light intensity collected by optical sensor 1415. Specifically, when the ambient light intensity is high, the display luminance of the touch display 1405 is increased; when the ambient light intensity is low, the display brightness of the touch display 1405 is turned down. In another embodiment, the processor 1401 can also dynamically adjust the shooting parameters of the camera assembly 1406 according to the intensity of the ambient light collected by the optical sensor 1415.
Proximity sensor 1416, also known as a distance sensor, is typically disposed on the front panel of terminal 1400. The proximity sensor 1416 is used to collect the distance between the user and the front surface of the terminal 1400. In one embodiment, when proximity sensor 1416 detects that the distance between the user and the front face of terminal 1400 is gradually decreased, processor 1401 controls touch display 1405 to switch from a bright screen state to a dark screen state; when proximity sensor 1416 detects that the distance between the user and the front face of terminal 1400 is gradually increasing, processor 1401 controls touch display 1405 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 14 is not intended to be limiting with respect to terminal 1400 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be employed.
Referring to fig. 15, a schematic structural diagram of a server 1500 according to an embodiment of the present application is shown. Specifically, the method comprises the following steps: the server 1500 includes a Central Processing Unit (CPU)1501, a system memory 1504 including a Random Access Memory (RAM)1502 and a Read Only Memory (ROM)1503, and a system bus 1505 connecting the system memory 1504 and the central processing unit 1501. The server 1500 also includes a basic input/output system (I/O system) 1506, which facilitates transfer of information between devices within the computer, and a mass storage device 1507 for storing an operating system 1513, application programs 1514, and other program modules 1515.
The basic input/output system 1506 includes a display 1508 for displaying information and an input device 1509 such as a mouse, keyboard, etc. for a user to input information. Wherein the display 1508 and the input device 1509 are connected to the central processing unit 1501 via an input output controller 1510 connected to the system bus 1505. The basic input/output system 1506 may also include an input/output controller 1510 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input-output controller 1510 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1507 is connected to the central processing unit 1501 through a mass storage controller (not shown) connected to the system bus 1505. The mass storage device 1507 and its associated computer-readable media provide non-volatile storage for the server 1500. That is, the mass storage device 1507 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROI drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 1504 and mass storage device 1507 described above may be collectively referred to as memory.
The server 1500 may also operate as a remote computer connected to a network via a network, such as the internet, according to various embodiments of the present application. That is, the server 1500 may be connected to the network 1512 through the network interface unit 1511 connected to the system bus 1505, or may be connected to other types of networks or remote computer systems (not shown) using the network interface unit 1511.
Optionally, the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the refresh method for the resource site on the virtual map provided by the above-mentioned method embodiments.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps in the method for refreshing resource sites on a virtual map according to the foregoing embodiments may be implemented by hardware, or may be implemented by a program instructing associated hardware, where the program may be stored in a computer-readable storage medium, where the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like. In other words, the storage medium has stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by a processor to implement the refresh method for a resource site on a virtual map as described in the various method embodiments above.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A refreshing method for resource sites on a virtual map is applied to a terminal device, and comprises the following steps:
acquiring attribute data of building objects in map blocks, wherein the building objects are map points used for manufacturing, camping and/or training virtual game characters, the map blocks correspond to one area in the virtual map, the virtual map is divided into at least two map blocks, the attribute data are used for indicating the current distribution situation of the building objects in the map blocks, the attribute data comprise the total number of current buildings in the map blocks, the virtual game characters in the building objects are used for being controlled to move to resource data points in the map blocks to collect virtual resources, the resource data points are map points used for providing virtual resources, and the map blocks comprise at least one building object and at least one resource data point;
obtaining the total number of target data points in the map block according to the total number of the buildings and a first preset refreshing rule, wherein the first preset refreshing rule is used for indicating the corresponding relationship between the total number of the buildings and the total number of the target data points, and the total number of the target data points refers to the total number of resource data points of the resource data points in the map block after refreshing;
and refreshing the resource data points in the map block according to the total number of the target data points.
2. The method of claim 1, wherein the attribute data further comprises: a current building grade range in the map block; the method further comprises the following steps:
obtaining a site grade range of the resource site in the map block by adopting a second preset refreshing rule according to the building grade range, wherein the second preset refreshing rule is used for indicating the corresponding relation between the building grade range and the site grade range;
and refreshing the resource data points in the map block according to the total number of the target data points and the data point grade range.
3. The method of claim 2, wherein the building grade range comprises n different building grades, the attribute data further comprising: the number of buildings corresponding to the n building grades respectively, wherein n is a positive integer;
the obtaining of the site level range of the resource site in the map block by adopting a second preset refresh rule according to the building level range includes:
summing the products of each building grade in the n building grades and the building quantity of the building grade to obtain a first sum value;
dividing the first total sum value with the total number of the buildings and rounding to obtain a grade evaluation value;
subtracting the grade evaluation value from the preset threshold value to obtain a grade minimum value, and adding the grade evaluation value and the preset threshold value to obtain a grade maximum value;
and obtaining the data point grade range of the resource data points in the map block according to the grade minimum value and the grade maximum value.
4. The method of claim 2, wherein the range of data point levels includes m different data point levels, wherein m is a positive integer;
the refreshing the resource data points in the map block according to the total number of the target data points and the data point grade range comprises:
obtaining the quantity ratio corresponding to each of the m data point grades according to the m data point grades and a third preset refreshing rule, wherein the third preset refreshing rule is used for indicating the corresponding relation between the data point grades and the quantity ratio;
obtaining the data point quantity corresponding to each of the m data point grades according to the ratio of the total quantity of the target data points to the quantity corresponding to each of the m data point grades;
and refreshing the resource data points in the map block according to the data point quantity corresponding to the m data point grades respectively.
5. The method of claim 4, wherein obtaining the number ratios corresponding to the m data point levels according to the m data point levels and a third preset refresh rule comprises:
for each data point grade in the m data point grades, multiplying a preset weight corresponding to the data point grade by a second preset proportion to obtain a product value of the data point grade;
summing the product values corresponding to the m data point grades to obtain a second sum value;
and for each data point grade, dividing the product value of the data point grades with the second sum value to obtain the number proportion of the data point grades.
6. A device for refreshing resource sites on a virtual map, the device comprising:
an obtaining module, configured to obtain attribute data of a building object in a map block, where the building object is a map point used for manufacturing, camping, and/or training a virtual game character, the map block corresponds to a region in the virtual map, the virtual map is divided into at least two map blocks, the attribute data is used to indicate a current distribution situation of the building object in the map block, the attribute data includes a total number of buildings in the map block, the virtual game character in the building object is used to be controlled to move to a resource site in the map block to collect a virtual resource, the resource site is a map point used for providing a virtual resource, and the map block includes at least one building object and at least one resource site;
the determining module is configured to obtain a total number of target data points in the map block according to the total number of the buildings and a first preset refresh rule, where the first preset refresh rule is used to indicate a corresponding relationship between the total number of the buildings and the total number of the target data points, and the total number of the target data points refers to the total number of resource data points of the resource data points in the map block after being refreshed;
and the refreshing module is used for refreshing the resource data points in the map block according to the total number of the target data points.
7. The apparatus of claim 6, wherein the attribute data further comprises: a current building grade range in the map block;
the determining module is further configured to obtain a site level range of the resource site in the map block according to the building level range by using a second preset refresh rule, where the second preset refresh rule is used to indicate a correspondence between the building level range and the site level range;
and the refreshing module is further used for refreshing the resource data points in the map block according to the total number of the target data points and the data point grade range.
8. The apparatus of claim 7, wherein the building grade range comprises n different building grades, the attribute data further comprising: the number of buildings corresponding to the n building grades respectively, wherein n is a positive integer;
the determining module further comprises: a first processing unit, a second processing unit and a third processing unit;
the first processing unit is used for summing products of each building grade in the n building grades and the building number of the building grade to obtain a first sum value; dividing the first total sum value with the total number of the buildings and rounding to obtain a grade evaluation value;
the second processing unit is used for subtracting the grade evaluation value from the preset threshold value to obtain a grade minimum value, and adding the grade evaluation value and the preset threshold value to obtain a grade maximum value;
and the third processing unit is used for obtaining the data point grade range of the resource data points in the map block according to the grade minimum value and the grade maximum value.
9. The apparatus of claim 7, wherein the range of site levels comprises m different site levels, wherein m is a positive integer;
the refresh module further includes: the fourth processing unit, the fifth processing unit and the refreshing unit;
the fourth processing unit is configured to obtain quantity ratios corresponding to the m data point levels according to the m data point levels and a third preset refresh rule, where the third preset refresh rule is used to indicate a correspondence between the data point levels and the quantity ratios;
the fifth processing unit is configured to obtain data point numbers corresponding to the m data point levels according to the ratio of the total number of the target data points to the number corresponding to each of the m data point levels;
and the refreshing unit is used for refreshing the resource data points in the map block according to the data point quantity corresponding to each of the m data point grades.
10. The apparatus of claim 9, wherein the fourth processing unit is further configured to, for each of the m data point levels, multiply a preset weight corresponding to the data point level by a second preset ratio to obtain a product value of the data point level; summing the product values corresponding to the m data point grades to obtain a second sum value; and for each data point grade, dividing the product value of the data point grades with the second sum value to obtain the number proportion of the data point grades.
11. A terminal device comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to implement the method of any of claims 1 to 5 for refreshing resource sites on a virtual map.
12. A computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the method for refreshing resource sites on a virtual map as claimed in any one of claims 1 to 5.
CN201711233543.8A 2017-11-30 2017-11-30 Refreshing method and device for resource site on virtual map Active CN107803030B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711233543.8A CN107803030B (en) 2017-11-30 2017-11-30 Refreshing method and device for resource site on virtual map
PCT/CN2018/117769 WO2019105352A1 (en) 2017-11-30 2018-11-27 Method and device for refreshing resource bases in virtual map and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711233543.8A CN107803030B (en) 2017-11-30 2017-11-30 Refreshing method and device for resource site on virtual map

Publications (2)

Publication Number Publication Date
CN107803030A CN107803030A (en) 2018-03-16
CN107803030B true CN107803030B (en) 2020-12-25

Family

ID=61581903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711233543.8A Active CN107803030B (en) 2017-11-30 2017-11-30 Refreshing method and device for resource site on virtual map

Country Status (2)

Country Link
CN (1) CN107803030B (en)
WO (1) WO2019105352A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107803030B (en) * 2017-11-30 2020-12-25 腾讯科技(成都)有限公司 Refreshing method and device for resource site on virtual map
CN109806592B (en) * 2019-01-18 2022-09-30 网易(杭州)网络有限公司 Game resource monitoring method and device
CN110102052B (en) * 2019-05-08 2022-06-10 腾讯科技(上海)有限公司 Virtual resource delivery method and device, electronic device and storage medium
CN111617484B (en) * 2020-06-04 2023-09-05 珠海金山数字网络科技有限公司 Map processing method and device
CN111744181A (en) * 2020-07-01 2020-10-09 网易(杭州)网络有限公司 In-game information display method and device, game client and medium
CN111939566B (en) * 2020-09-03 2024-01-26 网易(杭州)网络有限公司 Virtual material deployment method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4733870A (en) * 1986-09-03 1988-03-29 Ed Rinehart Strategy game emphasizing economical and political development
CN103544025A (en) * 2012-07-10 2014-01-29 腾讯科技(深圳)有限公司 Online game resource acquisition method and device
CN105589861A (en) * 2014-10-22 2016-05-18 杭州海康威视系统技术有限公司 Method for rapid positioning in map data
CN106164950A (en) * 2014-03-28 2016-11-23 微软技术许可有限责任公司 To group across client subscription
CN107038050A (en) * 2017-04-25 2017-08-11 合肥充盈信息科技有限公司 A kind of game configuration loading method based on virtual server
CN107077460A (en) * 2014-09-30 2017-08-18 微软技术许可有限责任公司 Structuring sample author content
CN107085612A (en) * 2017-05-15 2017-08-22 腾讯科技(深圳)有限公司 media content display method, device and storage medium
CN107170033A (en) * 2017-04-12 2017-09-15 青岛市光电工程技术研究院 Smart city 3D live-action map systems based on laser radar technique

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566993A (en) * 2008-04-22 2009-10-28 北京中食新华科技有限公司 Logistics WebGIS algorithm capable of balancing load
JP5378133B2 (en) * 2009-09-28 2013-12-25 任天堂株式会社 Bird's-eye view map resource generation program, bird's-eye view map display program, bird's-eye view map resource generation device, and bird's-eye view map display device
US10421017B2 (en) * 2015-12-04 2019-09-24 Sony Interactive Entertainment America Llc Balancing multiple team based games
CN106445588B (en) * 2016-09-08 2018-05-04 腾讯科技(深圳)有限公司 The update method and device of attribute information
CN107803030B (en) * 2017-11-30 2020-12-25 腾讯科技(成都)有限公司 Refreshing method and device for resource site on virtual map

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4733870A (en) * 1986-09-03 1988-03-29 Ed Rinehart Strategy game emphasizing economical and political development
CN103544025A (en) * 2012-07-10 2014-01-29 腾讯科技(深圳)有限公司 Online game resource acquisition method and device
CN106164950A (en) * 2014-03-28 2016-11-23 微软技术许可有限责任公司 To group across client subscription
CN107077460A (en) * 2014-09-30 2017-08-18 微软技术许可有限责任公司 Structuring sample author content
CN105589861A (en) * 2014-10-22 2016-05-18 杭州海康威视系统技术有限公司 Method for rapid positioning in map data
CN107170033A (en) * 2017-04-12 2017-09-15 青岛市光电工程技术研究院 Smart city 3D live-action map systems based on laser radar technique
CN107038050A (en) * 2017-04-25 2017-08-11 合肥充盈信息科技有限公司 A kind of game configuration loading method based on virtual server
CN107085612A (en) * 2017-05-15 2017-08-22 腾讯科技(深圳)有限公司 media content display method, device and storage medium

Also Published As

Publication number Publication date
WO2019105352A1 (en) 2019-06-06
CN107803030A (en) 2018-03-16

Similar Documents

Publication Publication Date Title
CN107803030B (en) Refreshing method and device for resource site on virtual map
CN108710525B (en) Map display method, device, equipment and storage medium in virtual scene
CN108619721B (en) Distance information display method and device in virtual scene and computer equipment
CN108245893B (en) Method, device and medium for determining posture of virtual object in three-dimensional virtual environment
CN108063981B (en) Method and device for setting attributes of live broadcast room
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN110134744B (en) Method, device and system for updating geomagnetic information
CN109886208B (en) Object detection method and device, computer equipment and storage medium
US20220291791A1 (en) Method and apparatus for determining selected target, device, and storage medium
WO2019192061A1 (en) Method, device, computer readable storage medium for identifying and generating graphic code
CN109189290B (en) Click area identification method and device and computer readable storage medium
CN109660876B (en) Method and device for displaying list
CN111389015A (en) Method and device for determining game props and storage medium
CN111068323A (en) Intelligent speed detection method and device, computer equipment and storage medium
CN111897465B (en) Popup display method, device, equipment and storage medium
CN111158575B (en) Method, device and equipment for terminal to execute processing and storage medium
CN110152309B (en) Voice communication method, device, electronic equipment and storage medium
CN111383251B (en) Method, device, monitoring equipment and storage medium for tracking target object
CN109833624B (en) Display method and device for marching line information on virtual map
CN113935678A (en) Method, device, equipment and storage medium for determining multiple distribution terminals held by distributor
CN113592874B (en) Image display method, device and computer equipment
CN115545592A (en) Display positioning method, device, equipment and storage medium
CN114140105A (en) Resource transfer method, device, equipment and computer readable storage medium
CN113559494A (en) Virtual item display method, device, terminal and storage medium
CN108310767B (en) Information display method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant