Method, device and equipment for determining proximate game objects in a distributed computing framework
By interacting with servers within a distributed computing framework, the list of nearby objects for game objects is determined in real time, solving the problem of difficulty in object determination caused by server computing pressure in online games, and improving the real-time performance and accuracy of the game.
Patent Information
- Application Number
- CN202111618309.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2041-12-27
AI Technical Summary
In online games, the excessive computational pressure on server areas makes it difficult to accurately determine the neighboring objects of game objects in real time, affecting the normal operation of game services.
Using a distributed computing framework, after the first server determines that the object's location has changed, it sends a nearby object query request to the location server and the second server, receives and merges the object lists returned by the two servers, and determines the target's nearby object list.
This technology enables real-time and accurate determination of the list of nearby objects when an object's location changes, reducing server computational load and improving the real-time performance and accuracy of game services.
Smart Images

Figure CN114491301B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computers, in particular to the technical field of artificial intelligence such as big data and cloud computing, and more particularly to a method and device for determining proximate game objects in a distributed computing framework, equipment and a storage medium. BACKGROUND
[0002] In online applications, such as online games, in order to reduce the pressure on the server, the game scene is usually divided into multiple areas, and then different servers provide service for different areas. Each area corresponds to a server that runs independently and interacts with other servers as needed. As the complexity or scale of the game expands, the amount of users each area server needs to carry becomes larger and larger, which not only causes a huge computing pressure on the server, but also may affect the normal use of the game service, such as difficulty in finding the proximate game objects for each game object in real time and accurately. SUMMARY
[0003] The present disclosure provides a method and device for determining proximate game objects in a distributed computing framework, equipment and a storage medium.
[0004] According to an aspect of the present disclosure, a method for determining proximate game objects in a distributed computing framework is provided, comprising:
[0005] The first server determines the changed position of any object when it is determined that the position of the object has changed;
[0006] Send a proximate object query request to the position server and the second server respectively, wherein the query request includes the changed position of the object, and the scene area corresponding to the second server is the same as the scene area corresponding to the first server;
[0007] Receive the first proximate object list returned by the position server and the second proximate object list returned by the second server;
[0008] Determine the target proximate object list corresponding to the changed position of the object according to the first proximate object list and the second proximate object list.
[0009] According to a second aspect of the present disclosure, a device for determining proximate game objects in a distributed computing framework is provided, comprising:
[0010] The first determination module is configured to determine the changed position of any object when it is determined that the position of the object has changed by the first server;
[0011] The sending module is configured to send a proximity object query request to a location server and a second server respectively, wherein the query request comprises the changed position of the any object, and the second server corresponds to a same scene area as the first server.
[0012] The receiving module is configured to receive a first proximity object list returned by the location server and a second proximity object list returned by the second server.
[0013] The second determining module is configured to determine a target proximity object list corresponding to the changed position of the any object according to the first proximity object list and the second proximity object list.
[0014] The third aspect of the present disclosure provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to the first aspect of the present disclosure when executing the program.
[0015] The fourth aspect of the present disclosure provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the method according to the first aspect of the present disclosure.
[0016] The fifth aspect of the present disclosure provides a computer program product, which executes the method according to the first aspect of the present disclosure when an instruction processor in the computer program product executes.
[0017] In the embodiments of the present disclosure, first, the first server determines the changed position of the any object when the position of the any object is changed, and then sends a proximity object query request to a location server and a second server respectively, wherein the query request comprises the changed position of the any object, and the second server corresponds to a same scene area as the first server. Then, the first server receives a first proximity object list returned by the location server and a second proximity object list returned by the second server. Finally, the first server determines a target proximity object list corresponding to the changed position of the any object according to the first proximity object list and the second proximity object list. In this way, when the position of the any object is changed, the proximity object list corresponding to the any object can be determined in real time through the interaction between the servers in the distributed computing framework, which is not only accurate and reliable, but also has high real-time performance.
[0018] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0020] Figure 1 An architecture schematic diagram of a distributed computing framework provided by an embodiment of the present disclosure;
[0021] Figure 2 A flow schematic diagram of a method for determining proximate game objects in a distributed computing framework provided by an embodiment of the present disclosure;
[0022] Figure 3 A flow schematic diagram of another method for determining proximate game objects in a distributed computing framework provided by an embodiment of the present disclosure;
[0023] Figure 4 A flow schematic diagram of another method for determining proximate game objects in a distributed computing framework provided by an embodiment of the present disclosure;
[0024] Figure 5 A flow schematic diagram of another method for determining proximate game objects in a distributed computing framework provided by an embodiment of the present disclosure;
[0025] Figure 6 A structure block diagram of a device for determining proximate game objects in a distributed computing framework provided by an embodiment of the present disclosure;
[0026] Figure 7 A block diagram of an electronic device for implementing a method for determining proximate game objects in a distributed computing framework provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] The exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures.
[0028] In order to facilitate the understanding of the present disclosure, the technical field related to the present disclosure is first explained simply in the following.
[0029] Artificial intelligence is a discipline that studies making computers simulate some thinking processes and intelligent behaviors of people (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning, deep learning, big data processing technology, knowledge graph technology, etc. several directions.
[0030] Cloud computing is a kind of distributed computing, which means that through the network "cloud", huge data computing processing programs are divided into countless small programs, and then through a system composed of multiple servers to process and analyze these small programs to get results and return to the user. In the early days of cloud computing, simply put, it is a simple distributed computing, which solves task distribution and combines the results of computation. Therefore, cloud computing is also called grid computing. Through this technology, the processing of tens of thousands of data can be completed in a very short time (a few seconds), so as to achieve powerful network services.
[0031] Big data processing refers to the process of analyzing and processing huge data in an artificial intelligence manner, and big data can be summarized as five Vs, large data volume (Volume), high speed (Velocity), multiple types (Variety), value (Value), and authenticity (Veracity).
[0032] It should be noted that in the embodiments of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations, and do not violate public order and good customs. The candidate regional information of the object obtained by the step contains the determination logic of the morphological characteristics, and the construction of the determination logic of the morphological characteristics is performed after the user's authorization, which complies with relevant laws and regulations and does not violate public order and good customs.
[0033] The present disclosure provides a method for determining a nearby game object in a distributed computing framework, which can be executed by a device for determining a nearby game object in a distributed computing framework provided by the present disclosure, or by an electronic device provided by the present disclosure. The electronic device can include, but is not limited to, a desktop computer, a tablet computer, a cloud device, a mobile device, a personal digital assistant, and other hardware devices with various operating systems, touch screens, and / or display screens, or it can be a server. The following describes a server provided by the present disclosure executing a method for determining a nearby game object in a distributed computing framework provided by the present disclosure, but this is not a limitation of the present disclosure.
[0034] It's important to note that in some online scenarios, such as game scenarios, smaller maps may have only one geographical area. However, for larger maps, it's usually necessary to divide the game's map into different geographical areas. For example... Figure 1 As shown, map1 can be divided into multiple adjacent geographical areas, such as map1 area1, map1 area2, map1 area3, map1 area4, etc., and each area is then provided with business services by a different server. It can be understood that each geographical area's corresponding server can be considered a computing unit, with each unit operating independently and managing the objects loaded within that area, i.e., users. However, when the number of users in a game scenario exceeds a certain value, for example, when a concentration of users occurs in a certain area, the computing power of the corresponding computing unit in that area is limited, resulting in enormous computational pressure and overload. Therefore, in this disclosure, each area can be further divided into multiple "segments," such as... Figure 1 The map structures, such as "map1 area1 layer1", "map1 area1 layer2", and "map1 area1 layer3", each correspond to a different server. This means one area corresponds to multiple servers, which collectively manage users within that area. Different servers on different sub-lines are responsible for different users. Subsequently, each server on a sub-line can determine nearby game objects for its assigned users, thereby reducing the computational burden on each server and improving the real-time performance of the service in this scenario. The method for determining nearby game objects in the distributed computing framework provided in this disclosure is implemented by the server corresponding to each "sub-line" in this disclosure.
[0035] The following describes in detail, with reference to the accompanying drawings, the method, apparatus, computer equipment, and storage medium for determining nearby game objects in the distributed computing framework provided in this disclosure.
[0036] Figure 2 This is a flowchart illustrating a method for determining nearby game objects in a distributed computing framework according to an embodiment of the present disclosure.
[0037] like Figure 2 As shown, the method for determining nearby game objects in this distributed computing framework may include the following steps:
[0038] Step 201: If the location of any object has changed, the first server determines the new location of the object.
[0039] The object can be a game object in the current region or a non-player character (NPC), which is not limited herein.
[0040] It should be noted that, in the present disclosure, after the map scene is divided into multiple regions, in order to better cope with the calculation pressure caused by the increase in the number of people in each region, the objects contained in each region can be handed over to multiple servers for object management, each server can manage the real-time state of a part of the objects, thereby reducing the operation pressure of each server, such as message queue accumulation and response time. For example, if there are 1000 people in region A at present, these objects in region A can be managed by 5 "branch" servers, wherein each server can carry 200 people, or a server carries 300 people, and some servers carry 100 people, and the like, which are not limited herein.
[0041] The first server is a server currently responsible for providing services for the any object.
[0042] Optionally, in the present disclosure, the first server can compare the position coordinates of the any object at different times to determine whether the position of the any object has changed. For example, if the initial position of the any object is at the entrance of the hall, the position coordinates are (x1, y1), and when the object moves to the center of the hall, the corresponding position coordinates are (x2, y2), the first server can determine that the position of the object has changed, and determine that the position coordinates of the object after the change are (x2, y2), which are not limited herein.
[0043] Alternatively, the first server can also determine that the position of the any object has changed when receiving the instruction of the any object entering or leaving sent by the global server.
[0044] Optionally, the changed position of the any object can include the position coordinates of the any object after the change.
[0045] In step 202, a nearby object query request is sent to a position server and a second server, respectively, wherein the query request includes the changed position of the any object, and the scene region corresponding to the second server is the same as the scene region corresponding to the first server.
[0046] The position server can be used to manage the position information of the objects in the scene. Thus, after the current server sends the nearby object query request to the position server, the position server can return the related data about the nearby objects of the current any object according to the position information of the current any object.
[0047] The proximate objects can be objects in a current field of view of the any object, which can be a game player or an NPC, and are not limited herein. For example, the proximate objects can be objects in a certain geographical area around a location of the any object.
[0048] The second server can be a server other than the first server that provides services for objects in a current area. It can be understood that one scene area can correspond to multiple servers, and the number of the second servers can be one or more, and is not limited herein.
[0049] In step 203, the first proximate object list returned by the location server and the second proximate object list returned by the second server are received.
[0050] The proximate object list can include identification information and location coordinate information of each proximate object, and is not limited herein.
[0051] It can be understood that the objects in the first proximate object list are proximate objects of the any object in the objects served by the first server.
[0052] The second proximate object list is a proximate object list of the objects served by the second server.
[0053] It should be noted that the location server can return each proximate object of the any object served by the first server according to the uploaded changed location of the any object. The second proximate object list returned by the second server is proximate objects corresponding to the objects served by the second server that can be determined by the second server.
[0054] In step 204, a target proximate object list corresponding to the any object after the location change is determined according to the first proximate object list and the second proximate object list.
[0055] It should be noted that the field of view of the any object can include multiple objects, such as 49 people, and the 49 people can not belong to the same server. In the present disclosure, the target proximate object list can be finally determined by combining the first proximate object list returned by the location server and the second proximate object list returned by the other server in the area, i.e., the second proximate object list returned by the second server.
[0056] The target proximate object list can be a list of proximate objects corresponding to the any object after the location change. Specifically, the first proximate object list and the second proximate object list can be fused to determine the final target proximate object list according to location information of each proximate object in the first proximate object list and the second proximate object list and location information of the any object.
[0057] In the embodiments of the present disclosure, first, the first server determines the changed position of any object when the position of the any object is changed, and then sends a nearby object query request to a position server and a second server respectively, wherein the query request includes the changed position of the any object, the scene area corresponding to the second server is the same as the scene area corresponding to the first server, and then the first server receives a first nearby object list returned by the position server and a second nearby object list returned by the second server, and then determines a target nearby object list corresponding to the changed position of the any object according to the first nearby object list and the second nearby object list. Thus, when the position of the any object is changed, the nearby object list corresponding to the any object can be determined in real time through the interaction between the servers in the distributed computing framework, which is not only accurate and reliable, but also has high real-time performance.
[0058] Figure 3 FIG. 3 is a flow diagram of another method for determining a nearby game object in a distributed computing framework according to an embodiment of the present disclosure.
[0059] As shown in FIG. 3, the method for determining a nearby game object in a distributed computing framework can include the following steps: Figure 3
[0060] Step 301, when the position of any object is changed, the first server determines the changed position of the any object.
[0061] It should be noted that the specific implementation of step 301 can refer to the above embodiments, which will not be repeated here.
[0062] Step 302, a second server identifier acquisition request is sent to a global server, wherein the acquisition request includes a scene area identifier corresponding to the first server.
[0063] The global server can be used to manage a server cluster and a scene area list corresponding to the server cluster. In the present disclosure, the scene server can send a second server identifier acquisition request to the global server, so that the server with the same scene area identifier can be queried in the scene area list based on the scene area identifier corresponding to the first server included in the acquisition request.
[0064] For example, if the scene area identifier corresponding to the current first server is K1, the scene server can determine other servers K2, K3 and K4 with the same scene area identifier K in the server cluster managed by the global server according to the scene area identifier K corresponding to the current first server.
[0065] It should be noted that the above examples are only illustrative and do not limit the present disclosure.
[0066] Step 303, receiving the second server identifier returned by the global server.
[0067] The second server identifier can be the identifier of another server in the same scene area as the current first server.
[0068] Specifically, based on the scene area identifier corresponding to the first server included in the second server identifier acquisition request, the global server can select a suitable second server identifier for return.
[0069] Step 304, sending a proximity object query request to the location server and the second server, respectively, wherein the query request includes the position of any object after the change and a third query serial number.
[0070] The third query serial number is determined by the first server based on a predetermined rule, which can uniquely identify the current proximity object query.
[0071] Since there can be multiple objects in the objects served by each server that have changed their positions at the same time, i.e., the server needs to send multiple proximity object queries, in order to distinguish the proximity object queries corresponding to different objects, the server can generate a corresponding query serial number for each query, such as generating a query serial number based on one or more of the identifier of the object that has changed its position, the server identifier, the changed position information, and the time of the change, etc. The present disclosure does not limit this.
[0072] It should be noted that the specific implementation of step 304 can refer to the above embodiments, which will not be described here.
[0073] Step 305, receiving the first proximity object list, the first query serial number returned by the location server, and the second proximity object list, the second query serial number returned by the second server.
[0074] The first proximity object list can be the proximity object list of the current any object in the area returned by the location server after the change of the position.
[0075] The second proximity object list can be the proximity object list of the previous any object in the area returned by the second server after the change of the position.
[0076] The first query serial number can be a unique identifier corresponding to the query request when the query request is sent to the current location server, which can be a digital serial number.
[0077] The second query serial number can be a unique identifier corresponding to the query request sent to the current second server, which can be a digital serial number.
[0078] In step 306, the first query serial number and the second query serial number are matched with the third query serial number in the query request respectively.
[0079] It should be noted that the first query serial number and the second query serial number are matched with the third query serial number in the query request respectively to determine whether the corresponding adjacent object list is the list corresponding to the current query. For example, if the first query serial number matches the third query serial number, it can be determined that the first adjacent object list is the list corresponding to the current query request, otherwise it can be considered that the list is not the list corresponding to the current query request, that is, it can be discarded.
[0080] In step 307, the adjacent object list corresponding to the query serial number that does not match the third query serial number is discarded.
[0081] It should be noted that the adjacent object list corresponding to the query serial number that does not match the third query serial number is discarded, that is, it does not meet the query request of the current query round, and thus is inaccurate. Therefore, the scene server can discard the adjacent object list corresponding to the query request.
[0082] In step 308, the target adjacent object list corresponding to the position change of any object is determined according to the first adjacent object list and the second adjacent object list.
[0083] It should be noted that the specific implementation of step 308 can refer to the above embodiments, which will not be described here.
[0084] Optionally, the server can also send an object list update message to the adjacent object list server, wherein the update message includes the identifier of any object and the target adjacent object list.
[0085] The adjacent object list server can be used to manage the adjacent object list corresponding to each object in the current application.
[0086] The object list update message can be used to prompt the adjacent object list server to update the real-time adjacent object data of the current object.
[0087] It should be noted that after the target adjacent object list corresponding to the position change of any object is determined, the scene server can send an object list update message to the adjacent object list server. Since the object list update message includes the identifier of any object and the target adjacent object list, the adjacent object list server can update the adjacent object list corresponding to the object stored according to the identifier of any object and the target adjacent object list.
[0088] In the embodiments of the present disclosure, first, the first server determines the changed position of any object when the position of any object is determined to be changed, and then sends a second server identifier acquisition request to the global server, wherein the acquisition request includes the scene area identifier corresponding to the first server, receives the second server identifier returned by the global server, and then sends a nearby object query request to the position server and the second server respectively, wherein the query request includes the changed position of any object, and the scene area corresponding to the second server is the same as the scene area corresponding to the first server, then receives the first nearby object list, the first query serial number returned by the position server, and the second nearby object list, the second query serial number returned by the second server, then matches the first query serial number, the second query serial number with the third query serial number in the query request respectively, and finally discards the nearby object list corresponding to the query serial number which is not matched with the third query serial number, and determines the target nearby object list corresponding to the changed position of any object according to the first nearby object list and the second nearby object list. Therefore, when the position of any object is changed, each server in the distributed computing framework interacts based on the query serial number, not only can the nearby object list corresponding to the object be determined in real time, but also through the query serial number matching, the processing of invalid nearby object list is avoided, and the data processing amount is reduced.
[0089] Due to the change of the position of any object, not only the corresponding nearby object list of the object may be changed, but also the corresponding nearby object list of other objects in the region may be affected. In the present disclosure, the corresponding nearby object list of other objects can be updated according to the change of the corresponding nearby object list of any object. The process of determining the change of the corresponding nearby object list of any object will be described in detail below. Figure 4 Figure 5 .
[0090] Figure 4 is a flowchart of another method for determining nearby game objects in a distributed computing framework according to an embodiment of the present disclosure.
[0091] As shown in Figure 4 , the method for determining nearby game objects in a distributed computing framework can include the following steps:
[0092] Step 401, determining a first field of view area corresponding to the changed position.
[0093] It can be understood that after the position of an object is changed, the field of view range corresponding to the object will also be changed.
[0094] The first field of view area can be a field of view range area corresponding to a position of any object after the position is changed. For example, if an object is at position A, the field of view angle range of the object at position A can be taken as the first field of view area, or a region within a preset distance range centered at point A can be determined as the first field of view area of the object, and the like, which is not limited herein.
[0095] At step 402, a first object not in the first field of view area is determined according to position information of each object in a third nearby object list corresponding to any object before the position is changed.
[0096] The third nearby object list can include identification information and position information of each nearby game object corresponding to any object before the position is changed.
[0097] The first object can be an object not in the first field of view range among the nearby objects of any object before the position is changed.
[0098] Specifically, the scene server can first obtain the third nearby object list, and then determine the first object not in the first area before the change by comparing the position coordinates of each object in the third nearby object list and the first field of view range currently determined.
[0099] For example, for any object X, the third nearby object list corresponding to the object X before the position is changed is {y1-j1, y2-j2, y3-j3, y4-j4,..., yn-jn}. Wherein y1, y2, y3, y4,..., yn refer to each object within the field of view of object X before the change, and j1, j2, j3, j4,..., jn refer to the position coordinates of each object within the field of view of object X before the change. According to the coordinates of each object, it can be determined that j1 and j2 are not in the first field of view range, and thus y1 and y2 are the first objects not in the first field of view area after the position of X is changed.
[0100] It should be noted that the above example is only an illustrative description, and does not limit the present disclosure.
[0101] At step 403, a second object in the third nearby object list except the first object is determined.
[0102] The second object can be other object in the third nearby object list except the first object.
[0103] For example, if the third nearby object list includes objects Y1, Y2, Y3, and Y2 is the first object, Y1 and Y3 can be determined as the second objects, which is not limited herein.
[0104] Step 404, traversing the target proximity object list to determine a third object in the target proximity object list except the second object.
[0105] The third object can be a proximity object newly entering the field of view of the current object, and the part of the objects are not in the third proximity object list but in the field of view region after the position of any object is changed.
[0106] It should be noted that after the scene server traverses the target proximity object list, the objects in the target proximity object list except the second object can be determined as the third object.
[0107] Step 405, sending a proximity object update request to the first object and the third object respectively, so that the first object and the third object update their corresponding proximity object lists respectively.
[0108] Specifically, after the first object and the third object are determined, the scene server can send a proximity object update request to the proximity object list server corresponding to the first object and the third object respectively, so that the first object and the third object can update the corresponding proximity object list according to the proximity object update request.
[0109] In the embodiment of the present disclosure, first, the first server determines the target proximity object list corresponding to any object after the position of the object is changed, and then determines the first object not in the first field of view region according to the position information of each object in the third proximity object list corresponding to any object before the position of the object is changed, and then determines the second object in the third proximity object list except the first object, and then traverses the target proximity object list to determine the third object in the target proximity object list except the second object, and then sends a proximity object update request to the first object and the third object respectively, so that the first object and the third object update their corresponding proximity object lists respectively. Thus, by determining the object to be changed in the proximity list based on the position of each object and the difference between the changed proximity object list and the changed proximity object list, the object of the proximity object list to be changed can be determined, and the update of the proximity object list of the object can be triggered, so that the proximity object list corresponding to each object can be updated in real time and more in line with the current actual situation, and the real-time performance and accuracy of the business are improved.
[0110] Figure 5 is a flowchart of another method for determining proximity game objects in a distributed computing framework according to an embodiment of the present disclosure.
[0111] As shown in Figure 5 The method for determining proximity game objects in the distributed computing framework can include the following steps:
[0112] Step 501, determining a first visual field region corresponding to the changed position and a second visual field region corresponding to the original position.
[0113] The first visual field region can be a visual field range region corresponding to the changed position of any object. For example, if an object is at position A, the visual field angle range of the object at position A can be regarded as the first visual field region, or a region within a preset distance range centered at point A can be determined as the first visual field region of the object, and the like, which are not limited herein.
[0114] The second visual field range can be a region within the visual field range of the object before the change.
[0115] In the present disclosure, the scene server can determine the first visual field region corresponding to the changed position and the second visual field region corresponding to the original position according to the position coordinates and pose data of any object before and after the change.
[0116] Step 502, determining invalid region grids and new region grids according to the first visual field region, the second visual field region, and the position information of each region grid.
[0117] Optionally, the current region can be divided into a plurality of smaller region grids for management. The range of a region grid can correspond to a certain area of a geographical region, and each region grid can bear a certain number of objects, such as one or more, which are not limited herein. In addition, each region grid also corresponds to a region grid identifier, and the region grid identifier corresponding to any object can also change after the change of the position of the object, that is, the object can be transferred from one region grid to another region grid.
[0118] Optionally, the changed position of any object can include the region grid identifier of the object.
[0119] It should be noted that the first visual field region and the second visual field region both correspond to a certain range of region grids, and the first visual field region and the second visual field region usually have a common region, so the common region can also correspond to a certain range of region grids.
[0120] In the present disclosure, the region grids with the same position information can be determined based on the position information of the region grids corresponding to the first visual field region and the second visual field region, and then the region grids are regarded as the common region.
[0121] The invalid region grid can be a region disappeared in the visual field of any object during the change.
[0122] Optionally, the region grids in the second visual field range except the region grids in the common region can be determined as invalid region grids.
[0123] The newly added region grid can be a region newly generated in the current object field of view after the change.
[0124] Optionally, the region grids in the first field of view range except the region grids of the common region can be determined as invalid region grids.
[0125] In step 503, a fourth object corresponding to the invalid region grid and a fifth object corresponding to the newly added region grid are determined according to the object corresponding to each region grid.
[0126] Optionally, the object corresponding to each region grid can be obtained from the position server. Specifically, the object corresponding to the position region of the invalid region grid and the object corresponding to the newly added region grid can be determined according to the position information of each object in the current scene region.
[0127] The fourth object can be an object that is out of the field of view of the user due to the change in the position of the object.
[0128] The fifth object can be an object that appears in the field of view of the user due to the change in the position of the object.
[0129] In step 504, a nearby object update request is sent to the fourth object and the fifth object respectively, so that the fourth object and the fifth object update their corresponding nearby object lists respectively.
[0130] Specifically, after the fourth object and the fifth object are determined, the scene server can send a nearby object update request to the nearby object list server corresponding to the fifth object and the fourth object respectively, so that the fourth object and the fifth object can update the corresponding nearby object list according to the nearby object update request.
[0131] Optionally, in the case where the region grid identifier corresponding to the changed position and the position before the change is the same, the scene server can determine that the nearby object list corresponding to any object is unchanged. Since the objects corresponding to the same region grid identifier are the same, the nearby object list corresponding to any object can be unchanged.
[0132] In the embodiments of the present disclosure, first, the first server determines the target nearby object list corresponding to the changed position of any object after the position of any object is changed, then determines the first visual field area corresponding to the changed position and the second visual field area corresponding to the previous position, and then determines the invalid area grid and the new area grid according to the first visual field area, the second visual field area and the position information of each area grid. Then, according to the object corresponding to each area grid, the fourth object corresponding to the invalid area grid and the fifth object corresponding to the new area grid are determined, and then the nearby object update request is sent to the fourth object and the fifth object respectively, so that the fourth object and the fifth object update their corresponding nearby object list. Therefore, the object of the nearby object list to be changed can be determined based on the difference between the first visual field area corresponding to the changed position and the second visual field area corresponding to the previous position, and the update of the nearby object list of the object is triggered, so that the nearby object list corresponding to each object can be updated in real time and more in line with the current actual situation, and the real-time performance and accuracy of the business are improved.
[0133] To achieve the above-mentioned embodiments, the present disclosure further provides a device for determining nearby game objects in a distributed computing framework.
[0134] Figure 6 A structural schematic diagram of a device for determining nearby game objects in a distributed computing framework provided by the embodiments of the present disclosure.
[0135] As shown in Figure 6 The device for determining nearby game objects in a distributed computing framework 600 includes a first determination module 610, a sending module 620, a receiving module 630 and a second determination module 640.
[0136] The first determination module is configured to determine the changed position of any object by the first server when determining that the position of any object has been changed.
[0137] The sending module is configured to send a nearby object query request to a position server and a second server respectively, wherein the query request includes the changed position of any object, and the scene area corresponding to the second server is the same as the scene area corresponding to the first server.
[0138] The receiving module is configured to receive the first nearby object list returned by the position server and the second nearby object list returned by the second server.
[0139] The second determination module is configured to determine the target nearby object list corresponding to the changed position of any object according to the first nearby object list and the second nearby object list.
[0140] Optionally, the sending module is further configured to:
[0141] sending a second server identifier obtaining request to a global server, wherein the obtaining request comprises a scene area identifier corresponding to the first server;
[0142] receiving a second server identifier returned by the global server.
[0143] Optionally, the receiving module is specifically configured to:
[0144] receiving a first nearby object list and a first query serial number returned by the location server, and receiving a second nearby object list and a second query serial number returned by the second server;
[0145] matching the first query serial number and the second query serial number with a third query serial number in the query request respectively;
[0146] discarding a nearby object list corresponding to a query serial number that is not matched with the third query serial number.
[0147] Optionally, the apparatus further comprises:
[0148] a third determining module configured to determine a first visual field area corresponding to the changed position;
[0149] a fourth determining module configured to determine a first object not in the first visual field area according to position information of each object in a third nearby object list corresponding to the any object before the position is changed;
[0150] a fifth determining module configured to determine a second object in the third nearby object list except the first object;
[0151] a sixth determining module configured to traverse the target nearby object list to determine a third object in the target nearby object list except the second object;
[0152] a first updating module configured to send a nearby object updating request to the first object and the third object respectively, so that the first object and the third object update their corresponding nearby object lists respectively.
[0153] Optionally, the second determining module is further configured to:
[0154] sending an object list updating message to a nearby object list server, wherein the updating message comprises an identifier of the any object and the target nearby object list.
[0155] Optionally, the apparatus further comprises:
[0156] determine a first field of view region corresponding to the changed position and a second field of view region corresponding to the original position;
[0157] determine an invalid region and a new region according to the first field of view region, the second field of view region, and position information of each region grid;
[0158] determine a fourth object corresponding to the invalid region and a fifth object corresponding to the new region according to the object corresponding to each region grid;
[0159] send a nearby object update request to the fourth object and the fifth object respectively, so that the fourth object and the fifth object update their corresponding nearby object lists respectively.
[0160] Optionally, the ninth determining module is further configured to:
[0161] obtain the object corresponding to each region grid from the position server.
[0162] Optionally, the changed position is any one of the following: a changed position coordinate of the any object, and a region grid identifier in which the any object is located.
[0163] Optionally, the first determining module is further configured to:
[0164] determine that the nearby object list corresponding to the any object remains unchanged in a case where the region grid identifier corresponding to the changed position and the original position is the same.
[0165] In the embodiments of the present disclosure, first, the first server determines that the position of the any object has changed, and then sends a nearby object query request to a position server and a second server respectively, wherein the query request includes the changed position of the any object, the second server corresponds to a same scene region as the first server, and then receives a first nearby object list returned by the position server and a second nearby object list returned by the second server, and finally determines a target nearby object list corresponding to the any object after the position change according to the first nearby object list and the second nearby object list. In this way, when the position of the any object changes, the target nearby object list corresponding to the any object can be determined in real time through the interaction between the servers in the distributed computing framework, which is not only accurate and reliable, but also has high real-time performance.
[0166] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.
[0167] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0168] As shown in Figure 7 The device 700 includes a computing unit 701 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 702 or a computer program loaded into a random access memory (RAM) 703 from a storage unit 708. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0169] Various components in the device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; the storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0170] The computing unit 701 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs various methods and processes described above, such as the method of determining proximate game objects in a distributed computing framework. For example, in some embodiments, the method of determining proximate game objects in a distributed computing framework can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the computing unit 701, one or more steps of the method of determining proximate game objects in a distributed computing framework described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the method of determining proximate game objects in a distributed computing framework by any other suitable means, such as by means of firmware.
[0171] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0172] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0173] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include a linearly-programmed electrical connection, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0174] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0175] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0176] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0177] In this embodiment, the first server, upon determining that the location of any object has changed, determines the new location of the object. Then, it sends nearby object query requests to both the location server and the second server. The query requests include the new location of the object. The scene area corresponding to the second server is the same as that corresponding to the first server. Next, the first server receives a first nearby object list returned by the location server and a second nearby object list returned by the second server. Based on these lists, the target nearby object list corresponding to the new location of the object is determined. Therefore, when the location of any object changes, the nearby object list corresponding to that object can be determined in real time through interaction between servers in the distributed computing framework. This method is not only accurate and reliable but also highly real-time.
[0178] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0179] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for determining proximate game objects in a distributed computing framework, wherein, The method applied to an online scene, divides a map scene in the online scene into multiple areas, one area corresponds to multiple servers, the multiple servers are collectively responsible for users in the area, and different servers are responsible for different users, and the method comprises: The first server determines the changed position of any object when the position of the object is changed; Send a nearby object query request to the position server and the second server respectively, wherein the position server is used to manage the position information of each object in the scene, the changed position of the any object is included in the query request, and the scene area corresponding to the second server is the same as the scene area corresponding to the first server; Receive the first nearby object list returned by the position server and the second nearby object list returned by the second server; According to the first nearby object list and the second nearby object list, determine the target nearby object list corresponding to the changed position of the any object.
2. The method of claim 1, wherein, Before the step of sending a nearby object query request to the position server and the second server respectively, the method further comprises: Send a second server identifier acquisition request to a global server, wherein the acquisition request includes the scene area identifier corresponding to the first server; Receive the second server identifier returned by the global server.
3. The method of claim 1, wherein, The step of receiving the first nearby object list returned by the position server and the second nearby object list returned by the second server comprises: Receive the first nearby object list, the first query serial number returned by the position server, and the second nearby object list, the second query serial number returned by the second server; Match the first query serial number, the second query serial number with the third query serial number in the query request respectively; Discard the nearby object list corresponding to the query serial number which is not matched with the third query serial number.
4. The method of claim 1, wherein, Further comprising: Determine the first field of view area corresponding to the changed position; According to the position information of each object in the third nearby object list corresponding to the any object before the position change, determine the first object which is not in the first field of view area; Determine the second object in the third nearby object list except the first object; Traverse the target nearby object list to determine the third object in the target nearby object list except the second object; Send a nearby object update request to the first object and the third object respectively, so that the first object and the third object update their corresponding nearby object list respectively.
5. The method of claim 1, wherein, After the step of determining the target nearby object list corresponding to the changed position of the any object, the method further comprises: Send an object list update message to a nearby object list server, wherein the update message includes the identifier of the any object and the target nearby object list.
6. The method of any one of claims 1-5, wherein, Further comprising: Determine the first field of view area corresponding to the changed position and the second field of view area corresponding to the changed position; According to the first field of view area, the second field of view area and the position information of each area grid, determine the invalid area grid and the new area grid; determine a fourth object corresponding to the invalid region grid and a fifth object corresponding to the added region grid according to the object corresponding to each region grid; send a nearby object update request to the fourth object and the fifth object respectively, so that the fourth object and the fifth object update their corresponding nearby object lists respectively.
7. The method of claim 6, wherein, Before the step of determining a fourth object corresponding to the invalid region grid and a fifth object corresponding to the added region grid according to the object corresponding to each region grid, the method further comprises: obtaining the object corresponding to each region grid from the location server.
8. The method of claim 6, wherein, The changed location is any one of the following: a changed location coordinate of the any object, and a region grid identifier in which the any object is located.
9. The method of claim 6, wherein, After the step of determining the changed location of the any object, the method further comprises: In a case where the region grid identifier corresponding to the changed location and the changed location is the same, it is determined that the nearby object list corresponding to the any object is unchanged.
10. An apparatus for determining proximate game objects in a distributed computing framework, wherein, The device is applied to an online scene, and a map scene in the online scene is divided into a plurality of regions, one region corresponding to a plurality of servers, the plurality of servers collectively responsible for users in the region, and different servers responsible for different users, and the device comprises: a first determining module configured to determine a changed location of the any object in a case where the location of the any object is changed; a sending module configured to send a nearby object query request to a location server and a second server respectively, wherein the location server is configured to manage location information of objects in a scene, the changed location of the any object is included in the query request, and a scene region corresponding to the second server is the same as a scene region corresponding to the first server; a receiving module configured to receive a first nearby object list returned by the location server and a second nearby object list returned by the second server; a second determining module configured to determine a target nearby object list corresponding to the any object after the location of the any object is changed according to the first nearby object list and the second nearby object list.
11. The apparatus of claim 10, wherein, The sending module is further configured to: send a second server identifier acquisition request to a global server, wherein the scene region identifier corresponding to the first server is included in the acquisition request; receive a second server identifier returned by the global server.
12. The apparatus of claim 10, wherein, The receiving module is specifically configured to: receive the first nearby object list, a first query serial number returned by the location server, and the second nearby object list, a second query serial number returned by the second server; match the first query serial number, the second query serial number, and a third query serial number in the query request respectively; discard a nearby object list corresponding to a query serial number that is not matched with the third query serial number.
13. The apparatus of claim 10, wherein, The device further comprises: a third determining module configured to determine a first field of view region corresponding to the changed location; a fourth determining module configured to determine a first object not in the first field of view region according to location information of each object in a third nearby object list corresponding to the any object before the location is changed; a fifth determining module configured to determine a second object in the third nearby object list except the first object. The sixth determining module is configured to traverse the target proximity object list to determine a third object in the target proximity object list except the second object; The first updating module is configured to send a proximity object updating request to the first object and the third object respectively, so that the first object and the third object update their corresponding proximity object lists respectively.
14. The apparatus of claim 10, wherein, The second determining module is further configured to: send an object list updating message to a proximity object list server, wherein the updating message comprises the identifier of the any object and the target proximity object list.
15. The apparatus of any of claims 9-14, wherein, Further comprising: The seventh determining module is configured to determine a first visual field area corresponding to the changed position and a second visual field area corresponding to the original position; The eighth determining module is configured to determine invalid area grids and new area grids according to the first visual field area, the second visual field area and position information of each area grid; The ninth determining module is configured to determine a fourth object corresponding to the invalid area grids and a fifth object corresponding to the new area grids according to objects corresponding to each area grid; The second updating module is configured to send a proximity object updating request to the fourth object and the fifth object respectively, so that the fourth object and the fifth object update their corresponding proximity object lists respectively.
16. The apparatus of claim 15, wherein, The ninth determining module is further configured to: obtain the objects corresponding to each area grid from the position server.
17. The apparatus of claim 15, wherein, The changed position is any one of the following: a changed position coordinate of the any object, an area grid identifier where the any object is located.
18. The apparatus of claim 15, wherein, The first determining module is further configured to: in a case where the area grid identifier corresponding to the changed position and the original position is the same, determine that the proximity object list corresponding to the any object is unchanged.
19. An electronic device comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
20. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method according to any one of claims 1-9.
21. 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-9.
Citation Information
Patent Citations
Game AOI synchronization method
CN105991591A
System and method of seamless game world based on server / client
US20060258462A1