WO2024109129A1 - Electronic device and data processing method - Google Patents

Electronic device and data processing method Download PDF

Info

Publication number
WO2024109129A1
WO2024109129A1 PCT/CN2023/108893 CN2023108893W WO2024109129A1 WO 2024109129 A1 WO2024109129 A1 WO 2024109129A1 CN 2023108893 W CN2023108893 W CN 2023108893W WO 2024109129 A1 WO2024109129 A1 WO 2024109129A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
target
display
homekit
electronic device
Prior art date
Application number
PCT/CN2023/108893
Other languages
French (fr)
Chinese (zh)
Inventor
陆世明
片兆峰
韩征
汪静娴
田鹏升
Original Assignee
海信视像科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202211477456.8A external-priority patent/CN117812365A/en
Priority claimed from CN202211658353.1A external-priority patent/CN117812135A/en
Priority claimed from CN202211714328.0A external-priority patent/CN117812395A/en
Application filed by 海信视像科技股份有限公司 filed Critical 海信视像科技股份有限公司
Publication of WO2024109129A1 publication Critical patent/WO2024109129A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Definitions

  • the embodiments of the present application relate to the field of terminal technology, and in particular, to an electronic device and a data processing method for the electronic device.
  • Electronic devices equipped with the HomeKit protocol can also be discovered and controlled by the HomeKit app. For example, after electronic device A is discovered and connected by the HomeKit app, the user can control electronic device A through the HomeKit app.
  • the HomeKit app can not only control electronic device A, but also control electronic device B connected to the electronic device, and even control electronic device C connected to electronic device B. In this way, users can control multiple electronic devices through the HomeKit app, which provides great convenience for users.
  • HomeKit app is the control end, and the device list of controlled devices displayed on HomeKit app is obtained when HomeKit app is initialized after connecting with electronic device A.
  • the device list is initialized, other devices that are later connected to electronic device A cannot be added to the device list.
  • an electronic device includes: a communicator, configured to: after establishing a connection with a HomeKit client based on a HomeKit protocol, receive a device list acquisition request sent by the HomeKit client, the device list acquisition request being used to indicate acquisition of device information of each target device connected to the electronic device, the device information including an identification of the device; a processor, configured to: based on the device list acquisition request, determine the device information of the electronic device and the device information of each target device, the device information including an identification of the corresponding device; generate target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder being empty; the communicator is further configured to: send the target information to the HomeKit client so that the HomeKit client displays a device list based on the target information, the device list including the identification of the electronic device and the identification of each target device
  • a data processing method is applied to an electronic device, comprising: after establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request sent by the HomeKit client, the device list acquisition request is used to indicate the acquisition of device information of each target device connected to the electronic device, the device information including an identification of the device; based on the device list acquisition request, determining the device information of the electronic device and the device information of each target device, the device information including an identification of the corresponding device; generating target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty; sending the target information to the HomeKit client so that the HomeKit client displays a device list based on the target information, the device list including the identification of the electronic device and the identification of each target device.
  • a computer-readable non-volatile storage medium comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the device list shown in the second aspect is implemented. Table acquisition method.
  • a computer program product including: when the computer program product is run on a computer, the computer implements the device list acquisition method shown in the second aspect.
  • FIG1 is one of the operation scenarios between a control device and an electronic device according to some embodiments.
  • FIG2 is a block diagram of a hardware configuration of an electronic device 200 according to some embodiments.
  • FIG3 is a second operation scenario between a control device and an electronic device according to some embodiments.
  • FIG4 is a third operation scenario between a control device and an electronic device according to some embodiments.
  • FIG5 is a flowchart of a method for obtaining a device list according to some embodiments.
  • FIG6 is a second flow chart of a method for acquiring a device list according to some embodiments.
  • FIG7 is a third flow chart of a method for acquiring a device list according to some embodiments.
  • FIG8 is a block diagram of a structure between a mobile phone and a television according to some embodiments.
  • FIG9 is a fourth flow chart of a method for acquiring a device list according to some embodiments.
  • FIG10 is a fifth flow chart of a method for obtaining a device list according to some embodiments.
  • FIG11 is an operation scenario between a display device and a control device according to some embodiments.
  • FIG12 is a block diagram of a hardware configuration of a control device 001 according to some embodiments.
  • FIG13 is a schematic diagram of a screen projection connection interface according to some embodiments.
  • FIG14 is a second schematic diagram of a screen projection connection interface according to some embodiments.
  • FIG15 is a flowchart of a screen projection processing method according to some embodiments.
  • FIG16 is a schematic diagram of a screen projection data flow according to some embodiments.
  • FIG17 is a schematic diagram of a screen projection data flow according to some embodiments.
  • FIG18 is a second flow chart of a screen projection processing method according to some embodiments.
  • FIG19 is a third flowchart of a screen projection processing method according to some embodiments.
  • FIG20 is a fourth flowchart of a screen projection processing method according to some embodiments.
  • FIG21 is a fifth flowchart of a screen projection processing method according to some embodiments.
  • FIG22 is a sixth flowchart of a screen projection processing method according to some embodiments.
  • FIG23 is a schematic diagram of software configuration in a display device according to some embodiments.
  • FIG24 is a schematic diagram showing an icon control interface of an application in a display device according to some embodiments.
  • FIG25 is a system framework diagram for performing screen projection processing according to some embodiments.
  • FIG26 is a schematic diagram of a flow chart of a screen projection processing method according to some embodiments.
  • FIG27 is a schematic diagram of an interface of a display when the current playback state of the display device is in a target mode according to some embodiments;
  • FIG28 is a schematic diagram of an interface of a display when a display switch of the display is in an on state and the display displays non-audio data according to some embodiments;
  • FIG29 is a flowchart of another screen projection processing method according to some embodiments.
  • FIG30 is a schematic diagram of an interface when a display displays prompt information according to some embodiments.
  • FIG31 is a schematic diagram of an interface of a display when a display device enters an input page according to some embodiments
  • FIG32 is a schematic diagram of a screen projection process of a display device according to some embodiments.
  • Figure 33 is a schematic diagram of the overall process of a screen projection processing method according to some embodiments.
  • the electronic device can have various implementation forms, for example, it can be a television, a smart TV, a laser projection device, a display (monitor), an electronic whiteboard (electronic bulletin board), an electronic desktop (electronic table), a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, etc.
  • Figure 1 is a schematic diagram of the operation scenario between the control device and the electronic device according to the embodiment, wherein the HomeKit app is installed in the control device 100, and the electronic device 200 supports the HomeKit protocol. Therefore, after the control device 100 establishes a connection with the electronic device 200 through the HomeKit app, the user can control the electronic device 200 that supports the HomeKit protocol and other devices directly or indirectly connected to the electronic device 200 through the HomeKit app installed in the control device 100.
  • control device 100 may be an iOS device with an iOS operating system installed with the HomeKit app, such as a handheld device such as an iPhone or iPad, or a device with other operating systems installed with the HomeKit app.
  • the control device 100 may establish a connection with the electronic device 200 by means of device discovery after connecting to the same wired or wireless network.
  • the user may input user commands through voice input, control panel input, gesture input, etc. to control the device 100.
  • the electronic device 200 includes at least one of a tuner 210 , a communicator 220 , a detector 230 , an external device interface 240 , a processor 250 , a display 260 , an audio output interface 270 , a user interface 280 , an external memory, and a power supply.
  • the processor includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input/output.
  • the display 260 includes a display screen component for presenting images, and a driving component for driving image display, a component for receiving image signals output from a processor, and a component for displaying video content, image content, and a menu control interface and a user control UI interface.
  • the display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
  • the communicator 220 is a component for communicating with an external device or server according to various communication protocol types.
  • the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver.
  • the electronic device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
  • the user interface 280 can be used to receive control signals from the control device 100 (such as an infrared remote controller, etc.). It can also be used to directly receive user input operation instructions and convert the operation instructions into instructions that the electronic device 200 can recognize and respond to. In this case, it can be called a user input interface.
  • the detector 230 is used to collect signals from the external environment or the external interaction.
  • the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
  • the external device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input/output interface formed by the above multiple interfaces.
  • HDMI high-definition multimedia interface
  • component analog or digital high-definition component input interface
  • CVBS composite video input interface
  • USB USB input interface
  • RGB port an RGB port
  • the tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
  • the processor 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the processor 250 is located, such as an external set-top box.
  • the processor 250 controls the operation of the electronic device and responds to the user's operation through various software control programs stored in the memory (internal memory or external memory).
  • the processor 250 controls the overall operation of the electronic device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the processor 250 can perform an operation related to the object selected by the user command.
  • the processor includes a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), and at least one of a random access memory (RAM), a read-only memory (ROM), a first interface to an nth interface for input/output, a communication bus (Bus), etc.
  • CPU central processing unit
  • video processor video processor
  • audio processor audio processor
  • graphics processing unit GPU
  • RAM random access memory
  • ROM read-only memory
  • a first interface to an nth interface for input/output a communication bus (Bus), etc.
  • RAM also called main memory
  • main memory is an internal memory that directly exchanges data with the processor. It can be read and written at any time (except when refreshed), and the speed is very fast. It is usually used as a temporary data storage medium for operating systems or other running programs. The biggest difference between it and ROM is the volatility of data, that is, once the power is cut off, the stored data will be lost.
  • RAM is used in computers and digital systems to temporarily store programs, data and intermediate results. ROM works in a non-destructive read-out mode and can only read but not write information. Once the information is written, it is fixed, and even if the power is cut off, the information will not be lost, so it is also called fixed memory.
  • the user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI).
  • GUI graphical user interface
  • the user may input a user command through a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
  • Electronic devices equipped with the HomeKit protocol can also be discovered and controlled by the HomeKit app on iOS devices. For example, after electronic device A is discovered and connected by the HomeKit app, the user can control electronic device A through the HomeKit app on the iOS device.
  • the HomeKit app can not only control electronic device A, but also control electronic device B connected to the electronic device, and even control electronic device C connected to electronic device B. In this way, users can control multiple electronic devices through the HomeKit app on iOS devices, which provides great convenience for users.
  • the iOS device side is the control side, and the device list of controlled devices displayed on the iOS device is obtained when the iOS device is initialized after connecting with electronic device A.
  • the device list is initialized, other devices that are later directly or indirectly connected to electronic device A cannot be added to the device list.
  • the iOS device is connected to electronic device A and initialized, it is impossible to dynamically update the device list displayed on the iOS device.
  • a method for obtaining a device list is provided, specifically a method for dynamically updating a device list by presetting device placeholders based on the HomeKit protocol, specifically, after establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request sent by the HomeKit client, the device list acquisition request being used to indicate obtaining device information of each target device connected to the electronic device, the device information including a device identifier; based on the device list acquisition request, determining the device information of the electronic device and the device information of each target device, the device information including a corresponding device identifier; generating target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder being empty; sending the target information to the HomeKit client so that the HomeKit client displays a device list based on the target information
  • each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the user not be misled because the device list generated by the HomeKit client based on the target information includes the identifiers of some devices that have not been connected, but a position is reserved in the device list for the unknown devices to be connected. Therefore, when other devices subsequently establish a connection with the electronic device, a device placeholder in the target information can be updated with the device information of the other device to update the target information, and then the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.
  • an electronic device and a device list acquisition method are provided, wherein the electronic device can implement the device list acquisition method according to the embodiment of the present application or the functional module or functional entity in the electronic device can implement the device list acquisition method according to the embodiment of the present application.
  • the electronic device includes: a communicator and a processor, which correspond to the communicator 220 and the processor 250 in Figure 2 above, respectively.
  • the HomeKit client can be the control device 100 in the figure, or it can be the HomeKit app installed in the control device 100, which can be determined according to actual conditions.
  • the communicator in order to enable the HomeKit client to dynamically update the device list of devices controlled by the electronic device, after establishing a connection with the HomeKit client based on the HomeKit protocol, receives a device list acquisition request sent by the HomeKit client to instruct the acquisition of device information (the device information includes the identification of the device) of each target device connected to the electronic device; the processor determines the device information of the electronic device and the device information of each target device based on the device list acquisition request, and the device information includes the identification of the corresponding device; then generates target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder; the communicator sends the target information to the HomeKit client, so that the HomeKit client displays the device list based on the target information, and the device list includes the identification of the electronic device and the identification of each target device.
  • each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the user not be misled because the device list generated by the HomeKit client based on the target information includes the identification of some unconnected devices, but also a position is reserved in the device list for the unknown devices to be connected. Therefore, when other devices subsequently establish a connection with the electronic device, a device placeholder in the target information can be updated with the device information of the other device to update the target information, and then the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.
  • Each device placeholder is used to indicate an unknown device to be connected. It can be understood that each device placeholder corresponds to a position reserved for the device information of a device to be connected in the target information. In this way, a position is reserved for the device to be connected in the device list generated by the HomeKit client based on the target information.
  • the device to be connected can be any device that is directly or indirectly connected to the electronic device.
  • the HomeKit client device is used to discover and control electronic devices and various other devices connected to the electronic devices (directly or indirectly). After the HomeKit client and the electronic device are connected to the same wired or wireless network, the HomeKit client performs device discovery. After the HomeKit client discovers the electronic device, it establishes a connection with the electronic device.
  • the specific process can refer to the existing related technology and will not be repeated here.
  • the HomeKit client After the HomeKit client establishes a connection with the electronic device, it sends a device list acquisition request to the electronic device, and then receives the target information sent by the electronic device.
  • the HomeKit client generates a device list based on the target information, specifically, based on the identifier of the electronic device in the target information and the identifier of each target device. Since the device information corresponding to the device placeholder is empty, the device list does not include the identifier of the unknown device to be connected indicated by each device placeholder. In other words, the HomeKit client displays the identifier of the device whose device information in the target information is not empty in the device list, ignores the device placeholder whose device information in the target information is empty, and does not display it in the device list.
  • the direct connection between the electronic device and the device A means that the electronic device and the device A are directly connected by wire or wirelessly, without being connected through other devices.
  • the indirect connection between the electronic device and the device B means that the electronic device is connected to the device B through the device C, which can also be understood as the electronic device is directly connected to the device C, and the device C is directly connected to the device B.
  • the device A and the device C can be called the inherent connection of the electronic device, and the device B can be called the extended connection of the electronic device.
  • the identifier of the other device can be dynamically updated to the device list so that the HomeKit client can control the newly connected other device.
  • the processor after sending the target information to the HomeKit client, the processor detects that the first device has established a connection with the electronic device; then updates a device placeholder in the target information to the device information of the first device to update the target information; the communicator sends the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, and the updated device list includes the identifier of the electronic device, the identifiers of each target device, and the identifier of the first device.
  • a device placeholder in the target information is replaced with the device information of the first device to obtain updated target information, and then the updated target information is sent to the HomeKit client, so that the HomeKit client adds the identifier of the first device to the device list based on the information of the first device in the updated target information, thereby realizing dynamic update when a new device is connected to the electronic device.
  • the device list displayed by the HomeKit client does not require the electronic device to disconnect from the HomeKit client and then reconnect. Instead, the device list displayed by the HomeKit client is dynamically updated while the electronic device and the HomeKit client remain connected.
  • the identifier of the target device when an electronic device detects that it is disconnected from a target device (directly or indirectly), can be dynamically deleted from the device list to prevent the user from controlling the disconnected target device through the HomeKit client.
  • the processor detects that a second device is disconnected from the electronic device, the second device being any one of the target devices; then the device information of the second device in the target information is updated to a placeholder for the device to update the target information; then the communicator sends the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information, the updated device list including the identifier of the electronic device and the identifiers of each device among the target devices except the second device.
  • the processor detects that a second device is disconnected from the electronic device, the second device being any one of the target devices; then the device information of the second device is deleted from the target information to update the target information; then the communicator sends the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information, the updated device list including the identifier of the electronic device and the identifiers of each device among the target devices except the second device.
  • the device information of the second device in the target information can be replaced by a device placeholder, or the device information of the second device can be deleted from the target information to obtain updated target information, and then the updated target information is sent to the HomeKit client, so that the HomeKit client deletes the identifier of the second device from the device list based on the updated target information that does not include the device information of the second device, thereby dynamically updating the device list displayed by the HomeKit client after an already connected device connects to the electronic device.
  • the electronic device there is no need for the electronic device to disconnect from the HomeKit client and then reconnect, but the dynamic update of the device list displayed by the HomeKit client is achieved while the electronic device remains connected to the HomeKit client.
  • the number of devices directly connected to the electronic device in each target device is not limited, nor is the number of devices indirectly connected to the electronic device.
  • the specific number can be determined based on actual conditions and is not limited here.
  • each target device includes: at least one third device, each third device is directly connected to the electronic device, that is, each target device is a third device, each target device is a device directly connected to the electronic device.
  • the HomeKit client is a mobile phone 301 with the HomeKit app installed
  • the electronic device is a TV 201 that supports the HomeKit protocol
  • the at least one third device is three third devices, each of which is an HDMI device 302 directly connected to the TV via an HDMI interface.
  • each target device includes: at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device. That is, a target device is a third device or a fourth device.
  • the at least one fourth device can be connected to the electronic device through the same third device or through different third devices, which can be determined according to actual conditions.
  • the HomeKit client is a mobile phone 301 with the HomeKit app installed
  • the electronic device is a TV 302 that supports the HomeKit protocol
  • the at least one third device is two third devices
  • the at least one fourth device is two fourth devices
  • each third device is an HDMI device 303 directly connected to the TV via an HDMI interface
  • each fourth device is an HDMI device 304 directly connected to a third device via an HDMI interface.
  • connection method between the target device directly connected to the electronic device and the electronic device is not limited, nor is the connection method between the target device indirectly connected to the electronic device and the electronic device limited.
  • It can be a wired interface connection, such as a High Definition Multimedia Interface (HDMI) connection, a USB interface connection, or a USB interface connection.
  • HDMI High Definition Multimedia Interface
  • USB interface connection a USB interface connection
  • USB interface connection a USB interface connection
  • wireless connection such as a Bluetooth connection, a WiFi connection, etc.
  • the specific connection can be determined according to actual conditions.
  • the electronic device is connected to each of the third devices via an HDMI interface; when each of the target devices includes the at least one fourth device, each of the third devices is connected to the corresponding third device via the HDMI interface.
  • the HDMI interface is a digital video/audio interface technology and a dedicated digital interface suitable for image transmission. It can transmit audio and image signals at the same time, with a maximum data transmission speed of 2.25GB/s, and does not require digital/analog or analog/digital conversion before signal transmission.
  • HDMI can be used with High-bandwidth Digital Content Protection (HDCP) to prevent unauthorized copying of copyrighted audio and video content.
  • HDCP High-bandwidth Digital Content Protection
  • the extra space provided by HDMI can be used in future upgraded audio and video formats.
  • the electronic device and each target device are devices with display screens
  • the transmitted data is audio and video data
  • connecting through an HDMI interface can improve the data transmission efficiency, protect the security of the data during the transmission process, and support audio and video formats that will be upgraded in the future.
  • the device information also includes the type of the corresponding device; the device list also includes the type of the electronic device and the type of each target device.
  • the device list when the electronic device is connected to and initialized with the HomeKit client, the device list includes the identification and type of the electronic device, and the identification and type of each target device; when it is detected that the electronic device has established a connection with the first device, the device list is updated to include the identification and type of the electronic device, the identification and type of each target device, and the identification and type of the first device; when it is detected that the electronic device is disconnected from the second device, the device list is updated to include the identification and type of the electronic device, and the identification and type of each target device except the second device.
  • the device information includes the type of device, and the device identifier and type may be displayed in the device list. This allows the user to better understand the identifier and type of each device based on the device list displayed by the HomeKit client, thereby better controlling each device according to user needs.
  • the sum of the number of each target device and the number of the at least one device placeholder is equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.
  • the first preset value and the second preset value can be determined according to actual conditions.
  • the first preset value is greater than the second preset value.
  • the total number of devices controlled by the HomeKit client based on the connection with the electronic device i.e., the total number of electronic devices, each target device, and at least one device placeholder, i.e., the sum of the first preset value and 1
  • the electronic device i.e., the total number of electronic devices, each target device, and at least one device placeholder, i.e., the sum of the first preset value and 1
  • the number of at least one device placeholder i.e., the second preset value
  • the steps involved in Figures 5 to 10 may include more steps, or fewer steps in actual implementation, and the order of these steps may also be different, so as to be able to implement the device list acquisition method provided in the embodiment of the present application.
  • the execution subject of the device list acquisition method can be an electronic device, or it can be a functional module or functional entity in the electronic device that can implement the device list acquisition method.
  • the specific description of the device list acquisition method according to the embodiment of the present application can refer to the relevant description of the above-mentioned electronic device, and the same or similar technical effects can be achieved, which will not be repeated here.
  • FIG5 is a flowchart of the steps of implementing a method for acquiring a device list according to one or more embodiments of the present application.
  • the method for acquiring a device list may include:
  • the device list acquisition request is used to instruct to acquire device information of each target device connected to the electronic device, and the device information includes an identification of the device.
  • S502 Determine the device information of the electronic device and the device information of each target device based on the device list acquisition request. Backup information.
  • the device information includes the identifier of the corresponding device.
  • S503 Generate target information based on the device information of the electronic device, the device information of each target device, and at least one device placeholder.
  • Each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty.
  • S504 Send the target information to the HomeKit client, so that the HomeKit client displays a device list based on the target information.
  • the device list includes the identifier of the electronic device and the identifiers of each target device.
  • each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the user not be misled because the device list generated by the HomeKit client based on the target information includes the identification of some unconnected devices, but also a position is reserved in the device list for the unknown devices to be connected. Therefore, when other devices subsequently establish a connection with the electronic device, a device placeholder in the target information can be updated with the device information of the other device to update the target information, and then the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.
  • the device list acquisition method according to the embodiment of the present application may further include the following S505 to S507 .
  • S505 Detect that the first device establishes a connection with the electronic device.
  • S506 Update a device placeholder in the target information to the device information of the first device to update the target information.
  • S507 Send the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information.
  • the updated device list includes the identifier of the electronic device, the identifiers of each target device, and the identifier of the first device.
  • the device list acquisition method according to the embodiment of the present application may further include the following S508 to S510 .
  • the second device is any one of the target devices.
  • S509 Update the device information of the second device in the target information to a placeholder for the device, so as to update the target information.
  • the updated device list includes the identifier of the electronic device and the identifiers of each device among the target devices except the second device.
  • the respective target devices include: at least one third device; or, the respective target devices include: at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device.
  • the electronic device is connected to each of the third devices via an HDMI interface; when each of the target devices includes the at least one fourth device, each of the third devices is connected to the corresponding third device via the HDMI interface.
  • the device information also includes the type of the corresponding device; the device list also includes the type of the electronic device and the type of each target device.
  • the sum of the number of each target device and the number of the at least one device placeholder is equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.
  • the iOS device is a mobile phone
  • the electronic device is a TV
  • the electronic device is connected to other devices via an HDMI interface.
  • the device list displayed on the mobile phone is initialized after the mobile phone is connected to the TV. Once the list is initialized, new devices cannot be added.
  • the number of HDMI interfaces on the TV is fixed, it can be solidified after the mobile phone is connected to the TV.
  • the device connected to the HDMI interface of the external device can also be extended to connect other HDMI devices, and this part of the data is changing. Under the premise that the mobile phone and the TV have established a link, this part of the data cannot be dynamically added to the mobile phone, so the mobile phone cannot dynamically display the devices connected later.
  • a mobile phone is used as a control terminal, on which a HomeKit app is installed, and a television is used as a controlled terminal supporting the HomeKit protocol, which is composed of a HomeKit proxy module 61, a data processing module 62, and a device management module 63.
  • the HomeKit Proxy module 61 is responsible for establishing a network connection and data communication with the mobile phone.
  • Receive control instructions and data (including device list acquisition request) sent by the mobile phone;
  • Data processing module 62 responsible for parsing control instructions and data, receiving the device list acquisition request forwarded by HomeKit Proxy, forwarding the parsed device list acquisition request to the device management module 63, and receiving the device information of the TV returned by the device management module, as well as the device information of each device directly or indirectly connected to the TV.
  • the data processing module is also used to add at least one device placeholder based on the device information of the TV and the device information of each device, reorganize the data, generate target information, and return the target information to the HomeKit Proxy module 61, so that the HomeKit Proxy module 61 returns it to the mobile phone;
  • the device management module 63 is used to obtain the device information of the TV, the device information of each device connected to the TV, and determine the number of devices connected to the TV, etc., and report the obtained information to the data processing module 62.
  • the inherent device list information includes the device information of the TV and the device information of the device directly connected to the TV;
  • the extended device list information includes the device information of the device indirectly connected to the TV.
  • the device management module 63 is used to identify the connection information corresponding to each HDMI interface of the TV, determine the third device connected to the inherent HDMI interface of the TV, and obtain the device information of the corresponding third device, and then determine the inherent device list information based on the device information of the TV and the device information of each third device; then, through the HDMI interface, obtain the fourth device connected to the third device through the HDMI interface from the third device directly connected to the TV, and obtain the device information of the fourth device, and then obtain the extended device list based on the device information of each fourth device.
  • the device list acquisition method includes the following S701 to S710 .
  • the HomeKit Proxy module of the TV After receiving the device list acquisition request, the HomeKit Proxy module of the TV sends the device list acquisition request to the data processing module.
  • S704 The data processing module of the television sends a device list acquisition request to the device management module.
  • the TV's HomeKit Proxy module After receiving the request to obtain the device list, the TV's HomeKit Proxy module calls the TV's data processing module and requests the device management module for the device list.
  • the device management module obtains inherent device list information and extended device list information.
  • the device management module obtains the number of local HDMI interfaces of the TV and the device information of the TV, as well as the device information of the device connected to the HDMI interface, to obtain the inherent device list information, and at the same time obtains whether the device connected to the HDMI interface is connected to an extension device, and obtains the device information of the extension device connected to the device connected to the HDMI interface, to obtain the extension device list information.
  • the device management module returns the inherent device list information and the extended device list information to the data processing module.
  • the data processing module adds N device placeholders based on the inherent device list information and the extended device list information, and sets the device name to be empty to generate target information.
  • the data processing module returns the target information to the HomeKit Proxy module.
  • HomeKit Proxy module sends the target information to the mobile phone.
  • the mobile phone After receiving the target information, the mobile phone displays a device list based on the target information.
  • the mobile phone displays the identification of each inherent device or the identification and type of each inherent device based on the device information of each device in the inherent device list information according to the target information; and displays the identification of each extended device or the identification and type of each extended device based on the device information of each device in the extended device list information, and ignores each device placeholder. It can also be understood that the mobile phone displays the device information of the device whose device information in the target information is not empty, and ignores the device placeholder whose device information is empty. In this way, the initialization of the device list is completed, and a position is reserved in the initialized device list for the device to be connected.
  • the specific process includes the following S801 to S808.
  • the HomeKit Proxy module sends a monitoring command to the data processing module to monitor whether there is a device connected to the TV or a device connected to the TV.
  • S802 The data processing module forwards the monitoring instruction to the device management module.
  • the device management module responds to the monitoring instruction, and when monitoring that a new expansion device is connected to the device connected to the television, obtains the device information of the newly connected expansion device.
  • the device management module returns the device information of the newly connected expansion device to the data processing module.
  • the device management module may update the device information of the newly connected expansion device into the expansion device list information and then send it to the data processing module, or may send the device information of the newly connected expansion device to the data processing module separately.
  • the data processing module receives the device information of the newly connected extended device, and replaces a device placeholder in the target information with the newly connected extended device information to update the target information.
  • the data processing module sends the updated target information to the HomeKit Proxy module.
  • HomeKit Proxy module sends the updated target information to the mobile phone.
  • the mobile phone After receiving the updated target information, the mobile phone displays an updated device list based on the updated target information.
  • the device management module After the device management module recognizes that a new expansion device is connected, it returns the device information of the newly connected expansion device to the data processing module.
  • the data processing module updates the device information of the newly connected expansion device to a device placeholder in the target information, and sets the name, type and other information of the newly connected expansion device. In this way, the device placeholder becomes a real device; the updated target information is sent to the mobile phone through the HomeKit Proxy module.
  • the mobile phone After the mobile phone receives the updated target information, it refreshes the device placeholder in the list. Since the placeholder has real information such as name and type, it can be refreshed and displayed on the device list displayed on the mobile phone.
  • the present application also provides examples of some embodiments for further solving other technical problems when the electronic device is used as a display device, which are as follows:
  • the pseudo standby state refers to a state where the operating system of the display device is in operation, but the screen of the display device is powered off and in a dark state, and the output port stops outputting.
  • the power-on state refers to a state where the operating system of the display device is in operation, and the screen of the display device is powered on and in a bright state.
  • the Android system is constantly iterating and updating. In order to protect user privacy, the permissions of the entire device application have been tightened to prevent the abuse of permissions, which will cause the performance of the entire device to be depleted and user complaints.
  • the current security measures are just merged by Google, and many applications have not yet been adapted, resulting in the failure to wake up the TV when pushed in the fake standby state, which is a poor user experience.
  • the electronic device described in the embodiment of the present application when used as a display device, receives a screen projection request sent by a smart device; in response to the screen projection request, when the display device is in a pseudo standby state, controls the display device to switch from the pseudo standby state to the power-on state based on the AirPlay2 application; executes the screen projection operation corresponding to the screen projection request based on the AirPlay2 application, so that when the screen projection request sent by the smart device is received in the pseudo standby state, the display device can be first woken up based on the AirPlay2 application, and then the corresponding screen projection operation is executed, so that screen projection can be realized in the pseudo standby state, thereby reducing the user's operating cost from the entire link, improving the efficiency of screen projection processing, and enhancing the user's operating experience.
  • FIG. 11 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment, wherein the control device includes As shown in FIG11 , the user can operate the display device 200 through the smart device 300 or the control device 001 .
  • the smart device 300 and the control device 001 can both be regarded as the control device 100 .
  • control device 001 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired.
  • the user can input user commands through buttons on the remote controller, voice input, control panel input, etc. to control the display device 200.
  • a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200.
  • the display device 200 is controlled using an application running on the smart device.
  • the display device may not use the above-mentioned smart device or control device to receive instructions, but may receive user control through touch or gestures.
  • the display device 200 can also be controlled in a manner other than the control device 001 and the smart device 300.
  • the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
  • the display device 200 also communicates data with the server 400.
  • the display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
  • the server 400 may provide the display device 200 with various content and interactions.
  • FIG12 is a block diagram of a configuration of a control device 001 according to an exemplary embodiment.
  • the control device 001 includes a processor 110, a communication interface 130, a user input/output interface 140, an external memory, and a power supply.
  • the control device 001 can receive an input operation instruction from a user, and convert the operation instruction into an instruction that can be recognized and responded to by the display device 200, playing the role of an interactive intermediary between the user and the display device 200.
  • a display device and a screen projection processing method are provided, wherein the display device can implement the screen projection processing method according to the embodiment of the present application or the functional module or functional entity in the display device can implement the screen projection processing method according to the embodiment of the present application.
  • the display device includes: a communicator and a processor, which correspond to the communicator 220 and the processor 250 in Figure 2 above, respectively.
  • the smart device may be the smart device 300 in Figure 11, and the smart device may be a device that supports the AirPlay2 protocol and can perform screen mirroring (screen projection connection) to the display device, such as an iOS device such as an iPhone or iPad.
  • the communicator receives a screen projection request sent by a smart device; the processor responds to the screen projection request and, when the display device is in a pseudo standby state, controls the display device to switch from a pseudo standby state to a power-on state based on the AirPlay2 application; and executes the screen projection operation corresponding to the screen projection request based on the AirPlay2 application.
  • the display device is controlled to switch from a pseudo-standby state to a power-on state based on the AirPlay2 application. It can be understood that the standard interface for waking up the screen is called based on the AirPlay2 application to power on the screen of the display device, so that the screen changes from a dark screen state to a bright screen state, thereby waking up the screen.
  • the screen projection request can be a screen projection connection request, and the corresponding screen projection operation is to establish a screen projection connection;
  • the screen projection request can be a screen projection push request, and the corresponding screen projection operation is to play the projection content, and the projection content can be pictures, audio or video, etc.; the specific details can be determined based on actual conditions and are not limited here.
  • the AirPlay2 application is an application built based on the AirPlay2 protocol that can realize the AirPlay2 screen projection function between smart devices and display devices.
  • the specific name of the AirPlay2 application is not limited in the embodiment of the present application and can be determined according to actual conditions.
  • the display device when a screen projection request is received from a smart device in a pseudo-standby state, the display device can be first woken up based on the AirPlay2 application, and then the corresponding screen projection operation can be performed, so that screen projection can be achieved in the pseudo-standby state, thereby reducing the user's operating cost in the entire link, improving the efficiency of screen projection processing, and enhancing the user's operating experience.
  • the screen projection request is a screen projection connection request
  • the screen projection operation is to establish a screen projection connection
  • the processor is configured to perform the screen projection operation corresponding to the screen projection request based on the AirPlay2 application, specifically: to establish a screen projection connection between the display device and the smart device based on the AirPlay2 application.
  • the communicator receives the message sent by the smart device. a screen projection connection request; the processor responds to the screen projection connection request, and when the display device is in a pseudo-standby state, controls the display device to switch from the pseudo-standby state to the power-on state based on the AirPlay2 application; and establishes a screen projection connection between the display device and the smart device based on the AirPlay2 application.
  • the display device when a screen projection connection request is received from a smart device in a pseudo-standby state, the display device can be first woken up based on the AirPlay2 application, and then the corresponding screen projection connection operation can be performed, so that the screen projection connection can be successfully established in the pseudo-standby state, thereby reducing the user's operating cost in the entire link, improving the efficiency of establishing the screen projection connection, and enhancing the user's operating experience.
  • the screen projection request is a screen projection push request, and the screen projection operation is to play the screen projection content;
  • the processor is also configured to: before the communicator receives the screen projection request sent by the smart device, establish a screen projection connection between the display device and the smart device based on the AirPlay2 application; when the target condition is met, control the display device to switch from the power-on state to the pseudo-standby state; the processor is configured to perform the screen projection operation corresponding to the screen projection request based on the AirPlay2 application, specifically: play the screen projection content corresponding to the screen projection push request based on the AirPlay2 application.
  • the processor establishes a screen projection connection between the display device and the smart device based on the AirPlay2 application; when the target condition is met, control the display device to switch from the power-on state to the pseudo-standby state; the communicator receives the screen projection connection request sent by the smart device; the processor responds to the screen projection connection request, and when the display device is in the pseudo-standby state, controls the display device to switch from the pseudo-standby state to the power-on state based on the AirPlay2 application; and plays the screen projection content corresponding to the screen projection push request based on the AirPlay2 application.
  • the display device when the display device is connected to a WiFi network and is powered on, pressing the power button will cause the device to enter a pseudo-standby state.
  • pressing the power button When the display device is powered on and has no audio or video output (e.g., in a paused playback state), and has been left idle for a certain period of time (e.g., 1 hour, 24 hours, etc.) without any key operation, the device will also enter a pseudo-standby state.
  • the Android TV When a user uses AirPlay2 to cast the screen to watch videos or audio and leaves the screen for too long or presses the power button, the Android TV will enter a pseudo-standby state. When the user comes back and wants to cast the screen to watch the program again, he or she can operate the smart device to send a casting push request to the display device. The display device will respond to the casting push request, wake up the screen, and play the corresponding video or audio.
  • the display device when a screen projection push request is received from a smart device in a pseudo-standby state, the display device can be first woken up based on the AirPlay2 application, and then the projection content corresponding to the screen projection push request can be played based on the AirPlay2 application, so that the corresponding projection content can be played in response to the screen projection push in the pseudo-standby state, thereby reducing the user's operating cost in the entire link, improving the efficiency of screen projection push processing, and enhancing the user's operating experience.
  • the target condition includes any one of the following: the playback content of the display device does not change within a preset time period; a user input for entering a pseudo standby state is received.
  • the playback content of the display device does not change within a preset time period, that is, the display device does not play any content or the played content does not change within the preset time period (paused playback state), and the display device switches from the power-on state to the pseudo-standby state.
  • the user input for entering the pseudo standby state may be a user clicking a power button or a button for entering the pseudo standby state, or the display device may display a prompt message indicating whether to enter the pseudo standby state, and the user may select an option to enter the pseudo standby state.
  • the display device switches from the power-on state to the pseudo standby state.
  • the user can set the AirPlay2 application to have a wake-up function in the pseudo standby state, that is, a function to wake up the display device screen, so that the display device switches from the pseudo standby state to the power-on state.
  • the processor is also configured to: before the communicator receives the screen projection request sent by the smart device, in response to the received target user input authorizing the AirPlay2 application to have the wake-up function, determine that the AirPlay2 application has the wake-up function; wherein the wake-up function is used to control the display device to switch from the pseudo standby state to the power-on state.
  • the target user input can be the input of setting the AirPlay2 application to have a wake-up function in the interface corresponding to the application permission setting item under the system setting interface; the target user input can also be the input of selecting authorize the AirPlay2 application to have a wake-up function when the AirPlay2 application is turned on for the first time or for a preset number of times, and when an authorization prompt message is displayed and prompts whether to authorize the AirPlay2 application to have a wake-up function, the specific input can be determined based on actual conditions and is not limited here.
  • the AirPlay2 application is set to have a wake-up function through the target user input, so that when the display device receives a screen projection request sent by a smart device in a pseudo-standby state, it can control the display device from the pseudo-standby state to the power-on state based on the AirPlay2 application, and then perform the corresponding screen projection operation, thereby reducing the user's operating cost in the entire link, improving the efficiency of screen projection push processing, and enhancing the user's operating experience.
  • the authorization prompt information is displayed to set the AirPlay2 application to have a wake-up function.
  • the processor is further configured to: display the authorization prompt information, the authorization prompt information includes a first option and a second option, the first option is used to indicate that the AirPlay2 application is authorized to have a wake-up function, and the second option is used to indicate that the AirPlay2 application is not authorized to have a wake-up function; the target user input is an input for selecting the first option.
  • the AirPlay2 application when the user selects the second option in response to the authorization prompt information, the AirPlay2 application does not have a wake-up function.
  • the AirPlay2 application cannot control the display device to switch from the pseudo standby state to the power-on state, and the display device remains in the pseudo standby state, and is unable to perform the corresponding screen projection operation.
  • whether the AirPlay2 application has the wake-up function is set by authorization prompt information, which is simple to operate. Moreover, by interacting with the user through the authorization prompt information, the user can set whether the AirPlay2 application has the wake-up function according to their own needs, which can improve the user experience.
  • the AirPlay2 application can be prefabricated in the system directory, and then the AirPlay2 application has a wake-up function without user authorization.
  • the AirPlay2 application is installed in the system directory of the display device, and any application in the system directory has a wake-up function; wherein the wake-up function is used to control the display device to switch from the pseudo standby state to the power-on state.
  • the system directory can be the system/app directory, the system_ext/priv_app directory, or other system directories.
  • user authorization is not required, that is, the TV can be woken up through Airplay2 screen casting in pseudo-standby state to perform screen casting demonstration.
  • the smart device is an iPhone, and the display device is a TV. Screen mirroring operation is performed on the iPhone, and an interface as shown in Figure 13 is displayed.
  • the interface includes the device identifiers of various devices that can be used for Airplay2 screen projection with the iPhone (which can be device names, device models, device numbers, etc.), including multiple identifiers such as "Living Room TV", “Bedroom TV”, and "Smart TV”. Among them, the user selects the "Smart TV” identifier corresponding to the TV, and a screen projection connection is established between the iPhone and the TV.
  • the TV displays the interface shown in Figure 14, indicating that the screen projection connection between the iPhone and the TV is successfully established.
  • the display device includes the Airplay daemon (AirPlayDaemon), the Airplay system service (AirPlaySystemService), and the Airplay2 application (AirPlayApk).
  • AirPlayDaemon is used to parse the screen projection request.
  • AirPlaySystemService is used to switch to the AirPlay channel and pull up AirPlayApk according to the screen projection request parsed by AirPlayDaemon;
  • AirPlaySystemService is also used to forward the messages between AirPlayDaemon and AirPlayApk to establish a screen projection connection and screen projection push.
  • AirPlayDaemon corresponds to the iOS system language
  • AirPlayApk corresponds to the Android system language
  • AirPlaySystemService is used to convert between the iOS system language and the Android system language.
  • the business process of establishing a screen projection connection and completing the screen projection push in the display device includes the following steps.
  • AirPlayDaemon receives a screen projection connection request sent by a smart device.
  • AirPlayDaemon parses the screen casting connection request to obtain the screen casting connection control instruction, and sends a socket message to AirPlaySystemService.
  • the socket message carries the screen casting connection control instruction, which is used to notify AirPlaySystemService to pull up AirPlayApk, and then let AirPlayApk complete the screen casting connection initialization, realize the screen casting connection, and display the screen casting (Curtain) page.
  • the screen casting page is used to indicate that the connection is successfully established.
  • the screen casting page can be a pairing page on the smart device.
  • AirPlayDaemon sends a socket message to AirPlaySystemService.
  • AirPlaySystemService executes JNI to trigger Java callback AirPlayApk based on the socket message.
  • JNI Java Native Interface
  • Java virtual machine to call local applications or libraries.
  • Local applications generally refer to programs written in languages such as C, C++, or assembly and compiled into programs for native hardware and operating systems.
  • JNI triggers the Java callback AirPlayApk, that is, JNI calls the logic of starting the application to switch to the AirPlay channel and launch the AirPlay application.
  • AirPlayApk broadcasts the first request message for requesting the initialization startup parameters of the screen projection connection.
  • AirPlayApk broadcasts a second request message for requesting drawing parameters of the projection screen page.
  • the first request message and the second request message may be the same request message or two independent request messages.
  • AirPlaySystemService broadcasts the projection connection initialization startup parameters and the drawing parameters of the projection screen page.
  • AirPlaySystemService can broadcast the projection connection initialization startup parameters and the projection screen page drawing parameters at the same time through one broadcast message, or it can broadcast the projection connection initialization startup parameters and the projection screen page drawing parameters separately through two broadcast messages.
  • AirPlaySystemService can forward the first request message and the second request message to AirPlayDaemon.
  • AirPlayDaemon sends the projection connection initialization startup parameters and the drawing parameters of the projection screen page to AirPlaySystemService.
  • AirPlaySystemService then sends the projection connection initialization startup parameters and the drawing parameters of the projection screen page to AirPlayApk.
  • AirPlayApk initializes the screen projection based on the screen projection connection initialization startup parameters to complete the screen projection connection; AirPlayApk draws the screen projection page based on the drawing parameters of the screen projection page and displays the screen projection page.
  • the broadcast AirPlay.check.breakin (first request message) is sent to inform that the channel switching is successful and request the initialization startup parameters of the screen projection connection.
  • the broadcast Request.CurtainPage.TIS (second request message) is sent to request the drawing parameters of the projection screen page. After obtaining the drawing parameters of the projection screen page, the projection screen page is drawn and displayed.
  • AirPlayDaemon receives the screen projection push request sent by the smart device.
  • AirPlayDaemon parses the screen casting push request. If the screen casting data corresponding to the screen casting push request is audio data, the screen casting push request is parsed to obtain the audio data and the screen casting push control instruction. AirPlayDaemon processes the audio data and sends the screen casting push control instruction to AirPlaySystemService; if the screen casting data corresponding to the screen casting push request is a video uniform resource locator (Uniform Resource Locator, URL), the screen casting push request is parsed to obtain the video URL and the screen casting push control instruction. AirPlayDaemon sends the video URL and the screen casting push control instruction to AirPlaySystemService, and AirPlaySystemService downloads the video data according to the video URL.
  • AirPlayDaemon sends the video URL and the screen casting push control instruction to AirPlaySystemService, and AirPlaySystemService downloads the video data according to the video URL.
  • AirPlaySystemService receives the screen projection push control instruction sent by AirPlayDaemon.
  • AirPlaySystemService receives the screen projection push control command of video or audio, and sends the broadcast AirPlay.from.breakin (screen projection push control command) to notify AirPlayApk to play.
  • AirPlaySystemService broadcasts screen projection and pushes control instructions.
  • AirPlayApk receives the screen projection push control instruction and broadcasts a third request message for requesting the screen projection playback startup parameters.
  • AirPlayApk receives the screen projection push control instruction, creates a session, and sends a broadcast AirPlay.reqbreakin.parameter (the third request message) to AirPlaySystemService to request startup parameters.
  • AirPlaySystemService broadcasts screen casting and playback startup parameters.
  • AirPlaySystemService sends the startup parameters to AirPlayApk using the broadcast airplay.tis.action.
  • AirPlaySystemService can forward the third request message to AirPlayDaemon.
  • AirPlayDaemon sends the screen projection playback startup parameters to AirPlaySystemService, and AirPlaySystemService then sends the screen projection playback startup parameters to AirPlayApk.
  • AirPlayApk performs screen casting based on the screen casting startup parameters.
  • AirPlay calls launchAirPlayAppTIS to inform the underlying screen casting that the playback has started and is playing.
  • FIG 16 shows the audio data push process based on AirPlay2 application.
  • the sender device is a smart device, AirPlay Daemon and Luna are display devices, and Luna is a part of AirPlayApk.
  • the display device receives the audio push from the sender device, the audio cache data is directly sent to AirPlay Daemon.
  • the (metadata) data is forwarded to Luna in the AirPlay App for upper-level UI drawing.
  • the audio synchronization between the Sender device and the AirPlay Daemon node is performed through Clock sync to achieve simultaneous playback.
  • Metadata data also known as intermediary data or relay data, is data about data. It mainly describes the properties of data and is used to support functions such as indicating storage location, historical data, resource search, and file records.
  • Figure 17 shows the video data push process based on AirPlay2 application.
  • the display device receives the video push from the sending device, it sends the video URL to AirPlay Daemon, which is then forwarded to the Luna engine in the AirPlay App.
  • AirPlay Daemon completes the media resource download, video playback, and upper-layer UI drawing.
  • the steps involved in Figures 18 to 22 may include more steps, or fewer steps in actual implementation, and the order of these steps may also be different, so as to implement the screen projection processing method provided in the embodiment of the present application.
  • the executor of the screen projection processing method can be a display device, or it can be a functional module or functional entity in the display device that can implement the screen projection processing method, which is not limited here.
  • the specific description of the screen projection processing method according to the embodiment of the present application can refer to the relevant description of the above-mentioned display device, and the same or similar technical effects can be achieved, which will not be repeated here.
  • FIG. 18 is a flowchart of the steps of implementing a screen projection processing method according to one or more embodiments of the present application.
  • the screen projection processing method may include:
  • the screen projection request is a screen projection connection request
  • the screen projection operation is to establish a screen projection connection
  • the screen projection request is a screen projection push request, and the screen projection operation is to play the projection content; in combination with Figure 18, as shown in Figure 20, before the above S901, the screen projection processing method according to the embodiment of the present application may also include the following S904 and S905, and the above S903 can be specifically implemented by the following S903b.
  • the target condition includes any one of the following: the playback content of the display device does not change within a preset time period; a user input for entering a pseudo standby state is received.
  • the screen projection processing method according to the embodiment of the present application may further include the following S906 .
  • S906 In response to the received target user input authorizing the AirPlay2 application to have the wake-up function, determine that the AirPlay2 application has the wake-up function.
  • the wake-up function is used to control the display device to switch from a pseudo-standby state to a power-on state.
  • the screen projection processing method according to the embodiment of the present application may also include the following S907.
  • the authorization prompt information includes a first option and a second option, the first option is used to indicate that the AirPlay2 application is authorized to have a wake-up function, and the second option is used to indicate that the AirPlay2 application is not authorized to have a wake-up function; the target user input is the input for selecting the first option.
  • the AirPlay2 application is installed in the system directory of the display device, and any application in the system directory has a wake-up function; wherein the wake-up function is used to control the display device to switch from a pseudo-standby state to a power-on state.
  • the present application also provides examples of some embodiments that can further solve other technical problems when the electronic device is used as a display device, as follows:
  • the screen projection function can solve this problem well.
  • Current display devices can support multiple screen projection protocols at the same time, such as Miracast protocol, AirPlay (air playback) protocol, etc.
  • the display device When playing a data stream on a display device through screen projection, if the user only wants to hear the sound of the data stream, the display device can be operated to enter target mode. In target mode, the display device only plays audio data, and the display switch of the display is in the off state. However, if the user casts the screen again to play other data streams, such as playing a video, the display device will still be in target mode, and the display switch of the display will still be in the off state, resulting in the user being unable to watch the content of the video, and the user experience is relatively poor.
  • an embodiment of the present application further proposes a screen projection processing method, wherein the processor of the display device first obtains the type of the currently received projection data stream and the current playback status of the display device, and then determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state.
  • the display device can automatically control the display switch of the display to be in the on state when determining that the type of the currently received projection data stream is non-audio data, and determining that the current playback status of the display device is in the target mode, and controls the display to display the non-audio data, thereby avoiding the situation where the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the screen projection process, thereby improving the user experience.
  • FIG23 is a schematic diagram of software configuration in a display device according to one or more embodiments of the present application. As shown in FIG23 , the system is divided into three layers, from top to bottom, namely, the application layer (Applications layer) (referred to as the “application layer”), the application framework layer (Application Framework layer) (referred to as the “framework layer”), and the operating system layer.
  • Application layer Applications layer
  • Application Framework layer Application Framework layer
  • operating system layer the operating system layer.
  • At least one application is running in the application layer, and these applications may be window programs, system settings programs, clock programs, etc. that come with the operating system; they may also be applications developed by third-party developers.
  • the applications in the application layer include but are not limited to the above examples.
  • the application layer may include TV Input (the input module of the TV, also known as the channel list module) and the AirPlay Android Application Package (AirPlay APK), where the AirPlay APK is mainly used to obtain the properties of the entire machine (display device), such as obtaining the volume of the entire machine, etc., which is not limited here.
  • the framework layer mainly includes: switching channels (cutting Input, cutting TIS), AirPlay service and audio and video middleware.
  • the AirPlay service can interact with the AirPlay process and AirPlay APK, and control the life cycle of AirPlay APK, and can interact with the switching channel and audio and video middleware through interface calls;
  • the AirPlay service interacts with the AirPlay APK through broadcasting;
  • the switching channel interacts with the TV Input through the Java Native Interface (JNI).
  • JNI Java Native Interface
  • the operating system layer mainly includes: the AirPlay process and the implementation of mirroring, video and audio function modules.
  • the operating system here can be Linux.
  • the AirPlay process is mainly a resident native process, including the AirPlay protocol stack, which can call the AirPlay specific playback function module (mirror, video or audio, etc.) to implement the corresponding function; the AirPlay process and the AirPlay service realize the interaction between the two through network communication.
  • the network communication may be implemented based on a network communication protocol, such as a socket protocol or other protocols, which is not limited in this embodiment.
  • the AirPlay protocol stack can receive the casting information or casting request sent by the mobile device, and send the casting information or casting request to the AirPlay service. After receiving the casting information or casting request (including casting parameters), the AirPlay service can determine the type of the current casting data stream (such as video, audio or mirror, etc.), and can also determine whether it is the first casting.
  • the interface in the Android TV input framework (TV Input Framework, TIF) is called to switch the channel of the TV Input, and switch the current channel of the display device to the channel corresponding to AirPlay; if it is not the first casting, the AirPlay service will obtain the type of the currently received casting data stream, and call the audio and video middleware interface to obtain the current playback status of the display device.
  • TIF TV Input Framework
  • AirPlay will call the audio and video middleware interface to turn off the switch corresponding to the Audio Only function to control the display switch of the display to be in the on state, at which time the screen of the display will light up, and the display can display non-audio data.
  • FIG. 23 illustrates the software configuration in the display device by taking the display device using the Android platform as an example, and is not intended to limit it.
  • Figure 24 is a schematic diagram of the icon control interface display of an application in a display device according to one or more embodiments of the present application.
  • the application layer includes at least one application that can display a corresponding icon control in the display, such as: a live TV application icon control, a video on demand application icon control, a media center application icon control, an application center icon control, a game application icon control, etc.
  • the live TV application can provide live TV through different signal sources.
  • the video on demand application can provide videos from different storage sources. Unlike the live TV application, the video on demand provides video display from certain storage sources.
  • the media center application can provide applications for playing various multimedia content.
  • the application center can provide storage for various applications.
  • the display device is a terminal device with a display function, such as a television, a mobile phone, a computer, a learning machine, etc.
  • a display function such as a television, a mobile phone, a computer, a learning machine, etc.
  • An output interface (display 260 and/or audio output interface 270 ) configured to output user interaction information
  • a communicator 220 used for communicating with a server
  • the processor 250 is configured to execute computer instructions in the memory to cause the device to perform:
  • the processor 250 is further configured to:
  • the display switch of the display When an operation of turning on a display switch of the display is received, the display switch of the display is controlled to be in an on state, and the display is controlled to display the non-audio data.
  • the processor 250 is further configured to:
  • the type of the currently received screen projection data stream and the current playback status of the display device are obtained.
  • the processor 250 is further configured to:
  • the processor 250 is further configured to:
  • the processor 250 is further configured to:
  • the current screen projection request is a first screen projection request, establish a screen projection connection between the display device and the sender of the current screen projection request, and switch the channel of the display device to the channel corresponding to the airplay;
  • the data stream sent by the sender is received and the data stream is played.
  • the screen projection protocol between the display device and the sender of the current screen projection request is: AirPlay protocol.
  • the embodiment of the present application executes the above-mentioned screen projection processing method on the display device.
  • the processor of the display device first obtains the type of the currently received screen projection data stream and the current playback status of the display device, and then determines that the type of the currently received screen projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state.
  • the display device can automatically control the display switch of the display to be in the on state and control the display to display the non-audio data when determining that the type of the currently received screen projection data stream is non-audio data and determining that the current playback status of the display device is in the target mode, so as to avoid the situation where the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the screen projection process and improving the user experience.
  • FIG25 is a system framework diagram for performing screen projection processing according to one or more embodiments of the present application.
  • the system may include an acquisition module 401, a determination module 402, and a control module 403.
  • the system first acquires the type of the currently received screen projection data stream and the current playback state of the display device through the acquisition module 401, and then the determination module 402 determines that the type of the currently received screen projection data stream is non-audio data, and determines that the current playback state of the display device is in the target mode.
  • the control module 403 controls the display switch of the display to be in an open state, and controls the display to display non-audio data, wherein, when the playback state is in the target mode, the display switch of the display is in a closed state.
  • the display device can automatically control the display switch of the display to be in an open state when determining that the type of the currently received screen projection data stream is non-audio data, and when determining that the current playback state of the display device is in the target mode, and control the display to display non-audio data, without the need for manual operation by the user, to avoid the display switch of the display being in a closed state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, ensuring that the user can normally view the projection content during the screen projection process, and improving the user's experience.
  • FIG26 is a flow chart of a screen projection processing method according to an embodiment of the present application. This embodiment can be applied to prevent the display switch of the display from being in the off state during the screen projection process, resulting in the inability to view the projected content. As shown in FIG26, the screen projection processing method specifically includes the following steps:
  • the currently received screen projection data stream can be understood as the screen projection data stream currently received by the display device and sent by the mobile device. It can be understood that: the user can operate the mobile device to cast the screen. During the screen projection process, the user can perform multiple screen projections, for example, first cast audio data, then cast video data, and then cast image data, etc. Correspondingly, the mobile device will send multiple screen projection data streams to the display device. In this embodiment, there is no specific limitation on the mobile device that sends the screen projection data stream to the display device during the screen projection process. It can be the same mobile device or different mobile devices. Mobile devices may include client devices that support the Airplay protocol, such as mobile phones, iPads, or macbooks.
  • the types of screen projection data streams may include audio data and non-audio data, among which audio data is sound-related data, such as music, recordings, etc.
  • the non-audio data may include video streams, live streams, or broadcast streams, etc.
  • the current playback status of the display device may include: the display device is currently playing only audio, the display device is currently playing only picture content, or the display device is currently playing both audio and picture content.
  • the processor of the display device obtains the type of the currently received projection data stream and the current playback status of the display device, so as to determine whether the type of the currently received projection data stream is non-audio data, and determine whether the current playback status of the display device is in target mode, thereby facilitating the execution of subsequent steps.
  • S52 determine that the type of the currently received projection data stream is non-audio data, and determine that the current playback state of the display device is in target mode, control the display switch of the display device to be in the on state, and control the display to display non-audio data.
  • the display switch of the display When the playback state is in the target mode, the display switch of the display is in the off state, that is, in the target mode, the display is in a black screen state, and the user cannot view the screen content.
  • the display switch of the display can be understood as a switch that controls the display to be in a black screen state or a bright screen state.
  • the processor of the display device determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback state of the display device is in target mode, based on the type of the currently received projection data stream and the current playback state of the display device, indicating that the display device is now projecting and playing non-audio data, but the display switch of the display is in the off state, and the screen content of the non-audio data cannot be played normally. Therefore, the processor of the display device controls the display switch of the display device to be in the on state, and controls the display to display non-audio data (screen content), so as to achieve the effect of normal playback of non-audio data.
  • the processor of the display device first obtains the type of the currently received projection data stream and the current playback status of the display device, and then determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state.
  • the display device can automatically control the display switch of the display to be in the on state and control the display to display the non-audio data when determining that the type of the currently received projection data stream is non-audio data and determining that the current playback status of the display device is in the target mode, without the need for manual operation by the user, thereby avoiding the situation where the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the projection process, thereby improving the user experience.
  • determining that the current playback state of the display device is in the target mode may specifically include:
  • the Audio Only function is a function provided by the display device to play only sound and turn off the display device screen. Turning off the display device screen means: controlling the display switch of the display to be in the off state.
  • the switch corresponding to the Audio Only function can be understood as a module used to control turning this function on or off.
  • the state of the switch corresponding to the Audio Only function can be controlled by the user operating the remote control or the mobile device connected to the display device. For example, by clicking the Menu button of the remote control (it can also be other buttons, which is not limited in this embodiment), the switch corresponding to the Audio Only function can be called up to control its state.
  • the audio and video middleware interface can be understood as an interface for recording and controlling the state of the switch corresponding to the Audio Only function.
  • the processor of the display device calls the audio and video middleware interface to obtain the status of the switch corresponding to the Audio Only function.
  • the status of the switch corresponding to the Audio Only function is on, it can be determined that the current playback status of the display device is in the target mode.
  • determining that the current playback state of the display device is in the target mode by the above method is simple, fast and efficient.
  • controlling the display switch of the display to be in an on state may specifically include:
  • the audio and video middleware interface is called to turn off the switch corresponding to the Audio Only function to control the display switch of the display to be in the on state.
  • the processor of the display device calls the audio and video middleware interface to turn off the switch corresponding to the Audio Only function, that is, the display device only plays sound and the function of turning off the display device screen is turned off.
  • the display switch of the display can be controlled to be in the on state, and the display can display the picture normally.
  • the above method can automatically control the display switch of the display to be in the on state, which is simple and efficient, and does not require manual operation by the user, thereby avoiding the situation where the display cannot display the picture normally because the display is in a black screen state when playing non-audio data.
  • FIG27 is a schematic diagram of the interface of the display when the current playback state of the display device is in the target mode according to an embodiment of the present application.
  • the display switch of the display is in the off state, and at this time, the interface of the display is a black screen interface.
  • Figure 28 is a schematic diagram of the interface of a display when a display switch of a display according to an embodiment of the present application is in an on state and the display displays non-audio data. As shown in Figure 28, when the display switch of the display is in an on state and the display displays non-audio data, the display normally displays the screen content corresponding to the non-video data.
  • the screen content shown in FIG. 28 is only for exemplary description, and the screen content can be determined according to the playback progress corresponding to the non-video data, which is not limited in this embodiment.
  • FIG 29 is a flow chart of another screen projection processing method according to an embodiment of the present application. This embodiment is optimized on the basis of the above embodiment. This embodiment can be applied to the process of determining that the type of the currently received screen projection data stream is non-audio data, and determining that the current playback state of the display device is in the target mode. As shown in Figure 29, the screen projection processing method specifically includes the following steps:
  • S291 obtain the type of the currently received screen projection data stream and the current playback status of the display device.
  • S292 determine that the type of the currently received projection data stream is non-audio data, and determine that the current playback state of the display device is in target mode, and control the display to display prompt information.
  • the prompt information is used to prompt the user whether to turn on the display switch of the display.
  • the processor of the display device determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback state of the display device is in target mode, and controls the display to display prompt information, through which the user can be prompted whether to turn on the display switch of the display.
  • the processor of the display device When the processor of the display device receives an operation of turning on a display switch of the display triggered by the user, the processor controls the display switch of the display to be in an on state, and controls the display to display video data.
  • the processor of the display device first obtains the type of the currently received projection data stream and the current playback status of the display device, then determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback status of the display device is in target mode, controls the display to display prompt information, and finally receives an operation to turn on the display switch of the display, controls the display switch of the display to be in an on state, and controls the display to display video data.
  • the prompt information on the display the user can be prompted to know that the display switch of the display was turned off during the previous screen projection, which can increase the human-computer interaction experience.
  • the display switch of the display is controlled to be in an on state, and controls the display to display video data, avoiding the situation where the display switch of the display is in a closed state (i.e., a black screen state) when non-audio data is currently playing due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally watch the projection content during the screen projection process and improving the user's usage experience.
  • a closed state i.e., a black screen state
  • FIG30 is a schematic diagram of an interface when a display displays prompt information according to an embodiment of the present application.
  • the processor of the display device determines that the type of the currently received projection data stream is non-audio data and that the current playback state of the display device is in target mode, it can control the display to display prompt information.
  • the prompt information may include a countdown prompt.
  • the processor of the display device can start a 5-minute countdown, and a prompt page as shown in FIG30 will pop up 15 seconds before the countdown ends.
  • the page includes: whether to turn on the display switch of the display. Off, the operable options include "Yes" and "No". Among them, Yes is used to turn on the display switch of the display, and No is used to turn off the display switch of the display.
  • the 15s in the upper right corner is a time prompt, and its value will continue to decrease as time changes until it reaches 0.
  • the prompt page shown in FIG30 can prompt the user whether to turn on the display switch of the display to avoid the display being in a black screen state. If no user operation is received, the processor of the display device automatically closes the prompt page after 15 seconds by default and automatically turns on the display switch of the display.
  • 5 minutes and 15 seconds are both user-defined values and may be other values, which are not limited in this embodiment.
  • obtaining the type of the currently received screen projection data stream and the current playback status of the display device may specifically include:
  • the type of the currently received screen projection data stream and the current playback status of the display device are obtained.
  • the current screen projection request can be understood as: the screen projection request currently received by the display device and sent by the mobile device.
  • the screen projection request can carry relevant screen projection parameters, such as mirroring, screen projection video or screen projection audio information.
  • the processor of the display device After the processor of the display device receives the current screen projection request sent by the mobile device, it determines the channel information of the display device in response to the current screen projection request, wherein the communication information may be the identification information of the channel currently corresponding to the display device.
  • the processor of the display device determines that the channel of the display device is the channel corresponding to the airplay according to the channel information (indicating that the current screen projection request is not the first screen projection request, that is, it is not the first screen projection), and the current screen projection request is a non-mirror screen projection request, the type of the currently received screen projection data stream and the current playback status of the display device are obtained.
  • the display device will execute the logic of switching channels, that is, switch the channel of the display device to the channel corresponding to the airplay. After the display device executes the logic of switching channels, the display will not have a black screen.
  • the display device will not execute the logic of switching channels. In this case, if the current playback state of the display device is in target mode (the target mode can be set during the previous screen projection), the display will remain in a black screen state (that is, the display switch of the display is in the off state).
  • obtaining the type of the currently received projection data stream and the current playback status of the display device is conducive to the subsequent determination of whether to execute the step of controlling the display switch of the display to be in the on state, thereby preventing the situation where the non-audio data screen content cannot be played due to the display switch of the display being in the off state.
  • the display device will execute the logic of switching channels.
  • the type of screen projection data stream corresponding to the first screen projection request that is: regardless of whether the screen projection data stream is audio data or non-audio data, the display device will execute the logic of switching channels.
  • FIG31 is a schematic diagram of the interface of a display when a display device enters an input page according to an embodiment of the present application.
  • a user can operate the input button of a remote control or operate other mobile devices connected to the display device to enter the input page, which may include multiple options, such as: Home, TV, AirPlay, HDMI (High Definition Multimedia Interface) 1 and HDMI2, etc.
  • the display device When switching from one option in the page to another, the display device will execute the logic of switching channels.
  • the display device when the AirPlay portal is in the settings and the AirPlay option is selected, the display device will also execute the logic of switching channels.
  • the method may further specifically include:
  • the current screen projection request is a first screen projection request, establish a screen projection connection between the display device and the sender of the current screen projection request, and switch the channel of the display device to the channel corresponding to the airplay;
  • the data stream sent by the sender is received and the data stream is played.
  • the sender of the current screen projection request can be any mobile device, and this embodiment does not limit this.
  • the processor of the display device receives the current screen projection request sent by the mobile device, it determines the channel information of the display device in response to the current screen projection request. When it is determined according to the channel information that the channel of the display device is not the channel corresponding to the airplay, it can be determined that the current screen projection request is the first screen projection request. At this time, the processor of the display device establishes a screen projection connection between the display device and the sender of the current screen projection request based on the first screen projection request, and switches the channel of the display device to the channel corresponding to the airplay. At the same time, since the current screen projection request is the first screen projection request, the display device will execute the logic of switching channels. After the display device executes the logic of switching channels, the display will not have a black screen. Therefore, the processor of the display device can play the data stream normally after receiving the data stream sent by the sender based on the screen projection connection and the channel corresponding to the airplay.
  • the screen projection protocol between the display device and the sender of the current screen projection request is: AirPlay protocol.
  • the AirPlay protocol is a playback technology in the iOS operating system, which can transfer files (including videos, photos and mirrors) on iOS or later versions to devices that support airplay.
  • the screen projection protocol between the display device and the sender of the current screen projection request in this embodiment is: AirPlay protocol.
  • FIG32 is a schematic diagram of a screen projection process of a display device according to an embodiment of the present application.
  • the screen projection process of the display device may include the following steps:
  • Step 1 When a user casts a screen through a mobile device, the screen casting driver module of the display device can receive the screen casting parameters sent by the mobile device, such as mirroring, screen casting video or screen casting audio and other information, and determine whether the current screen casting is the first screen casting;
  • the screen casting driver module of the display device can receive the screen casting parameters sent by the mobile device, such as mirroring, screen casting video or screen casting audio and other information, and determine whether the current screen casting is the first screen casting;
  • Step 2 If the current screen projection is the first screen projection, since the display device is not currently in the AirPlay channel when the screen is projected for the first time, the screen projection driver sends a channel switching message to the channel switching module, so that the channel switching module switches the channel of the display device to the channel corresponding to AirPlay, and then calls the AirPlay function module (such as audio, video or mirroring, etc.) to implement the corresponding function; if the current screen projection is mirror projection, regardless of whether it is the first screen projection, the screen projection driver will send a channel switching message to the channel switching module, and implement mirror projection through the mirroring function module, so that the display device synchronously plays the screen content of the mobile device;
  • the AirPlay function module such as audio, video or mirroring, etc.
  • Step 3 If the current screen projection is not the first screen projection and is not a mirror projection, the screen projection driver defaults the channel of the display device to the channel corresponding to AirPlay. Then, when the type of the currently received screen projection data stream is non-audio data, the screen projection driver calls the audio and video middleware interface to obtain the status of the switch corresponding to the Audio Only function. If the status of the switch corresponding to the Audio Only function is on, the status of the switch corresponding to the Audio Only function is controlled to be off, so as to control the display switch of the monitor to be on, and control the monitor to display non-audio data; if the status of the switch corresponding to the Audio Only function is off, the monitor is controlled to display non-audio data.
  • FIG33 is a schematic diagram of the overall process of a screen projection processing method according to an embodiment of the present application. As shown in FIG33 , the overall process may specifically include the following steps:
  • the user selects any music player software in the mobile device to cast the audio (Audio) screen (i.e., the user casts the screen to play the audio data), and then the TV will display the Audio related information in the mobile device and start playing the Audio;
  • the user is on the Audio page of the display device, and clicks the "Audio Only” option in the menu by operating the menu button of the remote control (or other methods), that is, turning on the switch corresponding to the Audio Only function, at which time the display device only plays sound and turns off the display of the display device;
  • non-audio data such as video data
  • the logic of switching channels will not be executed when playing the video at this time, and it is considered that the channel of the display device has not sent changes. Since the switch corresponding to the Audio Only function is in the on state, the display will not light up the screen at this time and will be in a black screen state;
  • S334 The user plays non-audio data on the screen
  • the display device determines whether the type of the currently received projection data stream is non-audio data, and whether the state of the switch corresponding to the Audio Only function is on; if yes, that is, the type of the currently received projection data stream is non-audio data, and the state of the switch corresponding to the Audio Only function is on, then execute step S336; otherwise, the type of the currently received projection data stream is audio data, or the state of the switch corresponding to the Audio Only function is not on (i.e., off), then execute step S338;
  • the state change of screen projection can be determined in the following manner, and at this time, it can be identified that the current state of Airplay is Audio/Video/Screen.
  • the parameter ui is the current Airplay status, which can be Screen (equivalent to the Airplay homepage)/Video/Audio.
  • quitAudioOnlyWhenAudioToVideo(ui) is as follows:
  • the embodiment of the present application executes the above-mentioned screen projection processing method on the display device.
  • the processor of the display device first obtains the type of the currently received screen projection data stream and the current playback status of the display device, and then determines that the type of the currently received screen projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state.
  • the display device can automatically control the display switch of the display to be in the on state when determining that the type of the currently received screen projection data stream is non-audio data, and determining that the current playback status of the display device is in the target mode, and controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, so as to avoid the situation that the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the screen projection process, thereby improving the user's experience.
  • a computer-readable non-volatile storage medium is also provided, on which a computer program is stored.
  • the computer program is executed by a processor, the various processes of the above-mentioned device list acquisition method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
  • the computer-readable non-volatile storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
  • the embodiment of the present application also provides a computer program product, including: when the computer program product is run on a computer, the computer is enabled to implement the above method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiments of the present application relate to an electronic device and a data processing method. The electronic device comprises: a communicator, which is configured to receive a device list acquisition request sent by a HomeKit client after having established a connection with the HomeKit client on the basis of a HomeKit protocol; and a processor, which is configured to determine the device information of an electronic device and the device information of each target device on the basis of the device list acquisition request, and generate target information on the basis of the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used for indicating one unknown device for access, and the device information corresponding to each device placeholder being null. The communicator is further configured to send to the HomeKit client the target information, so that the HomeKit client displays a device list on the basis of the target information.

