Disclosure of Invention
The invention mainly aims to solve the technical problems that the screen throwing mode of the existing running machine is inconvenient to operate and the user experience is poor.
The invention provides a screen projecting method of a treadmill, which comprises the following steps:
establishing screen projection connection between a screen projection sending end and the running machine in a two-dimensional code scanning mode;
generating a screen projection interface on a display screen of the treadmill in a suspension window mode;
screen projection data are transmitted to the treadmill in a screen recording mode;
and acquiring a voice control instruction of a user through a microphone of the treadmill and playing the multimedia resource on the screen projection sending end by using the screen projection sending end as sound playing equipment.
In an alternative embodiment of the first aspect of the present invention, the generating a screen projection interface on a display screen of the treadmill in a floating window manner includes:
acquiring display screen information of the screen projection sending terminal equipment;
and generating a floating window with the same size as the display screen of the screen projection sending terminal equipment on the display screen of the running machine based on the display screen information of the screen projection sending terminal equipment.
In an optional implementation manner of the first aspect of the present invention, after the acquiring, by a microphone of the treadmill, a voice control instruction of a user and playing, by using the screen-casting sending terminal as a sound playing device, a multimedia resource on the screen-casting sending terminal includes:
if the microphone of the treadmill does not capture the voice control instruction of the user again after the first time interval, the floating window is automatically minimized into a preset icon, and the preset icon is subjected to edge approaching processing.
In an optional implementation manner of the first aspect of the present invention, after the generating a screen projection interface on the display screen of the treadmill in a floating window manner, before transmitting screen projection data to the treadmill in a screen recording manner, the method includes:
judging whether the current display interface of the screen projection sending end is a system main interface or an interface of a multimedia playing application;
and if the current display interface of the screen projection sending end is a system main interface or an interface of a multimedia playing application, transmitting screen projection data of the system main interface or the interface of the multimedia playing application to the running machine in a screen recording mode.
In an optional implementation manner of the first aspect of the present invention, after the determining whether the current display interface of the screen-casting sending end is a system main interface or an interface of a multimedia playing application, the method further includes:
and if the current display interface of the screen projection sending end is not a system main interface or an interface of a multimedia playing application, transmitting screen projection data of a blue background to the treadmill.
In an optional implementation manner of the first aspect of the present invention, the acquiring, by a microphone of the treadmill, a voice control instruction of a user and playing, by using the screen-projecting transmitting end as a sound playing device, a multimedia resource on the screen-projecting transmitting end includes:
acquiring a voice control instruction of a user through a microphone of the treadmill;
calling a voice engine in a system of the treadmill to identify the voice control instruction;
and searching a key instruction corresponding to the voice control instruction according to the recognition result, executing key operation corresponding to the key instruction, and controlling the treadmill to play the selected multimedia file.
In an optional implementation manner of the first aspect of the present invention, before establishing a screen-casting connection between a screen-casting sending terminal and a treadmill by scanning a two-dimensional code, the method includes:
screen-casting sending application is pre-installed in the screen-casting sending end, and screen-casting service application is pre-installed in the treadmill.
The invention provides a screen projecting device of a running machine, which comprises:
the code scanning module is used for establishing screen projection connection between the screen projection sending end and the treadmill in a two-dimensional code scanning mode;
the interface generating module is used for generating a screen projection interface on a display screen of the treadmill in a suspension window mode;
the screen recording module is used for transmitting screen projection data to the treadmill in a screen recording mode;
and the control module is used for acquiring a voice control instruction of a user through a microphone of the treadmill and playing the multimedia resource on the screen projection sending end by taking the screen projection sending end as sound playing equipment.
A third aspect of the present invention provides a screen projecting apparatus of a treadmill, the screen projecting apparatus comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause a screen projecting apparatus of the treadmill to perform a screen projecting method of the treadmill as set forth in any of the above.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a screen projection method of a treadmill as set forth in any of the above.
Has the advantages that: the invention provides a screen projection method, a screen projection device, screen projection equipment and a storage medium of a treadmill, wherein the screen projection method of the treadmill comprises the following steps: establishing screen projection connection between a screen projection sending end and the running machine in a two-dimensional code scanning mode; generating a screen projection interface on a display screen of the treadmill in a suspension window mode; screen projection data are transmitted to the treadmill in a screen recording mode; and acquiring a voice control instruction of a user through a microphone of the treadmill and playing the multimedia resource on the screen projection sending end by using the screen projection sending end as sound playing equipment. The screen projection method of the treadmill is characterized in that the screen projection connection is established in a two-dimensional code scanning mode, the connection mode is more convenient, the screen projection interface is a suspended window and is convenient to move, the control operation is controlled through voice, both hands are liberated, the control is more convenient, and the experience is better.
Detailed Description
The embodiment of the invention provides a screen projection method, device, equipment and storage medium of a treadmill.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For the convenience of understanding, a specific flow of an embodiment of the present invention is described below, and with reference to fig. 1, a first aspect of the present invention provides a screen projecting method of a treadmill, the screen projecting method of the treadmill includes:
s100, establishing screen projection connection between a screen projection sending end and the running machine in a two-dimensional code scanning mode;
the two-dimensional code screen projection method in the embodiment of the invention comprises the following steps: acquiring a two-dimensional code verification request of a device to be projected; analyzing the two-dimension code verification request, and establishing a network topology with the equipment to be projected; in this embodiment, the data of the two-dimensional code is analyzed, and the device information in the two-dimensional code is read to obtain information such as an IP address, port information, and device ID of the device. Receiving a screen projection request of target data, and displaying the target data in the equipment to be projected according to the network topology.
S200, generating a screen projection interface on a display screen of the treadmill in a suspension window mode;
taking the operating system of the treadmill as windows as an example, the manner of realizing the floating window in the embodiment of the present invention is as follows: acquiring a WindowManager service: setting a windowmanager, layout params parameter; adding view to a screen; deleting the view from the screen; the suspension window needs to be added with authority; acquiring the size of a screen through Display in a Windows manager; changing the transparency of the Dialog background, the method for realizing the floating window by the android operating system is similar to the windows principle, and the invention is not detailed here.
S300, screen projection data are transmitted to the running machine in a screen recording mode;
views can also be deleted from the screen, for example, by adding views to the screen using the WindowManager interface in the window mechanism of the system. In practical use, after receiving a screen recording starting request, obtaining view information corresponding to application information to be screen recorded by calling a context.get Systemservice function or a context.WINDOW _ SERVICE function in a system, and then setting a Windows manager.layout Params function according to the view information.
S400, acquiring a voice control instruction of a user through a microphone of the treadmill and playing the multimedia resource on the screen projection sending end by using the screen projection sending end as a sound playing device.
The embodiment of the invention also needs recognition and conversion after acquiring the voice control instruction, for example, the voice characteristics can be judged according to the current working mode of voice recognition, a voice command is generated when the voice characteristics are judged to be matched with the voice template corresponding to the current working mode, and then key operation is generated according to the voice command and is sent to the treadmill, so that the treadmill works according to the result of the key operation.
In an alternative embodiment of the first aspect of the present invention, the generating a screen projection interface on a display screen of the treadmill in a floating window manner includes:
acquiring display screen information of the screen projection sending terminal equipment;
and generating a floating window with the same size as the display screen of the screen projection sending terminal equipment on the display screen of the running machine based on the display screen information of the screen projection sending terminal equipment.
In this embodiment, the display screen information of the screen-casting sending-end device includes, but is not limited to, screen size and resolution information; the floating window is generated by the display screen parameters of the screen projecting sending end equipment, so that the display effect of the screen projecting sending end equipment can be restored in the running machine, and the technical problem that a screen projecting interface is easy to collapse after screen projection due to the fact that the display screen parameters of the screen projecting sending end and the display screen parameters of the running machine are different can be solved.
In an optional implementation manner of the first aspect of the present invention, after the acquiring, by a microphone of the treadmill, a voice control instruction of a user and playing, by using the screen-casting sending terminal as a sound playing device, a multimedia resource on the screen-casting sending terminal includes:
if the microphone of the treadmill does not capture the voice control instruction of the user again after the first time interval, the floating window is automatically minimized into a preset icon, and the preset icon is subjected to edge approaching processing.
In this embodiment, in order not to affect the normal display of each motion parameter on the treadmill, after a period of time elapses, if the operation instruction of the user is not received again, the floating window will be automatically hidden, and the generated preset icon will also be displayed semi-transparently, and when the floating window needs to be called up again, only the preset icon needs to be touched.
In an optional implementation manner of the first aspect of the present invention, after the generating a screen projection interface on the display screen of the treadmill in a floating window manner, before transmitting screen projection data to the treadmill in a screen recording manner, the method includes:
judging whether the current display interface of the screen projection sending end is a system main interface or an interface of a multimedia playing application;
and if the current display interface of the screen projection sending end is a system main interface or an interface of a multimedia playing application, transmitting screen projection data of the system main interface or the interface of the multimedia playing application to the running machine in a screen recording mode.
In this embodiment, in order to ensure privacy of the user after screen projection, the screen projection method of the present invention may further determine a current display interface of the screen projection sending end, and if the interface relates to privacy of the user, leakage may be avoided by sending blank screen projection data to the treadmill, and the screen projection data may not be sent normally until the user replaces a corresponding APP (mainly, multimedia playing APP) interface.
In an optional implementation manner of the first aspect of the present invention, after the determining whether the current display interface of the screen-casting sending end is a system main interface or an interface of a multimedia playing application, the method further includes:
and if the current display interface of the screen projection sending end is not a system main interface or an interface of a multimedia playing application, transmitting screen projection data of a blue background to the treadmill.
In this embodiment, when the current display interface of the screen-casting sending end is not the system main interface or the interface of the multimedia playing application, a pure-color background picture may be sent to the treadmill, and in another embodiment, a segment of advertisement of a screen-casting service provider may be preset in the screen-casting sending end to enhance the user experience when the multimedia playing application is not opened.
In an optional implementation manner of the first aspect of the present invention, the acquiring, by a microphone of the treadmill, a voice control instruction of a user and playing, by using the screen-projecting transmitting end as a sound playing device, a multimedia resource on the screen-projecting transmitting end includes:
acquiring a voice control instruction of a user through a microphone of the treadmill;
calling a voice engine in a system of the treadmill to identify the voice control instruction;
and searching a key instruction corresponding to the voice control instruction according to the recognition result, executing key operation corresponding to the key instruction, and controlling the treadmill to play the selected multimedia file.
In this embodiment, the method for speech recognition includes: acquiring a voice character string; creating a syntactic analysis tree (used for judging whether the voice character string can be recognized for the first time or not and analyzing the word element attribute information of at least one word element in the voice character string) according to the voice character string; and then, creating a semantic analysis tree according to the result of the primary recognition, and acquiring pre-stored attribute information by the voice analysis tree according to the analyzed attribute information of the lemma so as to create a voice recognition result.
After voice recognition is carried out, a key instruction corresponding to semantics is obtained in a key instruction library of the treadmill according to the voice recognition (after a screen projection sending end is connected with the treadmill, a control instruction of the screen projection sending end is actively sent to the treadmill and is bound and mapped with the control instruction of the treadmill), it needs to be explained that the method for projecting and playing the multimedia media file by the screen does not need to send the multimedia file to the treadmill, and the scheme of the invention can be substantially understood as that the display screen of the treadmill is utilized to facilitate the control of the screen projection sending end (a mobile phone, a flat panel and the like) by a user.
In an optional implementation manner of the first aspect of the present invention, before establishing a screen-casting connection between a screen-casting sending terminal and a treadmill by scanning a two-dimensional code, the method includes:
screen-casting sending application is pre-installed in the screen-casting sending end, and screen-casting service application is pre-installed in the treadmill. In this embodiment, the screen projection sending application and the screen projection service application may be applications provided by the same screen projection service provider or applications provided in different services, but the screen projection sending application and the screen projection service application need to be based on the same screen projection protocol, so that a normal screen projection function can be realized between the screen projection sending end and the treadmill.
Referring to fig. 2, a second aspect of the present invention provides a screen projecting apparatus of a treadmill, comprising:
thecode scanning module 10 is used for establishing screen projection connection between a screen projection sending end and the treadmill in a two-dimensional code scanning mode;
aninterface generating module 20, configured to generate a screen projection interface on a display screen of the treadmill in a floating window manner;
thescreen recording module 30 is used for transmitting screen projection data to the treadmill in a screen recording mode;
and thecontrol module 40 is configured to obtain a voice control instruction of a user through a microphone of the treadmill and play the multimedia resource on the screen projection transmitting end by using the screen projection transmitting end as a sound playing device.
In an optional implementation manner of the second aspect of the present invention, the interface generating module includes:
the acquisition unit is used for acquiring display screen information of the screen projection sending terminal equipment;
and the window generating unit is used for generating a suspended window with the same size as the display screen of the screen projection sending terminal device on the display screen of the running machine based on the display screen information of the screen projection sending terminal device.
In an optional embodiment of the second aspect of the present invention, the screen projecting device of the treadmill further comprises:
and the hiding module is used for automatically minimizing the floating window into a preset icon and carrying out side approaching processing on the preset icon if the microphone of the treadmill does not capture the voice control instruction of the user again after the first time interval.
In an optional embodiment of the second aspect of the present invention, the screen projecting device of the treadmill further comprises:
the judging module is used for judging whether the current display interface of the screen projection sending end is a system main interface or an interface of a multimedia playing application;
and the first transmission module is used for transmitting screen projection data of the system main interface or the interface of the multimedia playing application to the treadmill in a screen recording mode if the current display interface of the screen projection sending end is the system main interface or the interface of the multimedia playing application.
In an optional embodiment of the second aspect of the present invention, the screen projecting device of the treadmill further comprises:
and the second transmission module is used for transmitting screen projection data of a blue background to the treadmill if the current display interface of the screen projection sending end is not a system main interface or an interface of a multimedia playing application.
In an alternative embodiment of the second aspect of the present invention, the control module comprises:
the recording unit is used for acquiring a voice control instruction of a user through a microphone of the treadmill;
the recognition unit is used for calling a voice engine in a system of the treadmill to recognize the voice control instruction;
and the execution unit is used for searching the key instruction corresponding to the voice control instruction according to the recognition result, executing the key operation corresponding to the key instruction and controlling the treadmill to play the selected multimedia file.
In an optional embodiment of the second aspect of the present invention, the screen projecting device of the treadmill further comprises:
and the pre-installation module is used for pre-installing screen projection sending application in the screen projection sending end and pre-installing screen projection service application in the treadmill.
Fig. 3 is a schematic structural diagram of a screen projecting device of a treadmill according to an embodiment of the present invention, which may have a relatively large difference due to different configurations or performances, and may include one or more processors 50 (CPUs) (e.g., one or more processors) and amemory 60, and one or more storage media 70 (e.g., one or more mass storage devices) for storing applications or data. The memory and storage medium may be, among other things, transient or persistent storage. The program stored on the storage medium may include one or more modules (not shown), each of which may include a series of instructional operations on a screen projection device of the treadmill. Still further, the processor may be configured to communicate with the storage medium to execute a series of instruction operations in the storage medium on a screen projection device of the treadmill.
The screen projection equipment of the treadmill may also include one ormore power supplies 80, one or more wired or wireless network interfaces 90, one or more input-output interfaces 100, and/or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the configuration of the screen projecting device of the treadmill illustrated in fig. 3 does not constitute a limitation of the screen projecting device of the treadmill and may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, or a volatile computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps of the screen projection method of a treadmill.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses, and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.