Summary of the invention
In view of this, the embodiment of the present application provides a kind of model of mind training method and device, a kind of side collision detection
Method and device, a kind of calculating equipment and storage medium, to solve technological deficiency existing in the prior art.
In a first aspect, the embodiment of the present application discloses a kind of model of mind training method, comprising:
Obtain the set of object sample set, wherein the set of the object sample is comprising multiple groups object sample set and often
The corresponding object sample set label of the group object sample set, object sample set described in every group include object size, object
Quantity, the closeness of object sample of body sample, the object sample set label includes clathrum method for building up;
Model of mind is trained by the set of the object sample set, obtains the model of mind, the intelligence
Model makes the object sample set and the object sample set label associated.
Optionally, before the set for obtaining object sample set, further includes:
The corresponding object sample set label of object sample set described in determining every group.
Optionally, the corresponding object sample set label of object sample set described in determining every group includes:
According to include at least two clathrum method for building up collection be combined into every group described in object sample set establish at least two
Corresponding clathrum;
According at least two clathrum determine every group described in object sample set object sample at least two collisions
Relationship;
According at least two collisions relationship determine every group described in at least two of object sample touch in object sample set
Hit testing result, wherein the collision detection result includes detecting the collision inspection of object sample in the primary object sample set
It surveys time-consuming;
A kind of corresponding clathrum method for building up of collision detection result is selected from at least two collision detections result
As the corresponding object sample set label of the object sample set.
Optionally, a kind of corresponding clathrum of collision detection result is selected to build from at least two collision detections result
After cube method is as the corresponding object sample set label of the object sample set, further includes:
New clathrum method for building up is received, and it includes at least two that the new clathrum method for building up, which is added to described,
In the set of kind clathrum method for building up.
Optionally, according at least two clathrum determine every group described in object sample set object sample at least two
Planting collision relationship includes:
In object sample set described in determining every group object sample in its corresponding at least two clathrum at least two
A clathrum coordinate;
At least two clathrums coordinate of object sample determines described in every group in the object sample set according to every group
At least two collision relationships of object sample in object sample set.
Optionally, the clathrum coordinate includes the object granularity of object sample in object sample set described in every group, and every group
Object sample object sample in the object sample set described in the abscissa of the clathrum and every group in the object sample set
In the ordinate of the clathrum,
In object sample set described in determining every group object sample in its corresponding at least two clathrum at least two
A clathrum coordinate includes:
Using the object granularity of object sample in object sample set described in every group as z-axis, object in object sample set described in every group
Body sample is object sample in object sample set described in x-axis and every group in the clathrum in the abscissa of the clathrum
Ordinate is y-axis, and at least two clathrum is converted at least two granularity coordinate systems, determine every group described in object sample
Concentrate object sample in the coordinate of at least two granularities coordinate system.
Optionally, at least two clathrums coordinate of object sample determines often in the object sample set according to every group
At least two collision relationships of object sample include: in the group object sample set
Object sample determines every in the coordinate of at least two granularities coordinate system in the object sample set according to every group
At least two collision relationships of object sample in the group object sample set.
Second aspect, one embodiment of the application additionally provide a kind of collision checking method, comprising:
Obtain include at least two examined objects examined object collection, wherein the examined object collection include to
The closeness of the size of detection object, the quantity of examined object and examined object;
Clathrum method for building up is determined for the examined object collection according to pre-generated model of mind, and according to described
Clathrum method for building up is that the examined object collection establishes corresponding clathrum;
Determine that the examined object concentrates the collision relationship of examined object according to the clathrum.
Optionally, determine that the examined object concentrates the collision relationship of examined object to include: according to the clathrum
Determine the clathrum coordinate that the examined object concentrates examined object in its corresponding clathrum;
The respective clathrum coordinate of examined object is concentrated to determine the examined object collection according to the examined object
The collision relationship of middle examined object.
Optionally, the clathrum coordinate includes the object granularity that examined object concentrates examined object, object to be detected
Body concentrates examined object to concentrate examined object in the net in the abscissa of the clathrum and the examined object
The ordinate of compartment,
Determine that the examined object concentration examined object includes: in the clathrum coordinate of its corresponding clathrum
Concentrate the object granularity of examined object as z-axis using examined object, examined object concentrates examined object to exist
The abscissa of the clathrum is that concentrate examined object in the ordinate of the clathrum be y-axis for x-axis and examined object,
The clathrum is converted into granularity coordinate system, determines the seat that examined object concentrates examined object in the granularity coordinate system
Mark.
Optionally, it is determined according to the examined object concentration respective clathrum coordinate of examined object described to be detected
Object concentrate examined object collision relationship include:
Examined object is concentrated to determine in the coordinate of the granularity coordinate system according to the examined object described to be detected
The collision relationship of object concentration examined object.
Optionally, the pre-generated model of mind includes any one above-mentioned model of mind.
The third aspect, one embodiment of the application additionally provide a kind of model of mind training device, comprising:
First obtains module, is configured as obtaining the set of object sample set, wherein the set of the object sample includes
The corresponding object sample set label of object sample set described in multiple groups object sample set and every group, object sample set packet described in every group
Size containing object, the quantity of object sample, the closeness of object sample, the object sample set label includes clathrum
Method for building up;
Training module is configured as being trained model of mind by the set of the object sample set, obtains described
Model of mind, the model of mind make the object sample set and the object sample set label associated.
Optionally, described device further include:
First determining module, be configured to determine that every group described in the corresponding object sample set label of object sample set.
Optionally, first determining module includes:
First setting up submodule is configured as being combined into described in every group according to the collection for including at least two clathrum method for building up
Object sample set establishes at least two corresponding clathrums;
Second determines submodule, be configured as according at least two clathrum determine every group described in object sample set
At least two collision relationships of object sample;
Third determines submodule, be configured as according at least two collisions relationship determine every group described in object sample set
At least two collision detection results of middle object sample, wherein the collision detection result includes detecting the primary object sample
The collision detection of this concentration object sample is time-consuming;
Submodule is selected, is configured as selecting a kind of collision detection result pair from at least two collision detections result
The clathrum method for building up answered is as the corresponding object sample set label of the object sample set.
Optionally, described device further include:
Adding module is configured as receiving new clathrum method for building up, and the new clathrum method for building up is added
It adds in the set including at least two clathrum method for building up.
Optionally, described second determine that submodule is also configured to
5th determines submodule, be configured to determine that every group described in object sample set object sample it is corresponding described at its
At least two clathrum coordinates of at least two clathrums;
6th determines submodule, is configured as described at least two of object sample in the object sample set according to every group
Clathrum coordinate determine every group described in object sample set object sample at least two collision relationships.
Optionally, the clathrum coordinate includes the object granularity of object sample in object sample set described in every group, and every group
Object sample object sample in the object sample set described in the abscissa of the clathrum and every group in the object sample set
In the ordinate of the clathrum,
Described 5th determines submodule, is also configured to
Using the object granularity of object sample in object sample set described in every group as z-axis, object in object sample set described in every group
Body sample is object sample in object sample set described in x-axis and every group in the clathrum in the abscissa of the clathrum
Ordinate is y-axis, and at least two clathrum is converted at least two granularity coordinate systems, determine every group described in object sample
Concentrate object sample in the coordinate of at least two granularities coordinate system.
Optionally, it the described 6th determines submodule, is also configured to
Object sample determines every in the coordinate of at least two granularities coordinate system in the object sample set according to every group
At least two collision relationships of object sample in the group object sample set.
Fourth aspect, one embodiment of the application additionally provide a kind of collision detecting device, comprising:
Second obtains module, is configured as obtaining the examined object collection including at least two examined objects, wherein institute
State the closeness that examined object collection includes the size of examined object, the quantity of examined object and examined object;
Second establishes module, is configured as being that the examined object collection determines grid according to pre-generated model of mind
Layer method for building up, and be that the examined object collection establishes corresponding clathrum according to the clathrum method for building up;
4th determining module is configured as determining that the examined object concentrates examined object according to the clathrum
Collision relationship.
Optionally, the 4th determining module includes:
Clathrum coordinate determines submodule, is configured to determine that the examined object concentrates examined object in its correspondence
Clathrum clathrum coordinate;
Collision relationship determines submodule, is configured as concentrating the respective grid of examined object according to the examined object
Layer coordinate determines that the examined object concentrates the collision relationship of examined object.
Optionally, the clathrum coordinate includes the object granularity that examined object concentrates examined object, object to be detected
Body concentrates examined object to concentrate examined object in the net in the abscissa of the clathrum and the examined object
The ordinate of compartment,
The clathrum coordinate determines submodule, is also configured to
Concentrate the object granularity of examined object as z-axis using examined object, examined object concentrates examined object to exist
The abscissa of the clathrum is that concentrate examined object in the ordinate of the clathrum be y-axis for x-axis and examined object,
The clathrum is converted into granularity coordinate system, determines the seat that examined object concentrates examined object in the granularity coordinate system
Mark.
Optionally, the collision relationship determines submodule, is also configured to
Examined object is concentrated to determine in the coordinate of the granularity coordinate system according to the examined object described to be detected
The collision relationship of object concentration examined object.
Optionally, the pre-generated model of mind includes any one above-mentioned model of mind.
5th aspect, one embodiment of the application additionally provide a kind of calculating equipment, including memory, processor and are stored in
On memory and the computer instruction that can run on a processor, the processor realize that the instruction is located when executing described instruction
The step of reason device realizes model of mind training method as described above or collision checking method when executing.
6th aspect, one embodiment of the application additionally provide a kind of computer readable storage medium, are stored with computer
The step of instruction, which realizes model of mind training method as described above or collision checking method when being executed by processor.
A kind of model of mind training method provided by the present application and device, a kind of collision checking method and device, Yi Zhongji
Calculate equipment and storage medium, wherein the model of mind training method includes obtaining the set of object sample set, wherein described
The set of object sample includes the corresponding object sample set label of object sample set described in multiple groups object sample set and every group, often
The group object sample set includes object size, the quantity of object sample, the closeness of object sample, the object sample
This collection label includes clathrum method for building up;Model of mind is trained by the set of the object sample set, obtains institute
Model of mind is stated, the model of mind makes the object sample set and the object sample set label associated.The intelligence
Model can obtain the corresponding object sample set label i.e. clathrum method for building up according to the object sample set, save
Time-consuming, and make the clathrum method for building up obtained according to object sample set more excellent by the method for the machine learning, greatly
Improve the subsequent collision detection result precision detected using the clathrum method for building up to object sample set.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments,
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims
The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly
Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes
One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment
Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other
It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments
As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to
" ... when " or " when ... " or " in response to determination ".
Firstly, the vocabulary of terms being related to one or more embodiments of the invention explains.
Doorkeeper: the Chinese in this specification embodiment is construed to " house dog ", determines system for clathrum, leads to
The monitoring to the object for entering the system is crossed, determines the quantity of clathrum corresponding with the object entered and the grid of clathrum
Granularity.Doorkeeper counts these article sizes, utilizes by recording the sizes of all objects by the system
Itself algorithm to network layer determines the grid granularity of the number of plies and every layer of clathrum that need the clathrum established.
In this application, a kind of model of mind training method and device, a kind of collision checking method and device, one are provided
Kind calculates equipment and storage medium, is described in detail one by one in the following embodiments.
Fig. 1 is to show the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100
Component include but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130,
Database 150 is for saving data.
Calculating equipment 100 further includes access device 140, access device 140 enable calculate equipment 100 via one or
Multiple networks 160 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network
(WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless
One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area
Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect
Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, unshowned other component in above-mentioned and Fig. 1 of equipment 100 is calculated
It can be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 is merely for the sake of example
Purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increase or replace other portions
Part.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter
Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement
Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting
Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 100 can also be mobile or state type
Server.
Wherein, processor 120 can execute the step in method shown in Fig. 2.Fig. 2 is to show to be implemented according to the application one
The schematic flow chart of the model of mind training method of example, including step 202 is to step 204.
Step 202: obtaining the set of object sample set, wherein the set of the object sample includes multiple groups object sample
Collection and the corresponding object sample set label of object sample set described in every group, object sample set described in every group include object sample
Size, the quantity of object sample, the closeness of object sample, the object sample set label include clathrum method for building up.
It include at least two groups object sample in the set of the object sample set in this specification one or more embodiment
Collect, includes at least two object samples in every group of object sample set, the object sample includes but is not limited to advise in scene of game
Then perhaps irregular figure such as character or attack stage property etc..
Object sample set described in every group includes object size, the quantity of object sample, the closeness of object sample
Each object size, the quantity of total object sample and this group of object sample set i.e. in object sample set described in every group
The closeness of middle object sample.
In this specification one or more embodiment, object sample set described in object sample set and every group is to pass through
Multiple history object collection of Doorkeeper, the corresponding object sample set label are that each history object collection passes through
Existing a variety of clathrum method for building up establish clathrum in Doorkeeper, then according to history object collection in the clathrum
Collision relationship obtains collision detection as a result, each history object collection finally determined according to the collision detection result is corresponding optimal
Object sample set label.
Step 204: model of mind is trained by the set of the object sample set, obtains the model of mind,
The model of mind makes the object sample set and the object sample set label associated.
In this specification one or more embodiment, before the set for obtaining object sample set, further includes:
The corresponding object sample set label of object sample set described in determining every group.
Wherein it is determined that the corresponding object sample set label of object sample set described in every group includes step 302 to step 308.
Step 302: according to include at least two clathrum method for building up collection be combined into every group described in object sample set establish
At least two corresponding clathrums.
In this specification one or more embodiment, every kind of clathrum is the correspondence established according to clathrum method for building up
The clathrum of the number of plies and granularity.Such as it is 4 that the first clathrum, which is the number of plies, grid granularity is the clathrum of a, second of grid
It is 2 that layer, which is the number of plies, and grid granularity is the clathrum etc. of b.Specific kind of clathrum is true according to existing clathrum method for building up
Fixed, the application is not limited in any way this.
In this specification one or more embodiment, if described includes that the set of at least two clathrum method for building up includes
3 kinds of clathrum method for building up, every kind of clathrum method for building up can establish a kind of corresponding clathrum for every group of object sample set;
Then according to the collection for including at least two clathrum method for building up be combined into every group described in object sample set to establish at least two corresponding
It is that object sample set described in every group establishes 3 kinds of corresponding clathrums that clathrum, which is according to 3 kinds of clathrum method for building up,.
Step 304: according at least two clathrum determine every group described in object sample is at least in object sample set
Two kinds of collision relationships.
In this specification one or more embodiment, carried out for the corresponding 3 kinds of clathrums of the object sample set described in every group
Explanation.
According at least two clathrum determine every group described in object sample set object sample at least two collisions
Relationship be according to 3 kinds of clathrums determine every group described in object sample set object sample 3 kinds of collision relationships.
Step 306: according at least two collisions relationship determine every group described in object sample is extremely in object sample set
Few two kinds of collision detection results, wherein the collision detection result includes detecting object sample in the primary object sample set
Collision detection it is time-consuming.
In this specification one or more embodiment, for the corresponding 3 kinds of collision relationships of the object sample set described in every group into
Row explanation.
According at least two collisions relationship determine every group described in at least two of object sample touch in object sample set
Hit testing result i.e. according to 3 kinds of collision relationships determine every group described in object sample set object sample 3 kinds of collision detection results.
In this specification one or more embodiment, the collision detection result is also possible in the object sample set of detection
The precision etc. of object sample, the application is not limited in any way this.
Step 308: a kind of corresponding clathrum of collision detection result is selected from at least two collision detections result
Method for building up is as the corresponding object sample set label of the object sample set.
In this specification one or more embodiment, it is illustrated so that collision detection result is 3 kinds as an example.
A kind of corresponding clathrum method for building up of collision detection result is selected from at least two collision detections result
Select a kind of time-consuming shortest from 3 kinds of collision detection results as the corresponding object sample set label of the object sample set
The corresponding clathrum method for building up of collision detection result is as the corresponding object sample set label of the object sample set.
In this specification one or more embodiment, a kind of collision is selected to examine from at least two collision detections result
After the corresponding clathrum method for building up of result is surveyed as the corresponding object sample set label of the object sample set, further includes:
New clathrum method for building up is received, and it includes at least two that the new clathrum method for building up, which is added to described,
In the set of kind clathrum method for building up.
New clathrum method for building up is received, it includes at least two that the new clathrum method for building up, which is added to described,
It is that every group of object sample set establishes new clathrum by new clathrum method for building up after the set of kind clathrum method for building up,
Then the new collision relationship that object sample in every group of object sample set is determined according to new clathrum is closed further according to new collision
It is to determine the new collision detection of object sample in every group of object sample set as a result, then by new collision detection result and before
Collision detection result be compared, reselect a kind of corresponding clathrum method for building up of collision detection result as object sample
This collects corresponding object sample set label, it can be achieved that the model of mind of training is continued to optimize.
Referring to fig. 4, by taking one group of object sample set A as an example, the corresponding object sample of the object sample set described in every group of determination
Collection label is described in detail.
3 kinds of clathrum method for building up if it exists: clathrum method for building up 1, clathrum method for building up 2, clathrum foundation side
Method 3 is then that object sample set A establishes 3 kinds of corresponding clathrums: clathrum 1, net respectively according to 3 kinds of clathrum method for building up
Compartment 2, clathrum 3, wherein clathrum 1, clathrum 2, the reticulate layer of clathrum 3 and grid granularity are according to object sample set
Quantity, the closeness of object sample of object size, object sample in A determine;
Then determine that 3 kinds of collisions of object sample in object sample set A are closed according to clathrum 1, clathrum 2, clathrum 3
Object sample in object sample set A, i.e., be put into clathrum 1 by system, collision relationship 1 is obtained, by object sample in object sample set A
Originally it is put into clathrum 2, obtains collision relationship 2, object sample in object sample set A is put into clathrum 3, obtain collision and close
Be 3, wherein in collision relationship, that is, object sample set A object sample who collided with whom;
3 kinds of collisions of object sample in object sample set A are determined further according to collision relationship 1, collision relationship 2, collision relationship 3
Testing result obtains the collision detection result 1 of object sample in object sample set A according to collision relationship 1, according to collision relationship
2 obtain the collision detection result 2 of object sample in object sample set A, obtain object in object sample set A according to collision relationship 3
The collision detection result 3 of sample, wherein the value of collision detection result 1 be time-consuming 3s, the value of collision detection result 2 be time-consuming 2s,
The value of collision detection result 3 is time-consuming 5s.
Time-consuming least collision inspection is finally selected from collision detection result 1, collision detection result 2, collision detection result 3
The corresponding clathrum method for building up 2 of result 2 is surveyed as the corresponding object sample set label of object sample set A.
If clathrum method for building up 4 and clathrum are built there is also clathrum method for building up 4 and clathrum method for building up 5
Cube method 5 be added to before clathrum method for building up set in, then established according to clathrum method for building up 4 and clathrum
Method 5 is that object sample set A establishes clathrum 4 and clathrum 5, then determines object sample set according to clathrum 4 and clathrum 5
The collision relationship 4 of object sample and collision relationship 5, determine in object sample set A further according to collision relationship 4 and collision relationship 5 in A
The collision detection result 4 and collision detection result 5 of object sample, wherein the value of collision detection result 4 is time-consuming 1s and collision inspection
The value for surveying result 5 is time-consuming 3s, then the collision detection result by collision detection result 4 and collision detection result 5 and before into
Row compares, and reselects the time-consuming minimum corresponding clathrum method for building up 4 of collision detection result 4 and is used as A pairs of object sample set
The object sample set label answered.
In practical application, the selection of collision detection result can be selected according to actual needs, including but not office
It is limited to select the collision detection of maximum value, minimum value either median as a result, the application is not limited in any way this.
In this specification one or more embodiment, using the model of mind training method, a large amount of object is collected first
Body sample set and clathrum method for building up, then according to a large amount of clathrum method for building up of collection to every group of object sample set into
The detection of row collision relationship obtains collision detection according to the collision relationship as a result, selecting optimal grid for every group of object sample set
Then layer method for building up carries out machine learning to model of mind according to the object sample set and corresponding clathrum method for building up
Training, and the corresponding label of object sample set is carried out according to new clathrum method for building up to continue adjust automatically, optimization, so that
Use the trained model of mind of this method that can quickly select optimal clathrum for object sample set in subsequent applications
Method for building up.
Referring to Fig. 5, this specification one or more embodiment, which provides, determines every group in a kind of model of mind training method
The corresponding object sample set label of the object sample set includes step 502 to step 510.
Step 502: according to include at least two clathrum method for building up collection be combined into every group described in object sample set establish
At least two corresponding clathrums.
Step 504: object sample is in its corresponding at least two clathrum in object sample set described in determining every group
At least two clathrum coordinates.
In this specification one or more embodiment, the clathrum coordinate includes object in object sample set described in every group
The object granularity of sample, object sample object described in the abscissa of the clathrum and every group in object sample set described in every group
In body sample set object sample the clathrum ordinate,
In object sample set described in determining every group object sample in its corresponding at least two clathrum at least two
A clathrum coordinate includes:
Using the object granularity of object sample in object sample set described in every group as z-axis, object in object sample set described in every group
Body sample is object sample in object sample set described in x-axis and every group in the clathrum in the abscissa of the clathrum
Ordinate is y-axis, and at least two clathrum is converted at least two granularity coordinate systems, determine every group described in object sample
Concentrate object sample in the coordinate of at least two granularities coordinate system.
Referring to Fig. 6, to include 2 object samples in object sample set B, to the object for corresponding one of which clathrum
Object sample is illustrated in the coordinate of a granularity coordinate system in body sample set B.
A kind of corresponding clathrum of 2 object samples includes 2 layers, is sat firstly, 2 layers of clathrum are converted to granularity
Mark system, the granularity coordinate system indicate position of the object sample in granularity plane using object granularity as z-axis, with x-axis and y-axis,
With the central point of object sample in coordinate of the coordinate representation object sample in granularity plane in granularity plane.Pass through the grain
It is [6.5,5.5,2] that degree coordinate system, which can be seen that coordinate of the object sample A in granularity coordinate system in lower layer's clathrum, i.e.,
For the object sample in the plane that granularity is 2mm, coordinate on this plane is (6.5,5.5).Object in the clathrum of upper layer
Coordinate of the body sample B in granularity coordinate system be [6.5,5.5,4], i.e., the object sample granularity be 4mm plane on,
Coordinate in the plane is (6.5,5.5).Then, by the way that object A is mapped to upper layer clathrum, the mapping of object A and object B
Overlapping;Or by the way that object B is mapped to lower layer's clathrum, the mapping of object B is Chong Die with object A, it is possible thereby to determine object A
It necessarily collides with object B.
Step 506: at least two clathrums coordinate of object sample determines in the object sample set according to every group
At least two collision relationships of object sample in object sample set described in every group.
In this specification one or more embodiment, in the object sample set according to every group described in object sample at least
Two clathrum coordinates determine every group described in object sample set object sample at least two collision relationships i.e. according to every group of institute
State in object sample set object sample in the coordinate of at least two granularities coordinate system determine every group described in object sample set
At least two collision relationships of object sample.
Wherein, at least two clathrums coordinate of object sample determines every group in the object sample set according to every group
At least two collision relationships of object sample include: in the object sample set
For being located at the object sample of same clathrum, object sample is sat in the granularity in object sample set described in every group
The x-axis and y-axis coordinate for marking system determine every group described in object sample set object sample the first collision relationship;
For being located at the examined object of different clathrums, object sample is in the granularity in object sample set described in every group
The x-axis, y-axis and z-axis coordinate of coordinate system determine every group described in object sample set object sample the second collision relationship;
According to the first collision relationship and the second collision relationship determine every group described in object sample in object sample set
This at least two collision relationships.
In actual use, object sample in object sample set described in every group is put into according to its object granularity first matched
After in Multilayer Network compartment, collision relationship then is carried out to object sample in every layer of clathrum and detects to obtain the first collision detection knot
Fruit, then cross-layer collision detection is carried out to the object sample in multiple clathrums, detect touching for the object sample in adjacent net compartment
The relationship of hitting obtains the second collision detection as a result, finally from the first collision detection result and the second available object of collision detection result
Body sample collision relationship testing result final in Multilayer Network compartment.Wherein, the object in the object sample set as described in every group
The good different clathrums of body sample correspondence establishment, therefore the object sample standard deviation in object sample set described in every group can correspond to one most
Whole collision relationship testing result, if there is the object sample in object sample set described in multiple groups, can generate it is multiple it is corresponding most
Collision relationship testing result eventually.
Referring to Fig. 7, by taking a kind of corresponding Multilayer Network compartment of object sample in wherein one group of object sample set as an example, to the object
The collision relationship detection of object sample is illustrated in body sample set.
If the Multilayer Network compartment includes a, b and c layers, the collision by taking three-layer network compartment a, b and c as an example to object sample
Relationship detection mode is illustrated.
In Fig. 7, clathrum a1 is the mapping relations figure of clathrum a.
Collision relationship detection to object sample includes two ways, and one is according to the lesser clathrum of object granularity
The coordinate of coordinate and the biggish clathrum of upper one layer of object granularity is detected toward father's layer angle detecting, referred to as upward cross-layer;It is another
It is according to the coordinate of the coordinate of the biggish clathrum of object granularity and the next layer of lesser clathrum of object granularity toward sublayer direction
Detection, referred to as downward cross-layer detection.
Wherein, upward cross-layer detection mode specifically: the object 1 in clathrum b is mapped to some coordinate in clathrum a
In same area 11, which object collides in detection object 1 and clathrum a.First object 1 will necessarily in clathrum a
Object in coordinate same area 11 collides, then identical as clathrum a coordinate to object 1 further according to same layer detection method
Object in 8 grey grid areas on 11 periphery of region carries out collision detection.
Downward cross-layer detection mode specifically: by the corresponding rectangle ABCD area maps of object one of in clathrum b
Into clathrum c, the object detection area in clathrum c: rectangle A ' B ' C ' D ' is then determined according to the region rectangle ABCD,
In, the region rectangle A ' B ' C ' D ' is to be mapped in the boundary in the region rectangle ABCD of clathrum c to extend to the outside sublayer point
Area's size obtains, which is the size of a grid of clathrum c.
In downward cross-layer detection mode, it is also necessary to the object meeting that detection is mapped in the region rectangle ABCD of clathrum c
Which collide with the object in clathrum c.Firstly, the object in the region rectangle ABCD will necessarily be with the area rectangle A ' B ' C ' D '
Object in domain collides, then further according to existing same layer detection method by the region rectangle ABCD object and rectangle A '
Except the object in other grey grid areas of corresponding rectangle ABCD area peripheral edge carries out collision detection in the region B ' C ' D '.
In practical application, when carrying out collision detection to the object sample in monolayer net compartment, using the structure of Hash, use
The nine grids detection mode of one object sample Zhan Yige, but the clathrum of this specification embodiment have it is multiple and each
A granularity of division is all different, and each layer of space lattice granularity is all different just as quaternary tree, then different
The object sample of object granule size is just put into the clathrum of different grid granularities, when the collision relationship of object sample detects,
Collision relationship between the mode detection object sample of nine grids, the object of different layers are just used for the object sample of same layer
Sample uses the collision relationship between the mode detection object sample of similar quaternary tree.
Re-scheduling operation is thus completely avoided, and because different size of object sample is placed into different grids
In layer, the overlapping detection between same layer object sample is avoided, screening precision is able to maintain always in certain high precision.
In this specification one or more embodiment, every kind of collision relationship of object sample in object sample set described in every group
It is all made of above method acquisition.
Step 508: according at least two collisions relationship determine every group described in object sample is extremely in object sample set
Few two kinds of collision detection results, wherein the collision detection result includes detecting object sample in the primary object sample set
Collision detection it is time-consuming.
Step 510: a kind of corresponding clathrum of collision detection result is selected from at least two collision detections result
Method for building up is as the corresponding object sample set label of the object sample set.
It is object sample described in every group according to preset clathrum method for building up in this specification one or more embodiment
Collection establishes corresponding clathrum, then according to the clathrum to be converted to three-dimensional granularity coordinate system, is then sat according to the granularity
Mark system determine every group described in object sample set object sample its corresponding clathrum coordinate so that the object according to every group
In body sample set the clathrum coordinate of object sample determine every group described in object sample set object sample collision relationship more
Accurately, using the accurate collision detection obtained according to the collision relationship as a result, then according to accurate collision detection result as object
Body sample set selects optimal object sample set label.
Processor 120 can execute the step in method shown in Fig. 8.Fig. 8 is shown according to one embodiment of specification
The schematic flow chart of collision checking method, including step 802 is to step 806.
Step 802: obtaining the examined object collection including at least two examined objects, wherein the examined object
Collection includes the closeness of the size of examined object, the quantity of examined object and examined object.
In this specification one or more embodiment, the quantity for the examined object that the examined object is concentrated is at least
Two, it is also possible to three or three or more, the examined object collection of suitable examined object quantity is obtained according to practical application,
The application is not limited in any way this.
Wherein, the examined object includes but is not limited to regularly or irregularly figure, such as people in scene of game
Object angle color or attack stage property etc..
Step 804: clathrum method for building up is determined for the examined object collection according to pre-generated model of mind, and
It is that the examined object collection establishes corresponding clathrum according to the clathrum method for building up.
In this specification one or more embodiment, the pre-generated model of mind is to train in above-described embodiment
Model of mind.
Step 806: determining that the examined object concentrates the collision relationship of examined object according to the clathrum.
In this specification one or more embodiment, it is to be detected to determine that the examined object is concentrated according to the clathrum
The collision relationship of object includes:
Determine the clathrum coordinate that the examined object concentrates examined object in its corresponding clathrum;
The respective clathrum coordinate of examined object is concentrated to determine the examined object collection according to the examined object
The collision relationship of middle examined object.
Wherein, the clathrum coordinate includes the object granularity that examined object concentrates examined object, examined object
Examined object is concentrated to concentrate examined object in the grid in the abscissa of the clathrum and the examined object
The ordinate of layer,
Determine that the examined object concentration examined object includes: in the clathrum coordinate of its corresponding clathrum
Concentrate the object granularity of examined object as z-axis using examined object, examined object concentrates examined object to exist
The abscissa of the clathrum is that concentrate examined object in the ordinate of the clathrum be y-axis for x-axis and examined object,
The clathrum is converted into granularity coordinate system, determines the seat that examined object concentrates examined object in the granularity coordinate system
Mark.
In this specification one or more embodiment, the respective grid of examined object is concentrated according to the examined object
Layer coordinate determines that the collision relationship of the examined object concentration examined object includes:
Examined object is concentrated to determine in the coordinate of the granularity coordinate system according to the examined object described to be detected
The collision relationship of object concentration examined object.
In this specification one or more embodiment, with specific reference to the clathrum determine the examined object concentrate to
The method of the collision relationship of detection object may refer to above-described embodiment, and details are not described herein.
In this specification one or more embodiment, the collision checking method leads to after getting examined object collection
Cross model of mind be examined object collection determine an optimal clathrum method for building up, then by examined object concentrate to
Detection object is placed through in the clathrum that optimal clathrum method for building up is established, and then accurately detects examined object
The collision relationship between examined object is concentrated, not only increases the detection accuracy of system, and save time-consuming, is greatly improved
User experience.
Referring to Fig. 9, one embodiment of the application additionally provides a kind of model of mind training device, comprising:
First obtains module 902, is configured as obtaining the set of object sample set, wherein the set of the object sample
Comprising the corresponding object sample set label of object sample set described in multiple groups object sample set and every group, object sample described in every group
Collection includes object size, the quantity of object sample, the closeness of object sample, and the object sample set label includes net
Compartment method for building up;
Training module 904 is configured as being trained model of mind by the set of the object sample set, obtains institute
Model of mind is stated, the model of mind makes the object sample set and the object sample set label associated.
Optionally, described device further include:
First determining module, be configured to determine that every group described in the corresponding object sample set label of object sample set.
Optionally, first determining module includes:
First setting up submodule is configured as being combined into described in every group according to the collection for including at least two clathrum method for building up
Object sample set establishes at least two corresponding clathrums;
Second determines submodule, be configured as according at least two clathrum determine every group described in object sample set
At least two collision relationships of object sample;
Third determines submodule, be configured as according at least two collisions relationship determine every group described in object sample set
At least two collision detection results of middle object sample, wherein the collision detection result includes detecting the primary object sample
The collision detection of this concentration object sample is time-consuming;
Submodule is selected, is configured as selecting a kind of collision detection result pair from at least two collision detections result
The clathrum method for building up answered is as the corresponding object sample set label of the object sample set.
Optionally, described device further include:
Adding module is configured as receiving new clathrum method for building up, and the new clathrum method for building up is added
It adds in the set including at least two clathrum method for building up.
Optionally, described second determine that submodule is also configured to
5th determines submodule, be configured to determine that every group described in object sample set object sample it is corresponding described at its
At least two clathrum coordinates of at least two clathrums;
6th determines submodule, is configured as described at least two of object sample in the object sample set according to every group
Clathrum coordinate determine every group described in object sample set object sample at least two collision relationships.
Optionally, the clathrum coordinate includes the object granularity of object sample in object sample set described in every group, and every group
Object sample object sample in the object sample set described in the abscissa of the clathrum and every group in the object sample set
In the ordinate of the clathrum,
Described 5th determines submodule, is also configured to
Using the object granularity of object sample in object sample set described in every group as z-axis, object in object sample set described in every group
Body sample is object sample in object sample set described in x-axis and every group in the clathrum in the abscissa of the clathrum
Ordinate is y-axis, and at least two clathrum is converted at least two granularity coordinate systems, determine every group described in object sample
Concentrate object sample in the coordinate of at least two granularities coordinate system.
Optionally, it the described 6th determines submodule, is also configured to
Object sample determines every in the coordinate of at least two granularities coordinate system in the object sample set according to every group
At least two collision relationships of object sample in the group object sample set.
In this specification one or more embodiment, using the model of mind training method, a large amount of object is collected first
Body sample set and clathrum method for building up, then according to a large amount of clathrum method for building up of collection to every group of object sample set into
The detection of row collision relationship obtains collision detection according to the collision relationship as a result, selecting optimal grid for every group of object sample set
Then layer method for building up carries out machine learning to model of mind according to the object sample set and corresponding clathrum method for building up
Training, and the corresponding label of object sample set is carried out according to new clathrum method for building up to continue adjust automatically, optimization, so that
Use the trained model of mind of this method that can quickly select optimal clathrum for object sample set in subsequent applications
Method for building up.
Referring to Figure 10, one embodiment of the application additionally provides a kind of collision detecting device, comprising:
Second obtains module 1002, is configured as obtaining the examined object collection including at least two examined objects,
In, the examined object collection includes the intensive of the size of examined object, the quantity of examined object and examined object
Degree;
Second establishes module 1004, is configured as being determined according to pre-generated model of mind for the examined object collection
Clathrum method for building up, and be that the examined object collection establishes corresponding clathrum according to the clathrum method for building up;
4th determining module 1006 is configured as determining that the examined object concentrates object to be detected according to the clathrum
The collision relationship of body.
Optionally, the 4th determining module 1006 includes:
Clathrum coordinate determines submodule, is configured to determine that the examined object concentrates examined object in its correspondence
Clathrum clathrum coordinate;
Collision relationship determines submodule, is configured as concentrating the respective grid of examined object according to the examined object
Layer coordinate determines that the examined object concentrates the collision relationship of examined object.
Optionally, the clathrum coordinate includes the object granularity that examined object concentrates examined object, object to be detected
Body concentrates examined object to concentrate examined object in the net in the abscissa of the clathrum and the examined object
The ordinate of compartment,
The clathrum coordinate determines submodule, is also configured to
Concentrate the object granularity of examined object as z-axis using examined object, examined object concentrates examined object to exist
The abscissa of the clathrum is that concentrate examined object in the ordinate of the clathrum be y-axis for x-axis and examined object,
The clathrum is converted into granularity coordinate system, determines the seat that examined object concentrates examined object in the granularity coordinate system
Mark.
Optionally, the collision relationship determines submodule, is also configured to
Examined object is concentrated to determine in the coordinate of the granularity coordinate system according to the examined object described to be detected
The collision relationship of object concentration examined object.
Optionally, the pre-generated model of mind includes any one above-mentioned model of mind.
In this specification one or more embodiment, the collision detecting device leads to after getting examined object collection
Cross model of mind be examined object collection determine an optimal clathrum method for building up, then by examined object concentrate to
Detection object is placed through in the clathrum that optimal clathrum method for building up is established, and then accurately detects examined object
The collision relationship between examined object is concentrated, not only increases the detection accuracy of system, and save time-consuming, is greatly improved
User experience.
One embodiment of the application also provides a kind of computer readable storage medium, is stored with computer instruction, the instruction
The step of model of mind training method as previously described or collision checking method are realized when being executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited
The technical solution of storage media and above-mentioned model of mind training method or the technical solution of collision checking method belong to same structure
Think, the detail content that the technical solution of storage medium is not described in detail, may refer to above-mentioned model of mind training method or
The description of the technical solution of collision checking method.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory),
Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior
Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts
Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because
According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen
It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
The application preferred embodiment disclosed above is only intended to help to illustrate the application.There is no detailed for alternative embodiment
All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification,
It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain the application
Principle and practical application, so that skilled artisan be enable to better understand and utilize the application.The application is only
It is limited by claims and its full scope and equivalent.