Search

CN-122018669-A - Equipment control method, system, device, equipment and storage medium

CN122018669ACN 122018669 ACN122018669 ACN 122018669ACN-122018669-A

Abstract

The embodiment of the application discloses a device control method, a device, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps of displaying a first virtual object located in a first virtual scene, acquiring pose data of the first virtual object after the change of the pose of the first virtual object in the first virtual scene, and sending a first control instruction to at least one second device, wherein the first control instruction comprises the pose data, the second device displays a second virtual scene, the second virtual scene comprises the second virtual object, the scene layout of the second virtual scene is identical to that of the first virtual scene, and the first control instruction is used for indicating the second device to control the position and the orientation of the second virtual object in the second virtual scene according to the pose data. The application can realize the synchronous control of the content displayed by the second equipment by the first equipment, and improves the accuracy of equipment control.

Inventors

  • LIU JUNHUI
  • ZHOU HONGBIN
  • YAN MING

Assignees

  • 深圳市腾讯计算机系统有限公司

Dates

Publication Date
20260512
Application Date
20241112

Claims (20)

  1. 1. A device control method, performed by a first device, the method comprising: Displaying a first virtual object located in a first virtual scene; under the condition that the pose of the first virtual object in the first virtual scene changes, acquiring pose data of the changed first virtual object, wherein the pose data represents the position and the orientation of the first virtual object in the first virtual scene; Sending a first control instruction to at least one second device, wherein the first control instruction comprises the pose data, and the first device is used for synchronously controlling the at least one second device; The second device displays a second virtual scene, the second virtual scene comprises a second virtual object, the scene layout of the second virtual scene is identical to the scene layout of the first virtual scene, and the first control instruction is used for indicating the second device to control the position and the orientation of the second virtual object in the second virtual scene according to the pose data.
  2. 2. The method according to claim 1, wherein the obtaining pose data of the changed first virtual object in the case that the pose of the first virtual object in the first virtual scene is changed includes: determining that the pose of the first virtual object in the first virtual scene changes under the condition that the change amount of the first virtual object between the pose data of the ith picture frame and the pose data of the kth picture frame is larger than a change amount threshold, wherein the kth picture frame is a picture frame before the ith picture frame, and i and k are positive integers; And determining the pose data of the first virtual object in the ith picture frame as the pose data of the first virtual object after the change.
  3. 3. The method of claim 2, wherein the pose data includes a position parameter and an orientation parameter, and wherein the determining that the pose of the first virtual object in the first virtual scene changes if the amount of change between the pose data of the i-th frame and the pose data of the k-th frame is greater than a change threshold comprises any of: acquiring a position change amount, and determining that the pose of the first virtual object in the first virtual scene changes under the condition that the position change amount is larger than a position change amount threshold value, wherein the position change amount represents a difference value between the position parameter of the ith picture frame and the position parameter of the kth picture frame; acquiring an orientation variation, and determining that the pose of the first virtual object in the first virtual scene changes under the condition that the orientation variation is larger than an orientation variation threshold, wherein the orientation variation represents a difference value between an orientation parameter of the ith picture frame and an orientation parameter of the kth picture frame; And acquiring the position change amount and the orientation change amount, and determining that the pose of the first virtual object in the first virtual scene changes when the position change amount is larger than the position change amount threshold and the orientation change amount is larger than the orientation change amount threshold.
  4. 4. The method of claim 2, wherein the determining that the pose of the first virtual object in the first virtual scene changes if the amount of change between the pose data of the i-th frame and the pose data of the k-th frame is greater than the change threshold comprises at least one of: The kth picture frame is the last picture frame of the ith picture frame, and if the variation between the pose data of the ith picture frame and the pose data of the kth picture frame is greater than a first variation threshold, the pose of the first virtual object in the first virtual scene is determined to be changed; The kth picture frame is a picture frame when a control instruction is sent last time, and if the variation between the pose data of the ith picture frame and the pose data of the kth picture frame is greater than a second variation threshold, the pose of the first virtual object in the first virtual scene is determined to be changed, wherein the second variation threshold is greater than the first variation threshold.
  5. 5. The method according to claim 1, wherein the method further comprises: Determining a target frame number under the condition that the pose of the first virtual object in the first virtual scene changes, wherein the target frame number is the frame number from a kth picture frame to an ith picture frame, the kth picture frame is the picture frame when a control instruction is sent last time, and the ith picture frame is the picture frame when the first control instruction is sent; The first control instruction further comprises the target frame number, and the first control instruction is used for indicating the second equipment to control the position and the orientation of the second virtual object in the second virtual scene according to the pose data within the frame number of the target frame number.
  6. 6. The method of claim 1, wherein the first device and the second device are running a target application, the first virtual scene and the second virtual scene are virtual scenes in the target application, the target application includes a pose control plug-in, and the acquiring pose data of the first virtual object after the first virtual object changes when the pose of the first virtual object in the first virtual scene changes includes: And detecting the pose of the first virtual object in the first virtual scene through the pose control plug-in, and acquiring pose data of the changed first virtual object under the condition that the pose of the first virtual object is detected to be changed through the pose control plug-in.
  7. 7. The method of any one of claims 1 to 6, wherein a plurality of functionality controls are displayed on the first virtual scene, the method further comprising: Under the condition that triggering operation on a target functional control is detected, control triggering data are obtained, wherein the control triggering data comprise control characteristics of the target functional control and operation characteristics of the triggering operation, and the target functional control is any control in the plurality of functional controls; Sending a second control instruction to the at least one second device, wherein the second control instruction comprises the control trigger data; The plurality of functional controls are displayed on the second virtual scene in the second device, and the second control instruction is used for indicating the second device to simulate triggering operation of the target functional control according to the control triggering data.
  8. 8. The method according to claim 7, wherein, in the case that the triggering operation on the target function control is detected, acquiring control triggering data includes: Under the condition that triggering operation of the target function control is detected, determining an operation type of the triggering operation; and under the condition that the operation type of the triggering operation does not belong to a preset operation type, acquiring the control triggering data, wherein the preset operation type is an operation type which does not need to be synchronized with the at least one second device.
  9. 9. The method of claim 7, wherein the first device and the second device are running a target application, the plurality of functionality controls are provided by the target application, and wherein the obtaining control trigger data in the event trigger operation to the target functionality control is detected comprises: Under the condition that the triggering operation is detected, determining the coordinates of the operation starting position of the triggering operation under the interface coordinate system of the target application; Acquiring coordinates of the plurality of functional controls under an interface coordinate system of the target application, wherein the coordinates of the functional controls represent display positions of the functional controls on the interface of the target application; and determining the function control matched with the coordinates of the operation starting position as the triggered target function control.
  10. 10. The method of claim 7, wherein the first device and the second device are running a target application, the first virtual scene and the second virtual scene being virtual scenes in the target application, the target application including a control plug-in, the obtaining control trigger data if a trigger operation on a target functionality control is detected, comprising: detecting the plurality of functional controls on the first virtual scene through the control plug-in, and acquiring the control triggering data under the condition that triggering operation of the target functional control is detected through the control plug-in.
  11. 11. A device control method, performed by a second device, the method comprising: displaying a second virtual object located in a second virtual scene; The method comprises the steps of receiving a first control instruction sent by first equipment, wherein the first control instruction comprises pose data, the first equipment is used for synchronously controlling second equipment, a first virtual scene is displayed on the first equipment, a first virtual object is included in the first virtual scene, the scene layout of the second virtual scene is identical to that of the first virtual scene, and the pose data represent the position and the orientation of the first virtual object after being changed in the first virtual scene; and responding to the first control instruction, and controlling the position and the orientation of the second virtual object in the second virtual scene according to the pose data.
  12. 12. The method of claim 11, wherein the first device and the second device are running a target application, the first virtual scene and the second virtual scene being virtual scenes in the target application, the target application comprising a pose control plug-in; The responding to the first control instruction, according to the pose data, controls the position and the orientation of the second virtual object in the second virtual scene, and comprises the following steps: And responding to the first control instruction, and controlling the position and the orientation of the second virtual object in the second virtual scene according to the pose data through the pose control plug-in.
  13. 13. The method of claim 11 or 12, wherein the second virtual scene has a plurality of functionality controls displayed thereon, the method further comprising: Receiving a second control instruction sent by the first device, wherein the second control instruction comprises control trigger data, the control trigger data represents trigger operation of a target function control detected by the first device, the target function control is any control in the plurality of function controls, and the control trigger data comprises control characteristics of the target function control and operation characteristics of the trigger operation; and responding to the second control instruction, and simulating triggering operation of the target functional control according to the control triggering data.
  14. 14. The method of claim 13, wherein the first device and the second device are running a target application, the first virtual scene and the second virtual scene being virtual scenes in the target application, the target application comprising a control plug-in; and responding to the second control instruction, simulating the triggering operation of the target functional control according to the control triggering data, and comprising the following steps: and responding to the second control instruction, and simulating the triggering operation of the target functional control according to the control triggering data through the control plug-in.
  15. 15. The equipment control system is characterized by comprising a management device, a first device and at least one second device, wherein the first device is used for synchronously controlling the at least one second device, and communication connection is established between the first device and the at least one second device and the management device respectively; The first device is configured to send a first control instruction to the management device when detecting that a pose of a first virtual object in a first virtual scene changes, where the first control instruction includes pose data, and the pose data represents a position and an orientation of the first virtual object after the change in the first virtual scene; the management device is configured to receive the first control instruction and forward the first control instruction to the at least one second device; and the at least one second device is used for responding to the first control instruction and controlling the position and the orientation of a second virtual object in a second virtual scene according to the pose data, wherein the scene layout of the second virtual scene is the same as that of the first virtual scene.
  16. 16. A device control apparatus, configured to a first device, the apparatus comprising: the display module is used for displaying a first virtual object in the first virtual scene; The first acquisition module is used for acquiring pose data of the first virtual object after the change under the condition that the pose of the first virtual object in the first virtual scene is changed, wherein the pose data represents the position and the orientation of the first virtual object in the first virtual scene; the first sending module is used for sending a first control instruction to at least one second device, the first control instruction comprises the pose data, and the first device is used for synchronously controlling the at least one second device; The second device displays a second virtual scene, the second virtual scene comprises a second virtual object, the scene layout of the second virtual scene is identical to the scene layout of the first virtual scene, and the first control instruction is used for indicating the second device to control the position and the orientation of the second virtual object in the second virtual scene according to the pose data.
  17. 17. An apparatus control device, disposed in a second apparatus, comprising: The display module is used for displaying a second virtual object in a second virtual scene; The first device is used for synchronously controlling the second device, the first device is displayed with a first virtual scene, the first virtual scene comprises a first virtual object, the scene layout of the second virtual scene is the same as the scene layout of the first virtual scene, and the pose data represents the changed position and orientation of the first virtual object in the first virtual scene; and the first control module is used for responding to the first control instruction and controlling the position and the orientation of the second virtual object in the second virtual scene according to the pose data.
  18. 18. A computer device comprising a processor and a memory, wherein the memory has stored therein at least one computer program that is loaded and executed by the processor to implement the operations performed by the device control method of any one of claims 1 to 10 or to implement the operations performed by the device control method of any one of claims 11 to 14.
  19. 19. A computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being loaded and executed by a processor to implement operations performed by the device control method of any one of claims 1 to 10 or to implement operations performed by the device control method of any one of claims 11 to 14.
  20. 20. A computer program product comprising a computer program, characterized in that the computer program is loaded and executed by a processor to realize the operations performed by the device control method according to any one of claims 1 to 10 or to realize the operations performed by the device control method according to any one of claims 11 to 14.

