Routing communication method and display equipment
By introducing a routing manager into the hybrid broadcast broadband television system, the communication of applications and services can be managed in a unified manner, solving the problem of wasted system resources and achieving more efficient resource utilization and scalability.
Patent Information
- Application Number
- CN202511009047.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-14
AI Technical Summary
In hybrid broadcast broadband television systems, the independent communication methods between applications and services lead to a waste of system resources.
By introducing a route manager into the display device, communication between applications and services can be managed uniformly. Using a routed communication method, applications pass messages to target services through the route manager. Signature information is used to ensure message integrity and source verification, reducing the number of independent communication channels.
It reduces waste of system resources, lowers memory and CPU usage, improves scalability, and reduces redundant data transmission through a unified pipeline.
Smart Images

Figure CN120956955A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display device technology, and more particularly to a display device. Background Technology
[0002] In a Hybrid Broadcast Broadband TV (HbbTV) system, applications and display devices communicate independently with each other. This means that each application and each service requires a separate communication channel. This communication method leads to a waste of system resources. Summary of the Invention
[0003] This application provides a routing communication method and a display device to solve the problem of wasted system resources.
[0004] In a first aspect, some embodiments provide a routing communication method applied to a display device, the display device including at least one application, a routing manager, and at least one service to be invoked, the method comprising:
[0005] In response to a user's trigger operation performed on the user interface provided by the application, the application obtains the name of the method to be called and related parameters corresponding to the trigger operation, constructs a first message conforming to a preset format based on the name of the method to be called and the parameters, and sends the first message and the resource address identifier of the application to the routing manager.
[0006] The routing manager searches for a matching target service among at least one service to be invoked based on the name and parameters of the method to be invoked in the first message; generates signature information for the application based on the resource address identifier; adds the resource address identifier and the signature information to the first message to generate a second message; and sends the second message to the target service.
[0007] The target service processes the method name and parameters to be called in the second message accordingly, generates a response message that conforms to a preset format, adds the resource address identifier and signature information in the second message to the response message to generate a response message to be returned, and returns the response message to the route manager.
[0008] The routing manager returns the response message to the application based on the resource address identifier and signature information in the response message.
[0009] Secondly, some embodiments also provide a display device, including at least one application, a routing manager, and at least one service to be invoked. The application is configured to, in response to a trigger operation performed by a user on a user interface provided by the application, obtain the name of the method to be invoked and related parameters corresponding to the trigger operation, construct a first message conforming to a preset format based on the name of the method to be invoked and the parameters, and send the first message and a resource address identifier of the application to the routing manager. The routing manager is configured to, according to the name of the method to be invoked and the parameters in the first message, search for a matching target service among the at least one service to be invoked; generate signature information of the application based on the resource address identifier, add the resource address identifier and the signature information to the first message to generate a second message, and send the second message to the target service. The target service is configured to, according to the name of the method to be invoked and the parameters in the second message, perform corresponding processing and generate a response message conforming to a preset format, add the resource address identifier and signature information from the second message to the response message to generate a response message to be returned, and return the response message to be returned to the routing manager. The routing manager is configured to, based on the resource address identifier and signature information in the response message to be returned, return the response message to the application.
[0010] Thirdly, some embodiments also provide a display device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described routing communication method.
[0011] Fourthly, some embodiments also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described routing communication method.
[0012] Fifthly, some embodiments also provide a computer program product, including a computer program that, when executed by a processor, implements the above-described routing communication method.
[0013] Compared with existing technologies that establish independent communication channels, this solution reduces the number of communication channels, lowers memory and CPU usage, reduces redundant data transmission through a unified pipeline, and exposes a unified interface for services, so new functions only need to be registered with the routing manager, thus improving scalability. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application;
[0016] Figure 2 This is a schematic diagram of the hardware configuration of a display device provided in some embodiments of this application;
[0017] Figure 3 This is a schematic diagram of the hardware configuration of the control device provided in some embodiments of this application;
[0018] Figure 4 This is a schematic diagram of the software configuration of a display device provided in some embodiments of this application;
[0019] Figure 5 Flowchart of the routing communication method provided in some embodiments of this application Figure 1 ;
[0020] Figure 6 Flowcharts of the handshake process provided for some embodiments of this application;
[0021] Figure 7 Flowchart of the routing communication method provided in some embodiments of this application Figure 2 ;
[0022] Figure 8 System framework diagrams provided for some embodiments of this application. Detailed Implementation
[0023] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0024] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0025] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0026] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0027] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0028] In this embodiment, display device 200 generally refers to a device with screen display and data processing capabilities. For example, display device 200 includes, but is not limited to, smart TVs, mobile terminals, computers, monitors, advertising screens, wearable devices, virtual reality devices, augmented reality devices, etc.
[0029] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application. For example... Figure 1 As shown, users can operate the display device 200 via touch operation, mobile terminal 300, and control device 100. For example, control device 100 can be a remote control, stylus, gamepad, etc.
[0030] The mobile terminal 300 can function as a control device for human-computer interaction between the user and the display device 200. It can also function as a communication device for establishing a communication connection with the display device 200 and exchanging data. In some embodiments, the mobile terminal 300 can have software applications installed on it and communicate with the display device 200 via network communication protocols to achieve one-to-one control and data communication. Furthermore, it can transmit audio and video content displayed on the mobile terminal 300 to the display device 200 for synchronized display.
[0031] like Figure 1 The diagram also shows that the display device 200 communicates with the server 400 via various communication methods. This allows the display device 200 to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0032] Display device 200 can provide broadcast television reception function, and can also be equipped with intelligent network television function that provides computer support function, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.
[0033] Figure 2 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of display device 200.
[0034] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.
[0035] In some embodiments, detector 230 is used to acquire signals from the external environment or to interact with the outside world. For example, detector 230 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0036] In some embodiments, the display 260 includes display function components for presenting images and driving components for driving image display. The display 260 is used to receive and display image signals output from the controller 250. For example, the display 260 can be used to display video content, image content, menu control interface components, and user control UI interfaces, etc.
[0037] In some embodiments, the communication device 220 is a component used to communicate with external devices or the server 400 according to various communication protocol types. The display device 200 may have multiple communication devices 220 depending on the supported communication methods. For example, when the display device 200 supports wireless network communication, it may have a communication device 220 with WiFi functionality. When the display device 200 supports Bluetooth connectivity, it needs to have a communication device 220 with Bluetooth functionality.
[0038] The communication device 220 enables the display device 200 to communicate with external devices or the server 400 via wireless or wired connections. Wired connections utilize data cables, interfaces, or other components to connect the display device 200 to external devices. Wireless connections utilize wireless signals or wireless networks. The display device 200 can directly establish a connection with external devices or indirectly through gateways, routers, or other connection devices.
[0039] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.
[0040] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0041] In some embodiments, a user can input user commands through a graphical user interface (GUI) displayed on a display 260, and the user input interface receives user input commands through the graphical user interface (GUI).
[0042] In some embodiments, the audio output device 270 can be a built-in speaker of the display device 200 or an external audio output device connected to the display device 200. For the external audio output device connected to the display device 200, the display device 200 may also be provided with an external audio output terminal, through which the audio output device can be connected to the display device 200 to output sound from the display device 200.
[0043] In some embodiments, the user input interface 280 can be used to receive instructions from user input.
[0044] Figure 3 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of the central control device. (Example) Figure 3 As shown, the control device 100 may include: a controller 110, a communication interface 130, a user input / output interface, a memory, and a power supply.
[0045] The control device 100 is configured to control the display device 200, and to receive user input operation commands and convert the operation commands into commands that the display device 200 can recognize and respond to, thus acting as an intermediary for interaction between the user and the display device 200.
[0046] In some embodiments, the control device 100 may be an intelligent device. For example, the control device 100 may be equipped with various applications for controlling the display device 200 according to user needs.
[0047] In some embodiments, such as Figure 1As shown, the mobile terminal 300 or other smart electronic devices can perform similar functions to the control device 100 after installing the application of the control display device 200.
[0048] The controller 110 includes a processor 112, RAM 113, ROM 114, a communication interface 130, and a communication bus. The controller 110 is used to control the operation of the control device 100, as well as the communication and cooperation between internal components and the external and internal data processing functions.
[0049] Under the control of the controller 110, the communication interface 130 enables communication of control signals and data signals with the display device 200. The communication interface 130 may include at least one of other near-field communication modules such as WiFi chip 131, Bluetooth module 132, and NFC module 133.
[0050] User input / output interface 140, wherein the input interface includes at least one of other input interfaces such as microphone 141, touchpad 142, sensor 143, and button 144.
[0051] In some embodiments, the control device 100 includes at least one of a communication interface 130 and an input / output interface 140. The control device 100 is configured with the communication interface 130, such as a WiFi, Bluetooth, or NFC module, which can encode user input commands via WiFi, Bluetooth, or NFC protocols and send them to the display device 200.
[0052] The memory 190 is used to store various operating programs, data, and applications for driving and controlling the control device 100 under the control of the controller. The memory 190 can also store various control signal instructions input by the user.
[0053] The power supply 180 is used to provide operating power support for the various components of the control device 100 under the control of the controller.
[0054] In some embodiments, the display device 200 may run an operating system to enable user interaction. An operating system is a computer program that manages and controls the hardware and software resources of the display device 200. The operating system can (control the display device) provide a user interface, allowing users to interact with the display device 200 and supporting the running of various applications.
[0055] It should be noted that the operating system can be a native operating system based on a specific operating platform, a third-party operating system that is deeply customized based on a specific operating platform, or an independent operating system specifically developed for display devices.
[0056] Operating systems can be divided into different modules or levels based on the functions they implement, such as... Figure 4 As shown, Figure 4 Provided for some embodiments of this application Figure 1 The diagram shows the software configuration of the display device. In some embodiments, the system of the display device 200 can be divided into three layers, from top to bottom: the application layer, the middleware layer, and the hardware layer.
[0057] The application layer mainly includes commonly used applications on TVs, as well as the application framework. The commonly used applications are mainly browser-based applications, such as HTML5 apps, and native apps.
[0058] An application framework is a complete program model that has all the basic functions required by standard application software, such as file access, data exchange, and the user interface for these functions (toolbar, status bar, menu, dialog box).
[0059] Native apps can support online or offline access, push notifications, or access to local resources.
[0060] The middleware layer includes various television protocols, multimedia protocols, and system components. Middleware can use the basic services (functions) provided by system software to connect different parts of application systems or different applications on the network, achieving resource sharing and function sharing.
[0061] The hardware layer mainly includes the Hardware Abstraction Layer (HAL) interface, hardware, and drivers. The HAL interface is a unified interface for all TV chips, with the specific logic implemented by each individual chip. Drivers mainly include: audio drivers, display drivers, Bluetooth drivers, camera drivers, Wi-Fi drivers, USB drivers, HDMI drivers, sensor drivers (such as fingerprint sensors, temperature sensors, pressure sensors, etc.), and power drivers.
[0062] It should be noted that the above examples are merely a simple division of operating system functions and do not limit the specific form of the operating system of the display device 200 in this application embodiment. Depending on the function of the display device, the type of operating system, and other factors, the number of levels and the specific level type of the operating system may be expressed in other forms.
[0063] In some embodiments, a routing communication method is provided, which can be applied to the aforementioned display device, the display device including at least one application, a routing manager, and at least one service to be invoked, such as... Figure 5As shown, the routing communication method includes:
[0064] Step 501: In response to the user's trigger operation on the user interface provided by the application, the application obtains the name of the method to be called and related parameters corresponding to the trigger operation, constructs a first message that conforms to a preset format based on the name of the method to be called and the parameters, and sends the first message and the application's resource address identifier to the routing manager.
[0065] Optionally, the display device in this embodiment is configured with a Hybrid Broadcast Broadband TV (HbbTV) system. The HbbTV system supports HbbTV applications and Operator Applications (OpApps). HbbTV is an interactive television standard that integrates broadcast television and broadband internet. HbbTV applications typically run in HTML5 / JavaScript format on smart TVs or set-top boxes, enabling access to broadcast content, internet services, and local terminal functions. OpApps are operator applications introduced in HbbTV 2.0.1 and later standards, allowing television operators to deploy their own branded application environments on terminals, providing customized user experiences and services. At least one application mentioned above includes both an HbbTV application and an OpApp application.
[0066] Optionally, the service to be invoked is a service invoked by the application. For example, the display device may include at least one service to be invoked, such as a voice assistant, accessibility features, or OpApp playback services. Accessibility refers to a series of technologies and design measures designed for people with disabilities (such as visual, hearing, physical, or cognitive impairments) to help them use products and services more conveniently. Its core goal is to enable everyone to access information and operate devices equally and without barriers. In digital television, common accessibility features include: screen readers, closed captions / subtitles, high contrast / large font mode, voice control / voice input, keyboard navigation / mouse-free operation, simplified interfaces / assistive prompts, and sign language videos.
[0067] Users can perform triggering operations on the user interface provided by the application. In response to these operations, the application can obtain the name of the method to be called and related parameters. For example, users can change caption preferences on the user interface provided by the application. In response, the application can obtain the application's subscription method name, subscription message type, and caption preference change value.
[0068] Optionally, JSON-RPC is a Remote Procedure Call (RPC) protocol based on JavaScript Object Notation (JSON). It is a lightweight, stateless, platform- and programming language-independent communication protocol. OpApp and HbbTV applications can communicate with the route manager via JSON-RPC.
[0069] Optionally, after obtaining the name of the method to be called and related parameters, the application can input the name of the method to be called and related parameters into a unified JSON-RPC interface, and construct a JSON-RPC message through the unified JSON-RPC interface. This JSON-RPC message includes the aforementioned name of the method to be called and related parameters. For ease of explanation, in this embodiment, this JSON-RPC message is referred to as the first message. The application can further send the first message and the application's original Uniform Resource Locator (original URL) to the routing manager.
[0070] Applications and the route manager can establish a WebSocket connection. Applications can send their initial message and original URL to the route manager via this connection. WebSocket provides a persistent, full-duplex communication channel that supports real-time data exchange.
[0071] Step 502: The routing manager searches for a matching target service in at least one service to be called based on the name and parameters of the method to be called in the first message; generates the application's signature information based on the resource address identifier; adds the resource address identifier and signature information to the first message to generate a second message; and sends the second message to the target service.
[0072] Optionally, after receiving the first message and the application's original URL, the route manager parses the first message to obtain the name of the method to be invoked and its related parameters. The route manager stores a routing table, which it can use to find a matching target service among at least one service to be invoked.
[0073] Optionally, the route manager can also sign information such as the application's original URL and the window in which the application is located to obtain the application's signature information, add the application's original URL and the signature information to the first message to generate a second message, and send the second message to the target service.
[0074] The application's original URL and corresponding signature information are unique and can uniquely identify an application.
[0075] Step 503: The target service processes the method name and parameters to be called in the second message accordingly, generates a response message that conforms to the preset format, adds the resource address identifier and signature information in the second message to the response message to generate a response message to be returned, and returns the response message to be returned to the routing manager.
[0076] Optionally, after receiving the second message, the target service parses the second message to obtain the name of the method to be called, related parameters, the original URL of the application, and signature information. Then, it performs corresponding processing based on the name of the method to be called and related parameters, generates a JSON-RPC response message, adds the original URL of the application and signature information to the JSON-RPC response message to generate a response message to be returned, and returns the response message to be returned to the route manager.
[0077] For example, the processing performed by the target service may involve data querying, status updating, or other business logic operations, which are related to the name of the method to be called and related parameters.
[0078] Step 504: The route manager returns the response message to the application based on the resource address identifier and signature information in the response message to be returned.
[0079] Upon receiving a response message, the route manager parses it to obtain the JSON-RPC response message, the application's original URL, and signature information. Based on the application's original URL and signature information, it locates the corresponding application and returns the response message to it. The application's original URL and signature information ensure the integrity of the response and the verifiability of its origin.
[0080] Once the application receives a message from the route manager, it can parse the message and execute subsequent processing logic, which may include updating the user interface, triggering subsequent operations, or logging.
[0081] In the above embodiments, a routing communication method is provided, applied to a display device. The display device includes at least one application, a routing manager, and at least one service to be invoked. The method includes: the application responding to a trigger operation performed by a user on a user interface provided by the application, obtaining the name of the method to be invoked and related parameters corresponding to the trigger operation, constructing a first message conforming to a preset format based on the name of the method to be invoked and the parameters, and sending the first message and the application's resource address identifier to the routing manager; the routing manager searching for a matching target service among at least one service to be invoked based on the name of the method to be invoked and the parameters in the first message; generating signature information of the application based on the resource address identifier, adding the resource address identifier and the signature information to the first message to generate a second message, and sending the second message to the target service; the target service performing corresponding processing based on the name of the method to be invoked and the parameters in the second message, generating a response message conforming to a preset format, adding the resource address identifier and signature information from the second message to the response message to generate a response message to be returned, and returning the response message to be returned to the routing manager; and the routing manager returning the response message to be returned to the application based on the resource address identifier and signature information in the response message to be returned. This allows all applications to communicate with any service through the routing manager, which greatly saves system resources compared to the existing technology of establishing independent communication channels.
[0082] In some embodiments, the routing manager stores a routing table, which includes a first mapping table between method names and services and a second mapping table between parameters and services. The routing manager searches for a matching target service among at least one service to be called based on the method name and parameters in the first message. This includes: the routing manager parses the first message to obtain the method name and parameters, and searches the first mapping table for candidate services that have a mapping relationship with the method to be called; if there are multiple candidate services, the routing manager searches among the multiple candidate services for a target service that has a mapping relationship with the parameters based on the second mapping table.
[0083] The route manager stores a route table, which includes a first mapping table between method names and services. The first mapping table stores the correspondence between method names and services.
[0084] For example, see Table 1, which is an example of the first mapping table. The service corresponding to the method name org.hbbtv.subscribeorg.hbbtv.af.* is the accessibility module; the service corresponding to the method name org.hbbtv.ipplayer.play is the playback window module; and the service corresponding to the method name org.hbbtv.app.voice.ready is the voice assistant module.
[0085] Table 1
[0086]
[0087] The routing table also includes a second mapping table between parameters and services, which stores the correspondence between parameters and services.
[0088] For example, see Table 2, which is an example of the first mapping table. The services corresponding to the parameters subtitlesPrefChange and highContrastUIPrefChange are the accessibility function module; the services corresponding to the parameters voiceReady and playPositionUpdate are the voice assistant module.
[0089] Table 2
[0090]
[0091] The routing manager receives a first message and the application's resource address identifier from the application. It then parses the first message to obtain the name of the method to be called and its related parameters. The routing manager first searches a first mapping table for candidate services that are mapped to the method to be called. If there are multiple candidate services, it searches a second mapping table for a target service that is mapped to the parameter. For example, if the method to be called is named method A and the related parameter is parameter A, the first mapping table searches for candidate services that are mapped to method A. Assuming that services A, B, and C are mapped to method A in the first mapping table, and these three services are all candidate services, the second mapping table searches for which of these three services is mapped to parameter A, and the service with the mapping is selected as the target service.
[0092] In the above embodiments, the routing manager stores a routing table, which includes a first mapping table between method names and services, and a second mapping table between parameters and services. The routing manager parses the first message to obtain the name of the method to be called and the parameters, and searches the first mapping table for candidate services that have a mapping relationship with the method to be called. If there are multiple candidate services, the routing manager searches for the target service that has a mapping relationship with the parameters among the multiple candidate services based on the second mapping table, and then sends the message to the target service. This method of communicating through the routing manager and services in a unified manner greatly saves system resources compared with the method of establishing independent communication channels in the prior art.
[0093] In some embodiments, the routing communication method provided in this application further includes: after the application and the routing manager establish a connection, the application sends a capability negotiation message conforming to a preset format and the application's resource address identifier to the routing manager; the routing manager generates the application's signature information based on the resource address identifier, obtains at least one set of methods supported by the service to be called, generates a negotiation result message conforming to a preset format based on the method set, the resource address identifier and the signature information, and returns the negotiation result message to the application.
[0094] The route manager can be understood as a local WebSocket server. Applications can establish a WebSocket connection with the route manager. After establishing the connection, the application can send a JSON-RPC format capability negotiation message and its original URL to the route manager.
[0095] For example, a capability negotiation message in SON-RPC format can be:
[0096] {
[0097] "jsonrpc": "2.0",
[0098] "method": "org.hbbtv.negotiateMethods",
[0099] "params": {
[0100] "terminalToApp": [
[0101] "org.hbbtv.notify"
[0102] …
[0103] ],
[0104] "appToTerminal": [
[0105] "org.hbbtv.subscribe",
[0106] "org.hbbtv.unsubscribe"
[0107] …
[0108] ],
[0109] },
[0110] "id": 1
[0111] }
[0112] When the route manager receives the capability negotiation message and the application's original URL, it can sign the application's original URL, the window in which the application is located, and other information to obtain the application's signature information. On the other hand, it obtains at least one set of methods supported by the service to be called, generates a negotiation result message in JSON-RPC format based on the method set, resource address identifier, and signature information, and returns the negotiation result message to the application.
[0113] For example, a negotiation result message in JSON-RPC format can be:
[0114] {
[0115] "jsonrpc": "2.0",
[0116] "result": {
[0117] "method": "org.hbbtv.negotiateMethods",
[0118] "terminalToApp": [
[0119] "org.hbbtv.notify"
[0120] …
[0121] ],
[0122] "appToTerminal": [
[0123] "org.hbbtv.subscribe",
[0124] "org.hbbtv.unsubscribe"
[0125] …
[0126] ],
[0127] "originalUrl": "https: / / example.com / app",
[0128] "signature": "abcdef1234567890"
[0129] },
[0130] "id": 1
[0131] }
[0132] In the above embodiments, after the application and the routing manager establish a connection, the application sends a capability negotiation message conforming to a preset format and the application's resource address identifier to the routing manager. The routing manager generates the application's signature information based on the resource address identifier, obtains at least one set of methods supported by the service to be invoked, generates a negotiation result message conforming to a preset format based on the method set, resource address identifier, and signature information, and returns the negotiation result message to the application. This handshake process allows the application to obtain the set of methods supported by all services, facilitating subsequent invocation.
[0133] In some embodiments, the routing communication method provided in this application further includes: after receiving a startup command, the application obtains the resource address identifier corresponding to the routing manager; and establishes a connection with the routing manager according to the resource address identifier corresponding to the routing manager.
[0134] Optionally, the user can input a startup command to the application using a remote control or voice control. After receiving the startup command, the application first obtains the Uniform Resource Locator (URL) corresponding to the route manager, and then establishes a WebSocket connection with the route manager according to the URL corresponding to the route manager.
[0135] See Figure 6 As shown, the route manager can be understood as a local WebSocket server. The user inputs a start command into the application. After receiving the start command, the application sends a URL retrieval request to the route manager. Upon receiving this request, the route manager returns its own URL to the application. For example, the content returned by the route manager is...<json_rpc_server url="ws: / / localhost:8787 / .." version="1.7.1" / > Upon receiving the URL, the application establishes a WebSocket connection with the route manager via the WebSocket protocol. The application sends a JSON-RPC-formatted capability negotiation message and its original URL to the route manager through this WebSocket connection. This capability negotiation message carries the method org.hbbtv.negotiateMethods. Upon receiving the capability negotiation message and the application's original URL, the route manager generates the application's signature information and obtains at least one set of methods supported by the service to be called. Based on this method set, the application's original URL, and the generated signature information, the route manager generates a JSON-RPC-formatted negotiation result message and returns it to the application.
[0136] In the above embodiment, after receiving the startup command, the application obtains the resource address identifier corresponding to the route manager; and establishes a connection with the route manager according to the resource address identifier corresponding to the route manager. Subsequently, a handshake is performed with the route manager through this connection.
[0137] In some embodiments, the triggering operation is a change operation of subtitle preference settings. The method name to be called corresponding to the triggering operation is the application subscription method name. The relevant parameters corresponding to the triggering operation include the subscription message type and the subtitle preference change value. The target service processes the corresponding method name and parameters in the second message and generates a response message that conforms to a preset format, including: the target service registers subscription information, which includes: the application subscription method name, the subscription message type, the subtitle preference change value, the resource address identifier, and the signature information; and generates a subscription response message that conforms to a preset format.
[0138] Among them, see Figure 7As shown, users can change caption preferences on the user interface provided by the application. In response to this action, the application obtains the application subscription method name (org.hbbtv.subscribe), subscription message type (subtitlesPrefChange), and caption preference change value (not shown). The application inputs the application subscription method name, subscription message type, and caption preference change value into a unified JSON-RPC interface, constructs a JSON-RPC message through this interface, and then sends this JSON-RPC message along with the application's original Uniform Resource Locator (original URL) to the route manager. Upon receiving the JSON-RPC message and the application's original URL, the route manager parses the JSON-RPC message to obtain the method name to be called and related parameters. It then determines the target service (assuming the target service is the accessibility module) by looking up the routing table. The route manager generates the application's signature information, adds the application's original URL and signature information to the aforementioned JSON-RPC message to generate a second message, and sends the second message to the accessibility module. The accessibility module parses the second message to obtain the application subscription method name, subscription message type, and caption preference change value. The accessibility module registers the application's subscription to subtitlesPrefChange. The registered subscription information includes: application subscription method name, subscription message type, caption preference change value, application's original URL, and signature information. After registering the subscription information, the accessibility module generates a subscription response message that conforms to a preset format and returns the subscription response message to the route manager. The route manager uniquely identifies the target application based on the original URL and signature information in the subscription response message and further returns the subscription response message to the application. After receiving the subscription response message, the application confirms that the subscription was successful.
[0139] The second message could be:
[0140] {
[0141] "jsonrpc": "2.0",
[0142] "method": "org.hbbtv.subscribe",
[0143] "params": {
[0144] "msgType": ["subtitlesPrefChange"],
[0145] "originalUrl": "https: / / example.com / app",
[0146] "signature": "abcdef1234567890"
[0147] },
[0148] "id": 2
[0149] }
[0150] The subscription response message can be:
[0151] {
[0152] "jsonrpc": "2.0",
[0153] "result": {
[0154] "method": "org.hbbtv.subscribe",
[0155] "msgType": ["subtitlesPrefChange"],
[0156] "status": "ok",
[0157] "originalUrl": "https: / / example.com / app",
[0158] "signature": "abcdef1234567890"
[0159] },
[0160] "id": 2
[0161] }
[0162] In the above embodiments, when the triggering operation is a change operation of subtitle preference settings, the method name to be called corresponding to the triggering operation is the application subscription method name, and the relevant parameters corresponding to the triggering operation include the subscription message type and the subtitle preference change value; after the target service receives the second message, it will register the subscription information, generate a subscription response message in a preset format and return it to the routing manager, thereby realizing the unification of the communication channel.
[0163] In some embodiments, the routing communication method provided in this application further includes: when the target service detects that the media asset data sent by the application's server carries subtitles and the attributes of the subtitles match the subtitle preference change value, it sends a notification message to the routing manager. The notification message includes a subscription message type, a subtitle preference change value, a resource address identifier, and signature information. The routing manager identifies the application based on the resource address identifier and signature information in the notification message and returns the notification message to the application. The application displays a subtitle change reminder based on the notification message.
[0164] See also Figure 7 As shown, the target service will judge the media asset data sent by the application's server. If it detects that the media asset data sent by the application's server carries subtitles and the subtitle attributes match the subtitle preference change value, for example, if the subtitles in the media asset data are in English and the subtitle preference change value is also in English, then the two are a match. The target service will then send a notification message to the routing manager. The notification message includes the subscription message type (subtitlePrefChange), the subtitle preference change value (value), the resource address identifier (originalUrl), and the signature information (signature). The routing manager identifies the application based on the originalUrl and signature in the notification message and forwards the notification message to the application. The application makes corresponding user interface updates or business processing based on the notification message (such as synchronously displaying subtitles, displaying subtitle change reminders, etc.).
[0165] The notification message can be:
[0166] {
[0167] "jsonrpc": "2.0",
[0168] "method": "org.hbbtv.notify",
[0169] "params": {
[0170] "msgType": "subtitlesPrefChange",
[0171] "value": {
[0172] "enabled": true,
[0173] "language": "zh-CN
[0174] },
[0175] "originalUrl": "https: / / example.com / app",
[0176] "signature": "abcdef1234567890"
[0177] }
[0178] Here, `method: org.hbbtv.notify` indicates a notification message. `params: msgType: subtitlesPrefChange` indicates a change in subtitle preferences. `value` contains the specific changes, such as: `enabled`: whether subtitles are enabled (true / false); `language`: the current subtitle language.
[0179] In the above embodiment, when the target service detects that the media asset data sent by the application's server carries subtitles, and the subtitle attributes match the subtitle preference change value, it sends a notification message to the routing manager. The notification message includes the subscription message type, subtitle preference change value, resource address identifier, and signature information. The routing manager identifies the application based on the resource address identifier and signature information in the notification message and returns the notification message to the application. The application displays a subtitle change reminder based on the notification message. This achieves interaction with the service through a unified channel, saving system resources.
[0180] In some embodiments, see Figure 8 As shown, the HbbTV system architecture is divided into three layers: Application Layer: Includes the HbbTV application and the OpApp application, which act as clients of the JSON-RPC protocol and initiate communication requests. Routing Middleware Layer: The JSON-RPC routing manager is responsible for uniformly receiving, parsing, verifying, routing, and forwarding all JSON-RPC messages, achieving centralized management of the communication channel. Platform Service Layer: Includes functional modules such as voice assistant, accessibility features, video window, assistive functions, and OpApp playback services, which act as JSON-RPC servers and handle specific business logic. Applications send requests to the JSON-RPC routing manager, which verifies the request and forwards it to the corresponding service module. After executing the corresponding logic processing, the service module generates a response and returns it to the JSON-RPC routing manager, which then returns the response to the corresponding application. Detailed processes are described above and will not be repeated here. Compared with existing technologies that establish independent communication channels, this solution reduces the number of communication channels, lowers memory and CPU usage, reduces redundant data transmission through a unified pipeline, and exposes a unified interface for services. New functions only need to be registered with the routing manager, improving scalability.
[0181] In some embodiments, a display device is provided, including at least one application, a routing manager, and at least one service to be invoked. The application is configured to, in response to a trigger operation performed by a user on a user interface provided by the application, obtain the name of a method to be invoked and related parameters corresponding to the trigger operation, construct a first message conforming to a preset format based on the name of the method to be invoked and the parameters, and send the first message and a resource address identifier of the application to the routing manager. The routing manager is configured to, based on the name of the method to be invoked and the parameters in the first message, search for a matching target service among the at least one service to be invoked; generate signature information of the application based on the resource address identifier, add the resource address identifier and the signature information to the first message to generate a second message, and send the second message to the target service. The target service is configured to, based on the name of the method to be invoked and the parameters in the second message, perform corresponding processing and generate a response message conforming to a preset format, add the resource address identifier and signature information from the second message to the response message to generate a response message to be returned, and return the response message to the routing manager. The routing manager is configured to, based on the resource address identifier and signature information in the response message to be returned, return the response message to the application. For detailed procedures, please refer to the aforementioned embodiments, which will not be repeated here.
[0182] In some embodiments, a display device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described routing communication method.
[0183] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described routing communication method.
[0184] In some embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described routing communication method.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0186] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. A routing communication method, characterized in that, Applied to a display device, the display device including at least one application, a route manager, and at least one service to be invoked, the method includes: In response to a user's trigger operation performed on the user interface provided by the application, the application obtains the name of the method to be called and related parameters corresponding to the trigger operation, constructs a first message conforming to a preset format based on the name of the method to be called and the parameters, and sends the first message and the resource address identifier of the application to the routing manager. The routing manager searches for a matching target service among at least one service to be invoked based on the name and parameters of the method to be invoked in the first message; generates signature information for the application based on the resource address identifier; adds the resource address identifier and the signature information to the first message to generate a second message; and sends the second message to the target service. The target service processes the method name and parameters to be called in the second message accordingly, generates a response message that conforms to a preset format, adds the resource address identifier and signature information in the second message to the response message to generate a response message to be returned, and returns the response message to the route manager. The routing manager returns the response message to the application based on the resource address identifier and signature information in the response message.
2. The method according to claim 1, characterized in that, The routing manager stores a routing table, which includes a first mapping table between method names and services and a second mapping table between parameters and services. The routing manager searches for a matching target service in the at least one service to be invoked based on the name and parameters of the method to be invoked in the first message, including: The routing manager parses the first message to obtain the name and parameters of the method to be called, and searches the first mapping table for a candidate service that has a mapping relationship with the method to be called. When there are multiple candidate services, the target service that has a mapping relationship with the parameter is found among the multiple candidate services based on the second mapping table.
3. The method according to claim 1, characterized in that, The method further includes: After the application establishes a connection with the routing manager, it sends a capability negotiation message in a preset format and the application's resource address identifier to the routing manager. The routing manager generates the application's signature information based on the resource address identifier, obtains the method set supported by the at least one service to be called, generates a negotiation result message conforming to a preset format based on the method set, the resource address identifier, and the signature information, and returns the negotiation result message to the application.
4. The method according to claim 3, characterized in that, The method further includes: After receiving the start command, the application obtains the resource address identifier corresponding to the routing manager; Establish a connection with the route manager according to the resource address identifier corresponding to the route manager.
5. The method according to claim 1, characterized in that, The triggering operation is a change operation of subtitle preference settings. The method name to be called corresponding to the triggering operation is the application subscription method name. The relevant parameters corresponding to the triggering operation include the subscription message type and the subtitle preference change value. The target service processes the method name and parameters to be invoked in the second message accordingly, and generates a response message conforming to a preset format, including: The target service registers subscription information, which includes: the application subscription method name, the subscription message type, the subtitle preference change value, the resource address identifier, and the signature information; and generates a subscription response message that conforms to a preset format.
6. The method according to claim 5, characterized in that, The service also includes: If the target service detects that the media asset data sent by the application's server carries subtitles, and the attributes of the subtitles match the subtitle preference change value, it sends a notification message to the routing manager. The notification message includes the subscription message type, the subtitle preference change value, the resource address identifier, and the signature information. The routing manager identifies the application based on the resource address identifier and signature information in the notification message, and returns the notification message to the application. The application displays a notification of the subtitle change based on the notification message.
7. A display device, characterized in that, It includes at least one application, a route manager, and at least one service to be invoked, wherein, The application is used to, in response to a trigger operation performed by a user on the user interface provided by the application, obtain the name of the method to be called and related parameters corresponding to the trigger operation, construct a first message conforming to a preset format based on the name of the method to be called and the parameters, and send the first message and the resource address identifier of the application to the routing manager. The routing manager is used to: search for a matching target service in at least one service to be invoked based on the name and parameters of the method to be invoked in the first message; generate signature information of the application based on the resource address identifier; add the resource address identifier and the signature information to the first message to generate a second message; and send the second message to the target service. The target service is used to process the method name and parameters to be called in the second message, generate a response message that conforms to a preset format, add the resource address identifier and signature information in the second message to the response message to generate a response message to be returned, and return the response message to be returned to the route manager. The routing manager is used to return the response message to the application based on the resource address identifier and signature information in the response message to be returned.
8. A display device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.