Description

电子设备及数据处理方法Electronic device and data processing method
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求在2022年11月23日提交中国专利局、申请号为202211477456.8,以及,在2022年12月22日提交中国专利局、申请号为202211658353.1,以及在2022年12月29日提交中国专利局、申请号为202211714328.0的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the application number 202211477456.8 filed with the China Patent Office on November 23, 2022, and the application number 202211658353.1 filed with the China Patent Office on December 22, 2022, and the application number 202211714328.0 filed with the China Patent Office on December 29, 2022, the entire contents of which are incorporated by reference into this application.
技术领域Technical Field
本申请实施例涉及终端技术领域,尤其涉及一种电子设备及用于电子设备的数据处理方法。The embodiments of the present application relate to the field of terminal technology, and in particular, to an electronic device and a data processing method for the electronic device.
背景技术Background technique
随着智能家居技术的发展,用户可以通过设备上的家居应用程序(HomeKit app)控制家里所有支持HomeKit协议的设备,这些设备包括灯、锁、恒温器、智能插头等设备。With the development of smart home technology, users can control all HomeKit-supported devices in their home, including lights, locks, thermostats, smart plugs and other devices, through the HomeKit app on the device.
搭载了HomeKit协议的电子设备同样可以被HomeKit app发现并控制。以电子设备A为被HomeKit app发现并建立连接后,用户可以通过HomeKit app控制电子设备A为例,HomeKit app不仅可以控制电子设备A,还可以控制与电子设备连接的电子设备B,甚至还可以控制与电子设备B连接的电子设备C。如此,用户可以通过HomeKit app控制多台电子设备,这给用户使用提供了极大的便利。Electronic devices equipped with the HomeKit protocol can also be discovered and controlled by the HomeKit app. For example, after electronic device A is discovered and connected by the HomeKit app, the user can control electronic device A through the HomeKit app. The HomeKit app can not only control electronic device A, but also control electronic device B connected to the electronic device, and even control electronic device C connected to electronic device B. In this way, users can control multiple electronic devices through the HomeKit app, which provides great convenience for users.
其中,根据HomeKit协议,HomeKit app作为控制端,HomeKit app上显示的被控制设备的设备列表,是在HomeKit app与电子设备A进行连接后初始化时获取到的。然而,设备列表一旦初始化完成,就不能再向设备列表中增加后来与电子设备A建立连接的其他设备了。也就是说,HomeKit app与电子设备A进行连接并初始化之后,无法实现动态更新HomeKit app上显示的设备列表。Among them, according to the HomeKit protocol, HomeKit app is the control end, and the device list of controlled devices displayed on HomeKit app is obtained when HomeKit app is initialized after connecting with electronic device A. However, once the device list is initialized, other devices that are later connected to electronic device A cannot be added to the device list. In other words, after HomeKit app connects with electronic device A and initializes, it is impossible to dynamically update the device list displayed on HomeKit app.
发明内容Summary of the invention
第一方面,根据本申请实施例了一种电子设备,包括:通信器,被配置为:在基于HomeKit协议与HomeKit客户端建立连接之后,接收该HomeKit客户端发送的设备列表获取请求,该设备列表获取请求用于指示获取与该电子设备连接的各个目标设备的设备信息,该设备信息包括设备的标识;处理器,被配置为:基于该设备列表获取请求,确定该电子设备的设备信息和该各个目标设备的设备信息,该设备信息包括对应的设备的标识;基于该电子设备的设备信息、该各个目标设备的设备信息和至少一个设备占位符生成目标信息,每个设备占位符用于指示一个待接入的未知设备,该每个设备占位符对应的设备信息为空;该通信器,还被配置为:向该HomeKit客户端发送该目标信息,以使该HomeKit客户端基于该目标信息显示设备列表,该设备列表包括该电子设备的标识和该各个目标设备的标识。In a first aspect, according to an embodiment of the present application, an electronic device includes: a communicator, configured to: after establishing a connection with a HomeKit client based on a HomeKit protocol, receive a device list acquisition request sent by the HomeKit client, the device list acquisition request being used to indicate acquisition of device information of each target device connected to the electronic device, the device information including an identification of the device; a processor, configured to: based on the device list acquisition request, determine the device information of the electronic device and the device information of each target device, the device information including an identification of the corresponding device; generate target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder being empty; the communicator is further configured to: send the target information to the HomeKit client so that the HomeKit client displays a device list based on the target information, the device list including the identification of the electronic device and the identification of each target device.
第二方面,根据本申请实施例了一种数据处理方法,应用于电子设备,包括:在基于HomeKit协议与HomeKit客户端建立连接之后,接收该HomeKit客户端发送的设备列表获取请求,该设备列表获取请求用于指示获取与该电子设备连接的各个目标设备的设备信息,该设备信息包括设备的标识;基于该设备列表获取请求,确定该电子设备的设备信息和该各个目标设备的设备信息,该设备信息包括对应的设备的标识;基于该电子设备的设备信息、该各个目标设备的设备信息和至少一个设备占位符生成目标信息,每个设备占位符用于指示一个待接入的未知设备,该每个设备占位符对应的设备信息为空;向该HomeKit客户端发送该目标信息,以使该HomeKit客户端基于该目标信息显示设备列表,该设备列表包括该电子设备的标识和该各个目标设备的标识。In a second aspect, according to an embodiment of the present application, a data processing method is applied to an electronic device, comprising: after establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request sent by the HomeKit client, the device list acquisition request is used to indicate the acquisition of device information of each target device connected to the electronic device, the device information including an identification of the device; based on the device list acquisition request, determining the device information of the electronic device and the device information of each target device, the device information including an identification of the corresponding device; generating target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty; sending the target information to the HomeKit client so that the HomeKit client displays a device list based on the target information, the device list including the identification of the electronic device and the identification of each target device.
第三方面,根据本申请实施例了一种计算机可读非易失性存储介质,包括:计算机可读存储介质上存储计算机程序,计算机程序被处理器执行时实现如第二方面所示的设备列 表获取方法。In a third aspect, according to an embodiment of the present application, a computer-readable non-volatile storage medium is provided, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the device list shown in the second aspect is implemented. Table acquisition method.
第四方面,根据本申请实施例了一种计算机程序产品,包括:当计算机程序产品在计算机上运行时,使得计算机实现如第二方面所示的设备列表获取方法。In a fourth aspect, according to an embodiment of the present application, a computer program product is provided, including: when the computer program product is run on a computer, the computer implements the device list acquisition method shown in the second aspect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为根据一些实施例的控制设备与电子设备之间操作场景之一;FIG1 is one of the operation scenarios between a control device and an electronic device according to some embodiments;
图2为根据一些实施例的电子设备200的硬件配置框图;FIG2 is a block diagram of a hardware configuration of an electronic device 200 according to some embodiments;
图3为根据一些实施例的控制设备与电子设备之间操作场景之二;FIG3 is a second operation scenario between a control device and an electronic device according to some embodiments;
图4为根据一些实施例的控制设备与电子设备之间操作场景之三;FIG4 is a third operation scenario between a control device and an electronic device according to some embodiments;
图5为根据一些实施例的设备列表获取方法的流程示意图之一;FIG5 is a flowchart of a method for obtaining a device list according to some embodiments;
图6为根据一些实施例的设备列表获取方法的流程示意图之二;FIG6 is a second flow chart of a method for acquiring a device list according to some embodiments;
图7为根据一些实施例的设备列表获取方法的流程示意图之三;FIG7 is a third flow chart of a method for acquiring a device list according to some embodiments;
图8为根据一些实施例的手机与电视之间的结构框图;FIG8 is a block diagram of a structure between a mobile phone and a television according to some embodiments;
图9为根据一些实施例的设备列表获取方法的流程示意图之四;FIG9 is a fourth flow chart of a method for acquiring a device list according to some embodiments;
图10为根据一些实施例的设备列表获取方法的流程示意图之五;FIG10 is a fifth flow chart of a method for obtaining a device list according to some embodiments;
图11为根据一些实施例的显示设备与控制设备之间操作场景;FIG11 is an operation scenario between a display device and a control device according to some embodiments;
图12为根据一些实施例的控制装置001的硬件配置框图;FIG12 is a block diagram of a hardware configuration of a control device 001 according to some embodiments;
图13为根据一些实施例的投屏连接界面示意图之一;FIG13 is a schematic diagram of a screen projection connection interface according to some embodiments;
图14为根据一些实施例的投屏连接界面示意图之二;FIG14 is a second schematic diagram of a screen projection connection interface according to some embodiments;
图15为根据一些实施例的投屏处理方法的流程示意图之一;FIG15 is a flowchart of a screen projection processing method according to some embodiments;
图16为根据一些实施例的投屏数据流程示意图之一;FIG16 is a schematic diagram of a screen projection data flow according to some embodiments;
图17为根据一些实施例的投屏数据流程示意图之一;FIG17 is a schematic diagram of a screen projection data flow according to some embodiments;
图18为根据一些实施例的投屏处理方法的流程示意图之二;FIG18 is a second flow chart of a screen projection processing method according to some embodiments;
图19为根据一些实施例的投屏处理方法的流程示意图之三;FIG19 is a third flowchart of a screen projection processing method according to some embodiments;
图20为根据一些实施例的投屏处理方法的流程示意图之四;FIG20 is a fourth flowchart of a screen projection processing method according to some embodiments;
图21为根据一些实施例的投屏处理方法的流程示意图之五;FIG21 is a fifth flowchart of a screen projection processing method according to some embodiments;
图22为根据一些实施例的投屏处理方法的流程示意图之六;FIG22 is a sixth flowchart of a screen projection processing method according to some embodiments;
图23为根据一些实施例的显示设备中软件配置示意图;FIG23 is a schematic diagram of software configuration in a display device according to some embodiments;
图24为根据一些实施例的显示设备中应用程序的图标控件界面显示示意图;FIG24 is a schematic diagram showing an icon control interface of an application in a display device according to some embodiments;
图25为根据一些实施例的进行投屏处理的系统框架图;FIG25 is a system framework diagram for performing screen projection processing according to some embodiments;
图26为根据一些实施例的一种投屏处理方法的流程示意图;FIG26 is a schematic diagram of a flow chart of a screen projection processing method according to some embodiments;
图27为根据一些实施例的当显示设备当前的播放状态处于目标模式时,显示器的界面示意图;FIG27 is a schematic diagram of an interface of a display when the current playback state of the display device is in a target mode according to some embodiments;
图28为根据一些实施例的显示器的显示开关处于打开状态,且显示器显示非音频数据时,显示器的界面示意图;FIG28 is a schematic diagram of an interface of a display when a display switch of the display is in an on state and the display displays non-audio data according to some embodiments;
图29为根据一些实施例的另一种投屏处理方法的流程示意图;FIG29 is a flowchart of another screen projection processing method according to some embodiments;
图30为根据一些实施例的一种显示器显示提示信息时的界面示意图;FIG30 is a schematic diagram of an interface when a display displays prompt information according to some embodiments;
图31为根据一些实施例的一种显示设备进入输入页面时,显示器的界面示意图;FIG31 is a schematic diagram of an interface of a display when a display device enters an input page according to some embodiments;
图32为根据一些实施例的一种显示设备的投屏流程的示意图;FIG32 is a schematic diagram of a screen projection process of a display device according to some embodiments;
图33为根据一些实施例的一种投屏处理方法的总体流程示意图。Figure 33 is a schematic diagram of the overall process of a screen projection processing method according to some embodiments.
具体实施方式Detailed ways
为使本申请的目的和实施方式更加清楚,下面将结合本申请示例性实施例中的附图,对本申请示例性实施方式进行清楚、完整地描述,显然,描述的示例性实施例仅是本申请一部分实施例,而不是全部的实施例。In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
需要说明的是,本申请中对于术语的简要说明,仅是为了方便理解接下来描述的实施方式,而不是意图限定本申请的实施方式。除非另有说明,这些术语应当按照其普通和通 常的含义理解。It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be used in their ordinary and common Normal understanding of the meaning.
本申请实施方式提供的电子设备可以具有多种实施形式,例如,可以是电视、智能电视、激光投影设备、显示器(monitor)、电子白板(electronic bulletin board)、电子桌面(electronic table)、手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备等。The electronic device provided in the embodiments of the present application can have various implementation forms, for example, it can be a television, a smart TV, a laser projection device, a display (monitor), an electronic whiteboard (electronic bulletin board), an electronic desktop (electronic table), a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, etc.
图1为根据实施例中控制设备与电子设备之间操作场景的示意图,其中控制设备100中安装有HomeKit app,电子设备200支持HomeKit协议,因此,在控制设备100通过HomeKit app与电子设备200建立连接之后,用户可以通过控制设备100中安装的HomeKit app控制支持HomeKit协议的电子设备200、以及与电子设备200直接连接或间接连接的其他设备。Figure 1 is a schematic diagram of the operation scenario between the control device and the electronic device according to the embodiment, wherein the HomeKit app is installed in the control device 100, and the electronic device 200 supports the HomeKit protocol. Therefore, after the control device 100 establishes a connection with the electronic device 200 through the HomeKit app, the user can control the electronic device 200 that supports the HomeKit protocol and other devices directly or indirectly connected to the electronic device 200 through the HomeKit app installed in the control device 100.
在一些实施例中,控制设备100可以是安装有HomeKit app的且具有iOS操作系统的iOS设备,例如iPhone、iPad等手持设备,也可以为安装有HomeKit app的且具有其他操作系统的设备。控制设备100可以与电子设备200连接同一个有线或无线网络之后,通过设备发现的方式建立连接。用户可以通过语音输入、控制面板输入、手势输入等输入用户指令,来控制设备100。In some embodiments, the control device 100 may be an iOS device with an iOS operating system installed with the HomeKit app, such as a handheld device such as an iPhone or iPad, or a device with other operating systems installed with the HomeKit app. The control device 100 may establish a connection with the electronic device 200 by means of device discovery after connecting to the same wired or wireless network. The user may input user commands through voice input, control panel input, gesture input, etc. to control the device 100.
如图2,电子设备200包括调谐解调器210、通信器220、检测器230、外部装置接口240、处理器250、显示器260、音频输出接口270、用户接口280、外部存储器、供电电源中的至少一种。As shown in FIG2 , the electronic device 200 includes at least one of a tuner 210 , a communicator 220 , a detector 230 , an external device interface 240 , a processor 250 , a display 260 , an audio output interface 270 , a user interface 280 , an external memory, and a power supply.
在一些实施例中处理器包括处理器,视频处理器,音频处理器,图形处理器,RAM,ROM,用于输入/输出的第一接口至第n接口。In some embodiments, the processor includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input/output.
显示器260包括用于呈现画面的显示屏组件,以及驱动图像显示的驱动组件,用于接收源自处理器输出的图像信号,进行显示视频内容、图像内容以及菜单操控界面的组件以及用户操控UI界面。The display 260 includes a display screen component for presenting images, and a driving component for driving image display, a component for receiving image signals output from a processor, and a component for displaying video content, image content, and a menu control interface and a user control UI interface.
显示器260可为液晶显示器、OLED显示器、以及投影显示器,还可以为一种投影装置和投影屏幕。The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
通信器220是用于根据各种通信协议类型与外部设备或服务器进行通信的组件。例如:通信器可以包括Wifi模块,蓝牙模块,有线以太网模块等其他网络通信协议芯片或近场通信协议芯片,以及红外接收器中的至少一种。电子设备200可以通过通信器220与外部控制设备100或服务器400建立控制信号和数据信号的发送和接收。The communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The electronic device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
用户接口280,可用于接收控制设备100(如:红外遥控器等)的控制信号。也可以用于直接接收用户的输入操作指令,且将操作指令转换为电子设备200可识别和响应的指令,此时可以称为用户输入接口。The user interface 280 can be used to receive control signals from the control device 100 (such as an infrared remote controller, etc.). It can also be used to directly receive user input operation instructions and convert the operation instructions into instructions that the electronic device 200 can recognize and respond to. In this case, it can be called a user input interface.
检测器230用于采集外部环境或与外部交互的信号。例如,检测器230包括光接收器,用于采集环境光线强度的传感器;或者,检测器230包括图像采集器,如摄像头,可以用于采集外部环境场景、用户的属性或用户交互手势,再或者,检测器230包括声音采集器,如麦克风等,用于接收外部声音。The detector 230 is used to collect signals from the external environment or the external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
外部装置接口240可以包括但不限于如下:高清多媒体接口(HDMI)、模拟或数据高清分量输入接口(分量)、复合视频输入接口(CVBS)、USB输入接口(USB)、RGB端口等任一个或多个接口。也可以是上述多个接口形成的复合性的输入/输出接口。The external device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input/output interface formed by the above multiple interfaces.
调谐解调器210通过有线或无线接收方式接收广播电视信号,以及从多个无线或有线广播电视信号中解调出音视频信号,如以及EPG数据信号。The tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
在一些实施例中,处理器250和调谐解调器210可以位于不同的分体设备中,即调谐解调器210也可在处理器250所在的主体设备的外置设备中,如外置机顶盒等。In some embodiments, the processor 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the processor 250 is located, such as an external set-top box.
处理器250,通过存储在存储器(内部存储器或外部存储器)上中各种软件控制程序,来控制电子设备的工作和响应用户的操作。处理器250控制电子设备200的整体操作。例如:响应于接收到用于选择在显示器260上显示UI对象的用户命令,处理器250便可以执行与由用户命令选择的对象有关的操作。 The processor 250 controls the operation of the electronic device and responds to the user's operation through various software control programs stored in the memory (internal memory or external memory). The processor 250 controls the overall operation of the electronic device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the processor 250 can perform an operation related to the object selected by the user command.
在一些实施例中处理器包括中央处理器(Central Processing Unit,CPU),视频处理器,音频处理器,图形处理器(Graphics Processing Unit,GPU),以及随机存取存储器(Random Access Memory,RAM),只读存储器(Read-Only Memory,ROM),用于输入/输出的第一接口至第n接口,通信总线(Bus)等中的至少一种。In some embodiments, the processor includes a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), and at least one of a random access memory (RAM), a read-only memory (ROM), a first interface to an nth interface for input/output, a communication bus (Bus), etc.
其中,RAM也叫主存,是与处理器直接交换数据的内部存储器。它可以随时读写(刷新时除外),而且速度很快,通常作为操作系统或其他正在运行中的程序的临时数据存储介质。它与ROM的最大区别是数据的易失性,即一旦断电所存储的数据将随之丢失。RAM在计算机和数字系统中用来暂时存储程序、数据和中间结果。ROM以非破坏性读出方式工作,只能读出无法写入信息。信息一旦写入后就固定下来,即使切断电源,信息也不会丢失,所以又称为固定存储器。Among them, RAM, also called main memory, is an internal memory that directly exchanges data with the processor. It can be read and written at any time (except when refreshed), and the speed is very fast. It is usually used as a temporary data storage medium for operating systems or other running programs. The biggest difference between it and ROM is the volatility of data, that is, once the power is cut off, the stored data will be lost. RAM is used in computers and digital systems to temporarily store programs, data and intermediate results. ROM works in a non-destructive read-out mode and can only read but not write information. Once the information is written, it is fixed, and even if the power is cut off, the information will not be lost, so it is also called fixed memory.
用户可在显示器260上显示的图形用户界面(GUI)输入用户命令,则用户输入接口通过图形用户界面(GUI)接收用户输入命令。或者,用户可通过输入特定的声音或手势进行输入用户命令,则用户输入接口通过传感器识别出声音或手势,来接收用户输入命令。The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
随着智能家居技术的发展,用户可以通过iOS设备上的家居应用程序(HomeKit app)控制家里所有支持HomeKit协议的设备,这些设备包括灯、锁、恒温器、智能插头等设备。With the development of smart home technology, users can control all HomeKit-supported devices in their home, including lights, locks, thermostats, smart plugs and other devices, through the HomeKit app on iOS devices.
搭载了HomeKit协议的电子设备同样可以被iOS设备端的HomeKit app发现并控制。以电子设备A为被HomeKit app发现并建立连接后,用户可以通过iOS设备端的HomeKit app控制电子设备A为例,HomeKit app不仅可以控制电子设备A,还可以控制与电子设备连接的电子设备B,甚至还可以控制与电子设备B连接的电子设备C。如此,用户可以通过iOS设备上的HomeKit app控制多台电子设备,这给用户使用提供了极大的便利。Electronic devices equipped with the HomeKit protocol can also be discovered and controlled by the HomeKit app on iOS devices. For example, after electronic device A is discovered and connected by the HomeKit app, the user can control electronic device A through the HomeKit app on the iOS device. The HomeKit app can not only control electronic device A, but also control electronic device B connected to the electronic device, and even control electronic device C connected to electronic device B. In this way, users can control multiple electronic devices through the HomeKit app on iOS devices, which provides great convenience for users.
其中,根据HomeKit协议,iOS设备端作为控制端,iOS设备上显示的被控制设备的设备列表,是在iOS设备与电子设备A进行连接后初始化时获取到的。然而,设备列表一旦初始化完成,就不能再向设备列表中增加后来与电子设备A进行直接连接或间接连接的其他设备了。也就是说,iOS设备与电子设备A进行连接并初始化之后,无法实现动态更新iOS设备上显示的设备列表。Among them, according to the HomeKit protocol, the iOS device side is the control side, and the device list of controlled devices displayed on the iOS device is obtained when the iOS device is initialized after connecting with electronic device A. However, once the device list is initialized, other devices that are later directly or indirectly connected to electronic device A cannot be added to the device list. In other words, after the iOS device is connected to electronic device A and initialized, it is impossible to dynamically update the device list displayed on the iOS device.
为了解决上述技术问题,根据本申请实施例了一种设备列表获取方法,具体为基于HomeKit协议,通过预置设备占位符来动态更新设备列表的方法,具体为在基于HomeKit协议与HomeKit客户端建立连接之后,接收该HomeKit客户端发送的设备列表获取请求,该设备列表获取请求用于指示获取与该电子设备连接的各个目标设备的设备信息,该设备信息包括设备的标识;基于该设备列表获取请求,确定该电子设备的设备信息和该各个目标设备的设备信息,该设备信息包括对应的设备的标识;基于该电子设备的设备信息、该各个目标设备的设备信息和至少一个设备占位符生成目标信息,每个设备占位符用于指示一个待接入的未知设备,该每个设备占位符对应的设备信息为空;向该HomeKit客户端发送该目标信息,以使该HomeKit客户端基于该目标信息显示设备列表,该设备列表包括该电子设备的标识和该各个目标设备的标识。如此,通过在目标信息中增加设备占位符,由于每个设备占位符用于指示一个待接入的未知设备,每个设备占位符对应的设备信息为空,则不但不会因为HomeKit客户端基于目标信息生成的设备列表包括一些未接入的设备的标识误导用户,而且在设备列表中为待接入的未知设备预留了位置,因此,后续当其他设备与电子设备建立连接时,可以用该其他设备的设备信息更新目标信息中的一个设备占位符,以实现更新目标信息,进而HomeKit客户端基于更新后的目标信息更新设备列表,以实现动态更新HomeKit客户端上显示的设备列表。In order to solve the above technical problems, according to an embodiment of the present application, a method for obtaining a device list is provided, specifically a method for dynamically updating a device list by presetting device placeholders based on the HomeKit protocol, specifically, after establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request sent by the HomeKit client, the device list acquisition request being used to indicate obtaining device information of each target device connected to the electronic device, the device information including a device identifier; based on the device list acquisition request, determining the device information of the electronic device and the device information of each target device, the device information including a corresponding device identifier; generating target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder being used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder being empty; sending the target information to the HomeKit client so that the HomeKit client displays a device list based on the target information, the device list including the identifier of the electronic device and the identifier of each target device. In this way, by adding device placeholders in the target information, since each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the user not be misled because the device list generated by the HomeKit client based on the target information includes the identifiers of some devices that have not been connected, but a position is reserved in the device list for the unknown devices to be connected. Therefore, when other devices subsequently establish a connection with the electronic device, a device placeholder in the target information can be updated with the device information of the other device to update the target information, and then the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.
根据本申请实施例了一种电子设备及设备列表获取方法,其中,电子设备可以实现根据本申请实施例的设备列表获取方法或者电子设备中的功能模块或功能实体可以实现根据本申请实施例的设备列表获取方法。该电子设备包括:通信器和处理器,分别对应上述图2中的通信器220和处理器250。HomeKit客户端可以为图中的控制设备100,也可以为控制设备100中安装的HomeKit app,具体可以根据实际情况确定。 According to an embodiment of the present application, an electronic device and a device list acquisition method are provided, wherein the electronic device can implement the device list acquisition method according to the embodiment of the present application or the functional module or functional entity in the electronic device can implement the device list acquisition method according to the embodiment of the present application. The electronic device includes: a communicator and a processor, which correspond to the communicator 220 and the processor 250 in Figure 2 above, respectively. The HomeKit client can be the control device 100 in the figure, or it can be the HomeKit app installed in the control device 100, which can be determined according to actual conditions.
在一些实施例中,为了实现HomeKit客户端可以动态更新通过电子设备控制的设备的设备列表,通信器在基于HomeKit协议与HomeKit客户端建立连接之后,接收该HomeKit客户端发送的用于指示获取与该电子设备连接的各个目标设备的设备信息(设备信息包括设备的标识)的设备列表获取请求;处理器基于该设备列表获取请求,确定该电子设备的设备信息和该各个目标设备的设备信息,该设备信息包括对应的设备的标识;然后基于该电子设备的设备信息、该各个目标设备的设备信息和至少一个设备占位符生成目标信息;该通信器向该HomeKit客户端发送该目标信息,以使该HomeKit客户端基于该目标信息显示设备列表,该设备列表包括该电子设备的标识和该各个目标设备的标识。本申请实施例中,通过在目标信息中增加设备占位符,由于每个设备占位符用于指示一个待接入的未知设备,每个设备占位符对应的设备信息为空,则不但不会因为HomeKit客户端基于目标信息生成的设备列表包括一些未接入的设备的标识误导用户,而且在设备列表中为待接入的未知设备预留了位置,因此,后续当其他设备与电子设备建立连接时,可以用该其他设备的设备信息更新目标信息中的一个设备占位符,以实现更新目标信息,进而HomeKit客户端基于更新后的目标信息更新设备列表,以实现动态更新HomeKit客户端上显示的设备列表。In some embodiments, in order to enable the HomeKit client to dynamically update the device list of devices controlled by the electronic device, after establishing a connection with the HomeKit client based on the HomeKit protocol, the communicator receives a device list acquisition request sent by the HomeKit client to instruct the acquisition of device information (the device information includes the identification of the device) of each target device connected to the electronic device; the processor determines the device information of the electronic device and the device information of each target device based on the device list acquisition request, and the device information includes the identification of the corresponding device; then generates target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder; the communicator sends the target information to the HomeKit client, so that the HomeKit client displays the device list based on the target information, and the device list includes the identification of the electronic device and the identification of each target device. In an embodiment of the present application, by adding device placeholders to the target information, since each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the user not be misled because the device list generated by the HomeKit client based on the target information includes the identification of some unconnected devices, but also a position is reserved in the device list for the unknown devices to be connected. Therefore, when other devices subsequently establish a connection with the electronic device, a device placeholder in the target information can be updated with the device information of the other device to update the target information, and then the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.
其中,每个设备占位符用于指示一个待接入的未知设备,可以理解为每个设备占位符对应目标信息中为一个待接入设备的设备信息预留的位置,如此,在HomeKit客户端基于目标信息生成的设备列表中就为待接入设备预留了位置。待接入设备可以为任意与电子设备进行直接连接或间接连接的设备。Each device placeholder is used to indicate an unknown device to be connected. It can be understood that each device placeholder corresponds to a position reserved for the device information of a device to be connected in the target information. In this way, a position is reserved for the device to be connected in the device list generated by the HomeKit client based on the target information. The device to be connected can be any device that is directly or indirectly connected to the electronic device.
其中,HomeKit客户端设备用来发现电子设备并控制电子设备以及与电子设备连接(直接连接或间接连接)的各个其他设备。在HomeKit客户端与电子设备连接同一个有线或无线网络后,HomeKit客户端进行设备发现,当HomeKit客户端发现电子设备之后,与电子设备建立连接,具体过程可以参考现有相关技术,此处不再赘述。Among them, the HomeKit client device is used to discover and control electronic devices and various other devices connected to the electronic devices (directly or indirectly). After the HomeKit client and the electronic device are connected to the same wired or wireless network, the HomeKit client performs device discovery. After the HomeKit client discovers the electronic device, it establishes a connection with the electronic device. The specific process can refer to the existing related technology and will not be repeated here.
其中,HomeKit客户端与电子设备建立连接之后,向电子设备发送设备列表获取请求,然后接收电子设备发送的目标信息。HomeKit客户端基于目标信息生成设备列表,具体为,基于目标信息中电子设备的标识、各个目标设备的标识生成设备列表,由于设备占位符对应的设备信息为空,因此设备列表中不包括各个设备占位符指示的待接入的未知设备的标识。也可以说,HomeKit客户端将目标信息中设备信息不为空的设备的标识显示在设备列表中,忽略目标信息中设备信息为空的设备占位符,不在设备列表中显示。Among them, after the HomeKit client establishes a connection with the electronic device, it sends a device list acquisition request to the electronic device, and then receives the target information sent by the electronic device. The HomeKit client generates a device list based on the target information, specifically, based on the identifier of the electronic device in the target information and the identifier of each target device. Since the device information corresponding to the device placeholder is empty, the device list does not include the identifier of the unknown device to be connected indicated by each device placeholder. In other words, the HomeKit client displays the identifier of the device whose device information in the target information is not empty in the device list, ignores the device placeholder whose device information in the target information is empty, and does not display it in the device list.
其中,电子设备与设备A直接连接指电子设备与设备A直接进行有线或无线连接,不通过其他设备进行连接。电子设备与设备B间接连接指电子设备通过设备C与设备B进行连接,也可以理解为电子设备与该设备C进行直接连接,该设备C与设备B进行直接连接。其中,设备A和设备C可以称为电子设备的固有连接,设备B可以称为电子设备的扩展连接。Among them, the direct connection between the electronic device and the device A means that the electronic device and the device A are directly connected by wire or wirelessly, without being connected through other devices. The indirect connection between the electronic device and the device B means that the electronic device is connected to the device B through the device C, which can also be understood as the electronic device is directly connected to the device C, and the device C is directly connected to the device B. Among them, the device A and the device C can be called the inherent connection of the electronic device, and the device B can be called the extended connection of the electronic device.
在一些实施例中,在电子设备检测到与其他设备建立连接(直接连接或间接连接)时,可以动态将该其他设备的标识更新到设备列表中,以使HomeKit客户端可以控制该新接入的其他设备。In some embodiments, when the electronic device detects that a connection (direct connection or indirect connection) is established with another device, the identifier of the other device can be dynamically updated to the device list so that the HomeKit client can control the newly connected other device.
在一些实施例中,该处理器在向该HomeKit客户端发送该目标信息之后,检测到第一设备与该电子设备建立连接;然后将该目标信息中的一个该设备占位符更新为第一设备的设备信息,以更新该目标信息;该通信器向该HomeKit客户端发送该更新后的目标信息,以使该HomeKit客户端基于该更新后的目标信息更新该设备列表,更新后的该设备列表包括该电子设备的标识、该各个目标设备的标识和第一设备的标识。In some embodiments, after sending the target information to the HomeKit client, the processor detects that the first device has established a connection with the electronic device; then updates a device placeholder in the target information to the device information of the first device to update the target information; the communicator sends the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, and the updated device list includes the identifier of the electronic device, the identifiers of each target device, and the identifier of the first device.
本申请实施例中,当第一设备与电子设备建立连接时,用第一设备的设备信息替换目标信息中的一个设备占位符,以得到更新后的目标信息,然后将更新后的目标信息发送给将HomeKit客户端,以使HomeKit客户端基于更新后的目标信息中的第一设备的信息,将第一设备的标识添加至设备列表,从而实现当有新设备接入电子设备之后动态更新 HomeKit客户端显示的设备列表,该过程中无需电子设备与HomeKit客户端断开连接,再重新进行连接,而是在电子设备与HomeKit客户端保持连接的情况下,实现HomeKit客户端显示的设备列表的动态更新。In the embodiment of the present application, when the first device establishes a connection with the electronic device, a device placeholder in the target information is replaced with the device information of the first device to obtain updated target information, and then the updated target information is sent to the HomeKit client, so that the HomeKit client adds the identifier of the first device to the device list based on the information of the first device in the updated target information, thereby realizing dynamic update when a new device is connected to the electronic device. The device list displayed by the HomeKit client does not require the electronic device to disconnect from the HomeKit client and then reconnect. Instead, the device list displayed by the HomeKit client is dynamically updated while the electronic device and the HomeKit client remain connected.
本申请实施例中,在电子设备检测到与一个目标设备断开连接(直接连接或间接连接)时,可以动态将该目标设备的标识从设备列表中删除,以避免用户再通过HomeKit客户端控制该断开连接的目标设备。In an embodiment of the present application, when an electronic device detects that it is disconnected from a target device (directly or indirectly), the identifier of the target device can be dynamically deleted from the device list to prevent the user from controlling the disconnected target device through the HomeKit client.
在一些实施例中,该处理器在向该HomeKit客户端发送该目标信息之后,检测到第二设备与该电子设备断开连接,第二设备为该各个目标设备中的任一个;然后将该目标信息中的第二设备的设备信息更新为一个该设备占位符,以更新该目标信息;然后该通信器向该HomeKit客户端发送该更新后的目标信息,以使该HomeKit客户端基于该更新后的目标信息更新该设备列表,更新后的该设备列表包括该电子设备的标识和该各个目标设备中除第二设备之外的各个设备的标识。In some embodiments, after sending the target information to the HomeKit client, the processor detects that a second device is disconnected from the electronic device, the second device being any one of the target devices; then the device information of the second device in the target information is updated to a placeholder for the device to update the target information; then the communicator sends the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information, the updated device list including the identifier of the electronic device and the identifiers of each device among the target devices except the second device.
在一些实施例中,该处理器在向该HomeKit客户端发送该目标信息之后,检测到第二设备与该电子设备断开连接,第二设备为该各个目标设备中的任一个;然后将第二设备的设备信息从该目标信息中删除,以更新该目标信息;然后该通信器向该HomeKit客户端发送该更新后的目标信息,以使该HomeKit客户端基于该更新后的目标信息更新该设备列表,更新后的该设备列表包括该电子设备的标识和该各个目标设备中除第二设备之外的各个设备的标识。In some embodiments, after sending the target information to the HomeKit client, the processor detects that a second device is disconnected from the electronic device, the second device being any one of the target devices; then the device information of the second device is deleted from the target information to update the target information; then the communicator sends the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information, the updated device list including the identifier of the electronic device and the identifiers of each device among the target devices except the second device.
本申请实施例中,当第二设备与电子设备断开连接时,可以用一个设备占位符替换目标信息中的第二设备的设备信息,也可以将第二设备的设备信息从目标信息中删除,以得到更新后的目标信息,然后将更新后的目标信息发送给将HomeKit客户端,以使HomeKit客户端基于更新后的不包括第二设备的设备信息的目标信息,将第二设备的标识从设备列表中删除,从而实现当有已接入的设备与电子设备端来连接之后,动态更新HomeKit客户端显示的设备列表,该过程中无需电子设备与HomeKit客户端断开连接,再重新进行连接,而是在电子设备与HomeKit客户端保持连接的情况下,实现HomeKit客户端显示的设备列表的动态更新。In an embodiment of the present application, when the second device is disconnected from the electronic device, the device information of the second device in the target information can be replaced by a device placeholder, or the device information of the second device can be deleted from the target information to obtain updated target information, and then the updated target information is sent to the HomeKit client, so that the HomeKit client deletes the identifier of the second device from the device list based on the updated target information that does not include the device information of the second device, thereby dynamically updating the device list displayed by the HomeKit client after an already connected device connects to the electronic device. In this process, there is no need for the electronic device to disconnect from the HomeKit client and then reconnect, but the dynamic update of the device list displayed by the HomeKit client is achieved while the electronic device remains connected to the HomeKit client.
本申请实施例中,不限定该各个目标设备中与电子设备直接连接的设备的数量,也不限定与电子设备间接连接的设备的数量,具体可以根据实际情况确定,此处不做限定。In the embodiment of the present application, the number of devices directly connected to the electronic device in each target device is not limited, nor is the number of devices indirectly connected to the electronic device. The specific number can be determined based on actual conditions and is not limited here.
在一些实施例中,该各个目标设备包括:至少一个第三设备,每个第三设备与该电子设备直接连接。即每个目标设备为一个第三设备,每个目标设备均为与电子设备直接连接的设备。In some embodiments, each target device includes: at least one third device, each third device is directly connected to the electronic device, that is, each target device is a third device, each target device is a device directly connected to the electronic device.
在一些实施例中,如图3所示,以HomeKit客户端为安装有HomeKit app的手机301,电子设备为支持HomeKit协议的电视201,至少一个第三设备为3个第三设备,每个第三设备为通过HDMI接口与电视进行直接连接的HDMI设备302。In some embodiments, as shown in Figure 3, the HomeKit client is a mobile phone 301 with the HomeKit app installed, the electronic device is a TV 201 that supports the HomeKit protocol, and the at least one third device is three third devices, each of which is an HDMI device 302 directly connected to the TV via an HDMI interface.
在一些实施例中,该各个目标设备包括:至少一个第三设备和至少一个第四设备;其中,每个第三设备与该电子设备直接连接,每个第四设备通过对应的第三设备与该电子设备连接。即一个目标设备为一个第三设备或为一个第四设备。该至少一个第四设备可以通过同一个第三设备与电子设备连接,也可以通过不同的第三设备与电子设备连接,具体可以根据实际情况确定。In some embodiments, each target device includes: at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device. That is, a target device is a third device or a fourth device. The at least one fourth device can be connected to the electronic device through the same third device or through different third devices, which can be determined according to actual conditions.
在一些实施例中,如图4所示,以HomeKit客户端为安装有HomeKit app的手机301,电子设备为支持HomeKit协议的电视302,至少一个第三设备为2个第三设备,至少一个第四设备为2个第四设备,每个第三设备为通过HDMI接口与电视进行直接连接的HDMI设备303,每个第四设备为通过HDMI接口与一个第三设备直接连接的HDMI设备304。In some embodiments, as shown in FIG. 4 , the HomeKit client is a mobile phone 301 with the HomeKit app installed, the electronic device is a TV 302 that supports the HomeKit protocol, the at least one third device is two third devices, the at least one fourth device is two fourth devices, each third device is an HDMI device 303 directly connected to the TV via an HDMI interface, and each fourth device is an HDMI device 304 directly connected to a third device via an HDMI interface.
本申请实施例中,不限定与电子设备直接连接的目标设备和电子设备的连接方式,也不限定与电子设备间接连接的目标设备和电子设备的连接方式,可以是有线接口连接,如高清晰度多媒体接口(High Definition Multimedia Interface,HDMI)连接、USB接口连接 等,也可以是无线连接,如蓝牙连接、WiFi连接等,具体可以根据实际情况确定。In the embodiments of the present application, the connection method between the target device directly connected to the electronic device and the electronic device is not limited, nor is the connection method between the target device indirectly connected to the electronic device and the electronic device limited. It can be a wired interface connection, such as a High Definition Multimedia Interface (HDMI) connection, a USB interface connection, or a USB interface connection. It can also be a wireless connection, such as a Bluetooth connection, a WiFi connection, etc. The specific connection can be determined according to actual conditions.
在一些实施例中,该电子设备通过HDMI接口与该每个第三设备连接;在该各个目标设备包括该至少一个第四设备的情况下,该每个第三设备通过HDMI接口与该对应的第三设备连接。In some embodiments, the electronic device is connected to each of the third devices via an HDMI interface; when each of the target devices includes the at least one fourth device, each of the third devices is connected to the corresponding third device via the HDMI interface.
其中,HDMI接口是一种数字化视频/音频接口技术,是适合影像传输的专用型数字化接口,其可同时传送音频和影像信号,最高数据传输速度为2.25GB/s,同时无需在信号传送前进行数/模或者模/数转换。HDMI可搭配高带宽数字内容保护技术(High-bandwidth Digital Content Protection,HDCP),以防止具有著作权的影音内容遭到未经授权的复制。HDMI所具备的额外空间可应用在日后升级的音视频格式中。Among them, the HDMI interface is a digital video/audio interface technology and a dedicated digital interface suitable for image transmission. It can transmit audio and image signals at the same time, with a maximum data transmission speed of 2.25GB/s, and does not require digital/analog or analog/digital conversion before signal transmission. HDMI can be used with High-bandwidth Digital Content Protection (HDCP) to prevent unauthorized copying of copyrighted audio and video content. The extra space provided by HDMI can be used in future upgraded audio and video formats.
本申请实施例中,当电子设备、各个目标设备均为具有显示屏的设备时,当传输的数据是音视频数据时,通过HDMI接口进行连接,可以提高数据的传输效率,而且可以保护数据在传输过程中的安全性,而且可以支持日后升级的音视频格式。In the embodiment of the present application, when the electronic device and each target device are devices with display screens, and when the transmitted data is audio and video data, connecting through an HDMI interface can improve the data transmission efficiency, protect the security of the data during the transmission process, and support audio and video formats that will be upgraded in the future.
在一些实施例中,该设备信息还包括对应的设备的类型;该设备列表还包括该电子设备的类型和该各个目标设备的类型。In some embodiments, the device information also includes the type of the corresponding device; the device list also includes the type of the electronic device and the type of each target device.
在一些实施例中,在电子设备与HomeKit客户端连接并初始化时,设备列表包括电子设备的标识和类型,以及各个目标设备的标识和类型;在检测到电子设备与第一设备建立连接时,设备列表更新为包括电子设备的标识和类型,各个目标设备的标识和类型,以及第一设备的标识和类型;在检测到电子设备与第二设备断开连接时,设备列表更新为包括电子设备的标识和类型,以及各个目标设备中除第二设备之外的其他设备的标识和类型。In some embodiments, when the electronic device is connected to and initialized with the HomeKit client, the device list includes the identification and type of the electronic device, and the identification and type of each target device; when it is detected that the electronic device has established a connection with the first device, the device list is updated to include the identification and type of the electronic device, the identification and type of each target device, and the identification and type of the first device; when it is detected that the electronic device is disconnected from the second device, the device list is updated to include the identification and type of the electronic device, and the identification and type of each target device except the second device.
本申请实施例中,设备信息包括设备的类型,则设备列表中可以显示有设备的标识和类型,如此,可以便于用户根据HomeKit客户端显示的设备列表更好地了解各个设备的标识和类型,从而根据用户需求更好地控制各个设备。In an embodiment of the present application, the device information includes the type of device, and the device identifier and type may be displayed in the device list. This allows the user to better understand the identifier and type of each device based on the device list displayed by the HomeKit client, thereby better controlling each device according to user needs.
在一些实施例中,该各个目标设备的数量与该至少一个设备占位符的数量之等于第一预设值;或者,该至少一个设备占位符的数量等于第二预设值。In some embodiments, the sum of the number of each target device and the number of the at least one device placeholder is equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.
其中,第一预设值、第二预设值可以根据实际情况确定。Among them, the first preset value and the second preset value can be determined according to actual conditions.
在一些实施例中,第一预设值大于第二预设值。In some embodiments, the first preset value is greater than the second preset value.
本申请实施例中,可以根据电子设备的属性、用户输入的通过HomeKit客户端控制的设备的总数量等信息,设置HomeKit客户端基于与电子设备的连接控制的设备的总数量(即电子设备、各个目标设备和至少一个设备占位符的总数量,即第一预设值与1之和),还可以根据电子设备的属性、用户输入的通过HomeKit客户端控制的设备的总数量等信息,设置至少一个设备占位符的数量(即第二预设值),如此,可以根据实际需求设置目标信息中需要添加的设备占位符的数量,可以提高设备列表的管理效率。In an embodiment of the present application, the total number of devices controlled by the HomeKit client based on the connection with the electronic device (i.e., the total number of electronic devices, each target device, and at least one device placeholder, i.e., the sum of the first preset value and 1) can be set according to the properties of the electronic device, the total number of devices controlled by the HomeKit client input by the user, and other information. The number of at least one device placeholder (i.e., the second preset value) can also be set according to the properties of the electronic device, the total number of devices controlled by the HomeKit client input by the user, and other information. In this way, the number of device placeholders to be added in the target information can be set according to actual needs, which can improve the management efficiency of the device list.
为了更加详细的说明本方案,以下将以示例性的方式结合图5至图10进行说明,可以理解的是,图5至图10中所涉及的步骤在实际实现时可以包括更多的步骤,或者更少的步骤,并且这些步骤之间的顺序也可以不同,以能够实现本申请实施例中提供的设备列表获取方法为准。该设备列表获取方法的执行主体可以为电子设备,也可以为电子设备中能够实现该设备列表获取方法的功能模块或功能实体。而且对根据本申请实施例的设备列表获取方法的具体描述可以参考对上述电子设备的相关描述,且可以实现相同或相似的技术效果,此处不再赘述。In order to explain the present solution in more detail, the following will be explained in an exemplary manner in conjunction with Figures 5 to 10. It can be understood that the steps involved in Figures 5 to 10 may include more steps, or fewer steps in actual implementation, and the order of these steps may also be different, so as to be able to implement the device list acquisition method provided in the embodiment of the present application. The execution subject of the device list acquisition method can be an electronic device, or it can be a functional module or functional entity in the electronic device that can implement the device list acquisition method. Moreover, the specific description of the device list acquisition method according to the embodiment of the present application can refer to the relevant description of the above-mentioned electronic device, and the same or similar technical effects can be achieved, which will not be repeated here.
图5为根据本申请一个或多个实施例实现设备列表获取方法的步骤流程图,该设备列表获取方法可以包括:FIG5 is a flowchart of the steps of implementing a method for acquiring a device list according to one or more embodiments of the present application. The method for acquiring a device list may include:
S501、在基于HomeKit协议与HomeKit客户端建立连接之后,接收该HomeKit客户端发送的设备列表获取请求。S501. After establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request sent by the HomeKit client.
其中,该设备列表获取请求用于指示获取与该电子设备连接的各个目标设备的设备信息,该设备信息包括设备的标识。The device list acquisition request is used to instruct to acquire device information of each target device connected to the electronic device, and the device information includes an identification of the device.
S502、基于该设备列表获取请求,确定该电子设备的设备信息和该各个目标设备的设 备信息。S502: Determine the device information of the electronic device and the device information of each target device based on the device list acquisition request. Backup information.
其中,该设备信息包括对应的设备的标识。The device information includes the identifier of the corresponding device.
S503、基于该电子设备的设备信息、该各个目标设备的设备信息和至少一个设备占位符生成目标信息。S503: Generate target information based on the device information of the electronic device, the device information of each target device, and at least one device placeholder.
其中,每个设备占位符用于指示一个待接入的未知设备,该每个设备占位符对应的设备信息为空。Each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty.
S504、向该HomeKit客户端发送该目标信息,以使该HomeKit客户端基于该目标信息显示设备列表。S504: Send the target information to the HomeKit client, so that the HomeKit client displays a device list based on the target information.
其中,该设备列表包括该电子设备的标识和该各个目标设备的标识。The device list includes the identifier of the electronic device and the identifiers of each target device.
本申请实施例中,通过在目标信息中增加设备占位符,由于每个设备占位符用于指示一个待接入的未知设备,每个设备占位符对应的设备信息为空,则不但不会因为HomeKit客户端基于目标信息生成的设备列表包括一些未接入的设备的标识误导用户,而且在设备列表中为待接入的未知设备预留了位置,因此,后续当其他设备与电子设备建立连接时,可以用该其他设备的设备信息更新目标信息中的一个设备占位符,以实现更新目标信息,进而HomeKit客户端基于更新后的目标信息更新设备列表,以实现动态更新HomeKit客户端上显示的设备列表。In an embodiment of the present application, by adding device placeholders to the target information, since each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty, not only will the user not be misled because the device list generated by the HomeKit client based on the target information includes the identification of some unconnected devices, but also a position is reserved in the device list for the unknown devices to be connected. Therefore, when other devices subsequently establish a connection with the electronic device, a device placeholder in the target information can be updated with the device information of the other device to update the target information, and then the HomeKit client updates the device list based on the updated target information to dynamically update the device list displayed on the HomeKit client.
在一些实施例中,结合图5,如图6所示,在上述S504之后,根据本申请实施例的设备列表获取方法还可以包括下述S505至S507。In some embodiments, in combination with FIG. 5 , as shown in FIG. 6 , after the above S504 , the device list acquisition method according to the embodiment of the present application may further include the following S505 to S507 .
S505、检测到第一设备与该电子设备建立连接。S505: Detect that the first device establishes a connection with the electronic device.
S506、将该目标信息中的一个该设备占位符更新为第一设备的设备信息,以更新该目标信息。S506: Update a device placeholder in the target information to the device information of the first device to update the target information.
S507、向该HomeKit客户端发送该更新后的目标信息,以使该HomeKit客户端基于该更新后的目标信息更新该设备列表。S507: Send the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information.
其中,更新后的该设备列表包括该电子设备的标识、该各个目标设备的标识和第一设备的标识。The updated device list includes the identifier of the electronic device, the identifiers of each target device, and the identifier of the first device.
在一些实施例中,结合图5,如图7所示,在上述S504之后,根据本申请实施例的设备列表获取方法还可以包括下述S508至S510。In some embodiments, in combination with FIG. 5 , as shown in FIG. 7 , after the above S504 , the device list acquisition method according to the embodiment of the present application may further include the following S508 to S510 .
S508、检测到第二设备与该电子设备断开连接。S508: Detect that the second device is disconnected from the electronic device.
其中,第二设备为该各个目标设备中的任一个。The second device is any one of the target devices.
S509、将该目标信息中的第二设备的设备信息更新为一个该设备占位符,以更新该目标信息。S509: Update the device information of the second device in the target information to a placeholder for the device, so as to update the target information.
S510、向该HomeKit客户端发送该更新后的目标信息,以使该HomeKit客户端基于该更新后的目标信息更新该设备列表。S510. Send the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information.
其中,更新后的该设备列表包括该电子设备的标识和该各个目标设备中除第二设备之外的各个设备的标识。The updated device list includes the identifier of the electronic device and the identifiers of each device among the target devices except the second device.
在一些实施例中,该各个目标设备包括:至少一个第三设备;或者,该各个目标设备包括:至少一个第三设备和至少一个第四设备;其中,每个第三设备与该电子设备直接连接,每个第四设备通过对应的第三设备与该电子设备连接。In some embodiments, the respective target devices include: at least one third device; or, the respective target devices include: at least one third device and at least one fourth device; wherein each third device is directly connected to the electronic device, and each fourth device is connected to the electronic device through a corresponding third device.
在一些实施例中,该电子设备通过HDMI接口与该每个第三设备连接;在该各个目标设备包括该至少一个第四设备的情况下,该每个第三设备通过HDMI接口与该对应的第三设备连接。In some embodiments, the electronic device is connected to each of the third devices via an HDMI interface; when each of the target devices includes the at least one fourth device, each of the third devices is connected to the corresponding third device via the HDMI interface.
在一些实施例中,该设备信息还包括对应的设备的类型;该设备列表还包括该电子设备的类型和该各个目标设备的类型。In some embodiments, the device information also includes the type of the corresponding device; the device list also includes the type of the electronic device and the type of each target device.
在一些实施例中,该各个目标设备的数量与该至少一个设备占位符的数量之等于第一预设值;或者,该至少一个设备占位符的数量等于第二预设值。In some embodiments, the sum of the number of each target device and the number of the at least one device placeholder is equal to a first preset value; or, the number of the at least one device placeholder is equal to a second preset value.
以iOS设备端为手机,电子设备为电视,电子设备与其他设备通过HDMI接口进行连 接为例,根据HomeKit协议,手机端显示的设备列表是在手机与电视连接后初始化的。列表一旦初始化就不能增加新设备了。虽然电视机的HDMI接口个数是固定的,手机与电视连接后可以固化下来。但是连接到外接设备HDMI接口上的设备还可以扩展连接其他HDMI设备,这部分数据是变化的。在手机与电视已经建立链接的前提下,这部分数据是无法动态添加到手机端的,因此手机端无法动态显示后接入的设备。The iOS device is a mobile phone, the electronic device is a TV, and the electronic device is connected to other devices via an HDMI interface. For example, according to the HomeKit protocol, the device list displayed on the mobile phone is initialized after the mobile phone is connected to the TV. Once the list is initialized, new devices cannot be added. Although the number of HDMI interfaces on the TV is fixed, it can be solidified after the mobile phone is connected to the TV. However, the device connected to the HDMI interface of the external device can also be extended to connect other HDMI devices, and this part of the data is changing. Under the premise that the mobile phone and the TV have established a link, this part of the data cannot be dynamically added to the mobile phone, so the mobile phone cannot dynamically display the devices connected later.
在一些实施例中,如图8所示,手机作为控制端,其上安装有HomeKit app,电视为支持HomeKit协议的被控制端,由HomeKit代理(proxy)模块61、数据处理模块62和设备管理模块63组成。其中,HomeKit Proxy模块61:负责与手机之间建立网络连接、数据通信。接收手机发送过来的控制指令和数据(包括设备列表获取请求);数据处理模块62:负责解析控制指令和数据,对上接收HomeKit Proxy转发的设备列表获取请求,对下向设备管理模块63转发解析后的设备列表获取请求,并接收设备管理模块返回的电视的设备信息,以及与电视进行直接连接或间接连接的各个设备的设备信息,然后数据处理模块还用于基于电视的设备信息和各个设备的设备信息,加入至少一个设备占位符,重组数据,生成目标信息,并将目标信息返回给HomeKit Proxy模块61,以便HomeKit Proxy模块61返回给手机;设备管理模块63用来获取电视的设备信息、与电视连接的各个设备的设备信息,以及确定电视连接的设备的个数等,并将获取的这些信息上报给数据处理模块62。In some embodiments, as shown in FIG8 , a mobile phone is used as a control terminal, on which a HomeKit app is installed, and a television is used as a controlled terminal supporting the HomeKit protocol, which is composed of a HomeKit proxy module 61, a data processing module 62, and a device management module 63. Among them, the HomeKit Proxy module 61 is responsible for establishing a network connection and data communication with the mobile phone. Receive control instructions and data (including device list acquisition request) sent by the mobile phone; Data processing module 62: responsible for parsing control instructions and data, receiving the device list acquisition request forwarded by HomeKit Proxy, forwarding the parsed device list acquisition request to the device management module 63, and receiving the device information of the TV returned by the device management module, as well as the device information of each device directly or indirectly connected to the TV. Then the data processing module is also used to add at least one device placeholder based on the device information of the TV and the device information of each device, reorganize the data, generate target information, and return the target information to the HomeKit Proxy module 61, so that the HomeKit Proxy module 61 returns it to the mobile phone; The device management module 63 is used to obtain the device information of the TV, the device information of each device connected to the TV, and determine the number of devices connected to the TV, etc., and report the obtained information to the data processing module 62.
在以下描述中,固有设备列表信息包括电视的设备信息、与电视直接连接的设备的设备信息;扩展设备列表信息包括与电视间接连接的设备的设备信息。在电视通过HDMI接口与目标设备进行直接连接,或间接连接时,设备管理模块63用来识别电视的各个HDMI接口对应的连接信息,确定电视固有的HDMI接口连接的第三设备,并获取对应的第三设备的设备信息,然后基于电视的设备信息和每个第三设备的设备信息确定固有设备列表信息;然后在通过HDMI接口,从与电视直接连接的第三设备获取第三设备通过HDMI接口连接的第四设备,并获取第四设备的设备信息,然后基于每个第四设备的设备信息得到扩展设备列表。In the following description, the inherent device list information includes the device information of the TV and the device information of the device directly connected to the TV; the extended device list information includes the device information of the device indirectly connected to the TV. When the TV is directly connected or indirectly connected to the target device through the HDMI interface, the device management module 63 is used to identify the connection information corresponding to each HDMI interface of the TV, determine the third device connected to the inherent HDMI interface of the TV, and obtain the device information of the corresponding third device, and then determine the inherent device list information based on the device information of the TV and the device information of each third device; then, through the HDMI interface, obtain the fourth device connected to the third device through the HDMI interface from the third device directly connected to the TV, and obtain the device information of the fourth device, and then obtain the extended device list based on the device information of each fourth device.
在一些实施例中,如图9所示,根据本申请实施例的设备列表获取方法包括下述S701至S710。In some embodiments, as shown in FIG. 9 , the device list acquisition method according to an embodiment of the present application includes the following S701 to S710 .
S701、手机与电视连接同一个网络后,通过HomeKit app进行设备发现,并与电视建立连接。S701. After the mobile phone and TV are connected to the same network, use the HomeKit app to discover the device and establish a connection with the TV.
S702、手机与电视链接建立完毕,手机向电视发送设备列表获取请求。S702: After the connection between the mobile phone and the TV is established, the mobile phone sends a device list acquisition request to the TV.
S703、电视的HomeKit Proxy模块收到设备列表获取请求后,将设备列表获取请求发送给数据处理模块。S703. After receiving the device list acquisition request, the HomeKit Proxy module of the TV sends the device list acquisition request to the data processing module.
S704、电视的数据处理模块将设备列表获取请求发送给设备管理模块。S704: The data processing module of the television sends a device list acquisition request to the device management module.
电视的HomeKit Proxy模块收到设备列表获取请求后,调用电视的数据处理模块,向设备管理模块请求设备列表。After receiving the request to obtain the device list, the TV's HomeKit Proxy module calls the TV's data processing module and requests the device management module for the device list.
S705、设备管理模块获取固有设备列表信息和扩展设备列表信息。S705. The device management module obtains inherent device list information and extended device list information.
可以理解,设备管理模块获取电视的本机HDMI接口个数和电视的设备信息,以及HDMI接口上连接的设备的设备信息,得到固有设备列表信息,同时获取HDMI接口上已连接设备是否连接了扩展设备,以及获取HDMI接口上已连接设备上连接的扩展设备的设备信息,得到扩展设备列表信息。It can be understood that the device management module obtains the number of local HDMI interfaces of the TV and the device information of the TV, as well as the device information of the device connected to the HDMI interface, to obtain the inherent device list information, and at the same time obtains whether the device connected to the HDMI interface is connected to an extension device, and obtains the device information of the extension device connected to the device connected to the HDMI interface, to obtain the extension device list information.
S706、设备管理模块将固有设备列表信息和扩展设备列表信息返回给数据处理模块。S706: The device management module returns the inherent device list information and the extended device list information to the data processing module.
S707、数据处理模块在固有设备列表信息和扩展设备列表信息的基础上追加N个设备占位符,并设置设备名字为空,生成目标信息。S707. The data processing module adds N device placeholders based on the inherent device list information and the extended device list information, and sets the device name to be empty to generate target information.
S708、数据处理模块将目标信息返回给HomeKit Proxy模块。S708. The data processing module returns the target information to the HomeKit Proxy module.
S709、HomeKit Proxy模块将目标信息发送给手机。S709, HomeKit Proxy module sends the target information to the mobile phone.
S710、手机接收到目标信息后,基于目标信息显示设备列表。 S710. After receiving the target information, the mobile phone displays a device list based on the target information.
可以理解,手机根据目标信息基于固有设备列表信息中各个设备的设备信息显示各个固有设备的标识或各个固有设备的标识和类型;并基于扩展设备列表信息中各个设备的设备信息显示各个扩展设备的标识或各个扩展设备的标识和类型,以及忽略各个设备占位符。也可以理解为,手机将目标信息中设备信息不为空的设备的设备信息显示出来,忽略不显示设备信息为空的设备占位符。如此,即完成了设备列表的初始化工作,初始化后的设备列表中为待接入的设备预留了位置。It can be understood that the mobile phone displays the identification of each inherent device or the identification and type of each inherent device based on the device information of each device in the inherent device list information according to the target information; and displays the identification of each extended device or the identification and type of each extended device based on the device information of each device in the extended device list information, and ignores each device placeholder. It can also be understood that the mobile phone displays the device information of the device whose device information in the target information is not empty, and ignores the device placeholder whose device information is empty. In this way, the initialization of the device list is completed, and a position is reserved in the initialized device list for the device to be connected.
在一些实施例中,在设备列表的初始化完成之后,电视的使用过程中,如果用户新接入了扩展设备,需要通知手机端HomeKit app更新列表,如图10所述,具体过程包括以下S801至S808。In some embodiments, after the initialization of the device list is completed, during the use of the TV, if the user newly connects an expansion device, it is necessary to notify the HomeKit app on the mobile phone to update the list, as described in Figure 10. The specific process includes the following S801 to S808.
S801、HomeKit Proxy模块向数据处理模块下发监听指令,以监听是否有设备接入电视或电视连接的设备。S801. The HomeKit Proxy module sends a monitoring command to the data processing module to monitor whether there is a device connected to the TV or a device connected to the TV.
S802、数据处理模块向设备管理模块转发监听指令。S802: The data processing module forwards the monitoring instruction to the device management module.
S803、设备管理模块响应监听指令,在监听到有新的扩展设备接入电视连接的设备时,获取该新接入的扩展设备的设备信息。S803: The device management module responds to the monitoring instruction, and when monitoring that a new expansion device is connected to the device connected to the television, obtains the device information of the newly connected expansion device.
S804、设备管理模块将该新接入的扩展设备的设备信息返回给数据处理模块。S804: The device management module returns the device information of the newly connected expansion device to the data processing module.
设备管理模块可以将该新接入的扩展设备的设备信息更新至扩展设备列表信息中,然后发送给数据处理模块,也可以单独将新接入的扩展设备的设备信息发送给数据处理模块。The device management module may update the device information of the newly connected expansion device into the expansion device list information and then send it to the data processing module, or may send the device information of the newly connected expansion device to the data processing module separately.
S805、数据处理模块接收到新接入的扩展设备的设备信息,用新接入的扩展的设备信息替换掉目标信息中的一个设备占位符,以更新目标信息。S805: The data processing module receives the device information of the newly connected extended device, and replaces a device placeholder in the target information with the newly connected extended device information to update the target information.
S806、数据处理模块将更新后的目标信息发送给HomeKit Proxy模块。S806. The data processing module sends the updated target information to the HomeKit Proxy module.
S807、HomeKit Proxy模块将更新后的目标信息发送给手机。S807, HomeKit Proxy module sends the updated target information to the mobile phone.
S808、手机接收到更新后的目标信息后,基于更新后的目标信息显示更新后的设备列表。S808. After receiving the updated target information, the mobile phone displays an updated device list based on the updated target information.
可以理解,设备管理模块识别到有新的扩展设备接入后,将新接入的扩展设备的设备信息返回给数据处理模块,数据处理模块将新接入的扩展设备的设备信息更新到目标信息的一个设备占位符上,设置新接入的扩展设备的名字、类型等信息,这样设备占位符就变成了真实的设备;更新后的目标信息通过HomeKit Proxy模块发送给手机端,手机端接收到更新后的目标信息后,将列表中的设备占位符刷新,由于占位符有了名字、类型等真实信息,就可以刷新显示到手机显示的设备列表上了。It can be understood that after the device management module recognizes that a new expansion device is connected, it returns the device information of the newly connected expansion device to the data processing module. The data processing module updates the device information of the newly connected expansion device to a device placeholder in the target information, and sets the name, type and other information of the newly connected expansion device. In this way, the device placeholder becomes a real device; the updated target information is sent to the mobile phone through the HomeKit Proxy module. After the mobile phone receives the updated target information, it refreshes the device placeholder in the list. Since the placeholder has real information such as name and type, it can be refreshed and displayed on the device list displayed on the mobile phone.
除了上述用于解决iOS设备与电子设备A进行连接并初始化之后,无法实现动态更新iOS设备上显示的设备列表的技术问题的实施例之外,本申请还给出电子设备作为显示设备时,进一步还可以解决其他技术问题的一些实施例的举例说明,具体如下:In addition to the above-mentioned embodiments for solving the technical problem that after the iOS device and the electronic device A are connected and initialized, the device list displayed on the iOS device cannot be dynamically updated, the present application also provides examples of some embodiments for further solving other technical problems when the electronic device is used as a display device, which are as follows:
假待机状态指显示设备操作系统处于运行状态,但显示设备的屏幕断电处于暗屏状态、输出端口停止输出的状态。开机状态指显示设备操作系统处于运行状态,显示设备的屏幕通断处于亮屏状态。The pseudo standby state refers to a state where the operating system of the display device is in operation, but the screen of the display device is powered off and in a dark state, and the output port stops outputting. The power-on state refers to a state where the operating system of the display device is in operation, and the screen of the display device is powered on and in a bright state.
安卓(Android)系统不停的迭代更新,为了保障用户隐私,对整机应用一直在收紧权限使用,避免权限被乱用引起整机性能消耗和用户投诉。目前的安全措施是Google刚合入,很多应用还没有进行适配,导致在假待机状态推送无法唤醒电视,用户体验很差。The Android system is constantly iterating and updating. In order to protect user privacy, the permissions of the entire device application have been tightened to prevent the abuse of permissions, which will cause the performance of the entire device to be depleted and user complaints. The current security measures are just merged by Google, and many applications have not yet been adapted, resulting in the failure to wake up the TV when pushed in the fake standby state, which is a poor user experience.
为了解决上述技术问题,本申请实施例中所述的电子设备作为显示设备时,通过接收智能设备发送的投屏请求;响应于该投屏请求,在该显示设备处于假待机状态的情况下,基于AirPlay2应用控制该显示设备从假待机状态切换到开机状态;基于该AirPlay2应用执行该投屏请求对应的投屏操作,从而在假待机状态下接收到智能设备发送的投屏请求,可以基于AirPlay2应用先唤醒显示设备,然后执行对应的投屏操作,使得在假待机状态下可以实现投屏,从整个链路上减少了用户的操作成本,提高了投屏处理的效率,提升了用户的操作体验。In order to solve the above technical problems, the electronic device described in the embodiment of the present application, when used as a display device, receives a screen projection request sent by a smart device; in response to the screen projection request, when the display device is in a pseudo standby state, controls the display device to switch from the pseudo standby state to the power-on state based on the AirPlay2 application; executes the screen projection operation corresponding to the screen projection request based on the AirPlay2 application, so that when the screen projection request sent by the smart device is received in the pseudo standby state, the display device can be first woken up based on the AirPlay2 application, and then the corresponding screen projection operation is executed, so that screen projection can be realized in the pseudo standby state, thereby reducing the user's operating cost from the entire link, improving the efficiency of screen projection processing, and enhancing the user's operating experience.
图11为根据实施例中显示设备与控制设备之间操作场景的示意图,其中控制设备包 括智能设备或控制装置。如图11所示,用户可通过智能设备300或控制装置001操作显示设备200。其中,智能设备300、控制装置001都可以视为控制设备100。FIG. 11 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment, wherein the control device includes As shown in FIG11 , the user can operate the display device 200 through the smart device 300 or the control device 001 . The smart device 300 and the control device 001 can both be regarded as the control device 100 .
在一些实施例中,控制装置001可以是遥控器,遥控器和显示设备的通信包括红外协议通信或蓝牙协议通信,及其他短距离通信方式,通过无线或有线方式来控制显示设备200。用户可以通过遥控器上按键、语音输入、控制面板输入等输入用户指令,来控制显示设备200。In some embodiments, the control device 001 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user can input user commands through buttons on the remote controller, voice input, control panel input, etc. to control the display device 200.
在一些实施例中,也可以使用智能设备300(如移动终端、平板电脑、计算机、笔记本电脑等)来控制显示设备200。例如,使用在智能设备上运行的应用程序控制显示设备200。In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.
在一些实施例中,显示设备可以不使用上述的智能设备或控制装置接收指令,而是通过触摸或者手势等接收用户的控制。In some embodiments, the display device may not use the above-mentioned smart device or control device to receive instructions, but may receive user control through touch or gestures.
在一些实施例中,显示设备200还可以采用除了控制装置001和智能设备300之外的方式进行控制,例如,可以通过显示设备200设备内部配置的获取语音指令的模块直接接收用户的语音指令控制,也可以通过显示设备200设备外部设置的语音控制设备来接收用户的语音指令控制。In some embodiments, the display device 200 can also be controlled in a manner other than the control device 001 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
在一些实施例中,显示设备200还与服务器400进行数据通信。可允许显示设备200通过局域网(LAN)、无线局域网(WLAN)和其他网络进行通信连接。服务器400可以向显示设备200提供各种内容和互动。In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide the display device 200 with various content and interactions.
图12为根据示例性实施例中控制装置001的配置框图。如图12所示,控制装置001包括处理器110、通信接口130、用户输入/输出接口140、外部存储器、供电电源。控制装置001可接收用户的输入操作指令,且将操作指令转换为显示设备200可识别和响应的指令,起用用户与显示设备200之间交互中介作用。FIG12 is a block diagram of a configuration of a control device 001 according to an exemplary embodiment. As shown in FIG12 , the control device 001 includes a processor 110, a communication interface 130, a user input/output interface 140, an external memory, and a power supply. The control device 001 can receive an input operation instruction from a user, and convert the operation instruction into an instruction that can be recognized and responded to by the display device 200, playing the role of an interactive intermediary between the user and the display device 200.
根据本申请实施例了一种显示设备及投屏处理方法,其中,显示设备可以实现根据本申请实施例的投屏处理方法或者显示设备中的功能模块或功能实体可以实现根据本申请实施例的投屏处理方法。该显示设备包括:通信器和处理器,分别对应上述图2中的通信器220和处理器250。智能设备可以为图11中的智能设备300,智能设备可以是支持AirPlay2协议,能够向显示设备进行屏幕镜像(投屏连接)的设备,例如iPhone或iPad等iOS设备。According to an embodiment of the present application, a display device and a screen projection processing method are provided, wherein the display device can implement the screen projection processing method according to the embodiment of the present application or the functional module or functional entity in the display device can implement the screen projection processing method according to the embodiment of the present application. The display device includes: a communicator and a processor, which correspond to the communicator 220 and the processor 250 in Figure 2 above, respectively. The smart device may be the smart device 300 in Figure 11, and the smart device may be a device that supports the AirPlay2 protocol and can perform screen mirroring (screen projection connection) to the display device, such as an iOS device such as an iPhone or iPad.
在一些实施例中,通信器接收智能设备发送的投屏请求;处理器响应于该投屏请求,在该显示设备处于假待机状态的情况下,基于AirPlay2应用控制该显示设备从假待机状态切换到开机状态;基于该AirPlay2应用执行该投屏请求对应的投屏操作。In some embodiments, the communicator receives a screen projection request sent by a smart device; the processor responds to the screen projection request and, when the display device is in a pseudo standby state, controls the display device to switch from a pseudo standby state to a power-on state based on the AirPlay2 application; and executes the screen projection operation corresponding to the screen projection request based on the AirPlay2 application.
在一些实施例中,基于AirPlay2应用控制该显示设备从假待机状态切换到开机状态,可以理解为,基于AirPlay2应用调用唤醒屏幕的标准接口,给显示设备的屏幕上电,使屏幕从暗屏状态进入亮屏状态,以实现唤醒屏幕。In some embodiments, the display device is controlled to switch from a pseudo-standby state to a power-on state based on the AirPlay2 application. It can be understood that the standard interface for waking up the screen is called based on the AirPlay2 application to power on the screen of the display device, so that the screen changes from a dark screen state to a bright screen state, thereby waking up the screen.
在一些实施例中,投屏请求可以为投屏连接请求,对应的投屏操作为建立投屏连接;投屏请求可以为投屏推送请求,对应的投屏操作为播放投屏内容,投屏内容可以为图片、音频或视频等;具体可以根据实际情况确定,此处不做限定。In some embodiments, the screen projection request can be a screen projection connection request, and the corresponding screen projection operation is to establish a screen projection connection; the screen projection request can be a screen projection push request, and the corresponding screen projection operation is to play the projection content, and the projection content can be pictures, audio or video, etc.; the specific details can be determined based on actual conditions and are not limited here.
其中,AirPlay2应用是基于AirPlay2协议构建的能够实现智能设备与显示设备之间的AirPlay2投屏功能的应用程序。本申请实施例中对AirPlay2应用的具体名称不做限定,可以根据实际情况确定。Among them, the AirPlay2 application is an application built based on the AirPlay2 protocol that can realize the AirPlay2 screen projection function between smart devices and display devices. The specific name of the AirPlay2 application is not limited in the embodiment of the present application and can be determined according to actual conditions.
本申请实施例中,在假待机状态下接收到智能设备发送的投屏请求,可以基于AirPlay2应用先唤醒显示设备,然后执行对应的投屏操作,使得在假待机状态下可以实现投屏,从整个链路上减少了用户的操作成本,提高了投屏处理的效率,提升了用户的操作体验。In an embodiment of the present application, when a screen projection request is received from a smart device in a pseudo-standby state, the display device can be first woken up based on the AirPlay2 application, and then the corresponding screen projection operation can be performed, so that screen projection can be achieved in the pseudo-standby state, thereby reducing the user's operating cost in the entire link, improving the efficiency of screen projection processing, and enhancing the user's operating experience.
在一些实施例中,该投屏请求为投屏连接请求,该投屏操作为建立投屏连接;该处理器被配置为基于该AirPlay2应用执行该投屏请求对应的投屏操作,具体为:基于该AirPlay2应用建立该显示设备与该智能设备之间的投屏连接。可以理解,通信器接收智能设备发送 的投屏连接请求;处理器响应于该投屏连接请求,在该显示设备处于假待机状态的情况下,基于AirPlay2应用控制该显示设备从假待机状态切换到开机状态;基于该AirPlay2应用建立该显示设备与该智能设备之间的投屏连接。In some embodiments, the screen projection request is a screen projection connection request, and the screen projection operation is to establish a screen projection connection; the processor is configured to perform the screen projection operation corresponding to the screen projection request based on the AirPlay2 application, specifically: to establish a screen projection connection between the display device and the smart device based on the AirPlay2 application. It can be understood that the communicator receives the message sent by the smart device. a screen projection connection request; the processor responds to the screen projection connection request, and when the display device is in a pseudo-standby state, controls the display device to switch from the pseudo-standby state to the power-on state based on the AirPlay2 application; and establishes a screen projection connection between the display device and the smart device based on the AirPlay2 application.
本申请实施例中,在假待机状态下接收到智能设备发送的投屏连接请求,可以基于AirPlay2应用先唤醒显示设备,然后执行对应的投屏连接操作,使得在假待机状态下可以成功建立投屏连接,从整个链路上减少了用户的操作成本,提高了投屏连接建立的效率,提升了用户的操作体验。In an embodiment of the present application, when a screen projection connection request is received from a smart device in a pseudo-standby state, the display device can be first woken up based on the AirPlay2 application, and then the corresponding screen projection connection operation can be performed, so that the screen projection connection can be successfully established in the pseudo-standby state, thereby reducing the user's operating cost in the entire link, improving the efficiency of establishing the screen projection connection, and enhancing the user's operating experience.
在一些实施例中,该投屏请求为投屏推送请求,该投屏操作为播放投屏内容;该处理器,还被配置为:在该通信器接收智能设备发送的投屏请求之前,基于该AirPlay2应用建立该显示设备与该智能设备之间的投屏连接;在满足目标条件的情况下,控制该显示设备从该开机状态切换至该假待机状态;该处理器被配置为基于该AirPlay2应用执行该投屏请求对应的投屏操作,具体为:基于该AirPlay2应用播放该投屏推送请求对应的投屏内容。可以理解,处理器基于该AirPlay2应用建立该显示设备与该智能设备之间的投屏连接;在满足目标条件的情况下,控制该显示设备从该开机状态切换至该假待机状态;通信器接收智能设备发送的投屏连接请求;处理器响应于该投屏连接请求,在该显示设备处于假待机状态的情况下,基于AirPlay2应用控制该显示设备从假待机状态切换到开机状态;基于该AirPlay2应用播放该投屏推送请求对应的投屏内容。In some embodiments, the screen projection request is a screen projection push request, and the screen projection operation is to play the screen projection content; the processor is also configured to: before the communicator receives the screen projection request sent by the smart device, establish a screen projection connection between the display device and the smart device based on the AirPlay2 application; when the target condition is met, control the display device to switch from the power-on state to the pseudo-standby state; the processor is configured to perform the screen projection operation corresponding to the screen projection request based on the AirPlay2 application, specifically: play the screen projection content corresponding to the screen projection push request based on the AirPlay2 application. It can be understood that the processor establishes a screen projection connection between the display device and the smart device based on the AirPlay2 application; when the target condition is met, control the display device to switch from the power-on state to the pseudo-standby state; the communicator receives the screen projection connection request sent by the smart device; the processor responds to the screen projection connection request, and when the display device is in the pseudo-standby state, controls the display device to switch from the pseudo-standby state to the power-on state based on the AirPlay2 application; and plays the screen projection content corresponding to the screen projection push request based on the AirPlay2 application.
在一些实施例中,显示设备连接wifi网络,并处于开机状态下,按电源(power)键会进入假待机状态;显示设备处于开机状态切无音视频输出(如,处于暂停播放状态),无按键操作静置一定时长(如1小时、24小时等)也会进入假待机状态。In some embodiments, when the display device is connected to a WiFi network and is powered on, pressing the power button will cause the device to enter a pseudo-standby state. When the display device is powered on and has no audio or video output (e.g., in a paused playback state), and has been left idle for a certain period of time (e.g., 1 hour, 24 hours, etc.) without any key operation, the device will also enter a pseudo-standby state.
用户用AirPlay2投屏观看视频或者音频,离开时间过久或者按了power键此时Android电视就会进入假待机状态,回来后想再次投屏查看节目,则操作智能设备向显示设备发送投屏推送请求,则显示设备响应投屏推送请求,唤醒屏幕,播放对应的视频或音频。When a user uses AirPlay2 to cast the screen to watch videos or audio and leaves the screen for too long or presses the power button, the Android TV will enter a pseudo-standby state. When the user comes back and wants to cast the screen to watch the program again, he or she can operate the smart device to send a casting push request to the display device. The display device will respond to the casting push request, wake up the screen, and play the corresponding video or audio.
本申请实施例中,在假待机状态下接收到智能设备发送的投屏推送请求,可以基于AirPlay2应用先唤醒显示设备,然后基于该AirPlay2应用播放该投屏推送请求对应的投屏内容,使得在假待机状态下可以响应投屏推送播放对应的投屏内容,从整个链路上减少了用户的操作成本,提高了投屏推送处理的效率,提升了用户的操作体验。In an embodiment of the present application, when a screen projection push request is received from a smart device in a pseudo-standby state, the display device can be first woken up based on the AirPlay2 application, and then the projection content corresponding to the screen projection push request can be played based on the AirPlay2 application, so that the corresponding projection content can be played in response to the screen projection push in the pseudo-standby state, thereby reducing the user's operating cost in the entire link, improving the efficiency of screen projection push processing, and enhancing the user's operating experience.
在一些实施例中,该目标条件包括以下任一项:预设时长内该显示设备的播放内容未发生变化;接收到进入假待机状态的用户输入。In some embodiments, the target condition includes any one of the following: the playback content of the display device does not change within a preset time period; a user input for entering a pseudo standby state is received.
在一些实施例中,开机状态下,预设时长内该显示设备的播放内容未发生变化,即预设时长内显示设备未播放任意内容或播放的内容没有变化(暂停播放状态),显示设备从开机状态切换到假待机状态。In some embodiments, in the power-on state, the playback content of the display device does not change within a preset time period, that is, the display device does not play any content or the played content does not change within the preset time period (paused playback state), and the display device switches from the power-on state to the pseudo-standby state.
在一些实施例中,进入假待机状态的用户输入可以为用户点击power键或进入假待机状态的按键,也可以是显示设备显示是否进入假待机状态的提示信息,用户选择进入假待机状态的选项。用户开机状态下,接收到进入假待机状态的用户输入,显示设备从开机状态切换到假待机状态。In some embodiments, the user input for entering the pseudo standby state may be a user clicking a power button or a button for entering the pseudo standby state, or the display device may display a prompt message indicating whether to enter the pseudo standby state, and the user may select an option to enter the pseudo standby state. When the user is in the power-on state, upon receiving the user input for entering the pseudo standby state, the display device switches from the power-on state to the pseudo standby state.
在一些实施例中,用户可以通过操作设置AirPlay2应用具备在假待机状态下唤醒功能,即唤醒显示设备屏幕的功能,使显示设备从假待机状态切换至开机状态的功能。该处理器,还被配置为:在该通信器接收智能设备发送的投屏请求之前,响应于接收到的授权该AirPlay2应用具备唤醒功能的目标用户输入,确定该AirPlay2应用具备该唤醒功能;其中,该唤醒功能用于控制该显示设备从假待机状态切换到开机状态。In some embodiments, the user can set the AirPlay2 application to have a wake-up function in the pseudo standby state, that is, a function to wake up the display device screen, so that the display device switches from the pseudo standby state to the power-on state. The processor is also configured to: before the communicator receives the screen projection request sent by the smart device, in response to the received target user input authorizing the AirPlay2 application to have the wake-up function, determine that the AirPlay2 application has the wake-up function; wherein the wake-up function is used to control the display device to switch from the pseudo standby state to the power-on state.
在一些实施例中,目标用户输入可以为用户在系统设置界面下的应用权限设置项对应的界面中,设置AirPlay2应用的权限中设置AirPlay2应用具备唤醒功能的输入;目标用户输入也可以是AirPlay2应用在首次开启或预设次数的开启时,显示授权提示信息,提示是否授权AirPlay2应用具备唤醒功能时,选择授权AirPlay2应用具备唤醒功能的输入,具体可以根据实际情况确定,此处不做限定。 In some embodiments, the target user input can be the input of setting the AirPlay2 application to have a wake-up function in the interface corresponding to the application permission setting item under the system setting interface; the target user input can also be the input of selecting authorize the AirPlay2 application to have a wake-up function when the AirPlay2 application is turned on for the first time or for a preset number of times, and when an authorization prompt message is displayed and prompts whether to authorize the AirPlay2 application to have a wake-up function, the specific input can be determined based on actual conditions and is not limited here.
本申请实施例中,通过目标用户输入设置AirPlay2应用具备唤醒功能,从而显示设备在假待机状态下接收到智能设备发送的投屏请求时,可以基于AirPlay2应用控制该显示设备从假待机状态切换到开机状态,进而执行对应的投屏操作,从整个链路上减少了用户的操作成本,提高了投屏推送处理的效率,提升了用户的操作体验。In an embodiment of the present application, the AirPlay2 application is set to have a wake-up function through the target user input, so that when the display device receives a screen projection request sent by a smart device in a pseudo-standby state, it can control the display device from the pseudo-standby state to the power-on state based on the AirPlay2 application, and then perform the corresponding screen projection operation, thereby reducing the user's operating cost in the entire link, improving the efficiency of screen projection push processing, and enhancing the user's operating experience.
在一些实施例中,通过在开启AirPlay2应用时,显示授权提示信息设置AirPlay2应用具备唤醒功能。该处理器,还被配置为:显示授权提示信息,该授权提示信息包括第一选项和第二选项,第一选项用于指示授权该AirPlay2应用具备唤醒功能,第二选项用于指示不授权该AirPlay2应用具备唤醒功能;该目标用户输入为选择第一选项的输入。In some embodiments, when the AirPlay2 application is started, the authorization prompt information is displayed to set the AirPlay2 application to have a wake-up function. The processor is further configured to: display the authorization prompt information, the authorization prompt information includes a first option and a second option, the first option is used to indicate that the AirPlay2 application is authorized to have a wake-up function, and the second option is used to indicate that the AirPlay2 application is not authorized to have a wake-up function; the target user input is an input for selecting the first option.
在一些实施例中,在用户针对授权提示信息选择第二选项的情况下,AirPlay2应用不具备唤醒功能,则显示设备在假待机状态下接收到智能设备发送的投屏请求时,基于AirPlay2应用无法控制该显示设备从假待机状态切换到开机状态,显示设备保持假待机状态,进而无法执行对应的投屏操作。In some embodiments, when the user selects the second option in response to the authorization prompt information, the AirPlay2 application does not have a wake-up function. When the display device receives a screen projection request sent by a smart device in a pseudo standby state, the AirPlay2 application cannot control the display device to switch from the pseudo standby state to the power-on state, and the display device remains in the pseudo standby state, and is unable to perform the corresponding screen projection operation.
本申请实施例中,通过授权提示信息设置AirPlay2应用是否具备唤醒功能,操作简单,而且通过授权提示信息与用户进行交互,用户可以根据自身需求设置AirPlay2应用是否具备唤醒功能,可以提高用户体验。In the embodiment of the present application, whether the AirPlay2 application has the wake-up function is set by authorization prompt information, which is simple to operate. Moreover, by interacting with the user through the authorization prompt information, the user can set whether the AirPlay2 application has the wake-up function according to their own needs, which can improve the user experience.
在一些实施例中,可以将AirPlay2应用预制在系统目录下,然后无需用户授权AirPlay2应用即具备唤醒功能。具体地,该AirPlay2应用安装于该显示设备的系统目录下,该系统目录下的任一应用具备唤醒功能;其中,该唤醒功能用于控制该显示设备从假待机状态切换到开机状态。In some embodiments, the AirPlay2 application can be prefabricated in the system directory, and then the AirPlay2 application has a wake-up function without user authorization. Specifically, the AirPlay2 application is installed in the system directory of the display device, and any application in the system directory has a wake-up function; wherein the wake-up function is used to control the display device to switch from the pseudo standby state to the power-on state.
在一些实施例中,系统目录可以是system/app目录,也可以是system_ext/priv_app目录,还可以是其他系统目录,此时不需要进行用户授权,即可以在假待机状态,通过Airplay2投屏唤醒电视,进行投屏播放演示。In some embodiments, the system directory can be the system/app directory, the system_ext/priv_app directory, or other system directories. In this case, user authorization is not required, that is, the TV can be woken up through Airplay2 screen casting in pseudo-standby state to perform screen casting demonstration.
智能设备为iPhone,显示设备为电视,在iPhone上进行屏幕镜像操作,显示如图13所示的界面,该界面中包括可以与iPhone进行Airplay2投屏的各个设备的设备标识(可以是设备名称、设备型号、设备编号等),如图所示包括“客厅电视”、“卧室电视”、“智能电视”等多个标识,其中,用户选择电视对应的“智能电视”标识,iPhone与电视之间进行投屏连接,电视显示如图14所示的界面,表示iPhone与电视之间的投屏连接建立成功。The smart device is an iPhone, and the display device is a TV. Screen mirroring operation is performed on the iPhone, and an interface as shown in Figure 13 is displayed. The interface includes the device identifiers of various devices that can be used for Airplay2 screen projection with the iPhone (which can be device names, device models, device numbers, etc.), including multiple identifiers such as "Living Room TV", "Bedroom TV", and "Smart TV". Among them, the user selects the "Smart TV" identifier corresponding to the TV, and a screen projection connection is established between the iPhone and the TV. The TV displays the interface shown in Figure 14, indicating that the screen projection connection between the iPhone and the TV is successfully established.
显示设备中包括Airplay守护进程(AirPlayDaemon)、Airplay系统服务(AirPlaySystemService)、Airplay2应用(AirPlayApk)。其中,AirPlayDaemon用于解析投屏请求。AirPlaySystemService用于根据AirPlayDaemon解析的投屏请切换至AirPlay通道,拉起AirPlayApk;AirPlaySystemService还用于转发AirPlayDaemon和AirPlayApk之间为建立投屏连接和投屏推送传递的消息,AirPlayDaemon对应iOS系统语言,AirPlayApk对应安卓系统语言,AirPlaySystemService用于iOS系统语言与安卓系统语言之间的转换。如图15所示,显示设备中建立投屏连接和完成投屏推送的业务流程包括下述步骤。The display device includes the Airplay daemon (AirPlayDaemon), the Airplay system service (AirPlaySystemService), and the Airplay2 application (AirPlayApk). Among them, AirPlayDaemon is used to parse the screen projection request. AirPlaySystemService is used to switch to the AirPlay channel and pull up AirPlayApk according to the screen projection request parsed by AirPlayDaemon; AirPlaySystemService is also used to forward the messages between AirPlayDaemon and AirPlayApk to establish a screen projection connection and screen projection push. AirPlayDaemon corresponds to the iOS system language, AirPlayApk corresponds to the Android system language, and AirPlaySystemService is used to convert between the iOS system language and the Android system language. As shown in Figure 15, the business process of establishing a screen projection connection and completing the screen projection push in the display device includes the following steps.
S601、AirPlayDaemon接收智能设备发送的投屏连接请求。S601. AirPlayDaemon receives a screen projection connection request sent by a smart device.
AirPlayDaemon解析投屏连接请求得到投屏连接控制指令,向AirPlaySystemService发送套接字(socket)消息,socket消息携带投屏连接控制指令,用于通知AirPlaySystemService拉起AirPlayApk,然后让AirPlayApk完成投屏连接初始化,实现投屏连接,显示投屏屏幕(Curtain)页面,投屏屏幕页面用于指示连接建立成功,投屏屏幕页面可以为智能设备上的配对页面。AirPlayDaemon parses the screen casting connection request to obtain the screen casting connection control instruction, and sends a socket message to AirPlaySystemService. The socket message carries the screen casting connection control instruction, which is used to notify AirPlaySystemService to pull up AirPlayApk, and then let AirPlayApk complete the screen casting connection initialization, realize the screen casting connection, and display the screen casting (Curtain) page. The screen casting page is used to indicate that the connection is successfully established. The screen casting page can be a pairing page on the smart device.
S602、AirPlayDaemon向AirPlaySystemService发送socket消息。S602. AirPlayDaemon sends a socket message to AirPlaySystemService.
S603、AirPlaySystemService基于socket消息,执行JNI触发Java回调AirPlayApk。S603, AirPlaySystemService executes JNI to trigger Java callback AirPlayApk based on the socket message.
JNI(Java Native Interface,java本地接口),是一种编程框架,用于java虚拟机中的java程序与本地应用或者库相互调用,本地应用一般指的是C,C++或者汇编等语言编写的,并且被编译为本机硬件和操作系统的程序。 JNI (Java Native Interface) is a programming framework used for Java programs in a Java virtual machine to call local applications or libraries. Local applications generally refer to programs written in languages such as C, C++, or assembly and compiled into programs for native hardware and operating systems.
JNI触发Java回调AirPlayApk,即JNI调用启动应用的逻辑,以切换到AirPlay通道,拉起AirPlay应用。JNI triggers the Java callback AirPlayApk, that is, JNI calls the logic of starting the application to switch to the AirPlay channel and launch the AirPlay application.
S604、AirPlayApk广播用于请求投屏连接初始化启动参数的第一请求消息。S604, AirPlayApk broadcasts the first request message for requesting the initialization startup parameters of the screen projection connection.
S605、AirPlayApk广播用于请求投屏屏幕页面的绘制参数的第二请求消息。S605. AirPlayApk broadcasts a second request message for requesting drawing parameters of the projection screen page.
第一请求消息和第二请求消息可以为同一个请求消息,也可以为两个独立的请求消息。The first request message and the second request message may be the same request message or two independent request messages.
S606、AirPlaySystemService广播投屏连接初始化启动参数和投屏屏幕页面的绘制参数。S606, AirPlaySystemService broadcasts the projection connection initialization startup parameters and the drawing parameters of the projection screen page.
AirPlaySystemService可以通过一个广播消息同时广播投屏连接初始化启动参数和投屏屏幕页面的绘制参数,也可以通过两个广播消息分别广播投屏连接初始化启动参数和投屏屏幕页面的绘制参数。AirPlaySystemService can broadcast the projection connection initialization startup parameters and the projection screen page drawing parameters at the same time through one broadcast message, or it can broadcast the projection connection initialization startup parameters and the projection screen page drawing parameters separately through two broadcast messages.
AirPlaySystemService接收到第一请求消息和第二请求消息之后,可以将第一请求消息和第二请求消息转发给AirPlayDaemon,AirPlayDaemon将投屏连接初始化启动参数和投屏屏幕页面的绘制参数发送给AirPlaySystemService,AirPlaySystemService再将投屏连接初始化启动参数和投屏屏幕页面的绘制参数发送给AirPlayApk。After receiving the first request message and the second request message, AirPlaySystemService can forward the first request message and the second request message to AirPlayDaemon. AirPlayDaemon sends the projection connection initialization startup parameters and the drawing parameters of the projection screen page to AirPlaySystemService. AirPlaySystemService then sends the projection connection initialization startup parameters and the drawing parameters of the projection screen page to AirPlayApk.
S607、AirPlayApk基于投屏连接初始化启动参数进行投屏初始化,完成投屏连接;AirPlayApk基于投屏屏幕页面的绘制参数绘制投屏屏幕页面,显示投屏屏幕页面。S607. AirPlayApk initializes the screen projection based on the screen projection connection initialization startup parameters to complete the screen projection connection; AirPlayApk draws the screen projection page based on the drawing parameters of the screen projection page and displays the screen projection page.
AirPlayApk中的TvInputService onCreate周期函数启动时,发送广播AirPlay.check.breakin(第一请求消息),告知切换通道成功,请求投屏连接初始化启动参数,InputService.Session.onCreateOverLay函数触发时,发送广播Request.CurtainPage.TIS(第二请求消息),请求投屏屏幕页面的绘制参数,获取到投屏屏幕页面的绘制参数后绘制投屏屏幕页面,显示投屏屏幕页面。When the TvInputService onCreate cycle function in AirPlayApk is started, the broadcast AirPlay.check.breakin (first request message) is sent to inform that the channel switching is successful and request the initialization startup parameters of the screen projection connection. When the InputService.Session.onCreateOverLay function is triggered, the broadcast Request.CurtainPage.TIS (second request message) is sent to request the drawing parameters of the projection screen page. After obtaining the drawing parameters of the projection screen page, the projection screen page is drawn and displayed.
S608、AirPlayDaemon接收到智能设备发送的投屏推送请求。S608, AirPlayDaemon receives the screen projection push request sent by the smart device.
AirPlayDaemon解析投屏推送请求。若投屏推送请求对应的投屏数据为音频数据,则解析投屏推送请求得到音频数据和投屏推送控制指令。AirPlayDaemon处理音频数据,并将投屏推送控制指令发送给AirPlaySystemService;若投屏推送请求对应的投屏数据为视频统一资源定位符(Uniform Resource Locator,URL),则解析投屏推送请求得到视频URL和投屏推送控制指令。AirPlayDaemon将视频URL和投屏推送控制指令发送给AirPlaySystemService,AirPlaySystemService根据视频URL下载视频数据。AirPlayDaemon parses the screen casting push request. If the screen casting data corresponding to the screen casting push request is audio data, the screen casting push request is parsed to obtain the audio data and the screen casting push control instruction. AirPlayDaemon processes the audio data and sends the screen casting push control instruction to AirPlaySystemService; if the screen casting data corresponding to the screen casting push request is a video uniform resource locator (Uniform Resource Locator, URL), the screen casting push request is parsed to obtain the video URL and the screen casting push control instruction. AirPlayDaemon sends the video URL and the screen casting push control instruction to AirPlaySystemService, and AirPlaySystemService downloads the video data according to the video URL.
S609、AirPlaySystemService接收到AirPlayDaemon发送的投屏推送控制指令。S609, AirPlaySystemService receives the screen projection push control instruction sent by AirPlayDaemon.
AirPlaySystemService收到视频或者音频的投屏推送控制指令,发送广播AirPlay.from.breakin(投屏推送控制指令)通知AirPlayApk进行播放。AirPlaySystemService receives the screen projection push control command of video or audio, and sends the broadcast AirPlay.from.breakin (screen projection push control command) to notify AirPlayApk to play.
S610、AirPlaySystemService广播投屏推送控制指令。S610, AirPlaySystemService broadcasts screen projection and pushes control instructions.
S611、AirPlayApk接收投屏推送控制指令,广播用于请求投屏播放启动参数的第三请求消息。S611. AirPlayApk receives the screen projection push control instruction and broadcasts a third request message for requesting the screen projection playback startup parameters.
AirPlayApk收到投屏推送控制指令,进行会话(Session)创建,同时发送广播AirPlay.reqbreakin.parameter(第三请求消息)至AirPlaySystemService请求启动参数。AirPlayApk receives the screen projection push control instruction, creates a session, and sends a broadcast AirPlay.reqbreakin.parameter (the third request message) to AirPlaySystemService to request startup parameters.
S612、AirPlaySystemService广播投屏播放启动参数。S612, AirPlaySystemService broadcasts screen casting and playback startup parameters.
AirPlaySystemService将启动参数用广播airplay.tis.action将投屏播放启动参数发送至AirPlayApk。AirPlaySystemService sends the startup parameters to AirPlayApk using the broadcast airplay.tis.action.
AirPlaySystemService接收到第三请求消息之后,可以将第三请求消息转发给AirPlayDaemon,AirPlayDaemon将投屏播放启动参数发送给AirPlaySystemService,AirPlaySystemService再将投屏播放启动参数发送给AirPlayApk。After receiving the third request message, AirPlaySystemService can forward the third request message to AirPlayDaemon. AirPlayDaemon sends the screen projection playback startup parameters to AirPlaySystemService, and AirPlaySystemService then sends the screen projection playback startup parameters to AirPlayApk.
S613、AirPlayApk基于投屏播放启动参数进行投屏播放。S613, AirPlayApk performs screen casting based on the screen casting startup parameters.
AirPlay调用launchAirPlayAppTIS告知底层投屏播放已启动,正在播放。AirPlay calls launchAirPlayAppTIS to inform the underlying screen casting that the playback has started and is playing.
如图16所示为基于AirPlay2应用的音频(Audio)数据推送流程。其中,发送(Sender)设备为智能设备,AirPlay Daemon和Luna为显示设备,Luna为AirPlayApk中的一部分。当显示设备接收到发送设备的音频推送时,音频缓存数据直接发送至AirPlay Daemon,元 (metadata)数据转发至AirPlay App中的Luna用于上层UI绘制。Sender设备与AirPlay Daemon节点之间通过Clock sync进行音频同步,以实现同时播放。Figure 16 shows the audio data push process based on AirPlay2 application. The sender device is a smart device, AirPlay Daemon and Luna are display devices, and Luna is a part of AirPlayApk. When the display device receives the audio push from the sender device, the audio cache data is directly sent to AirPlay Daemon. The (metadata) data is forwarded to Luna in the AirPlay App for upper-level UI drawing. The audio synchronization between the Sender device and the AirPlay Daemon node is performed through Clock sync to achieve simultaneous playback.
metadata数据又称中介数据、中继数据,为描述数据的数据(data about data),主要是描述数据属性(property)的信息,用来支持如指示存储位置、历史数据、资源查找、文件记录等功能。Metadata data, also known as intermediary data or relay data, is data about data. It mainly describes the properties of data and is used to support functions such as indicating storage location, historical data, resource search, and file records.
如图17所示为基于AirPlay2应用的视频(Video)数据推送流程。当显示设备接收到发送设备的视频推送时,发送视频URL至AirPlay Daemon,然后转发至AirPlay App中的Luna引擎,Luna完成媒体资源下载,视频播放与上层UI绘制。Figure 17 shows the video data push process based on AirPlay2 application. When the display device receives the video push from the sending device, it sends the video URL to AirPlay Daemon, which is then forwarded to the Luna engine in the AirPlay App. Luna completes the media resource download, video playback, and upper-layer UI drawing.
为了更加详细的说明本方案,以下将以示例性的方式结合图18至图22进行说明,可以理解的是,图18至图22中所涉及的步骤在实际实现时可以包括更多的步骤,或者更少的步骤,并且这些步骤之间的顺序也可以不同,以能够实现本申请实施例中提供的投屏处理方法为准。该投屏处理方法的执行主体可以为显示设备,也可以为显示设备中能够实现该投屏处理方法的功能模块或功能实体,此处不做限定。而且对根据本申请实施例的投屏处理方法的具体描述可以参考对上述显示设备的相关描述,且可以实现相同或相似的技术效果,此处不再赘述。In order to explain the present solution in more detail, the following will be explained in an exemplary manner in conjunction with Figures 18 to 22. It can be understood that the steps involved in Figures 18 to 22 may include more steps, or fewer steps in actual implementation, and the order of these steps may also be different, so as to implement the screen projection processing method provided in the embodiment of the present application. The executor of the screen projection processing method can be a display device, or it can be a functional module or functional entity in the display device that can implement the screen projection processing method, which is not limited here. Moreover, the specific description of the screen projection processing method according to the embodiment of the present application can refer to the relevant description of the above-mentioned display device, and the same or similar technical effects can be achieved, which will not be repeated here.
图18为根据本申请一个或多个实施例实现投屏处理方法的步骤流程图,该投屏处理方法可以包括:FIG. 18 is a flowchart of the steps of implementing a screen projection processing method according to one or more embodiments of the present application. The screen projection processing method may include:
S901、接收智能设备发送的投屏请求。S901. Receive a screen projection request sent by a smart device.
S902、响应于该投屏请求,在该显示设备处于假待机状态的情况下,基于AirPlay2应用控制该显示设备从假待机状态切换到开机状态。S902. In response to the screen projection request, when the display device is in a pseudo-standby state, control the display device to switch from the pseudo-standby state to the power-on state based on the AirPlay2 application.
S903、基于该AirPlay2应用执行该投屏请求对应的投屏操作。S903. Execute the screen projection operation corresponding to the screen projection request based on the AirPlay2 application.
在一些实施例中,该投屏请求为投屏连接请求,该投屏操作为建立投屏连接;结合图18,如图19所示,上述S903具体可以通过下述S903a实现。In some embodiments, the screen projection request is a screen projection connection request, and the screen projection operation is to establish a screen projection connection; in combination with FIG. 18 , as shown in FIG. 19 , the above S903 can be specifically implemented through the following S903a.
S903a、基于该AirPlay2应用建立该显示设备与该智能设备之间的投屏连接。S903a. Establish a screen projection connection between the display device and the smart device based on the AirPlay2 application.
在一些实施例中,该投屏请求为投屏推送请求,该投屏操作为播放投屏内容;结合图18,如图20所示,在上述S901之前,根据本申请实施例的投屏处理方法还可以包括下述S904和S905,上述S903具体可以通过下述S903b实现。In some embodiments, the screen projection request is a screen projection push request, and the screen projection operation is to play the projection content; in combination with Figure 18, as shown in Figure 20, before the above S901, the screen projection processing method according to the embodiment of the present application may also include the following S904 and S905, and the above S903 can be specifically implemented by the following S903b.
S904、基于该AirPlay2应用建立该显示设备与该智能设备之间的投屏连接。S904. Establish a screen projection connection between the display device and the smart device based on the AirPlay2 application.
S905、在满足目标条件的情况下,控制该显示设备从该开机状态切换至该假待机状态。S905: When the target condition is met, control the display device to switch from the power-on state to the pseudo-standby state.
S903b、基于该AirPlay2应用播放该投屏推送请求对应的投屏内容。S903b. Play the projection content corresponding to the projection push request based on the AirPlay2 application.
在一些实施例中,该目标条件包括以下任一项:预设时长内该显示设备的播放内容未发生变化;接收到进入假待机状态的用户输入。In some embodiments, the target condition includes any one of the following: the playback content of the display device does not change within a preset time period; a user input for entering a pseudo standby state is received.
在一些实施例中,结合图18,如图21所示,在上述S901之前,根据本申请实施例的投屏处理方法还可以包括下述S906。In some embodiments, in combination with FIG. 18 , as shown in FIG. 21 , before the above-mentioned S901 , the screen projection processing method according to the embodiment of the present application may further include the following S906 .
S906、响应于接收到的授权该AirPlay2应用具备唤醒功能的目标用户输入,确定该AirPlay2应用具备该唤醒功能。S906: In response to the received target user input authorizing the AirPlay2 application to have the wake-up function, determine that the AirPlay2 application has the wake-up function.
其中,该唤醒功能用于控制该显示设备从假待机状态切换到开机状态。The wake-up function is used to control the display device to switch from a pseudo-standby state to a power-on state.
在一些实施例中,结合图21,如图22所示,在上述S901之前,根据本申请实施例的投屏处理方法还可以包括下述S907。In some embodiments, in combination with Figure 21, as shown in Figure 22, before the above-mentioned S901, the screen projection processing method according to the embodiment of the present application may also include the following S907.
S907、显示授权提示信息。S907: Display authorization prompt information.
其中,该授权提示信息包括第一选项和第二选项,第一选项用于指示授权该AirPlay2应用具备唤醒功能,第二选项用于指示不授权该AirPlay2应用具备唤醒功能;该目标用户输入为选择第一选项的输入。Among them, the authorization prompt information includes a first option and a second option, the first option is used to indicate that the AirPlay2 application is authorized to have a wake-up function, and the second option is used to indicate that the AirPlay2 application is not authorized to have a wake-up function; the target user input is the input for selecting the first option.
在一些实施例中,该AirPlay2应用安装于该显示设备的系统目录下,该系统目录下的任一应用具备唤醒功能;其中,该唤醒功能用于控制该显示设备从假待机状态切换到开机状态。 In some embodiments, the AirPlay2 application is installed in the system directory of the display device, and any application in the system directory has a wake-up function; wherein the wake-up function is used to control the display device to switch from a pseudo-standby state to a power-on state.
除了上述用于解决iOS设备与电子设备A进行连接并初始化之后,无法实现动态更新iOS设备上显示的设备列表的技术问题的实施例,以及用于在假待机状态下可以实现投屏,从整个链路上减少了用户的操作成本,提高投屏处理效率,提升用户的操作体验的实施例之外,本申请还给出当电子设备作为显示设备时,进一步还可以解决其他技术问题的一些实施例的举例说明,具体如下:In addition to the above-mentioned embodiments for solving the technical problem that after the iOS device is connected to the electronic device A and initialized, the device list displayed on the iOS device cannot be dynamically updated, and the embodiments for realizing screen projection in the pseudo standby state, reducing the user's operating cost from the entire link, improving the screen projection processing efficiency, and enhancing the user's operating experience, the present application also provides examples of some embodiments that can further solve other technical problems when the electronic device is used as a display device, as follows:
近年来随着互联网的快速发展和人工智能(Artificial Intelligence,AI)技术的普及,显示设备,如智能电视在人们的日常生活中逐渐成为了家里的智能终端,其也是客厅娱乐的首选。尤其是在家庭聚会时,智能电视的大屏优势就会凸显出来,成为人们的主流娱乐方式。In recent years, with the rapid development of the Internet and the popularization of artificial intelligence (AI) technology, display devices such as smart TVs have gradually become smart terminals in people's daily lives, and they are also the first choice for living room entertainment. Especially during family gatherings, the large-screen advantage of smart TVs will be highlighted, becoming the mainstream entertainment method for people.
同时,随着用户需求的逐步提高,对大屏幕的要求也更高了。例如,用户希望可以在大屏幕上分享游戏实时画面;又如,用户希望在大屏幕上播放自己喜欢的视频。为了满足用户的需求,投屏功能能够很好的解决该问题。目前的显示设备能够同时支持多种投屏协议,如Miracast协议、AirPlay(隔空播放)协议等。At the same time, as user needs gradually increase, the requirements for large screens are also higher. For example, users hope to share real-time game images on a large screen; for another example, users hope to play their favorite videos on a large screen. In order to meet user needs, the screen projection function can solve this problem well. Current display devices can support multiple screen projection protocols at the same time, such as Miracast protocol, AirPlay (air playback) protocol, etc.
在通过投屏方式利用显示设备播放数据流的过程中,如果用户只想听到数据流的声音,可以操作显示设备进入目标模式。在目标模式下,显示设备只播放音频数据,并且显示器的显示开关处于关闭状态。但是,如果用户再次投屏播放其他数据流,如播放视频时,显示设备仍然会处于目标模式下,显示器的显示开关扔处于关闭状态,导致用户无法观看到视频的内容,用户体验感比较差。When playing a data stream on a display device through screen projection, if the user only wants to hear the sound of the data stream, the display device can be operated to enter target mode. In target mode, the display device only plays audio data, and the display switch of the display is in the off state. However, if the user casts the screen again to play other data streams, such as playing a video, the display device will still be in target mode, and the display switch of the display will still be in the off state, resulting in the user being unable to watch the content of the video, and the user experience is relatively poor.
针对上述问题,当上述电子设备作为显示设备时,本申请实施例还提出了一种投屏处理方法,显示设备的处理器首先获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,然后确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,其中,播放状态处于目标模式时,显示器的显示开关处于关闭状态,上述技术方案中,显示设备能够在确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式时,自动控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,避免由于目标模式导致当前播放非音频数据时,显示器的显示开关处于关闭状态,用户无法观看到非音频数据的内容,保证用户在投屏过程中,正常观看投屏内容,提升用户的使用体验。In response to the above-mentioned problem, when the above-mentioned electronic device is used as a display device, an embodiment of the present application further proposes a screen projection processing method, wherein the processor of the display device first obtains the type of the currently received projection data stream and the current playback status of the display device, and then determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state. In the above-mentioned technical scheme, the display device can automatically control the display switch of the display to be in the on state when determining that the type of the currently received projection data stream is non-audio data, and determining that the current playback status of the display device is in the target mode, and controls the display to display the non-audio data, thereby avoiding the situation where the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the screen projection process, thereby improving the user experience.
图23为根据本申请一个或多个实施例的显示设备中软件配置示意图。如图23所示,将系统分为三层,从上至下分别为应用程序(Applications)层(简称“应用层”)、应用程序框架(Application Framework)层(简称“框架层”)以及操作系统层。FIG23 is a schematic diagram of software configuration in a display device according to one or more embodiments of the present application. As shown in FIG23 , the system is divided into three layers, from top to bottom, namely, the application layer (Applications layer) (referred to as the "application layer"), the application framework layer (Application Framework layer) (referred to as the "framework layer"), and the operating system layer.
在一些实施例中,应用程序层中运行有至少一个应用程序,这些应用程序可以是操作系统自带的窗口(Window)程序、系统设置程序或时钟程序等;也可以是第三方开发者所开发的应用程序。在具体实施时,应用程序层中的应用程序包括但不限于以上举例。本实施例中应用层可以包括TV Input(电视的输入模块,也称频道列表模块)和隔空播放应用程序包(AirPlay Android Application Package,AirPlay APK),其中,AirPlay APK主要用于:获取整机(显示设备)的属性,如获取整机音量等,此处不做限定。In some embodiments, at least one application is running in the application layer, and these applications may be window programs, system settings programs, clock programs, etc. that come with the operating system; they may also be applications developed by third-party developers. In specific implementations, the applications in the application layer include but are not limited to the above examples. In this embodiment, the application layer may include TV Input (the input module of the TV, also known as the channel list module) and the AirPlay Android Application Package (AirPlay APK), where the AirPlay APK is mainly used to obtain the properties of the entire machine (display device), such as obtaining the volume of the entire machine, etc., which is not limited here.
在一些实施例中,框架层主要包括:切换通道(切Input,切TIS)、AirPlay服务以及音视频中间件。其中,AirPlay服务能够与AirPlay进程、AirPlay APK交互,并控制AirPlay APK的生命周期,并且能够通过接口调用与切换通道和音视频中间件进行交互;AirPlay服务通过广播与AirPlay APK交互;切换通道通过Java本地接口(Java Native Interface,JNI)与TV Input交互。In some embodiments, the framework layer mainly includes: switching channels (cutting Input, cutting TIS), AirPlay service and audio and video middleware. Among them, the AirPlay service can interact with the AirPlay process and AirPlay APK, and control the life cycle of AirPlay APK, and can interact with the switching channel and audio and video middleware through interface calls; the AirPlay service interacts with the AirPlay APK through broadcasting; the switching channel interacts with the TV Input through the Java Native Interface (JNI).
在一些实施例中,操作系统层主要包括:AirPlay进程和镜像、视频以及音频等功能模块的实现。其中,这里的操作系统可以为Linux。AirPlay进程主要为常驻的原生(native)进程,包括AirPlay协议栈,能够调用AirPlay具体的播放功能模块(镜像、视频或者音频等)实现对应的功能;AirPlay进程和AirPlay服务通过网络通信实现二者的交互,此处的 网络通信可以基于网络通信协议实现,例如套接字(socket)协议或者其他协议等,本实施例对此不做限定。In some embodiments, the operating system layer mainly includes: the AirPlay process and the implementation of mirroring, video and audio function modules. The operating system here can be Linux. The AirPlay process is mainly a resident native process, including the AirPlay protocol stack, which can call the AirPlay specific playback function module (mirror, video or audio, etc.) to implement the corresponding function; the AirPlay process and the AirPlay service realize the interaction between the two through network communication. The network communication may be implemented based on a network communication protocol, such as a socket protocol or other protocols, which is not limited in this embodiment.
在一些实施例中,当用户操作移动设备进行投屏时,AirPlay协议栈能够接收移动设备发送的投屏信息或者投屏请求,并将投屏信息或者投屏请求发送至AirPlay服务。AirPlay服务接收到投屏信息或者投屏请求(包括投屏参数)之后,能够确定当前待投屏数据流的类型(如视频、音频或者镜像等),同时也能够确定当前是否为首次投屏,若为首次投屏,则调用安卓电视输入框架(TV Input Framework,TIF)中的接口,以使TV Input进行频道切换,将显示设备的当前通道切换为AirPlay对应的通道;若非首次投屏,AirPlay服务会获取当前接收的投屏数据流的类型,以及调用音视频中间件接口获取显示设备当前的播放状态,若当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,那么AirPlay会调用音视频中间件接口,将Audio Only功能对应的开关关闭,以控制显示器的显示开关处于打开状态,此时显示器的屏幕会亮屏,显示器能够显示非音频数据。In some embodiments, when a user operates a mobile device to cast a screen, the AirPlay protocol stack can receive the casting information or casting request sent by the mobile device, and send the casting information or casting request to the AirPlay service. After receiving the casting information or casting request (including casting parameters), the AirPlay service can determine the type of the current casting data stream (such as video, audio or mirror, etc.), and can also determine whether it is the first casting. If it is the first casting, the interface in the Android TV input framework (TV Input Framework, TIF) is called to switch the channel of the TV Input, and switch the current channel of the display device to the channel corresponding to AirPlay; if it is not the first casting, the AirPlay service will obtain the type of the currently received casting data stream, and call the audio and video middleware interface to obtain the current playback status of the display device. If the type of the currently received casting data stream is non-audio data, and it is determined that the current playback status of the display device is in target mode, then AirPlay will call the audio and video middleware interface to turn off the switch corresponding to the Audio Only function to control the display switch of the display to be in the on state, at which time the screen of the display will light up, and the display can display non-audio data.
需要说明的是,图23是以显示设备采用安卓平台为例对显示设备中软件配置进行说明,不用于对其进行限定。It should be noted that FIG. 23 illustrates the software configuration in the display device by taking the display device using the Android platform as an example, and is not intended to limit it.
图24为根据本申请一个或多个实施例的显示设备中应用程序的图标控件界面显示示意图。如图24中所示,应用程序层包含至少一个应用程序可以在显示器中显示对应的图标控件,如:直播电视应用程序图标控件、视频点播应用程序图标控件、媒体中心应用程序图标控件、应用程序中心图标控件、游戏应用图标控件等。直播电视应用程序,可以通过不同的信号源提供直播电视。视频点播应用程序,可以提供来自不同存储源的视频。不同于直播电视应用程序,视频点播提供来自某些存储源的视频显示。媒体中心应用程序,可以提供各种多媒体内容播放的应用程序。应用程序中心,可以提供储存各种应用程序。Figure 24 is a schematic diagram of the icon control interface display of an application in a display device according to one or more embodiments of the present application. As shown in Figure 24, the application layer includes at least one application that can display a corresponding icon control in the display, such as: a live TV application icon control, a video on demand application icon control, a media center application icon control, an application center icon control, a game application icon control, etc. The live TV application can provide live TV through different signal sources. The video on demand application can provide videos from different storage sources. Unlike the live TV application, the video on demand provides video display from certain storage sources. The media center application can provide applications for playing various multimedia content. The application center can provide storage for various applications.
在一些实施例中,上述显示设备是具有显示功能的终端设备,例如电视机、手机、电脑、学习机等。该显示设备中:In some embodiments, the display device is a terminal device with a display function, such as a television, a mobile phone, a computer, a learning machine, etc. In the display device:
输出接口(显示器260,和/或,音频输出接口270),被配置为输出用户交互信息;An output interface (display 260 and/or audio output interface 270 ) configured to output user interaction information;
通信器220,用于与服务器进行通信;A communicator 220, used for communicating with a server;
处理器250,被配置为执行存储器中的计算机指令以使得设备执行:The processor 250 is configured to execute computer instructions in the memory to cause the device to perform:
获取当前接收的投屏数据流的类型以及所述显示设备当前的播放状态;Obtain the type of the currently received projection data stream and the current playback status of the display device;
确定所述当前接收的投屏数据流的类型为非音频数据,以及确定所述显示设备当前的播放状态处于目标模式,控制所述显示器的显示开关处于打开状态,并控制所述显示器显示所述非音频数据,其中,所述播放状态处于所述目标模式时,所述显示器的显示开关处于关闭状态。Determine that the type of the currently received projection data stream is non-audio data, and determine that the current playback state of the display device is in target mode, control the display switch of the display to be in an on state, and control the display to display the non-audio data, wherein when the playback state is in the target mode, the display switch of the display is in a off state.
在一些实施例中,处理器250,还被配置为:In some embodiments, the processor 250 is further configured to:
所述确定所述当前接收的投屏数据流的类型为非音频数据,以及确定所述显示设备当前的播放状态处于目标模式之后,控制所述显示器显示提示信息,所述提示信息用于提示用户是否打开所述显示器的显示开关;After determining that the type of the currently received projection data stream is non-audio data and determining that the current playback state of the display device is in the target mode, controlling the display to display prompt information, wherein the prompt information is used to prompt the user whether to turn on the display switch of the display;
接收到打开所述显示器的显示开关的操作,控制所述显示器的显示开关处于打开状态,并控制所述显示器显示所述非音频数据。When an operation of turning on a display switch of the display is received, the display switch of the display is controlled to be in an on state, and the display is controlled to display the non-audio data.
在一些实施例中,处理器250,进一步被配置为:In some embodiments, the processor 250 is further configured to:
响应于当前投屏请求,确定所述显示设备的通道信息;In response to the current screen projection request, determining channel information of the display device;
当根据所述通道信息确定所述显示设备的通道为隔空播放对应的通道,且所述当前投屏请求为非镜像投屏请求时,获取当前接收的投屏数据流的类型以及所述显示设备当前的播放状态。When it is determined according to the channel information that the channel of the display device is the channel corresponding to the airplay, and the current screen projection request is a non-mirror screen projection request, the type of the currently received screen projection data stream and the current playback status of the display device are obtained.
在一些实施例中,处理器250,进一步被配置为:In some embodiments, the processor 250 is further configured to:
调用音视频中间件接口,获取只播声音Audio Only功能对应的开关的状态;Call the audio and video middleware interface to obtain the switch status corresponding to the Audio Only function;
当所述状态为打开状态时,确定所述显示设备当前的播放状态处于所述目标模式。 When the state is the on state, it is determined that the current playback state of the display device is in the target mode.
在一些实施例中,处理器250,进一步被配置为:In some embodiments, the processor 250 is further configured to:
调用所述音视频中间件接口,将所述Audio Only功能对应的开关关闭,以控制所述显示器的显示开关处于所述打开状态。Call the audio and video middleware interface and turn off the switch corresponding to the Audio Only function to control the display switch of the display to be in the on state.
在一些实施例中,处理器250,还被配置为:In some embodiments, the processor 250 is further configured to:
确定所述当前投屏请求为首次投屏请求,建立所述显示设备与所述当前投屏请求的发送方的投屏连接,以及将所述显示设备的通道切换为所述隔空播放对应的通道;Determine that the current screen projection request is a first screen projection request, establish a screen projection connection between the display device and the sender of the current screen projection request, and switch the channel of the display device to the channel corresponding to the airplay;
基于所述投屏连接和所述隔空播放对应的通道,接收所述发送方发送的数据流,并播放所述数据流。Based on the screen projection connection and the channel corresponding to the airplay, the data stream sent by the sender is received and the data stream is played.
在一些实施例中,所述显示设备与所述当前投屏请求的发送方之间的投屏协议为:隔空播放AirPlay协议。In some embodiments, the screen projection protocol between the display device and the sender of the current screen projection request is: AirPlay protocol.
综上所述,本申请实施例通过在显示设备上执行上述投屏处理方法,显示设备的处理器首先获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,然后确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,其中,播放状态处于目标模式时,显示器的显示开关处于关闭状态,上述技术方案中,显示设备能够在确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式时,自动控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,避免由于目标模式导致当前播放非音频数据时,显示器的显示开关处于关闭状态,用户无法观看到非音频数据的内容,保证用户在投屏过程中,正常观看投屏内容,提升用户的使用体验。To summarize, the embodiment of the present application executes the above-mentioned screen projection processing method on the display device. The processor of the display device first obtains the type of the currently received screen projection data stream and the current playback status of the display device, and then determines that the type of the currently received screen projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state. In the above-mentioned technical scheme, the display device can automatically control the display switch of the display to be in the on state and control the display to display the non-audio data when determining that the type of the currently received screen projection data stream is non-audio data and determining that the current playback status of the display device is in the target mode, so as to avoid the situation where the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the screen projection process and improving the user experience.
图25为根据本申请实施例一个或多个实施例进行投屏处理的系统框架图。如图25所示,该系统中可以包括获取模块401、确定模块402以及控制模块403。该系统首先通过获取模块401获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,然后确定模块402确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,最后控制模块403控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,其中,播放状态处于目标模式时,显示器的显示开关处于关闭状态,上述技术方案中,显示设备能够在确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式时,自动控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,无需用户手动操作,避免由于目标模式导致当前播放非音频数据时,显示器的显示开关处于关闭状态,用户无法观看到非音频数据的内容,保证用户在投屏过程中,正常观看投屏内容,提升用户的使用体验。FIG25 is a system framework diagram for performing screen projection processing according to one or more embodiments of the present application. As shown in FIG25, the system may include an acquisition module 401, a determination module 402, and a control module 403. The system first acquires the type of the currently received screen projection data stream and the current playback state of the display device through the acquisition module 401, and then the determination module 402 determines that the type of the currently received screen projection data stream is non-audio data, and determines that the current playback state of the display device is in the target mode. Finally, the control module 403 controls the display switch of the display to be in an open state, and controls the display to display non-audio data, wherein, when the playback state is in the target mode, the display switch of the display is in a closed state. In the above technical solution, the display device can automatically control the display switch of the display to be in an open state when determining that the type of the currently received screen projection data stream is non-audio data, and when determining that the current playback state of the display device is in the target mode, and control the display to display non-audio data, without the need for manual operation by the user, to avoid the display switch of the display being in a closed state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, ensuring that the user can normally view the projection content during the screen projection process, and improving the user's experience.
为了更加详细的说明本申请实施例中的投屏处理方案,以下将以示例性的方式结合图26进行说明,可以理解的是,图26中所涉及的步骤在实际实现时可以包括更多的步骤,或者更少的步骤,并且这些步骤之间的顺序也可以不同,以能够实现本申请实施例中提供的投屏处理方法为准,本申请实施例不做限定。In order to explain the screen projection processing scheme in the embodiment of the present application in more detail, the following will be explained in an exemplary manner in combination with Figure 26. It can be understood that the steps involved in Figure 26 may include more steps, or fewer steps in actual implementation, and the order of these steps may also be different, so as to implement the screen projection processing method provided in the embodiment of the present application. The embodiment of the present application is not limited.
图26为根据本申请实施例的一种投屏处理方法的流程示意图。本实施例可适用于在投屏过程中,防止出现显示器的显示开关处于关闭状态,导致无法观看投屏内容的情况。如图26所示,该投屏处理方法具体包括如下步骤:FIG26 is a flow chart of a screen projection processing method according to an embodiment of the present application. This embodiment can be applied to prevent the display switch of the display from being in the off state during the screen projection process, resulting in the inability to view the projected content. As shown in FIG26, the screen projection processing method specifically includes the following steps:
S51,获取当前接收的投屏数据流的类型以及显示设备当前的播放状态。S51, obtain the type of the currently received screen projection data stream and the current playback status of the display device.
其中,当前接收的投屏数据流可以理解为显示设备当前接收到的,由移动设备发送的投屏数据流。可以理解的是:用户可以操作移动设备进行投屏,在投屏过程中,用户可以进行多次投屏,例如,先投音频数据,接着投视频数据,再投图片数据等,相应的,移动设备就会向显示设备发送多个投屏数据流,本实施例中对投屏过程中向显示设备发送投屏数据流的移动设备不做具体限定,可以为同一个移动设备,也可以为不同的移动设备。移动设备可以包括手机、Ipad或者macbook等支持Airplay协议的客户端设备。投屏数据流的类型可以包括音频数据和非音频数据,其中,音频数据即声音相关的数据,如音乐、录 音等;非音频数据可以包括视频流、直播流或者广播流等包含画面内容的数据。显示设备当前的播放状态可以包括:显示设备当前仅播放音频、显示设备当前仅播放画面内容或者显示设备当前同时播放音频和画面内容等。Among them, the currently received screen projection data stream can be understood as the screen projection data stream currently received by the display device and sent by the mobile device. It can be understood that: the user can operate the mobile device to cast the screen. During the screen projection process, the user can perform multiple screen projections, for example, first cast audio data, then cast video data, and then cast image data, etc. Correspondingly, the mobile device will send multiple screen projection data streams to the display device. In this embodiment, there is no specific limitation on the mobile device that sends the screen projection data stream to the display device during the screen projection process. It can be the same mobile device or different mobile devices. Mobile devices may include client devices that support the Airplay protocol, such as mobile phones, iPads, or macbooks. The types of screen projection data streams may include audio data and non-audio data, among which audio data is sound-related data, such as music, recordings, etc. The non-audio data may include video streams, live streams, or broadcast streams, etc. The current playback status of the display device may include: the display device is currently playing only audio, the display device is currently playing only picture content, or the display device is currently playing both audio and picture content.
为了解决在投屏过程中,由于显示器的显示开关处于关闭状态,导致用户无法观看投屏内容的情况,显示设备的处理器获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,以便确定当前接收的投屏数据流的类型是否为非音频数据,以及确定显示设备当前的播放状态是否处于目标模式,从而有利于后续步骤的执行。In order to solve the problem that the user cannot view the projected content because the display switch of the display is in the off state during the screen projection process, the processor of the display device obtains the type of the currently received projection data stream and the current playback status of the display device, so as to determine whether the type of the currently received projection data stream is non-audio data, and determine whether the current playback status of the display device is in target mode, thereby facilitating the execution of subsequent steps.
S52,确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示设备的显示器的显示开关处于打开状态,并控制显示器显示非音频数据。S52, determine that the type of the currently received projection data stream is non-audio data, and determine that the current playback state of the display device is in target mode, control the display switch of the display device to be in the on state, and control the display to display non-audio data.
其中,播放状态处于目标模式时,显示器的显示开关处于关闭状态,即:在目标模式时,显示器为黑屏状态,此时用户无法观看画面内容。显示器的显示开关可以理解为控制显示器为黑屏状态或者亮屏状态的开关。When the playback state is in the target mode, the display switch of the display is in the off state, that is, in the target mode, the display is in a black screen state, and the user cannot view the screen content. The display switch of the display can be understood as a switch that controls the display to be in a black screen state or a bright screen state.
显示设备的处理器根据当前接收的投屏数据流的类型以及显示设备当前的播放状态,确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,说明显示设备此时要投屏播放非音频数据,但是显示器的显示开关处于关闭状态,无法正常播放非音频数据的画面内容。因此,显示设备的处理器控制显示设备的显示器的显示开关处于打开状态,并控制显示器显示非音频数据(画面内容),从而达到正常播放非音频数据的效果。The processor of the display device determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback state of the display device is in target mode, based on the type of the currently received projection data stream and the current playback state of the display device, indicating that the display device is now projecting and playing non-audio data, but the display switch of the display is in the off state, and the screen content of the non-audio data cannot be played normally. Therefore, the processor of the display device controls the display switch of the display device to be in the on state, and controls the display to display non-audio data (screen content), so as to achieve the effect of normal playback of non-audio data.
本实施例中,显示设备的处理器首先获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,然后确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,其中,播放状态处于目标模式时,显示器的显示开关处于关闭状态,上述技术方案中,显示设备能够在确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式时,自动控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,无需用户手动操作,避免由于目标模式导致当前播放非音频数据时,显示器的显示开关处于关闭状态,用户无法观看到非音频数据的内容,保证用户在投屏过程中,正常观看投屏内容,提升用户的使用体验。In this embodiment, the processor of the display device first obtains the type of the currently received projection data stream and the current playback status of the display device, and then determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state. In the above technical scheme, the display device can automatically control the display switch of the display to be in the on state and control the display to display the non-audio data when determining that the type of the currently received projection data stream is non-audio data and determining that the current playback status of the display device is in the target mode, without the need for manual operation by the user, thereby avoiding the situation where the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the projection process, thereby improving the user experience.
在一些实施例中,确定所述显示设备当前的播放状态处于目标模式,可以具体包括:In some embodiments, determining that the current playback state of the display device is in the target mode may specifically include:
调用音视频中间件接口,获取只播声音Audio Only功能对应的开关的状态;Call the audio and video middleware interface to obtain the switch status corresponding to the Audio Only function;
当所述状态为打开状态时,确定所述显示设备当前的播放状态处于所述目标模式。When the state is the on state, it is determined that the current playback state of the display device is in the target mode.
其中,Audio Only功能为显示设备提供的只播声音,关闭显示设备屏幕的功能。关闭显示设备屏幕,即:控制显示器的显示开关处于关闭状态。Audio Only功能对应的开关可以理解为用来控制打开或者关闭该功能的模块。Audio Only功能对应的开关的状态可以由用户操作遥控器或者与显示设备相连的移动设备来控制,例如通过点击遥控器的菜单(Menu)按键(也可以为其它按键,本实施例不做限定),可以调出Audio Only功能对应的开关,从而对其状态进行控制。音视频中间件接口可以理解为记录和控制Audio Only功能对应的开关的状态的接口。Among them, the Audio Only function is a function provided by the display device to play only sound and turn off the display device screen. Turning off the display device screen means: controlling the display switch of the display to be in the off state. The switch corresponding to the Audio Only function can be understood as a module used to control turning this function on or off. The state of the switch corresponding to the Audio Only function can be controlled by the user operating the remote control or the mobile device connected to the display device. For example, by clicking the Menu button of the remote control (it can also be other buttons, which is not limited in this embodiment), the switch corresponding to the Audio Only function can be called up to control its state. The audio and video middleware interface can be understood as an interface for recording and controlling the state of the switch corresponding to the Audio Only function.
具体的,显示设备的处理器调用音视频中间件接口,能够获取到Audio Only功能对应的开关的状态,当Audio Only功能对应的开关的状态为打开状态时,能够确定显示设备当前的播放状态处于目标模式。Specifically, the processor of the display device calls the audio and video middleware interface to obtain the status of the switch corresponding to the Audio Only function. When the status of the switch corresponding to the Audio Only function is on, it can be determined that the current playback status of the display device is in the target mode.
本实施例中,通过上述方法确定显示设备当前的播放状态处于目标模式,简单、快捷且高效。In this embodiment, determining that the current playback state of the display device is in the target mode by the above method is simple, fast and efficient.
在一些实施例中,控制所述显示器的显示开关处于打开状态,可以具体包括:In some embodiments, controlling the display switch of the display to be in an on state may specifically include:
调用所述音视频中间件接口,将所述Audio Only功能对应的开关关闭,以控制所述显示器的显示开关处于所述打开状态。 The audio and video middleware interface is called to turn off the switch corresponding to the Audio Only function to control the display switch of the display to be in the on state.
具体的,显示设备的处理器调用音视频中间件接口,将Audio Only功能对应的开关关闭,即:将显示设备只播声音,关闭显示设备屏幕的功能关闭,在将Audio Only功能对应的开关关闭之后,能够控制显示器的显示开关处于打开状态,此时显示器能够正常显示画面。Specifically, the processor of the display device calls the audio and video middleware interface to turn off the switch corresponding to the Audio Only function, that is, the display device only plays sound and the function of turning off the display device screen is turned off. After turning off the switch corresponding to the Audio Only function, the display switch of the display can be controlled to be in the on state, and the display can display the picture normally.
本实施例中,通过上述方法能够自动控制显示器的显示开关处于打开状态,简单高效,无需用户手动操作,避免显示器在播放非音频数据时,由于显示器处于黑屏状态,无法正常显示画面的情况。In this embodiment, the above method can automatically control the display switch of the display to be in the on state, which is simple and efficient, and does not require manual operation by the user, thereby avoiding the situation where the display cannot display the picture normally because the display is in a black screen state when playing non-audio data.
示例性的,图27为根据本申请实施例的当显示设备当前的播放状态处于目标模式时,显示器的界面示意图。如图27所示,当显示设备当前的播放状态处于目标模式时(即Audio Only功能对应的开关的状态未打开状态),显示器的显示开关处于关闭状态,此时,显示器的界面即为黑屏的界面。Exemplarily, FIG27 is a schematic diagram of the interface of the display when the current playback state of the display device is in the target mode according to an embodiment of the present application. As shown in FIG27, when the current playback state of the display device is in the target mode (i.e., the state of the switch corresponding to the Audio Only function is not turned on), the display switch of the display is in the off state, and at this time, the interface of the display is a black screen interface.
示例性的,图28为根据本申请实施例的一种显示器的显示开关处于打开状态,且显示器显示非音频数据时,显示器的界面示意图。如图28所示,当显示器的显示开关处于打开状态,且显示器显示非音频数据时,显示器正常显示非视频数据对应的画面内容。Exemplarily, Figure 28 is a schematic diagram of the interface of a display when a display switch of a display according to an embodiment of the present application is in an on state and the display displays non-audio data. As shown in Figure 28, when the display switch of the display is in an on state and the display displays non-audio data, the display normally displays the screen content corresponding to the non-video data.
需要说明的是:图28中所示的画面内容仅用于示例性说明,该画面内容可以根据非视频数据对应的播放进度确定,本实施例对此不做限定。It should be noted that the screen content shown in FIG. 28 is only for exemplary description, and the screen content can be determined according to the playback progress corresponding to the non-video data, which is not limited in this embodiment.
图29为根据本申请实施例的另一种投屏处理方法的流程示意图。本实施例是在上述实施例的基础上进行优化。本实施例可适用于对确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式之后的过程进行说明。如图29所示,该投屏处理方法具体包括如下步骤:Figure 29 is a flow chart of another screen projection processing method according to an embodiment of the present application. This embodiment is optimized on the basis of the above embodiment. This embodiment can be applied to the process of determining that the type of the currently received screen projection data stream is non-audio data, and determining that the current playback state of the display device is in the target mode. As shown in Figure 29, the screen projection processing method specifically includes the following steps:
S291,获取当前接收的投屏数据流的类型以及显示设备当前的播放状态。S291, obtain the type of the currently received screen projection data stream and the current playback status of the display device.
S292,确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示器显示提示信息。S292, determine that the type of the currently received projection data stream is non-audio data, and determine that the current playback state of the display device is in target mode, and control the display to display prompt information.
其中,提示信息用于提示用户是否打开显示器的显示开关。The prompt information is used to prompt the user whether to turn on the display switch of the display.
显示设备的处理器确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示器显示提示信息,通过该提示信息能够提示用户是否打开显示器的显示开关。The processor of the display device determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback state of the display device is in target mode, and controls the display to display prompt information, through which the user can be prompted whether to turn on the display switch of the display.
S293,接收到打开显示器的显示开关的操作,控制显示器的显示开关处于打开状态,并控制显示器显示视频数据。S293, receiving an operation of turning on a display switch of the display, controlling the display switch of the display to be in an on state, and controlling the display to display video data.
当显示设备的处理器接收到用户触发的打开显示器的显示开关的操作,则控制显示器的显示开关处于打开状态,并控制显示器显示视频数据。When the processor of the display device receives an operation of turning on a display switch of the display triggered by the user, the processor controls the display switch of the display to be in an on state, and controls the display to display video data.
本实施例中,显示设备的处理器首先获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,然后确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示器显示提示信息,最后接收到打开显示器的显示开关的操作,控制显示器的显示开关处于打开状态,并控制显示器显示视频数据,通过显示器显示提示信息,能够对用户进行提示,使用户知道在之前投屏时,关闭了显示器的显示开关,能够增加人机交互体验,同时,在接收到打开显示器的显示开关的操作之后,控制显示器的显示开关处于打开状态,并控制显示器显示视频数据,避免出现由于目标模式导致当前播放非音频数据时,显示器的显示开关处于关闭状态(即黑屏状态),用户无法观看到非音频数据的内容的情况,保证用户在投屏过程中,能够正常观看投屏内容,提升用户的使用体验。In this embodiment, the processor of the display device first obtains the type of the currently received projection data stream and the current playback status of the display device, then determines that the type of the currently received projection data stream is non-audio data, and determines that the current playback status of the display device is in target mode, controls the display to display prompt information, and finally receives an operation to turn on the display switch of the display, controls the display switch of the display to be in an on state, and controls the display to display video data. By displaying the prompt information on the display, the user can be prompted to know that the display switch of the display was turned off during the previous screen projection, which can increase the human-computer interaction experience. At the same time, after receiving the operation to turn on the display switch of the display, the display switch of the display is controlled to be in an on state, and controls the display to display video data, avoiding the situation where the display switch of the display is in a closed state (i.e., a black screen state) when non-audio data is currently playing due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally watch the projection content during the screen projection process and improving the user's usage experience.
示例性的,图30为根据本申请实施例的一种显示器显示提示信息时的界面示意图。如图30所示,显示设备的处理器在确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式之后,能够控制显示器显示提示信息,该提示信息中可以包括倒计时提示,具体可以为显示设备的处理器启动5分钟倒计时,在距离倒计时结束15s时弹出如图30所示的提示页面,该页面中包括:是否打开显示器的显示开 关,可操作选项包括“是”和“否”。其中,是用于打开显示器的显示开关,否用于不打开显示器的显示开关。右上角的15s为时间提示,随着时间的变化其数值会不断减小,直到为0。Exemplarily, FIG30 is a schematic diagram of an interface when a display displays prompt information according to an embodiment of the present application. As shown in FIG30, after the processor of the display device determines that the type of the currently received projection data stream is non-audio data and that the current playback state of the display device is in target mode, it can control the display to display prompt information. The prompt information may include a countdown prompt. Specifically, the processor of the display device can start a 5-minute countdown, and a prompt page as shown in FIG30 will pop up 15 seconds before the countdown ends. The page includes: whether to turn on the display switch of the display. Off, the operable options include "Yes" and "No". Among them, Yes is used to turn on the display switch of the display, and No is used to turn off the display switch of the display. The 15s in the upper right corner is a time prompt, and its value will continue to decrease as time changes until it reaches 0.
通过图30所示的提示页面,能够提示用户是否通过打开显示器的显示开关的操作,避免显示器仍处于黑屏状态。如果未接收到用户操作,则显示设备的处理器默认在15s后自动关闭提示页面,并自动打开显示器的显示开关。The prompt page shown in FIG30 can prompt the user whether to turn on the display switch of the display to avoid the display being in a black screen state. If no user operation is received, the processor of the display device automatically closes the prompt page after 15 seconds by default and automatically turns on the display switch of the display.
可以理解的是:5分钟和15s均为自定义数值,还可以为其他数值,本实施例不对其进行限定。It is understandable that 5 minutes and 15 seconds are both user-defined values and may be other values, which are not limited in this embodiment.
在一些实施例中,获取当前接收的投屏数据流的类型以及所述显示设备当前的播放状态,可以具体包括:In some embodiments, obtaining the type of the currently received screen projection data stream and the current playback status of the display device may specifically include:
响应于当前投屏请求,确定所述显示设备的通道信息;In response to the current screen projection request, determining channel information of the display device;
当根据所述通道信息确定所述显示设备的通道为隔空播放对应的通道,且所述当前投屏请求为非镜像投屏请求时,获取当前接收的投屏数据流的类型以及所述显示设备当前的播放状态。When it is determined according to the channel information that the channel of the display device is the channel corresponding to the airplay, and the current screen projection request is a non-mirror screen projection request, the type of the currently received screen projection data stream and the current playback status of the display device are obtained.
其中,当前投屏请求可以理解为:显示设备当前接收到的,由移动设备发送的投屏请求。投屏请求中可以携带相关的投屏参数,例如镜像、投屏视频或者投屏音频等信息。The current screen projection request can be understood as: the screen projection request currently received by the display device and sent by the mobile device. The screen projection request can carry relevant screen projection parameters, such as mirroring, screen projection video or screen projection audio information.
具体的,显示设备的处理器接收到移动设备发送的当前投屏请求之后,响应于该当前投屏请求,确定显示设备的通道信息,其中,通信信息可以为显示设备当前对应的通道的标识信息。当显示设备的处理器根据通道信息确定显示设备的通道为隔空播放对应的通道(说明当前投屏请求为非首次投屏请求,即不是第一次投屏),并且当前投屏请求为非镜像投屏请求时,获取当前接收的投屏数据流的类型以及显示设备当前的播放状态。Specifically, after the processor of the display device receives the current screen projection request sent by the mobile device, it determines the channel information of the display device in response to the current screen projection request, wherein the communication information may be the identification information of the channel currently corresponding to the display device. When the processor of the display device determines that the channel of the display device is the channel corresponding to the airplay according to the channel information (indicating that the current screen projection request is not the first screen projection request, that is, it is not the first screen projection), and the current screen projection request is a non-mirror screen projection request, the type of the currently received screen projection data stream and the current playback status of the display device are obtained.
需要说明的是:若当前投屏请求为首次投屏请求或者镜像投屏请求,显示设备会执行切换通道的逻辑,即:将显示设备的通道切换为隔空播放对应的通道。显示设备执行切换通道的逻辑之后,显示器不会出现黑屏的情况。而在当前投屏请求为:非首次投屏请求且非镜像投屏请求时,显示设备不会执行切换通道的逻辑,在这种情况下,若显示设备当前的播放状态处于目标模式(该目标模式可以为之前投屏时设置的),则显示器会保持黑屏的状态(即:显示器的显示开关处于关闭状态)。It should be noted that: if the current screen projection request is the first screen projection request or a mirrored screen projection request, the display device will execute the logic of switching channels, that is, switch the channel of the display device to the channel corresponding to the airplay. After the display device executes the logic of switching channels, the display will not have a black screen. When the current screen projection request is: not the first screen projection request and not a mirrored screen projection request, the display device will not execute the logic of switching channels. In this case, if the current playback state of the display device is in target mode (the target mode can be set during the previous screen projection), the display will remain in a black screen state (that is, the display switch of the display is in the off state).
本实施例中,在上述条件下,获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,有利于后续确定是否执行控制显示器的显示开关处于打开状态的步骤,防止由于显示器的显示开关处于关闭状态,导致无法播放非音频数据的画面内容的情况。In this embodiment, under the above conditions, obtaining the type of the currently received projection data stream and the current playback status of the display device is conducive to the subsequent determination of whether to execute the step of controlling the display switch of the display to be in the on state, thereby preventing the situation where the non-audio data screen content cannot be played due to the display switch of the display being in the off state.
需要说明的是:若当前投屏请求为首次投屏请求,显示设备会执行切换通道的逻辑,此处对首次投屏请求对应的投屏数据流的类型不做限制,即:无论投屏数据流为音频数据还是非音频数据,显示设备都会执行切换通道的逻辑。It should be noted that: if the current screen projection request is the first screen projection request, the display device will execute the logic of switching channels. There is no restriction on the type of screen projection data stream corresponding to the first screen projection request, that is: regardless of whether the screen projection data stream is audio data or non-audio data, the display device will execute the logic of switching channels.
示例性的,图31为根据本申请实施例的一种显示设备进入输入页面时,显示器的界面示意图。如图31所示,用户可以操作遥控器的输入(Input)按键或者操作其他与显示设备相连的移动设备,从而进入输入页面,该页面中可以包括多个选项,如:Home(主页面)、TV(电视)、AirPlay、HDMI(高清多媒体接口,High Definition Multimedia Interface)1以及HDMI2等,从该页面中某一个选项切换到另一个选项时,显示设备均会执行切换通道的逻辑。Exemplarily, FIG31 is a schematic diagram of the interface of a display when a display device enters an input page according to an embodiment of the present application. As shown in FIG31, a user can operate the input button of a remote control or operate other mobile devices connected to the display device to enter the input page, which may include multiple options, such as: Home, TV, AirPlay, HDMI (High Definition Multimedia Interface) 1 and HDMI2, etc. When switching from one option in the page to another, the display device will execute the logic of switching channels.
在一些实施例中,当AirPlay的入口在设置中,选择AirPlay选项是,显示设备也会执行切换通道的逻辑。In some embodiments, when the AirPlay portal is in the settings and the AirPlay option is selected, the display device will also execute the logic of switching channels.
在一些实施例中,所述方法还可以具体包括:In some embodiments, the method may further specifically include:
确定所述当前投屏请求为首次投屏请求,建立所述显示设备与所述当前投屏请求的发送方的投屏连接,以及将所述显示设备的通道切换为所述隔空播放对应的通道;Determine that the current screen projection request is a first screen projection request, establish a screen projection connection between the display device and the sender of the current screen projection request, and switch the channel of the display device to the channel corresponding to the airplay;
基于所述投屏连接和所述隔空播放对应的通道,接收所述发送方发送的数据流,并播放所述数据流。 Based on the screen projection connection and the channel corresponding to the airplay, the data stream sent by the sender is received and the data stream is played.
其中,当前投屏请求的发送方可以为任一移动设备,本实施例对此不做限定。Among them, the sender of the current screen projection request can be any mobile device, and this embodiment does not limit this.
具体的,显示设备的处理器接收到移动设备发送的当前投屏请求后,响应于当前投屏请求,确定显示设备的通道信息,当根据通道信息确定显示设备的通道不是隔空播放对应的通道时,能够确定当前投屏请求为首次投屏请求,此时,显示设备的处理器基于该首次投屏请求,建立显示设备与当前投屏请求的发送方的投屏连接,并且将显示设备的通道切换为隔空播放对应的通道。同时,由于当前投屏请求为首次投屏请求,显示设备会执行切换通道的逻辑,显示设备在执行切换通道的逻辑之后,显示器不会出现黑屏的情况,因此,显示设备的处理器基于该投屏连接和所述隔空播放对应的通道,在接收发送方发送的数据流之后,能够正常播放数据流。Specifically, after the processor of the display device receives the current screen projection request sent by the mobile device, it determines the channel information of the display device in response to the current screen projection request. When it is determined according to the channel information that the channel of the display device is not the channel corresponding to the airplay, it can be determined that the current screen projection request is the first screen projection request. At this time, the processor of the display device establishes a screen projection connection between the display device and the sender of the current screen projection request based on the first screen projection request, and switches the channel of the display device to the channel corresponding to the airplay. At the same time, since the current screen projection request is the first screen projection request, the display device will execute the logic of switching channels. After the display device executes the logic of switching channels, the display will not have a black screen. Therefore, the processor of the display device can play the data stream normally after receiving the data stream sent by the sender based on the screen projection connection and the channel corresponding to the airplay.
本实施例中,通过上述过程,能够保证首次投屏时,正常播放对应的数据流。In this embodiment, through the above process, it can be ensured that the corresponding data stream is played normally when the screen is projected for the first time.
在一些实施例中,所述显示设备与所述当前投屏请求的发送方之间的投屏协议为:隔空播放AirPlay协议。In some embodiments, the screen projection protocol between the display device and the sender of the current screen projection request is: AirPlay protocol.
其中,AirPlay协议是iOS操作系统中的播放技术,能够将iOS或更新版上的文件(包括视频、照片和镜像)传送到支持隔空播放的设备。Among them, the AirPlay protocol is a playback technology in the iOS operating system, which can transfer files (including videos, photos and mirrors) on iOS or later versions to devices that support airplay.
具体的,隔空播放协议中存在切换通道的逻辑,因此本实施例中显示设备与当前投屏请求的发送方之间的投屏协议为:隔空播放协议。Specifically, there is a logic of switching channels in the AirPlay protocol. Therefore, the screen projection protocol between the display device and the sender of the current screen projection request in this embodiment is: AirPlay protocol.
示例性的,图32为根据本申请实施例的一种显示设备的投屏流程的示意图。如图32所示,显示设备的投屏流程可以包括以下步骤:For example, FIG32 is a schematic diagram of a screen projection process of a display device according to an embodiment of the present application. As shown in FIG32, the screen projection process of the display device may include the following steps:
步骤一、用户通过移动设备进行投屏时,显示设备的投屏驱动模块能够接收到移动设备发送的投屏参数,如镜像、投屏视频或者投屏音频等信息,并且会判断当前投屏是否为首次投屏;Step 1: When a user casts a screen through a mobile device, the screen casting driver module of the display device can receive the screen casting parameters sent by the mobile device, such as mirroring, screen casting video or screen casting audio and other information, and determine whether the current screen casting is the first screen casting;
步骤二、若当前投屏为首次投屏,由于首次投屏时,显示设备当前不在AirPlay的通道下,投屏驱动向切通道模块发送切换通道的消息,以使切通道模块将显示设备的通道切换为AirPlay对应的通道,再调用AirPlay功能模块(如音频、视频或者镜像等)实现对应的功能;若当前投屏为镜像投屏,无论是否为首次投屏,投屏驱动都会向切通道模块发送切换通道的消息,并通过镜像功能模块实现镜像投屏,使得显示设备同步播放移动设备的屏幕内容;Step 2: If the current screen projection is the first screen projection, since the display device is not currently in the AirPlay channel when the screen is projected for the first time, the screen projection driver sends a channel switching message to the channel switching module, so that the channel switching module switches the channel of the display device to the channel corresponding to AirPlay, and then calls the AirPlay function module (such as audio, video or mirroring, etc.) to implement the corresponding function; if the current screen projection is mirror projection, regardless of whether it is the first screen projection, the screen projection driver will send a channel switching message to the channel switching module, and implement mirror projection through the mirroring function module, so that the display device synchronously plays the screen content of the mobile device;
步骤三、若当前投屏为非首次投屏且非镜像投屏,则投屏驱动默认显示设备的通道为AirPlay对应的通道,然后在当前接收的投屏数据流的类型为非音频数据时,投屏驱动调用音视频中间件接口,获取Audio Only功能对应的开关的状态,若Audio Only功能对应的开关的状态为打开状态,则控制Audio Only功能对应的开关的状态为关闭状态,以控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据;若Audio Only功能对应的开关的状态为关闭状态,则控制显示器显示非音频数据。Step 3. If the current screen projection is not the first screen projection and is not a mirror projection, the screen projection driver defaults the channel of the display device to the channel corresponding to AirPlay. Then, when the type of the currently received screen projection data stream is non-audio data, the screen projection driver calls the audio and video middleware interface to obtain the status of the switch corresponding to the Audio Only function. If the status of the switch corresponding to the Audio Only function is on, the status of the switch corresponding to the Audio Only function is controlled to be off, so as to control the display switch of the monitor to be on, and control the monitor to display non-audio data; if the status of the switch corresponding to the Audio Only function is off, the monitor is controlled to display non-audio data.
图33为根据本申请实施例的一种投屏处理方法的总体流程示意图。如图33所示,总体流程具体可以包括如下步骤:FIG33 is a schematic diagram of the overall process of a screen projection processing method according to an embodiment of the present application. As shown in FIG33 , the overall process may specifically include the following steps:
S331、用户在移动设备中选择任意的音乐类播放软件进行音频(Audio)投屏(即:用户投屏播放音频数据),此时电视中会显示移动设备中的Audio相关信息,并开始播放该Audio;S331, the user selects any music player software in the mobile device to cast the audio (Audio) screen (i.e., the user casts the screen to play the audio data), and then the TV will display the Audio related information in the mobile device and start playing the Audio;
S332、用户在显示设备中Audio页面,通过操作遥控器的菜单按键(或者其他方式),在菜单中点击“Audio Only”选项,即:打开Audio Only功能对应的开关,此时显示设备只播声音,关闭显示设备的显示器;S332, the user is on the Audio page of the display device, and clicks the "Audio Only" option in the menu by operating the menu button of the remote control (or other methods), that is, turning on the switch corresponding to the Audio Only function, at which time the display device only plays sound and turns off the display of the display device;
S333、用户在移动设备中选择非音频数据,如视频(Video)数据进行投屏播放时,因为显示设备之前播放过Audio,此时播放Video不会执行切换通道的逻辑,认为显示设备的通道未发送变化,由于Audio Only功能对应的开关为打开状态,此时显示器不会点亮屏幕,处于黑屏状态;S333. When the user selects non-audio data, such as video data, for screen projection playback in the mobile device, because the display device has played audio before, the logic of switching channels will not be executed when playing the video at this time, and it is considered that the channel of the display device has not sent changes. Since the switch corresponding to the Audio Only function is in the on state, the display will not light up the screen at this time and will be in a black screen state;
S334、用户投屏播放非音频数据; S334: The user plays non-audio data on the screen;
S335、显示设备判断当前接收的投屏数据流的类型是否为非音频数据,并且Audio Only功能对应的开关的状态是否为打开状态;如果是,即当前接收的投屏数据流的类型为非音频数据,且Audio Only功能对应的开关的状态为打开状态,则执行步骤S336;否则,当前接收的投屏数据流的类型为音频数据,或者Audio Only功能对应的开关的状态不是打开状态(即关闭状态),则执行步骤S338;S335. The display device determines whether the type of the currently received projection data stream is non-audio data, and whether the state of the switch corresponding to the Audio Only function is on; if yes, that is, the type of the currently received projection data stream is non-audio data, and the state of the switch corresponding to the Audio Only function is on, then execute step S336; otherwise, the type of the currently received projection data stream is audio data, or the state of the switch corresponding to the Audio Only function is not on (i.e., off), then execute step S338;
S336、若显示设备确定当前接收的投屏数据流的类型为非音频数据,且Audio Only功能对应的开关的状态为打开状态,则关闭Audio Only功能对应的开关;S336. If the display device determines that the type of the currently received projection data stream is non-audio data, and the state of the switch corresponding to the Audio Only function is on, then turn off the switch corresponding to the Audio Only function;
S337、显示器的显示开关处于打开状态;S337, the display switch of the display is in the on state;
S338、控制显示设备正常播放当前的非音频数据。S338. Control the display device to play the current non-audio data normally.
在一些实施例中,可以通过如下方式确定投屏的状态变化,此时能识别到Airplay当前的状态是Audio/Video/Screen。In some embodiments, the state change of screen projection can be determined in the following manner, and at this time, it can be identified that the current state of Airplay is Audio/Video/Screen.
代码如下所示:
The code looks like this:
上述代码文件中,参数ui为当前的Airplay状态,其可以为Screen(相当于Airplay主页)/Video/Audio。每当用户投屏时,均会调用notifyUIPage方法。示例性的,假设用户投屏播放视频数据,则ui=video;假设用户投屏播放音频数据,则ui=audio。In the above code file, the parameter ui is the current Airplay status, which can be Screen (equivalent to the Airplay homepage)/Video/Audio. Whenever the user casts the screen, the notifyUIPage method will be called. For example, if the user casts the screen to play video data, then ui = video; if the user casts the screen to play audio data, then ui = audio.
其中,quitAudioOnlyWhenAudioToVideo(ui)的实现逻辑如下所示:Among them, the implementation logic of quitAudioOnlyWhenAudioToVideo(ui) is as follows:
首先获取上一次的Airplay状态,当其为Audio,并且当前Airplay状态为Video时,再判断Audio Only功能对应的开关的状态为打开状态,关闭Audio Only功能,显示器的屏幕会亮屏。First, get the last Airplay status. When it is Audio and the current Airplay status is Video, determine whether the switch status corresponding to the Audio Only function is on. Turn off the Audio Only function and the display screen will light up.
代码如下所示:

