Disclosure of Invention
The embodiment of the invention provides a head-mounted display and a display control method, which can transmit video information and control information in the same communication mode and are convenient to use.
A first aspect of embodiments of the present invention provides a head-mounted display, including:
The connection module is used for establishing communication connection with the information sending equipment;
An acquisition module for acquiring parameter information of the head mounted display;
the packaging module is used for sending the parameter information to the information sending equipment by adopting a preset message format;
And the display module is used for receiving the display information sent by the information sending equipment, decoding and displaying the display information.
optionally, the connection module includes:
The monitoring unit is used for replying a corresponding response message when monitoring a connection request from the information sending equipment;
a first connection unit, configured to create a socket according to the connection request to communicate with the information sending apparatus;
Or
a request unit for transmitting a connection request to the information transmitting apparatus;
and the second connection unit is used for establishing a socket according to the response message and communicating with the information sending equipment when receiving the response message corresponding to the connection request.
Optionally, the obtaining module includes:
a first obtaining unit, configured to detect motion information of the head-mounted display through a gyroscope sensor, where the motion information includes: at least one or more of a roll angle, a pitch angle, a roll angle rate, a pitch angle rate, and a pitch angle rate;
The second acquisition unit is used for detecting geomagnetic information of the head-mounted display through a geomagnetic sensor, wherein the geomagnetic information comprises geomagnetic intensity information in at least one direction;
and the parameter generating unit is used for generating parameter information according to the motion information and the geomagnetic information.
Optionally, the head mounted display further comprises:
The control module is used for generating a control instruction according to the received operation information;
the encapsulation module is also used for sending the control instruction to the information sending equipment by adopting a preset message format;
Wherein the control module comprises:
the detection unit is used for detecting operation information received by the head-mounted display, and the operation information comprises touch information, press information and voice information;
an instruction generating unit, configured to generate a control instruction according to the operation information, where the control instruction includes: play, pause, and stop.
Optionally, the encapsulation module includes:
an attribute generating unit, configured to generate a packet attribute according to the parameter information, where the packet attribute includes: a parameter packet;
a message encapsulation unit, configured to encapsulate the parameter information by using a preset message format to obtain message information, where the preset message format includes: adding a message field at the head or the tail of the parameter information, wherein the message field comprises: a start flag bit, an effective length identification bit, a serial number, a message attribute and a check bit;
and the message sending unit is used for sending the packaged message information to the information sending equipment.
A second aspect of the present invention provides a display control method for a head-mounted display, including:
establishing communication connection with the information sending equipment;
Acquiring parameter information of the head-mounted display;
Sending the parameter information to the information sending equipment by adopting a preset message format;
and receiving the display information sent by the information sending equipment, decoding and displaying.
Optionally, the establishing a communication connection with an information sending device includes:
when a connection request from the information sending equipment is monitored, a corresponding response message is replied;
creating a socket according to the connection request to communicate with the information sending equipment;
or
sending a connection request to the information sending equipment;
and when a response message corresponding to the connection request is received, creating a socket according to the response message and communicating with the information sending equipment.
optionally, the acquiring parameter information of the head mounted display comprises:
Detecting, by a gyroscope sensor, motion information of the head-mounted display, the motion information including: at least one or more of a roll angle, a pitch angle, a roll angle rate, a pitch angle rate, and a pitch angle rate;
Detecting geomagnetic information of the head-mounted display through a geomagnetic sensor, wherein the geomagnetic information comprises geomagnetic intensity information in at least one direction;
and generating parameter information according to the motion information and the geomagnetic information.
optionally, the display control method further includes:
generating a control instruction according to the received operation information, and sending the control instruction to the information sending device by adopting a preset message format, wherein the generating of the control instruction according to the received operation information specifically comprises:
Detecting operation information received by the head-mounted display, wherein the operation information comprises touch information, press information and voice information;
generating a control instruction according to the operation information, wherein the control instruction comprises: play, pause, and stop.
Optionally, the sending the parameter information to the information sending device by using a preset message format includes:
generating message attributes according to the parameter information, wherein the message attributes comprise: a parameter packet;
Packaging the parameter information by adopting a preset message format to obtain message information, wherein the preset message format comprises: adding a message field at the head or the tail of the parameter information, wherein the message field comprises: a start flag bit, an effective length identification bit, a serial number, a message attribute and a check bit;
and sending the packaged message information to the information sending equipment.
The embodiment of the invention has the following beneficial effects:
The head-mounted display is in communication connection with the information sending device, and sends the parameter information in a preset message format, so that the same communication mode as the display information can be adopted when the parameter information is sent, an extra transmission interface is not needed, the cost is reduced, the use is convenient, and the user experience is improved.
the terms "first," "second," and "third," etc. in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
fig. 1 is a flowchart of a display control method of a head-mounted display according to a first embodiment of the present invention. In this embodiment, the head-mounted display may communicate with an information sending device, the information sending device may be a playing device such as a computer, a mobile phone, and a tablet, the head-mounted display is configured to send control information to the information sending device, the control information includes parameter information and a control instruction, and the head-mounted display is further configured to receive and play picture, audio, or video information sent by the information sending device. The display control method of the head-mounted display includes the following steps S101-S104.
in step S101, a communication connection with the information transmission apparatus is established.
specifically, a communication connection with the information transmission apparatus is first established. In this embodiment, the communication connection may be a wireless or wired connection. The wireless method includes: bluetooth or wifi, wired mode includes: an ethernet port or a USB interface. When the communication connection is established, the communication connection is established in a socket establishing mode, and the communication process is established through the socket, so that the display information and the control information can be respectively used as independent sub-threads to communicate, the display information and the control information can establish the communication connection in the same communication mode, the display information and the control information are not interfered with each other, and a communication interface is not required to be additionally established.
this step S101 is described in detail below with reference to fig. 2 and fig. 3, and fig. 2 is a flowchart illustrating a first embodiment of a method for establishing a communication connection according to an embodiment of the present invention. In this embodiment, the method for establishing a communication connection includes steps S201 to S202.
In step S201, when a connection request from the information sending device is monitored, a corresponding response message is replied.
specifically, in this embodiment, the head-mounted display monitors whether a connection request of another device is received, and when the connection request from the information sending device is received, replies a corresponding response message for notifying the information sending device that the connection request has been accepted.
in step S202, a socket is created according to the connection request to communicate with the information transmission apparatus.
specifically, in this embodiment, the head mounted display creates a socket according to the connection request, and communicates with the information transmission device through the socket. The communication process is established through the socket, so that the display information and the control information can be communicated as independent sub-threads respectively subsequently.
in other embodiments, as shown in fig. 3, fig. 3 is a flowchart of a second embodiment of a method for establishing a communication connection according to an embodiment of the present invention. In this embodiment, the method for establishing a communication connection includes steps S301 to S302.
in step S301, a connection request is transmitted to the information transmitting apparatus.
Specifically, in this embodiment, when the head mounted display wants to perform a play operation, it first detects whether an information sending device exists in the surrounding communication range, and if so, sends a connection request to the information sending device, and determines whether a response message is received.
In step S302, when a response message corresponding to the connection request is received, a socket is created according to the response message to communicate with the information sending apparatus.
Specifically, when a response message corresponding to the connection request is received, indicating that the information sending apparatus has accepted the connection request at this time, a socket is created according to the response message and the information sending apparatus communicates with the socket.
it is to be understood that the method for establishing a communication connection may also take other forms, and the embodiment of the present invention is not limited thereto.
In step S102, parameter information of the head mounted display is acquired.
Specifically, after the communication connection is established, in order to obtain a better viewing experience, parameter information of the head-mounted display needs to be acquired, wherein the parameter information includes motion information of the head-mounted display and geomagnetic information. In this embodiment, the parameter information may be acquired by a sensor built in the head-mounted display.
in step S103, the parameter information is sent to the information sending device in a preset message format.
Specifically, after the parameter information is acquired, the parameter information needs to be transmitted to the information sending device. The information sending equipment can adjust the display parameters of the display information according to the parameter information of the head-mounted display and control the playing according to the control instruction of the head-mounted display. In this embodiment, the parameter information is sent to the information sending device in a preset message format. The preset message format comprises the steps of packaging the parameter information or the control instruction, and adding a corresponding message field on the packaged message. The message field includes: a start flag bit, an effective length identification bit, a serial number, a message attribute and a check bit. After the preset message format is adopted, the obtained message can be sent by adopting the communication connection established in the step S101, so that a communication interface does not need to be additionally established.
In step S104, the display information transmitted by the information transmitting apparatus is received, decoded and displayed.
Specifically, the information sending device receives the parameter information, controls according to a certain algorithm according to the received parameter information, and generates display information sent to the head-mounted display, and the head-mounted display receives the display information by using the communication connection established in step S101, performs data decoding on the display information, and displays the decoded information on the head-mounted display. Because the parameter information sending in step S103 and the display information receiving in step S104 both use the same communication connection, no additional communication interface needs to be established, which reduces the cost and facilitates the use of the user.
in other embodiments, the display control method further includes generating a control instruction according to the received operation information, and sending the control instruction to the information sending device in a preset message format.
the generating of the control instruction according to the received operation information specifically includes: and receiving operation information of the head-mounted display by a user, and generating a corresponding control instruction according to the operation information. Wherein the operation information can be in various forms, such as an operation area of the touch head type display; the operation can be performed by pressing the corresponding key; may be an operation by voice command; but also by issuing remote control commands or the like via other devices. The control instruction is used for controlling the display information. In the present embodiment, the display information includes: pictures, audio, or video. The corresponding control instructions may include: play, pause, and stop.
As can be seen from the above, in the display control method of the head-mounted display in the embodiment of the present invention, the communication connection is established with the information sending device, and the parameter information is sent in the preset message format, so that a communication method the same as that of the display information can be adopted when the parameter information is sent, an additional transmission interface is not required, the cost is reduced, the use is convenient, and the user experience is improved.
fig. 4 is a flowchart of a display control method for a head-mounted display according to a second embodiment of the present invention. In this embodiment, the display control method of the head-mounted display includes the following steps S401 to S406, and it is understood that the steps S402 to S404 in this embodiment can be applied to the step S102 in the first embodiment shown in fig. 1.
In step S401, a communication connection with the information transmitting apparatus is established.
In step S402, motion information of the head-mounted display is detected by a gyroscope sensor.
Specifically, a gyroscope sensor on the head-mounted display is turned on, and motion information of the head-mounted display is detected through the gyroscope sensor, wherein the motion information includes: at least one or more of a roll angle, a pitch angle, a roll angle rate, a pitch angle rate, and a pitch angle rate.
In step S403, geomagnetic information of the head-mounted display is detected by a geomagnetic sensor.
Specifically, open geomagnetic sensor on the head mounted display, through geomagnetic sensor detects head mounted display's geomagnetic information, geomagnetic information includes at least one ascending geomagnetic intensity information in direction, the direction includes: the X-direction, the Y-direction, and the Z-direction.
in step S404, parameter information is generated from the motion information and the geomagnetic information.
specifically, parameter information is generated according to the detected motion information and geomagnetic information. The parameter information is used for informing the information sending equipment of the configuration parameters of the current head-mounted display, and the information sending equipment is convenient to adjust subsequent display information according to the configuration parameters.
In step S405, the parameter information is sent to the information sending device in a preset message format.
In step S406, the display information transmitted by the information transmitting apparatus is received, decoded, and displayed.
As can be seen from the above, in the display control method of the head-mounted display in the embodiment of the present invention, the communication connection is established with the information sending device, and the detected parameter information is sent in the preset message format, so that a communication manner identical to that of the display information can be adopted when the parameter information is sent, an additional transmission interface is not required, the cost is reduced, the use is convenient, and the user experience is improved.
fig. 5 is a flowchart of a display control method for a head-mounted display according to a third embodiment of the present invention. In this embodiment, the display control method of the head-mounted display includes the following steps S501 to S510, where the steps S501 to S504 in this embodiment are the same as the steps S401 to S404 in the second embodiment shown in fig. 4, and the step S510 is the same as the step S406 in the second embodiment shown in fig. 4, which is not repeated herein. It is understood that the steps of S507-S509 in the present embodiment may also be applied to S103 in the first embodiment shown in fig. 1.
in step S501, a communication connection with the information transmitting apparatus is established.
in step S502, motion information of the head-mounted display is detected by a gyroscope sensor.
in step S503, geomagnetic information of the head-mounted display is detected by a geomagnetic sensor.
In step S504, parameter information is generated from the motion information and the geomagnetic information.
In step S505, the operation information received by the head mounted display is detected.
Specifically, the operation information received by the head-mounted display is detected. In the present embodiment, the operation information includes touch information, press information, and voice information. The head-mounted display can be provided with a touch screen operation area for receiving touch operation information of a user; a key-press type operation area for receiving the press operation information of the user can be arranged; a microphone may also be provided for receiving voice information of the user.
In step S506, a control command is generated according to the operation information.
Specifically, the received operation information is identified, and a control instruction is generated according to the operation information. The control instruction is used for controlling the playing of the display information, and the control instruction comprises: play, pause, and stop.
It should be noted that, in this embodiment, steps S502 to 504 and steps S505 to 506 may be performed simultaneously, or only one of the steps may be performed, that is, only the control command is generated or only the parameter information is acquired, and steps S502 to 504 may also be located after steps S505 to 506, which is not limited in this embodiment of the present invention.
In step S507, a packet attribute is generated according to the parameter information or the control instruction, where the packet attribute includes: parameter packets or control packets.
specifically, a message attribute is first generated according to a type of a message to be sent, and in this embodiment, the type of the message includes parameter information or a control instruction. Correspondingly, the message attribute includes: parameter packets and control packets. Optionally, the message attribute further includes a heartbeat packet, and the heartbeat packet is sent at a certain interval time to notify the current state.
in step S508, the parameter information or the control instruction is encapsulated by using a preset message format, so as to obtain message information.
specifically, the sent parameter information or control instruction is encapsulated by adopting a preset message format. In this embodiment, the preset packet format includes: adding a message field at the head or tail of the parameter information or the control instruction, wherein the message field comprises: a start flag bit, an effective length identification bit, a serial number, a message attribute and a check bit.
fig. 6 is a schematic structural diagram of a first embodiment of a message format according to an embodiment of the present invention. As shown in fig. 6, the message includes: STX, LEN, SEQ, MSG, DATA and CHA, CHB fields.
wherein, the STX field is a start marker bit for marking the start field of the message;
the LEN column is an effective length identification bit and is used for identifying the length of the message;
The SEQ column is a sequence number field, and 1 is automatically added when each message is sent;
The MSG field is a message attribute field and is used for identifying the function of the current message;
the DATA column is a DATA segment and is used for storing transmitted DATA information;
The CHA and CHB fields are check bits for correspondingly checking the data.
Optionally, when the transmitted message is parameter information, since the parameter information includes motion information and geomagnetic information, by setting a plurality of different identification bits, different identification bits may be corresponded to different parameters in the parameter information, for example, the plurality of identification bits are set to respectively correspond to a rotation angle, a pitch angle, a tilt angle, a rotation angle rate, a pitch angle rate, a tilt angle rate, and the like.
in step S509, the encapsulated message information is sent to the information sending device.
specifically, after the message information is obtained, the message information is sent to the information sending device. The information sending device performs corresponding processing according to the received message information, for example, if the received message information includes parameter information, adjusting display parameters of the display information, such as a display angle, a rotation direction, and the like, according to the motion information of the head-mounted display and the geomagnetic information in the corresponding parameter information; and if the received message information contains a control instruction, correspondingly controlling the display information according to the control instruction, such as playing, pausing or stopping.
in step S510, the display information sent by the information sending device is received, decoded and displayed.
as can be seen from the above, in the display control method of the head-mounted display in the embodiment of the present invention, the communication connection is established with the information sending device, and the detected parameter information or the obtained control instruction is encapsulated in the preset message format and sent, so that the same communication method as that for displaying the information can be adopted when the parameter information or the control instruction is sent, an additional transmission interface is not required, the cost is reduced, the use is convenient, and the user experience is improved.
To facilitate a better implementation of the above-described aspects of embodiments of the present invention, the following also provides relevant means for implementing the above-described aspects in cooperation.
Fig. 7 is a schematic structural diagram of a head-mounted display according to a first embodiment of the invention. In this embodiment, the head-mounted display may communicate with an information sending device, where the information sending device may be a playing device such as a computer, a mobile phone, or a tablet, and the head-mounted display may be configured to receive and play picture, audio, or video information sent by the information sending device.
the head mounted display includes:
A connection module 701, configured to establish a communication connection with an information sending apparatus;
in other embodiments, the connection module 701 may further include: a monitoring unit and a first connecting unit.
The monitoring unit is used for replying a corresponding response message when monitoring a connection request from the information sending equipment;
the first connection unit is used for establishing a socket according to the connection request to communicate with the information sending equipment;
in other embodiments, the connection module 701 may further include: a request unit and a second connection unit.
The request unit is used for sending a connection request to the information sending equipment;
And the second connection unit is used for establishing a socket according to the response message and communicating with the information sending equipment when receiving the response message corresponding to the connection request.
An obtaining module 702 for obtaining parameter information of the head mounted display;
The encapsulation module 703 is configured to send the parameter information to the information sending device in a preset message format;
And the display module 704 is configured to receive, decode and display the display information sent by the information sending device.
it can be understood that the functions of the functional modules of the apparatus in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the relevant description of the foregoing method embodiment, which is not described herein again.
As can be seen from the above, the head-mounted display in the embodiment of the present invention establishes a communication connection with the information sending device, and sends the parameter information in the preset message format, so that a communication method the same as that of the display information can be adopted when sending the parameter information, an additional transmission interface is not required, the cost is reduced, the use is convenient, and the user experience is improved.
Fig. 8 is a schematic structural diagram of a head-mounted display according to a second embodiment of the invention.
In contrast to the first embodiment shown in fig. 7, in this embodiment, the obtaining module 702 may further include:
A first obtaining unit 7021, configured to detect motion information of the head-mounted display through a gyroscope sensor, where the motion information includes: at least one or more of a roll angle, a pitch angle, a roll angle rate, a pitch angle rate, and a pitch angle rate;
A second obtaining unit 7022, configured to detect geomagnetic information of the head-mounted display through a geomagnetic sensor, where the geomagnetic information includes geomagnetic intensity information in at least one direction;
a parameter generating unit 7023, configured to generate parameter information according to the motion information and the geomagnetic information.
the head-mounted display may further include a control module 705, where the control module 705 is configured to generate a control instruction according to the received operation information, the encapsulation module 703 is further configured to send the control instruction to the information sending device in a preset message format, and the control module 705 may further include:
The detecting unit 7051 is configured to detect operation information received by the head-mounted display, where the operation information includes touch information, press information, and voice information;
an instruction generating unit 7052, configured to generate a control instruction according to the operation information, where the control instruction includes: play, pause, and stop.
It can be understood that the functions of the functional modules of the apparatus in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the relevant description of the foregoing method embodiment, which is not described herein again.
as can be seen from the above, the head-mounted display in the embodiment of the present invention establishes a communication connection with the information sending device, and sends the detected parameter information or the obtained control instruction in the preset message format, so that a communication method the same as that of the display information can be adopted when sending the parameter information or the control instruction, and an additional transmission interface is not required, so that the cost is reduced, the use is convenient, and the user experience is improved.
Fig. 9 is a schematic structural diagram of a head-mounted display according to a third embodiment of the invention.
in contrast to the second embodiment shown in fig. 8, in this embodiment, the encapsulation module 703 may further include:
An attribute generating unit 7031, configured to generate a packet attribute according to the parameter information or the control instruction, where the packet attribute includes: a parameter packet or a control packet;
a message encapsulating unit 7032, configured to encapsulate the parameter information or the control instruction by using a preset message format to obtain message information, where the preset message format includes: adding a message field at the head or tail of the parameter information or the control instruction, wherein the message field comprises: a start flag bit, an effective length identification bit, a serial number, a message attribute and a check bit;
A message sending unit 7033, configured to send the encapsulated message information to the information sending device.
It is understood that the package module 703 in this embodiment can also be applied to the first embodiment shown in fig. 7. The functions of each functional module of the apparatus in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
As can be seen from the above, the head-mounted display in the embodiment of the present invention establishes a communication connection with the information sending device, encapsulates the detected parameter information or the obtained control instruction in a preset message format, and sends the encapsulated parameter information or control instruction, and can use a communication method the same as that used for displaying the information when sending the parameter information or control instruction, without using an additional transmission interface, thereby reducing the cost, facilitating the use, and improving the user experience.
it will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.