Description

Equipment control method, system, device, equipment and storage medium Technical Field The embodiment of the application relates to the technical field of computers, in particular to a device control method, a device, computer equipment and a storage medium. Background Group control refers to a technique of centrally controlling and managing a group of slave devices by a master device. In the related art, a master screen of a master device and a slave screen of a slave device are projected to a computer, and a position on the slave screen is mapped to a trigger operation on the master screen according to a ratio between a screen resolution of the master device and a screen resolution of the slave device, so that the trigger operation performed at the position is simulated to realize synchronous control of the slave device by the master device. However, in the above method, since there is a gap between screen resolutions of the master device and the slave device, a mapped position based on a ratio between screen resolutions is not accurate enough, and thus the accuracy of the device control method is low. Disclosure of Invention The embodiment of the application provides a device control method, a device, computer equipment and a storage medium, which can realize that a first device synchronously controls content displayed by a second device, thereby improving the accuracy of device control. The technical scheme is as follows: In one aspect, there is provided a device control method performed by a first device, the method comprising: Displaying a first virtual object located in a first virtual scene; under the condition that the pose of the first virtual object in the first virtual scene changes, acquiring pose data of the changed first virtual object, wherein the pose data represents the position and the orientation of the first virtual object in the first virtual scene; Sending a first control instruction to at least one second device, wherein the first control instruction comprises the pose data, and the first device is used for synchronously controlling the at least one second device; The second device displays a second virtual scene, the second virtual scene comprises a second virtual object, the scene layout of the second virtual scene is identical to the scene layout of the first virtual scene, and the first control instruction is used for indicating the second device to control the position and the orientation of the second virtual object in the second virtual scene according to the pose data. Optionally, the determining, in the case of detecting a trigger operation on the target function control, an operation type of the trigger operation includes: Determining an operation starting position and an operation ending position of the triggering operation under the condition that the triggering operation of the target function control is detected; determining that the operation type of the trigger operation is a sliding operation in the case that the distance between the operation start position and the operation end position is greater than a distance threshold; and determining that the operation type of the triggering operation is a clicking operation under the condition that the distance between the operation starting position and the operation ending position is not larger than the distance threshold value. Optionally, the operation feature of the triggering operation includes at least one of an operation duration, an operation type, an operation start position, or an operation end position. In one aspect, there is provided a device control method performed by a second device, the method comprising: displaying a second virtual object located in a second virtual scene; The method comprises the steps of receiving a first control instruction sent by first equipment, wherein the first control instruction comprises pose data, the first equipment is used for synchronously controlling second equipment, a first virtual scene is displayed on the first equipment, a first virtual object is included in the first virtual scene, the scene layout of the second virtual scene is identical to that of the first virtual scene, and the pose data represent the position and the orientation of the first virtual object after being changed in the first virtual scene; and responding to the first control instruction, and controlling the position and the orientation of the second virtual object in the second virtual scene according to the pose data. Optionally, the first control instruction further includes a target frame number, where the target frame number indicates a frame number between a kth frame and an ith frame, the kth frame being a frame displayed by the first device when the control instruction is received last time, and the ith frame being a frame displayed by the first device when the first control instruction is received; The responding to the first control instruction, according to the pose data, controls the pos