The code looks like this:

综上所述,本申请实施例通过在显示设备上执行上述投屏处理方法,显示设备的处理器首先获取当前接收的投屏数据流的类型以及显示设备当前的播放状态,然后确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式,控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,其中,播放状态处于目标模式时,显示器的显示开关处于关闭状态,上述技术方案中,显示设备能够在确定当前接收的投屏数据流的类型为非音频数据,以及确定显示设备当前的播放状态处于目标模式时,自动控制显示器的显示开关处于打开状态,并控制显示器显示非音频数据,避免由于目标模式导致当前播放非音频数据时,显示器的显示开关处于关闭状态,用户无法观看到非音频数据的内容,保证用户在投屏过程中,正常观看投屏内容,提升用户的使用体验。To summarize, the embodiment of the present application executes the above-mentioned screen projection processing method on the display device. The processor of the display device first obtains the type of the currently received screen projection data stream and the current playback status of the display device, and then determines that the type of the currently received screen projection data stream is non-audio data, and determines that the current playback status of the display device is in the target mode, controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, wherein, when the playback status is in the target mode, the display switch of the display is in the off state. In the above-mentioned technical scheme, the display device can automatically control the display switch of the display to be in the on state when determining that the type of the currently received screen projection data stream is non-audio data, and determining that the current playback status of the display device is in the target mode, and controls the display switch of the display to be in the on state, and controls the display to display the non-audio data, so as to avoid the situation that the display switch of the display is in the off state when the non-audio data is currently being played due to the target mode, and the user cannot view the content of the non-audio data, thereby ensuring that the user can normally view the projection content during the screen projection process, thereby improving the user's experience.
根据本申请实施例还提供了一种计算机可读非易失性存储介质,该计算机可读存储介质上存储计算机程序,该计算机程序被处理器执行时实现上述设备列表获取方法执行的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。According to an embodiment of the present application, a computer-readable non-volatile storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned device list acquisition method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
其中,该计算机可读非易失性存储介质可以为只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Among them, the computer-readable non-volatile storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
本申请实施例还提供一种计算机程序产品,包括:当所述计算机程序产品在计算机上运行时,使得所述计算机实现上述方法。The embodiment of the present application also provides a computer program product, including: when the computer program product is run on a computer, the computer is enabled to implement the above method.
为了方便解释,已经结合具体的实施方式进行了上述说明。但是,上述示例性的讨论不是意图穷尽或者将实施方式限定到上述公开的具体形式。根据上述的教导,可以得到多种修改和变形。上述实施方式的选择和描述是为了更好的解释原理以及实际的应用,从而使得本领域技术人员更好的使用所述实施方式以及适于具体使用考虑的各种不同的变形的实施方式。 For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

