Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
In order to solve the above-mentioned problems, the embodiments of the present disclosure provide a function control method of a virtual control device, and before the method is described, first, a description is made about some technical concepts or noun concepts referred to herein:
The virtual reality device, the terminal for realizing the virtual reality effect, may be provided in the form of glasses, a head mounted display (Head Mount Display, HMD), or a contact lens for realizing visual perception and other forms of perception, but the form of the virtual reality device is not limited to this, and may be further miniaturized or enlarged as needed.
The virtual reality devices described in embodiments of the present disclosure may include, but are not limited to, the following types:
and the computer-side virtual reality (PCVR) equipment performs related calculation of virtual reality functions and data output by using the PC side, and the external computer-side virtual reality equipment realizes the effect of virtual reality by using the data output by the PC side.
The mobile virtual reality device supports setting up a mobile terminal (such as a smart phone) in various manners (such as a head-mounted display provided with a special card slot), performing related calculation of a virtual reality function by the mobile terminal through connection with the mobile terminal in a wired or wireless manner, and outputting data to the mobile virtual reality device, for example, watching a virtual reality video through an APP of the mobile terminal.
The integrated virtual reality device has a processor for performing the calculation related to the virtual function, and thus has independent virtual reality input and output functions, and is free from connection with a PC or a mobile terminal, and has high degree of freedom in use.
Virtual reality objects, objects that interact in a virtual scene, objects that are under the control of a user or a robot program (e.g., an artificial intelligence based robot program) are capable of being stationary, moving, and performing various actions in the virtual scene.
As shown in fig. 1, HMDs are relatively light, ergonomically comfortable, and provide high resolution content with low latency. The sensor (such as a nine-axis sensor) for detecting the gesture in the virtual reality device is arranged in the virtual reality device, and is used for detecting the gesture change of the virtual reality device in real time, if the user wears the virtual reality device, when the gesture of the head of the user changes, the real-time gesture of the head is transmitted to the processor, so that the gaze point of the sight of the user in the virtual environment is calculated, an image in the gaze range (namely a virtual view field) of the user in the three-dimensional model of the virtual environment is calculated according to the gaze point, and the image is displayed on the display screen, so that the user looks like watching in the real environment.
In this embodiment, when a user wears the HMD device and opens a predetermined application program, for example, a live video application program, the HMD device may run corresponding virtual scenes, where the virtual scenes may be simulation environments for the real world, semi-simulation virtual scenes, or pure virtual scenes. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene, and the dimensions of the virtual scene are not limited in the embodiments of the present disclosure. For example, the virtual scene may include a person, sky, land, sea, etc., the land may include environmental elements such as desert, city, etc., the user may control the virtual object to move in the virtual scene, and may also interactively control a control, model, presentation content, person, etc. in the virtual scene through a virtual control device such as a handle device.
As shown in fig. 2, a user performs an operation on a related virtual object in a virtual reality space by operating a virtual control device in the real world, where, for example, when a virtual scene is taken as a video playing service scene, a ray model of the virtual control device may be displayed on a front page of a video playing service scene, where the ray model is used to intuitively indicate a virtual object or an operation direction selected by a current virtual control device.
The method is described below in connection with specific examples.
Fig. 3 is a flow chart of a method for controlling functions of a virtual control device according to an embodiment of the present disclosure, where the method may be executed by a function control apparatus of the virtual control device, and the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device corresponding to a virtual reality technology. As shown in fig. 3, the method includes:
Step 301, determining a service priority level of each service state in at least one service state currently opened in the virtual implementation space.
It can be understood that at least one or more service states can be drawn in the same service scene, and the interaction operation under different service states is realized through the virtual control device, where the service scene is an interaction scene entered in the current virtual reality space, such as a concert scene, a video playing scene, etc., and the service state is a service scene interaction state of the interaction operation executable under the corresponding scene, for example, for the concert scene, the corresponding service state can be a bullet screen sending service state, a concert shooting service state, etc.; for example, for a video playing scene, the corresponding service state may be an initial service state of video playing, a selected service state of video, a service state of video playing, and so on.
The device functions that may be required in different traffic states are different, and possibly even mutually exclusive, wherein the device functions may be interaction functions that may be provided by a predefined virtual control device, e.g. for the virtual control device 1, the device functions that may be provided by it may comprise a display virtual control device default model, a display virtual control device custom model, a ray model of a display virtual control device, an arrow model of a display virtual control device, etc.
For example, in a concert scenario, in a bullet screen sending service state, the required device functions are a default model of a display virtual control device (for example, a handle model shown in a left diagram of fig. 4), a custom model of a non-display virtual control device, and in a concert shooting service state, the required device functions are a default model of a non-display virtual control device, and a custom model of a display virtual control device (for example, a camera model shown in a right diagram of fig. 4), and it is obvious that the device functions in the two service states are repulsive, so, in order to implement management of the device functions of the virtual device in different service states, in one embodiment of the present disclosure, a service priority level of each service state in at least one service state currently opened in the virtual reality space is determined, so that management of the device functions is performed according to the service priority level later.
It should be noted that, in different application scenarios, the manner of determining the service priority level is different, and examples are as follows:
In some possible embodiments, considering that the service state that is generally recently started is a service state that is preferentially used by a user, for example, in a video playing state, there is an entry sequence limitation between different service states, the service state is firstly entered into a video playing service state, then a video selecting service state is entered into a video playing service state, then the service state is entered into a video playing service state, and the like, while the service state that is recently newly entered is obviously a service state to be used by the user at present, therefore, the service priority level is determined according to the starting sequence of the service state, the starting sequence information is inversely related to the service priority level, and the more the starting sequence is backward, the service priority level is higher.
In some possible embodiments, the service priority level of the corresponding service state in each service scenario is marked in advance, and in this embodiment, a service state identifier of each service state is obtained, where the service state identifier may be any information that identifies the service state uniqueness in the corresponding service scenario, including but not limited to one or more of text, subtitle, number, code, and the like.
In this embodiment, a corresponding relationship between a service state identifier and a corresponding service priority level is stored in a preset database, and the preset database is queried according to the service state identifier to obtain the service priority level of each service state in at least one service state.
Step 302, determining at least one device function of each service state associated with a preset virtual control device, and determining candidate switch state information of each device function in the corresponding service state.
In one embodiment of the present disclosure, at least one device function associated with each service state and a preset virtual control device is determined, for example, a preset database may be queried to obtain at least one device function corresponding to each service state, for example, an interaction function corresponding to each service state may be obtained, and a device function matching the interaction function is determined, where a method for determining whether an interaction and a device function match may be determined according to a pre-trained depth model, or may be determined by other possible implementation manners, which are not listed herein.
At least one device function associated with each service state sets corresponding candidate switch state information in the corresponding service state, wherein the candidate switch state information comprises on state information, off state information and the like.
Step 303, determining target switch state information of all the device functions corresponding to at least one service state according to the service priority level corresponding to the device functions and the corresponding candidate switch state information.
In one embodiment of the present disclosure, after determining the candidate switch service state information, the target switch state information of all the device functions corresponding to at least one service state may be determined according to the service priority level corresponding to the device function and the corresponding candidate switch state information, and similarly, the target switch service state information includes on state information, off state information, and the like.
The method for determining the target switch state information of all the equipment functions corresponding to at least one service state is different in different application scenarios according to the service priority level corresponding to the equipment functions and the corresponding candidate switch state information, and examples are as follows:
In some possible embodiments, the highest service priority level of each device function in all the device functions corresponding to at least one service state is determined according to the service priority level, and the candidate switch state information under the highest service priority level of each device function is determined to be the corresponding target switch state information, that is, in this embodiment, the candidate switch state information corresponding to the highest service priority level is taken as the target switch state information according to the highest service priority level of each device function.
For example, as shown in fig. 5, the service states of the current service scenario in the virtual reality space include a service state 1, a service state 2 and a service state 10, where the service priority level corresponding to the service state 1 is 1, the corresponding device functions include a device function 1 (candidate switch state is an on state), a device function 2 (candidate switch state is an off state), a device function 3 (candidate switch state is an on state), the service priority level corresponding to the service state 2 is 2, the corresponding device functions include a device function 1 (candidate switch state is an off state), a device function 3 (candidate switch state is an off state), a device function 4 (candidate switch state is an off state), the service priority level corresponding to the service state 10 is 10, and the corresponding device functions include a device function 1 (candidate switch state is an on state), a device function 4 (candidate switch state is an on state), and a device function 5 (candidate switch state is an off state).
Thus, the device functions corresponding to the service state 1, the service state 2 and the service state 10 are the device function 1, the device function 2, the device function 3, the device function 4 and the device function 5, the corresponding highest service priority levels are 10, 1,2, 10 and 10 respectively, the corresponding candidate switch states are the open state, the close state, the open state and the close state respectively, and thus, the target switch states corresponding to the device function 1, the device function 2, the device function 3, the device function 4 and the device function 5 are the open state, the close state, the open state and the close state respectively.
In some possible embodiments, determining that overlapping device functions exist among different service states which are currently started under all device functions, and directly taking candidate switch state information of the non-overlapping device functions as target state information, and determining candidate state information corresponding to the highest service priority in the overlapping device functions as target state information of the overlapping device functions.
Step 304, the virtual control device is controlled to provide device function services according to the target switch state information.
In one embodiment of the present disclosure, after determining the target switch state information, the virtual control device is controlled to provide a device function service according to the target switch state information, where the function service is related to a specific device function, in this embodiment, on one hand, the device function controlling the target switch state information to be in an on state is turned on to provide the related function service, so as to ensure normal provision of the function service in a multi-service state, and on the other hand, the device function controlling the target switch state information to be in an off state is turned off to avoid occurrence of functional mutual exclusion with other turned on device functions.
For example, with continued reference to FIG. 5, device functions 1 and 4 may be controlled to turn on to provide functional services related to device function 1 and device function 4, and device functions 2, 3, and 5 may be controlled to turn off to avoid mutual exclusion with the business functions of device functions 1 and 4.
In some possible embodiments, controlling the virtual control device to provide device function services according to the target switch state information includes: and determining the target switch state information as a first device function of the on state information in all device functions corresponding to at least one service state, controlling the virtual control device to provide device function services corresponding to the first device function, wherein a logic controller can be preset for each device function, the logic controller corresponding to the first device function is controlled to be in the on state so as to realize the on of the corresponding first device function service, likewise, determining the target switch state information as a second device function of the off state information, determining a preset logic controller of the second device function, and controlling the preset logic controller to be in the off state.
Wherein in some possible embodiments, when the virtual control device is controlled to provide the device function service corresponding to the first device function, a function model and a rendering parameter corresponding to the first virtual device are determined, where the function model includes, but is not limited to, a virtual model of the virtual control device (such as the handle model, the camera model and the like described above), an operation guiding model of the virtual device (such as the ray model and the arrow model described above), and the rendering parameter includes, but is not limited to, a rendering color, a rendering style, a rendering position and the like of the function model, and in this embodiment, the corresponding function model is rendered in the virtual reality space according to the rendering parameter so as to intuitively guide the user to perform the corresponding interaction processing.
For example, as shown in fig. 6, if the virtual control device is a handle, the currently opened service state includes a default service state (service priority level is 1) and an interface opened service state (service priority level is 2), where the device function corresponding to the default service state is a ray function (candidate switch state information is an off state), the device function corresponding to the default handle model function (candidate switch state information is an on state), the device function corresponding to the interface opened service state is a ray function (candidate switch state information is an on state), the custom handle model function (candidate switch state information is an off state), and the default handle model function (candidate switch state information is an on state), and the target state information corresponding to the ray function of the final handle is an on state, the target state information corresponding to the default handle model function is an on state, and the target state information corresponding to the custom handle model function is an off state.
It should be emphasized that, in each service state mentioned in the embodiments of the present disclosure, at least one device function associated with a preset virtual control device generally includes a device function required in the corresponding service state and a device function that may be mutually exclusive with the required device function, if at least one device function associated with the preset virtual control device includes only the device function required in the corresponding service state, it is also required to determine, among other device functions in the opened service state, that a target device function mutually exclusive with the device function corresponding to the highest opened service priority exists, and determine that the target device function target switch state information is the closed state.
In summary, according to the function control method of the virtual control device in the embodiment of the present disclosure, a service priority level of each service state in at least one currently opened service state in a virtual reality space is determined, at least one device function of each service state associated with a preset virtual control device is determined, candidate switch state information of each device function in a corresponding service state is determined, further, target switch state information of all device functions corresponding to the at least one service state is determined according to the service priority level corresponding to the device function and the corresponding candidate switch state information, and the virtual control device is controlled to provide device function services according to the target switch state information. In the embodiment of the disclosure, the device function management of the virtual control device in different service states is realized, and the accuracy of the function service provided by the virtual control device is ensured.
In order to implement the above embodiment, the present disclosure further proposes a function control apparatus of a virtual control device.
Fig. 7 is a schematic structural diagram of a function control device of a virtual control apparatus according to an embodiment of the present disclosure, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device to perform function control of the virtual control apparatus. As shown in fig. 7, the apparatus includes: a first determination module 710, a second determination module 720, a third determination module 730, and a control module 740, wherein,
A first determining module 710, configured to determine a service priority level of each of at least one service state currently opened in the virtual reality space;
A second determining module 720, configured to determine at least one device function associated with a preset virtual control device and determine candidate switch state information of each device function in a corresponding service state;
A third determining module 730, configured to determine target switch state information of all device functions corresponding to at least one service state according to the service priority level corresponding to the device function and the corresponding candidate switch state information;
and a control module 740 for controlling the virtual control device to provide device function services according to the target switch state information.
The function control device of the virtual control device provided by the embodiment of the present disclosure may execute the function control method of the virtual control device provided by any embodiment of the present disclosure, and has corresponding function modules and beneficial effects of the execution method, and the implementation principle is similar and will not be described herein.
In order to implement the above-described embodiments, the present disclosure also proposes a computer program product comprising a computer program/instruction which, when executed by a processor, implements the function control method of the virtual control device in the above-described embodiments.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Referring now in particular to fig. 8, a schematic diagram of an electronic device 800 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 800 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 800 may include a processor (e.g., a central processing unit, a graphics processor, etc.) 801 that may perform various appropriate actions and processes according to programs stored in a Read Only Memory (ROM) 802 or programs loaded from a memory 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, etc.; memory 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 shows an electronic device 800 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 809, or from memory 808, or from ROM 802. When the computer program is executed by the processor 801, the above-described functions defined in the function control method of the virtual control apparatus of the embodiment of the present disclosure are performed.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
Determining the service priority level of each service state in at least one currently opened service state in the virtual reality space, determining at least one device function of each service state associated with preset virtual control equipment, determining candidate switch state information of each device function in the corresponding service state, further determining target switch state information of all device functions corresponding to the at least one service state according to the service priority level corresponding to the device function and the corresponding candidate switch state information, and controlling the virtual control equipment to provide device function service according to the target switch state information. In the embodiment of the disclosure, the device function management of the virtual control device in different service states is realized, and the accuracy of the function service provided by the virtual control device is ensured.
The electronic device may write computer program code for performing the operations of the present disclosure in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.