Method and apparatus for determining security area, device, and storage medium
View Patent ↗Provided are a method and apparatus for determining a security area, a device, and a storage medium. The method includes: determining property information of an entity in a real scene in which a user is in a motion; displaying, based on the property information of the entity, in a virtual space a target virtual scene mapped from the real scene; and determining, based on a security-type virtual object in the target virtual scene, a corresponding security area. In the present disclosure, the customized delineation of the security area in a plurality of spatial ranges is achieved by using the user's motion in the real scene, and an adaptability between the security area and the real scene is ensured. Moreover, by displaying the target virtual scene mapped from the real scene to the user, the user's collision-free motion in the real scene can be supported before the security area is delineated.
1 . A method for determining a security area, wherein the method is applied in an Extended Reality (XR) device, the method comprising:
determining property information of an entity in a real scene where a user is located;
displaying, based on the property information of the entity, a target virtual scene mapped from the real scene in a virtual space;
determining, based on property information of an entity corresponding to a virtual object in the target virtual scene, a corresponding security area,
wherein the method further comprises, prior to said determining the property information of the entity in the real scene where the user is located:
accessing the virtual space; and
displaying, in response to a wake-up instruction in the virtual space, a configuration entry of the security area in the virtual space, to perform a determination operation of the security area.
2 . The method according to claim 1 , wherein said displaying, based on the property information of the entity, the target virtual scene mapped from the real scene in the virtual space comprises:
mapping, based on a predetermined target mapping relationship and the property information of the entity, the entity into a corresponding virtual object to generate the target virtual scene; and
displaying the target virtual scene in the virtual space.
3 . The method according to claim 2 , further comprising:
presenting virtual scene options in the virtual space; and
obtaining, in response to a selection operation on any virtual scene from the virtual scene options, a predetermined target mapping relationship for the selected virtual scene.
4 . The method according to claim 1 , wherein the entity in the real scene comprises an obstacle entity and a security entity, and the virtual object in the target virtual scene comprises an obstacle-type virtual object and a security-type virtual object.
5 . The method according to claim 1 , wherein said determining the property information of the entity in the real scene where the user is located comprises:
obtaining, when the user is in a motion, a target image in the real scene, and entity depth data and device pose data that correspond to the target image;
performing recognition on the target image to determine feature information of the entity in the real scene; and
determining the property information of the entity based on the feature information of the entity, the entity depth data and the device pose data.
6 . The method according to claim 5 , wherein said obtaining the target image in the real scene comprises:
obtaining an image collection of the real scene taken by a plurality of cameras on the XR device at the same moment; and
fusing the image collection to generate the target image.
7 . The method according to claim 1 , wherein the property information of the entity at least comprises feature information of the entity, relative position information of the entity, and absolute position information of the entity.
8 . A electronic device, comprising:
a processor; and
a memory storing executable instructions of the processor;
wherein the processor is configured to, when executing the executable instructions, cause the electronic device to:
determine property information of an entity in a real scene where a user is located;
display, based on the property information of the entity, a target virtual scene mapped from the real scene in a virtual space;
determine, based on property information of an entity corresponding to a virtual object in the target virtual scene, a corresponding security area,
wherein the executable instructions, when being executed by the processor, further cause the processor to, prior to said determining the property information of the entity in the real scene where the user is located:
access the virtual space; and
display, in response to a wake-up instruction in the virtual space, a configuration entry of the security area in the virtual space, to perform a determination operation of the security area.
9 . The electronic device according to claim 8 , wherein said displaying, based on the property information of the entity, the target virtual scene mapped from the real scene in the virtual space comprises:
mapping, based on a predetermined target mapping relationship and the property information of the entity, the entity into a corresponding virtual object to generate the target virtual scene; and
displaying the target virtual scene in the virtual space.
10 . The electronic device according to claim 9 , wherein the processor is further configured to, when executing the executable instructions, cause the electronic device to:
present virtual scene options in the virtual space; and
obtain, in response to a selection operation on any virtual scene from the virtual scene options, a predetermined target mapping relationship for the selected virtual scene.
11 . The electronic device according to claim 8 , wherein the entity in the real scene comprises an obstacle entity and a security entity, and the virtual object in the target virtual scene comprises an obstacle-type virtual object and a security-type virtual object.
12 . The electronic device according to claim 8 , wherein said determining the property information of the entity in the real scene where the user is located comprises:
obtaining, when the user is in a motion, a target image in the real scene, and entity depth data and device pose data that correspond to the target image;
performing recognition on the target image to determine feature information of the entity in the real scene; and
determining the property information of the entity based on the feature information of the entity, the entity depth data and the device pose data.
13 . The electronic device according to claim 12 , wherein said obtaining the target image in the real scene comprises:
obtaining an image collection of the real scene taken by a plurality of cameras on the XR device at the same moment; and
fusing the image collection to generate the target image.
14 . The electronic device according to claim 8 , wherein the property information of the entity at least comprises feature information of the entity, relative position information of the entity, and absolute position information of the entity.
15 . A non-transitory computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when being executed by a processor, causes the processor to:
determine property information of an entity in a real scene where a user is located;
display, based on the property information of the entity, a target virtual scene mapped from the real scene in a virtual space;
determine, based on property information of an entity corresponding to a virtual object in the target virtual scene, a corresponding security area,
wherein the computer program, when being executed by the processor, further causes the processor to, prior to said determining the property information of the entity in the real scene where the user is located:
access the virtual space; and
display, in response to a wake-up instruction in the virtual space, a configuration entry of the security area in the virtual space, to perform a determination operation of the security area.
16 . The non-transitory computer-readable storage medium according to claim 15 , wherein said displaying, based on the property information of the entity, the target virtual scene mapped from the real scene in the virtual space comprises:
mapping, based on a predetermined target mapping relationship and the property information of the entity, the entity into a corresponding virtual object to generate the target virtual scene; and
displaying the target virtual scene in the virtual space.
17 . The non-transitory computer-readable storage medium according to claim 16 , wherein the computer program, when being executed by a processor, further causes the processor to:
present virtual scene options in the virtual space; and
obtain, in response to a selection operation on any virtual scene from the virtual scene options, a predetermined target mapping relationship for the selected virtual scene.
18 . The non-transitory computer-readable storage medium according to claim 15 , wherein the entity in the real scene comprises an obstacle entity and a security entity, and the virtual object in the target virtual scene comprises an obstacle-type virtual object and a security-type virtual object.