Claims (13)

  1. 一种电子设备,包括:An electronic device, comprising:
    通信器,被配置为:在基于HomeKit协议与HomeKit客户端建立连接之后,接收所述HomeKit客户端发送的设备列表获取请求,所述设备列表获取请求用于指示获取与所述电子设备连接的各个目标设备的设备信息,所述设备信息包括设备的标识;The communicator is configured to: after establishing a connection with a HomeKit client based on the HomeKit protocol, receive a device list acquisition request sent by the HomeKit client, wherein the device list acquisition request is used to instruct to acquire device information of each target device connected to the electronic device, wherein the device information includes an identifier of the device;
    处理器,被配置为:基于所述设备列表获取请求,确定所述电子设备的设备信息和所述各个目标设备的设备信息,所述设备信息包括对应的设备的标识;A processor configured to: determine device information of the electronic device and device information of each target device based on the device list acquisition request, wherein the device information includes an identifier of a corresponding device;
    基于所述电子设备的设备信息、所述各个目标设备的设备信息和至少一个设备占位符生成目标信息,每个设备占位符用于指示一个待接入的未知设备,所述每个设备占位符对应的设备信息为空;Generate target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty;
    所述通信器,还被配置为:向所述HomeKit客户端发送所述目标信息,以使所述HomeKit客户端基于所述目标信息显示设备列表,所述设备列表包括所述电子设备的标识和所述各个目标设备的标识。The communicator is further configured to: send the target information to the HomeKit client, so that the HomeKit client displays a device list based on the target information, wherein the device list includes an identifier of the electronic device and an identifier of each target device.
  2. 根据权利要求1所述的电子设备,The electronic device according to claim 1,
    所述处理器,还被配置为:在向所述HomeKit客户端发送所述目标信息之后,检测到第一设备与所述电子设备建立连接;The processor is further configured to: after sending the target information to the HomeKit client, detect that a first device establishes a connection with the electronic device;
    将所述目标信息中的一个所述设备占位符更新为所述第一设备的设备信息,以更新所述目标信息;updating one of the device placeholders in the target information with the device information of the first device to update the target information;
    所述通信器,还被配置为:向所述HomeKit客户端发送所述更新后的目标信息,以使所述HomeKit客户端基于所述更新后的目标信息更新所述设备列表,更新后的所述设备列表包括所述电子设备的标识、所述各个目标设备的标识和所述第一设备的标识。The communicator is further configured to: send the updated target information to the HomeKit client, so that the HomeKit client updates the device list based on the updated target information, and the updated device list includes the identifier of the electronic device, the identifiers of each target device and the identifier of the first device.
  3. 根据权利要求1所述的电子设备,The electronic device according to claim 1,
    所述处理器,还被配置为:在向所述HomeKit客户端发送所述目标信息之后,检测到第二设备与所述电子设备断开连接,所述第二设备为所述各个目标设备中的任一个;The processor is further configured to: after sending the target information to the HomeKit client, detect that a second device is disconnected from the electronic device, the second device being any one of the target devices;
    将所述目标信息中的所述第二设备的设备信息更新为一个所述设备占位符,以更新所述目标信息;Updating the device information of the second device in the target information to a device placeholder to update the target information;
    所述通信器,还被配置为:向所述HomeKit客户端发送所述更新后的目标信息,以使所述HomeKit客户端基于所述更新后的目标信息更新所述设备列表,更新后的所述设备列表包括所述电子设备的标识和所述各个目标设备中除所述第二设备之外的各个设备的标识。The communicator is further configured to: send the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, and the updated device list includes the identifier of the electronic device and the identifier of each device among the target devices except the second device.
  4. 根据权利要求1所述的电子设备,所述各个目标设备包括:至少一个第三设备;The electronic device according to claim 1, wherein each target device comprises: at least one third device;
    或者,or,
    所述各个目标设备包括:至少一个第三设备和至少一个第四设备;The target devices include: at least one third device and at least one fourth device;
    其中,每个所述第三设备与所述电子设备直接连接,每个第四设备通过对应的所述第三设备与所述电子设备连接。Each of the third devices is directly connected to the electronic device, and each of the fourth devices is connected to the electronic device through the corresponding third device.
  5. 根据权利要求4所述的电子设备,所述电子设备通过HDMI接口与所述每个第三设备连接;The electronic device according to claim 4, wherein the electronic device is connected to each of the third devices via an HDMI interface;
    在所述各个目标设备包括所述至少一个第四设备的情况下,所述每个第三设备通过HDMI接口与所述对应的第三设备连接。In the case that each of the target devices includes the at least one fourth device, each of the third devices is connected to the corresponding third device via an HDMI interface.
  6. 根据权利要求1所述的电子设备,所述设备信息还包括对应的设备的类型;所述设备列表还包括所述电子设备的类型和所述各个目标设备的类型。According to the electronic device according to claim 1, the device information also includes the type of the corresponding device; the device list also includes the type of the electronic device and the type of each target device.
  7. 根据权利要求1至6中任一项所述的电子设备,所述各个目标设备的数量与所述至少一个设备占位符的数量之等于第一预设值;The electronic device according to any one of claims 1 to 6, wherein the sum of the number of each target device and the number of the at least one device placeholder is equal to a first preset value;
    或者,or,
    所述至少一个设备占位符的数量等于第二预设值。The number of the at least one device placeholder is equal to a second preset value.
  8. 一种用于电子设备的数据处理方法,所述方法包括: A data processing method for an electronic device, the method comprising:
    在基于HomeKit协议与HomeKit客户端建立连接之后,接收所述HomeKit客户端发送的设备列表获取请求,所述设备列表获取请求用于指示获取与所述电子设备连接的各个目标设备的设备信息,所述设备信息包括设备的标识;After establishing a connection with a HomeKit client based on the HomeKit protocol, receiving a device list acquisition request sent by the HomeKit client, the device list acquisition request is used to instruct to acquire device information of each target device connected to the electronic device, the device information including an identifier of the device;
    基于所述设备列表获取请求,确定所述电子设备的设备信息和所述各个目标设备的设备信息,所述设备信息包括对应的设备的标识;Based on the device list acquisition request, determine the device information of the electronic device and the device information of each target device, wherein the device information includes an identification of a corresponding device;
    基于所述电子设备的设备信息、所述各个目标设备的设备信息和至少一个设备占位符生成目标信息,每个设备占位符用于指示一个待接入的未知设备,所述每个设备占位符对应的设备信息为空;Generate target information based on the device information of the electronic device, the device information of each target device and at least one device placeholder, each device placeholder is used to indicate an unknown device to be connected, and the device information corresponding to each device placeholder is empty;
    向所述HomeKit客户端发送所述目标信息,以使所述HomeKit客户端基于所述目标信息显示设备列表,所述设备列表包括所述电子设备的标识和所述各个目标设备的标识。The target information is sent to the HomeKit client, so that the HomeKit client displays a device list based on the target information, wherein the device list includes an identifier of the electronic device and an identifier of each target device.
  9. 根据权利要求8所述的方法,所述向所述HomeKit客户端发送所述目标信息之后,所述方法还包括:According to the method of claim 8, after sending the target information to the HomeKit client, the method further comprises:
    检测到第一设备与所述电子设备建立连接;Detecting that a first device establishes a connection with the electronic device;
    将所述目标信息中的一个所述设备占位符更新为所述第一设备的设备信息,以更新所述目标信息;updating one of the device placeholders in the target information with the device information of the first device to update the target information;
    向所述HomeKit客户端发送所述更新后的目标信息,以使所述HomeKit客户端基于所述更新后的目标信息更新所述设备列表,更新后的所述设备列表包括所述电子设备的标识、所述各个目标设备的标识和所述第一设备的标识。The updated target information is sent to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, wherein the updated device list includes an identifier of the electronic device, identifiers of each target device, and an identifier of the first device.
  10. 根据权利要求8所述的方法,在向所述HomeKit客户端发送所述目标信息之后,所述方法还包括:According to the method of claim 8, after sending the target information to the HomeKit client, the method further comprises:
    检测到第二设备与所述电子设备断开连接,所述第二设备为所述各个目标设备中的任一个;detecting that a second device is disconnected from the electronic device, the second device being any one of the target devices;
    将所述目标信息中的所述第二设备的设备信息更新为一个所述设备占位符,以更新所述目标信息;Updating the device information of the second device in the target information to a device placeholder to update the target information;
    向所述HomeKit客户端发送所述更新后的目标信息,以使所述HomeKit客户端基于所述更新后的目标信息更新所述设备列表,更新后的所述设备列表包括所述电子设备的标识和所述各个目标设备中除所述第二设备之外的各个设备的标识。Sending the updated target information to the HomeKit client so that the HomeKit client updates the device list based on the updated target information, wherein the updated device list includes an identifier of the electronic device and an identifier of each device among the target devices except the second device.
  11. 根据权利要求8所述的方法,所述设备信息还包括对应的设备的类型;所述设备列表还包括所述电子设备的类型和所述各个目标设备的类型。According to the method of claim 8, the device information also includes the type of the corresponding device; the device list also includes the type of the electronic device and the type of each target device.
  12. 根据权利要求8~11任一权项所述的方法,所述各个目标设备的数量与所述至少一个设备占位符的数量之等于第一预设值;The method according to any one of claims 8 to 11, wherein the sum of the number of each target device and the number of the at least one device placeholder is equal to a first preset value;
    或者,or,
    所述至少一个设备占位符的数量等于第二预设值。The number of the at least one device placeholder is equal to a second preset value.
  13. 一种计算机可读非易失性存储介质,包括:计算机可读存储介质上存储计算机程序,计算机程序被处理器执行时实现如权利要求8~12任一权项所述的数据处理方法。 A computer-readable non-volatile storage medium, comprising: a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the data processing method according to any one of claims 8 to 12 is implemented.
