Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic structural diagram of a virtual house-watching system according to an embodiment of the present invention, as shown in fig. 1, where the virtual house-watching system includes a server 101 and a plurality of terminal devices 102, and the server 101 and the plurality of terminal devices 102 are respectively connected in a communication manner. The plurality of terminal devices can access a virtual three-dimensional space of the same house through the server, the virtual three-dimensional space is displayed on each terminal device, when the server receives operation information sent by one terminal device, the operation information is generated according to the operation, such as rotation operation, movement operation and the like, of the terminal device when the terminal device detects the operation on the virtual three-dimensional space, the server receives the operation information and responds to the operation information, and the server sends a response result to the operation information to each device terminal accessing the virtual three-dimensional space. The terminal equipment comprises, but is not limited to, a smart phone, a tablet personal computer and the like.
Fig. 2 is a flow chart of a processing method of an operation conflict according to an embodiment of the present invention, and as shown in fig. 2, the processing method of an operation conflict provided by the present invention includes:
s201, receiving operation information sent by a plurality of terminal devices, wherein the plurality of terminal devices access a virtual three-dimensional space of the same house source;
specifically, when a plurality of terminal apparatuses access a virtual three-dimensional space of the same house source through a virtual house-seeing system, each of the terminal apparatuses may transmit operation information, which is generated when the terminal apparatus detects an operation to the virtual three-dimensional space, to a server. The server may receive operation information transmitted from each terminal device.
S202, if the operation information sent by the plurality of terminal devices is judged to be in conflict, the operation information of the terminal device which is received first is responded.
Specifically, after receiving the operation information of one of the terminal devices, the server needs a certain time for processing the operation information of the terminal device. If the server receives the operation information of other terminal devices when responding to the operation information of the terminal devices, the operation information of the other terminal devices conflicts with the operation information of the terminal devices because the same virtual three-dimensional space cannot respond to different operations of the virtual three-dimensional space at the same time. Since the server receives the operation information of the above-mentioned terminal device earlier than the operation information of the other terminal devices, the server may respond to the operation information of the above-mentioned terminal device and then transmit the result of responding to the operation information of the above-mentioned terminal device to the plurality of terminal devices.
For example, zhang Sanand his wife respectively view the virtual three-dimensional space of the same set of room sources A on the server in virtual room viewing mode through their own smartphones. And thirdly, after the smart phone displays the virtual three-dimensional space of the house source A, performing rotation operation on the virtual three-dimensional space of the house source A, generating operation information a corresponding to the rotation operation after the smart phone detects the rotation operation, and sending the operation information a to the server, wherein the server can receive the operation information a corresponding to the rotation operation and process the operation information a corresponding to the rotation operation. And when the server processes the operation information corresponding to the rotation operation, receiving operation information b sent by the smart phone of the Zhang three wife, wherein the operation information b is generated after the smart phone of the Zhang three wife detects the click operation of the Zhang three wife on the virtual three-dimensional space of the house source A. The server processes the operation information a, judges that the operation information b conflicts with the operation information a, and continuously processes the operation information a without responding to the operation information b, sends the processing result of the rotation operation to the smart phones of Zhang-three and Zhang-three wives, and displays the virtual three-dimensional space of the house source A after the rotation operation on the smart phones of Zhang-three and Zhang-three wives.
According to the processing method for the operation conflict, the operation information sent by the plurality of terminal devices accessing the virtual three-dimensional space of the same house source can be received, and after the operation information sent by the plurality of terminal devices is judged and known to conflict, the operation information of the terminal device received first is responded, so that the processing efficiency of the operation information is improved.
On the basis of the above embodiments, the method for processing operation conflicts provided by the present invention further includes:
and when the operation information of the terminal equipment which is received first is processed, not responding to the received operation information of other terminal equipment.
Specifically, after judging that the operation information of other terminal devices conflicts with the operation information of the terminal device received first, the server does not respond to the received operation information of other terminal devices when processing the operation information of the terminal device received first, and the server can discard the operation information of other terminal devices which conflicts with the operation information of the terminal device received first because the current view angle of the virtual three-dimensional space corresponding to the room source changes after responding to the operation information of the terminal device received first.
On the basis of the above embodiments, the method for processing operation conflicts provided by the present invention further includes:
and when the operation information of the terminal equipment received first is processed, sending the current busy prompt information to other terminal equipment.
Specifically, after judging that the operation information of other terminal devices conflicts with the operation information of the first received terminal device, the server does not process the operation information of other terminal devices when processing the operation information of the first received terminal device, in order to avoid that the other terminal devices repeatedly send the operation information due to the fact that response information to the operation information of the other terminal devices is not received, the server can respectively send prompt information of current busyness to the other terminal devices, and the prompt information indicates that the server cannot process the operation information sent by the other terminal devices at present, and prompts the other terminal devices to wait for the current processing to be completed.
On the basis of the above embodiments, further, if it is determined that the operation information of the plurality of terminal devices conflicts, responding to the operation information of the terminal device received first includes:
and if judging that the time for receiving the operation information sent by the plurality of terminal devices is the same, randomly responding to one of the operation information sent by the plurality of terminal devices.
Specifically, if the server receives the operation information sent by the plurality of terminal devices at the same time, the receiving time of the operation information corresponding to the plurality of terminal devices is the same, the server may randomly select one operation information from the operation information with the same receiving time to process the operation information, and then send a processing result of the operation information to the plurality of terminal devices.
Fig. 3 is a schematic structural diagram of a server according to an embodiment of the present invention, and as shown in fig. 3, the server provided by the present invention includes a receiving unit 301 and a judging unit 302, where:
the receiving unit 301 is configured to receive operation information sent by a plurality of terminal devices, where the plurality of terminal devices access a virtual three-dimensional space of the same room source; the judging unit 302 is configured to respond to operation information of the terminal device that is received first after judging that operation information sent by the plurality of terminal devices collides.
Specifically, when a plurality of terminal apparatuses access a virtual three-dimensional space of the same house source through a virtual house-seeing system, each of the terminal apparatuses may transmit operation information, which is generated when the terminal apparatus detects an operation to the virtual three-dimensional space, to the receiving unit 301. The receiving unit 301 may receive operation information transmitted from each terminal device.
After receiving the operation information of one of the terminal devices, a certain time is required for processing the operation information of the terminal device. If operation information of other terminal devices is received in response to the operation information of the terminal device, the judging unit 302 judges that the operation information of the other terminal devices collides with the operation information of the terminal device because the same virtual three-dimensional space cannot simultaneously respond to different operations of the virtual three-dimensional space. Since the operation information of the above-described terminal device is received earlier than the operation information of the other terminal devices, the judgment unit 302 may respond to the operation information of the above-described terminal device and then transmit the result of responding to the operation information of the above-described terminal device to the plurality of terminal devices.
The server provided by the invention can receive the operation information sent by a plurality of terminal devices accessing the virtual three-dimensional space of the same house source, and responds to the operation information of the terminal device received first after judging and knowing that the operation information sent by the plurality of terminal devices conflicts, thereby improving the processing efficiency of the operation information.
Fig. 4 is a schematic structural diagram of a server according to another embodiment of the present invention, and as shown in fig. 4, the server provided by the present invention further includes a response unit 303, where:
the response unit 303 is configured to not respond to the received operation information of the other terminal device when processing the operation information of the terminal device that is received first.
Specifically, after it is determined that the operation information of the other terminal device collides with the operation information of the first received terminal device, the response unit 303 does not respond to the received operation information of the other terminal device when processing the operation information of the first received terminal device, and the operation information of the other terminal device that collides with the operation information of the first received terminal device may be discarded because the current viewing angle of the virtual three-dimensional space corresponding to the room source changes after responding to the operation information of the first received terminal device.
Fig. 5 is a schematic structural diagram of a server according to another embodiment of the present invention, and as shown in fig. 5, the server provided by the present invention further includes a sending unit 304, where:
the sending unit 304 is configured to send, when processing operation information of the terminal device that is received first, currently busy prompt information to other terminal devices.
Specifically, after it is determined that the operation information of the other terminal device conflicts with the operation information of the first received terminal device, when the operation information of the first received terminal device is processed, the operation information of the other terminal device is not processed, so as to avoid that the other terminal device repeatedly sends the operation information due to the fact that no response information to the operation information of the other terminal device is received, the sending unit 304 may send, to the other terminal device, currently busy prompt information respectively, where the prompt information indicates that the server cannot process the operation information sent by the other terminal device at present, and prompt the other terminal device to wait for the current processing to be completed.
Further, based on the above embodiments, the determining unit 302 is specifically configured to:
and after judging that the time for receiving the operation information sent by the plurality of terminal devices is the same, randomly responding to one of the operation information sent by the plurality of terminal devices.
Specifically, if the server receives the operation information sent by the plurality of terminal devices at the same time, the receiving time of the operation information corresponding to the plurality of terminal devices is the same, the determining unit 302 may randomly select one of the operation information from the plurality of operation information with the same receiving time to process, and then send a result of processing the operation information to the plurality of terminal devices.
The embodiment of the server provided by the present invention may be specifically used to execute the processing flow of each method embodiment, and the functions thereof are not described herein again, and reference may be made to the detailed description of the method embodiments.
FIG. 6 is a schematic diagram of the physical structure of an electronic device according to an embodiment of the present invention, as shown in FIG. 6, the electronic device includes a processor 601, a memory 602, and a communication bus 603;
wherein, the processor 601 and the memory 602 complete communication with each other through the communication bus 603;
the processor 601 is configured to invoke program instructions in the memory 602 to perform the methods provided by the method embodiments described above, including, for example: receiving operation information sent by a plurality of terminal devices, wherein the plurality of terminal devices access a virtual three-dimensional space of the same house source; and if the operation information sent by the plurality of terminal devices is judged to be in conflict, responding to the operation information of the terminal device which is received first.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example comprising: receiving operation information sent by a plurality of terminal devices, wherein the plurality of terminal devices access a virtual three-dimensional space of the same house source; and if the operation information sent by the plurality of terminal devices is judged to be in conflict, responding to the operation information of the terminal device which is received first.
The present embodiment provides a non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the methods provided by the above-described method embodiments, for example, including: receiving operation information sent by a plurality of terminal devices, wherein the plurality of terminal devices access a virtual three-dimensional space of the same house source; and if the operation information sent by the plurality of terminal devices is judged to be in conflict, responding to the operation information of the terminal device which is received first.
Further, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, an apparatus, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.