PCT/CN2023/108893 2022-11-23 2023-07-24 Electronic device and data processing method WO2024109129A1 (en)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN202211477456.8 2022-11-23
CN202211477456.8A CN117812365A (en) 2022-11-23 2022-11-23 Display device, screen projection processing method and storage medium
CN202211658353.1A CN117812135A (en) 2022-12-22 2022-12-22 Electronic device, device list acquisition method, and storage medium
CN202211658353.1 2022-12-22
CN202211714328.0 2022-12-29
CN202211714328.0A CN117812395A (en) 2022-12-29 2022-12-29 Display equipment and screen throwing processing method

Publications (1)

Publication Number Publication Date
WO2024109129A1 true WO2024109129A1 (en) 2024-05-30

Family

ID=91195107

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/108893 WO2024109129A1 (en) 2022-11-23 2023-07-24 Electronic device and data processing method

Country Status (1)

Country Link
WO (1) WO2024109129A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534350A (en) * 2005-06-17 2009-09-16 捷讯研究有限公司 Method and apparatus for dynamic session placeholder for message collection user interface
US20190349213A1 (en) * 2018-05-11 2019-11-14 Bubble Electric, Inc. Systems and Methods for Home Automation Control
US20210174095A1 (en) * 2019-12-09 2021-06-10 Google Llc Interacting with visitors of a connected home environment
CN114374543A (en) * 2021-12-20 2022-04-19 北京北信源软件股份有限公司 Network security protection method, system, device, security switch and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534350A (en) * 2005-06-17 2009-09-16 捷讯研究有限公司 Method and apparatus for dynamic session placeholder for message collection user interface
US20190349213A1 (en) * 2018-05-11 2019-11-14 Bubble Electric, Inc. Systems and Methods for Home Automation Control
US20210174095A1 (en) * 2019-12-09 2021-06-10 Google Llc Interacting with visitors of a connected home environment
CN114374543A (en) * 2021-12-20 2022-04-19 北京北信源软件股份有限公司 Network security protection method, system, device, security switch and storage medium

Similar Documents

Publication Publication Date Title
WO2021109422A1 (en) Standby control method and display device
CN111741372B (en) Screen projection method for video call, display device and terminal device
CN110022495B (en) Method for pushing media file to display device by mobile terminal and display device
WO2021212668A1 (en) Screen projection display method and display device
US8613028B2 (en) Audiovisual multi-room support
US8875191B2 (en) Device for reproducing content and method thereof
US20090241149A1 (en) Content reproduction system, remote control device, and computer program
CN112367543B (en) Display device, mobile terminal, screen projection method and screen projection system
CN114286165B (en) Display equipment, mobile terminal, and screen-throwing data transmission method and system
JP2004288197A (en) Interface for presenting data expression in screen area inset
JP5089916B2 (en) Control apparatus and control method
CN108605057B (en) Display device, user terminal device, system, and control method thereof
CN113590059A (en) Screen projection method and mobile terminal
WO2011158487A1 (en) Operation support device and operation support method
US11550527B2 (en) Media file processing method for display device and display device
CN115454367A (en) Display device and display device control method
CN112272331B (en) Method for rapidly displaying program channel list and display equipment
WO2021139045A1 (en) Method for playing back media project and display device
WO2024109129A1 (en) Electronic device and data processing method
WO2022242328A1 (en) Method for playback in split screen and display device
CN114915810B (en) Media resource pushing method and intelligent terminal
CN111654753B (en) Application program starting method and display device
CN114615529A (en) Display device, external device and audio playing method
CN114286320A (en) Display device, mobile terminal and Bluetooth connection method
US11954401B2 (en) Method for selecting audio output device, and display apparatus