A method, apparatus, device, and medium for attribute notification in an IPTV system.

By using the init process in the IPTV system to establish a socket connection with the application and notify the application of changes when attributes change, the problem of low efficiency in obtaining attribute information in the prior art is solved, achieving efficient attribute notification and resource management, and supporting unified notification for multiple application clients.

CN119562088BActive Publication Date: 2025-10-31SICHUAN TIANYI COMHEART TELECOM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510132218.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-10-31
Estimated Expiration
2045-02-06

AI Technical Summary

Technical Problem

In existing IPTV systems, the efficiency of application terminals in obtaining attribute information is low, resulting in a waste of CPU resources.

Method used

The init process creates file descriptors under /dev/socket/, creates sockets, establishes connections with multiple applications, and notifies the target application of attribute changes through a hash list when attributes change. It uses Unix Socket for communication and combines the epoll mechanism to manage sockets.

Benefits of technology

It improves the efficiency of application terminals in obtaining attribute information in IPTV systems, reduces CPU resource waste, supports unified notification of APK applications and native binary programs, and enhances system security and general consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562088B_ABST
    Figure CN119562088B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and medium for attribute notification in an IPTV system, relating to the field of IPTV technology, to address the problem of low efficiency in obtaining attribute information by applications in existing IPTV systems. The method includes: creating a file descriptor under ` / dev / socket / ` through an init process to create a first socket; establishing connections with multiple application terminals through the first socket; when the init process receives an attribute change request for a target attribute, modifying the attribute value of the target attribute in the IPTV system, and querying a pre-stored hash list to see if the target attribute exists; wherein the hash list includes multiple attributes and the socket associated with each attribute; if it exists, notifying the target application terminal that the target attribute has changed through the target socket associated with the target attribute. This method only notifies the application terminal when the attribute changes, thereby improving the efficiency of applications obtaining attribute information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of IPTV technology, and provides a method, apparatus, device and medium for notifying attributes of an IPTV system. Background Technology

[0002] In the development of Internet Protocol Television (IPTV) systems, communication and data storage between multiple applications are frequently required. System properties are among the most commonly used methods. System properties are special key-value pairs used to store system configuration and status information. All applications can write and read their own status and values ​​through system properties, making them very simple and convenient to use. For example, an application configures its shared values ​​into a property, and other applications read this property to obtain the attribute value. However, when monitoring attribute changes within a program, repeatedly retrieving the current attribute value on a single thread to obtain the changed attribute value is inefficient and wastes CPU resources. Summary of the Invention

[0003] This application provides an attribute notification method, apparatus, device, and medium for an IPTV system, which addresses the problem of low efficiency in obtaining attribute information in existing IPTV systems.

[0004] Firstly, an attribute notification method for an IPTV system is provided, applied to the server side of the IPTV system, wherein the IPTV system further includes multiple application terminals; the method includes:

[0005] The init process creates a file descriptor under / dev / socket / to create the first socket;

[0006] The first socket establishes a connection with the plurality of application clients; the plurality of application clients include APK applications and native binary programs.

[0007] When the init process receives a request to change the attribute of a target attribute, it modifies the attribute value of the target attribute in the IPTV system and queries the pre-stored hash list to see if the target attribute exists; wherein, the hash list includes multiple attributes and the socket associated with each attribute;

[0008] If it exists, the target application is notified of the change in the target attribute through the target socket associated with the target attribute.

[0009] Optionally, the step of establishing a connection with multiple application terminals through the first socket includes:

[0010] Add the first socket to epoll and receive connection requests from any application through the first socket; the connection request is initiated by the application through the newly created third socket;

[0011] Create a second socket for communicating with either of the aforementioned applications.

[0012] Optionally, after creating a second socket for communicating with either of the applications, the method further includes:

[0013] Add the second socket to epoll and receive the attribute group requested by any application through the second socket; the attribute group is initiated by any application through the third socket; the attribute group includes at least one attribute;

[0014] Write the at least one attribute and the second socket together into the hash list.

[0015] Optionally, after writing the at least one attribute and the association of the second socket into the hash list, the method further includes:

[0016] The second socket sends an attribute listening success flag to the third socket of any of the application terminals; the attribute listening success flag is used to indicate that at least one attribute has been successfully listened to.

[0017] Optionally, after sending a success flag for attribute monitoring to any of the applications, the method further includes:

[0018] If an error message is received through the second socket, the second socket is removed from the hash list and closed; the error message is used to instruct either application to disconnect.

[0019] Optionally, the attribute change request includes the name of the target attribute and the changed attribute value; the step of notifying the target application that the target attribute has changed through the target socket associated with the target attribute includes:

[0020] The target socket associated with the target attribute sends the name of the target attribute and the value of the changed attribute to the target application.

[0021] Optionally, the change request further includes the name of the target attribute and the changed attribute value; the step of notifying the target application that the target attribute has changed through the target socket associated with the target attribute includes:

[0022] The target socket associated with the target attribute sends the name of the target attribute to the target application, so that the target application calls the specified interface to read the changed attribute value from the IPTV system according to the name of the target attribute.

[0023] Secondly, an optimization device for an IPTV system is provided, disposed in the server side of the IPTV system, wherein the IPTV system further includes multiple application terminals; the device includes:

[0024] Create a module to establish a file descriptor under / dev / socket / via the init process to create the first socket;

[0025] A connection module is used to establish a connection with the plurality of application terminals through the first socket; the plurality of application terminals include APK applications and native binary programs.

[0026] The modification module is used to modify the attribute value of the target attribute in the IPTV system and query whether the target attribute exists in the pre-stored hash list when the init process receives an attribute change request for the target attribute; wherein, the hash list includes multiple attributes and the socket associated with each attribute;

[0027] The notification module is used to notify the target application that the target attribute has changed if the target attribute exists in the hash list, through the target socket associated with the target attribute.

[0028] Thirdly, this application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the attribute notification method of the IPTV system described in the first aspect.

[0029] Fourthly, this application provides a computer-readable storage medium storing a computer program, wherein a processor executes the computer program to implement the attribute notification method of the IPTV system described in the first aspect.

[0030] Compared with the prior art, the beneficial effects of this application are as follows:

[0031] This application provides an attribute notification method for an IPTV system. The method is applied to the server side of the IPTV system, which also includes multiple application terminals. The method includes: creating a file descriptor under ` / dev / socket / ` through an init process to create a first socket; establishing connections with multiple application terminals through the first socket; the multiple application terminals include APK applications and native binary programs; when the init process receives an attribute change request for a target attribute, it modifies the attribute value of the target attribute in the IPTV system and queries a pre-stored hash list to see if the target attribute exists; wherein the hash list includes multiple attributes and the socket associated with each attribute; if it exists, the target application terminal is notified of the target attribute change through the target socket associated with the target attribute.

[0032] In this application, the method only notifies the application when an attribute changes. Compared to the polling mechanism for attributes in existing technologies, this improves the efficiency of the application in obtaining attribute information in the IPTV system. Furthermore, by creating a file descriptor under / dev / socket / through the init process, it can notify not only the APK application but also the native binary program when an attribute changes, demonstrating good general consistency. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0034] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0035] Figure 2 A flowchart illustrating the attribute notification method for an IPTV system provided in this application embodiment;

[0036] Figure 3 A schematic diagram of the server initialization process provided in an embodiment of this application;

[0037] Figure 4 A schematic diagram illustrating the process of server-side notification of attribute changes provided in an embodiment of this application;

[0038] Figure 5 A flowchart illustrating the application side provided in this application embodiment;

[0039] Figure 6 This is a schematic diagram of the structure of the attribute notification device of the IPTV system provided in the embodiments of this application. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0041] IPTV systems have many attributes, such as net.dns1 representing the IP address of the primary DNS server and net.dns2 representing the IP address of the backup DNS server. Currently, various applications in IPTV systems primarily use a round-robin mechanism to read attribute values. If the interval is set too short, it leads to high CPU overhead; if the interval is set too long, the timeliness of information retrieval is low.

[0042] Therefore, this application provides an attribute notification method for an IPTV system, applied to an IPTV system. Please refer to... Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application, or it can be understood as a structural schematic diagram of an IPTV system. The IPTV system includes a server and multiple application terminals. Figure 1 This example uses multiple application clients, including application client 1 and application client 2, but in reality, there is no limit to the number of application clients.

[0043] These applications include APK applications and native binary programs. APK applications refer to Android applications that use the Android Application Package (APK). Native binary programs refer to applications that are designed for C and Linux.

[0044] Combination Figure 2 This application also provides an attribute notification method for an IPTV system. The method steps defined in the process of the attribute notification method for the IPTV system can be implemented by the server of the IPTV system.

[0045] The following will be about Figure 2 The specific process shown will be explained in detail.

[0046] S201. The init process creates a file descriptor under / dev / socket / to create the first socket.

[0047] In the specific implementation process, after the IPTV system's attribute service is initialized, a first socket for monitoring attribute changes is added. This first socket uses a Unix socket. A Unix socket is a mechanism for communication between processes on the same machine, directly creating a special file in the file system to represent the socket. Therefore, creating a file descriptor (property_change) under / dev / socket / completes the creation of the first socket. This file descriptor is created and managed by the init process.

[0048] In the embodiments of this application, Unix Socket does not rely on network protocols (such as TCP, IP, etc.) like network sockets, but uses file paths in the file system for communication. Therefore, it can avoid the performance overhead of network protocol stack and is generally more efficient.

[0049] In one possible implementation, because Unix sockets use file system paths to identify communication endpoints instead of IP addresses and port numbers, Unix socket files have file system permission control. Access permissions to socket files can be set using commands such as `chmod` and `chown`. Only users or processes with the appropriate permissions can access or manipulate the Unix socket. In other words, the file descriptor (` / dev / socket / property_change`) is similar to a file. If the file descriptor's attribute is set to the system user, only applications with system privileges are allowed to access the file descriptor. Regular applications cannot access the file descriptor and therefore cannot obtain the attribute value, thus improving the security of the IPTV system.

[0050] S202. Establish connections with multiple application terminals through the first socket.

[0051] In the actual implementation process, after the server creates a file descriptor (property_change) under / dev / socket / , if an application needs to listen to a certain property, it needs to connect to that file descriptor first, that is, establish a connection with the application through the first socket.

[0052] In one possible embodiment, a first socket is added to epoll, and a connection request from any application is received through the first socket; the connection request is initiated by any application through a newly created third socket; a second socket is created for communicating with any application.

[0053] In practice, after creating the first socket, the server first adds it to epoll and then to the epoll event listener loop, waiting for connections from applications. Once any application starts, it first creates a third socket and then initiates a connection request to the first socket (i.e., the file descriptor) through the third socket. After receiving a connection request from any application, the server's first socket creates a second socket using the `accept` function. This second socket is used to communicate with that application. Thereafter, communication between the server and that application is achieved through both the second and third sockets.

[0054] In this embodiment, epoll is an I / O event notification mechanism provided by the Linux kernel for efficiently managing a large number of file descriptors (such as network connections and files). epoll uses an event-driven approach, notifying the application only when the state of a file descriptor changes. Multiple file descriptors can be associated with it. For example, if multiple sockets need to receive data, typically multiple threads would need to wait. Now, only one thread waits on epoll. When data is received, an epoll event is triggered, causing it to return, and then the data is received on the socket, resulting in better performance.

[0055] In one possible embodiment, after creating a second socket for communicating with either application, the method further includes:

[0056] Add the second socket to epoll and receive the attribute group requested by any application through the second socket; the attribute group is initiated by any application through the third socket; the attribute group includes at least one attribute; write at least one attribute and the second socket into the hash list.

[0057] In practice, after creating the second socket, the server adds it to epoll, waiting for any application to send a request to monitor a group of attributes. The application groups at least one attribute it wants to monitor. If the group contains multiple attributes, it separates them with a specific character (e.g., ";") before sending the group to the server's second socket via a third socket. Upon receiving the group, the server, if it contains multiple attributes, splits it into individual attributes and associates each monitored attribute with the second socket in a hash list.

[0058] In one possible embodiment, after writing at least one attribute and the association with the second socket into the hash list, the method further includes:

[0059] Send an attribute listening success flag to the third socket of any application through the second socket; the attribute listening success flag is used to indicate that at least one attribute has been successfully listened to.

[0060] In this embodiment, the server sends a success flag for attribute monitoring to any application. When the application receives the success flag, it confirms that the attribute monitoring has been successfully set. This avoids repeatedly sending requests to monitor attribute groups without clear feedback, which could lead to redundant operations or wasted resources.

[0061] In one possible implementation, if the attribute monitoring setting fails, the server can also send an attribute monitoring failure flag to the application. The application then knows that the request was unsuccessful and can take appropriate remedial measures (such as retrying or adjusting the attribute being monitored). The server can also log information related to the attribute monitoring setting failure for subsequent troubleshooting and analysis, thereby optimizing the IPTV system.

[0062] In one possible embodiment, after sending a successful attribute monitoring flag to any application, the method further includes:

[0063] If an error message is received through the second socket, the second socket is removed from the hash list and closed; the error message is used to indicate that either application should disconnect.

[0064] In practice, after sending a successful attribute listening flag to any application, the server adds the second socket to the event listener loop, waiting for further requests from the application. If an application suddenly disconnects or exits abnormally, the second socket receives an error message, which the server then processes. If the attribute associated with the second socket has no association with any other socket in the hash list, it means only that application is listening to that attribute, and the second socket and its associated attribute can be removed from the hash list. If the attribute associated with the second socket has an association with any other socket in the hash list, it means other applications are also listening to that attribute, and only the second socket is removed from the hash list. Finally, the second socket is closed, completing resource reclamation.

[0065] In this embodiment, when the application needs to monitor attributes, it sends the attributes to the server. When the application no longer needs to monitor attributes, it can disconnect from the server, which is convenient and efficient. When the application disconnects or encounters an anomaly, the server can respond promptly and perform cleanup operations to avoid continuous resource consumption.

[0066] S203. When the init process receives a request to change the attribute of the target attribute, it modifies the attribute value of the target attribute in the IPTV system and queries the pre-stored hash list to see if the target attribute exists.

[0067] In practical implementation, when a target attribute in the IPTV system changes, the init process receives an attribute change request. This request includes the name of the target attribute and the changed attribute value. The target attribute name refers to the name of the attribute being changed, identifying a specific configuration item or setting in the IPTV system. The changed attribute value is the newly set value, representing the new state or value of the target attribute. The server can modify the value of the target attribute in the IPTV system to the changed attribute value based on its name. A hash list pre-stores multiple attributes and their associated sockets. The server can query the hash list to check if the target attribute exists, thus determining if any application in the IPTV system is listening for that target attribute.

[0068] S204. If it exists, notify the target application that the target attribute has changed through the target socket associated with the target attribute.

[0069] In the specific implementation process, if the target attribute exists in the hash list, it means that an application in the IPTV system is listening to the target attribute. Then, the target socket associated with the target attribute is determined from the hash list, and the information that the target attribute has changed is sent to the target application (i.e., the application corresponding to the target socket) through the target socket.

[0070] It should be noted that multiple applications may be listening to the target attribute at the same time. Therefore, there may be multiple target sockets associated with the target attribute in the hash list. Information about changes in the target attribute can be sent to the target application corresponding to each target socket through each target socket.

[0071] There are two specific implementation methods, which will be described below.

[0072] The first method involves sending the name and variable value of the target attribute to the target application through the target socket associated with the target attribute.

[0073] In practice, when a target attribute changes, the server will push a message containing the name of the target attribute and the changed attribute value to the target application. After receiving the message, the target application does not need to query the changed attribute value again. It can directly perform subsequent business processing based on the changed attribute value of the target attribute, which can improve the processing efficiency of the application.

[0074] The second method involves sending the name of the target attribute to the target application through the target socket associated with the target attribute, so that the target application can call the specified interface to read the changed attribute value of the target attribute from the IPTV system according to the name of the target attribute.

[0075] In the specific implementation process, when the target attribute changes, the server only notifies the name of the target attribute. After receiving the name of the target attribute, the target application can call the specified interface at a specific time to query the latest value of the target attribute according to its own needs. The IPTV system returns the changed attribute value (i.e. the latest value) of the target attribute through this call to the specified interface. The application then performs subsequent business processing based on the changed attribute value of the target attribute.

[0076] In this embodiment, the server only notifies the name of the target attribute, which reduces the amount of data transmitted over the network. If the application does not need to know the attribute value changes in real time, but only needs to obtain the changed attribute value of the target attribute at a specific time, the second method is also more flexible. Furthermore, only the attribute change message is notified to the application; if the application does not have access permissions, it still cannot obtain the attribute value corresponding to the target attribute, thus ensuring the security of the IPTV system.

[0077] In one possible implementation, if the target attribute is not found in the hash list after S203, it means that no application in the IPTV system is listening to the target attribute, and the process ends.

[0078] Please refer to Figure 3 This is a schematic diagram of the server initialization process provided in the embodiments of this application.

[0079] S301. Create a socket corresponding to a file descriptor.

[0080] After the system property service is initialized, a first socket for property change monitoring is added. This socket uses a Unix socket, and a file descriptor named property_change is created under / dev / socket / , with the socket name being server. This file descriptor is created and managed by the init process.

[0081] S302. Add the socket to the event loop and wait to receive messages.

[0082] Add the socket to the event listener loop and wait for the application to connect.

[0083] S303, Establish socket s via accept.

[0084] When an application attempts to connect, the server establishes a second socket (socket s) using accept and adds s to epoll, waiting for the application to send a request.

[0085] S304: Receive the attribute group to be monitored from s.

[0086] S305. Add the attribute group and s to the hash list.

[0087] S306. Add s to the event loop.

[0088] The server continues to add `s` to the event listener loop, waiting for requests from the application. This is to prevent the application from suddenly disconnecting or exiting abnormally; in such cases, `s` will receive an error message.

[0089] S307. Determine if the application is disconnected.

[0090] If s does not receive an error message, it is determined that the application is not disconnected, and it continues to receive messages from other applications, executing S303. If s receives an error message, it is determined that the application is disconnected, executing S308.

[0091] S308. Remove the attribute containing 's' from the hash list and turn off 's'.

[0092] After the application closes socket 's', it returns an error message to the server. The server will process the error message, remove the attribute containing 'socket ' from the list, and close 's', completing resource reclamation. After the server executes S308, it can continue executing S303.

[0093] Please refer to Figure 4 This is a schematic diagram illustrating the process of server-side notification of attribute changes provided in an embodiment of this application.

[0094] S401, Received an attribute change request.

[0095] When a target attribute of the system changes, the init process will receive an attribute change request; this is a native system function.

[0096] S402. Search the hash list for the name of the currently changed attribute.

[0097] In the attribute change request, the new function added in this application embodiment is triggered to query whether the target attribute exists in the hash list h.

[0098] S403. Determine if the attribute name exists in the hash list.

[0099] If it exists, execute S404; otherwise, continue executing S401.

[0100] S404. Send the attribute change message to all corresponding s in the hash list.

[0101] Retrieve all 's' corresponding to the attribute name of the target attribute, and send the name of the target attribute to the corresponding target application through each 's'.

[0102] Please refer to Figure 5 This is a flowchart of the application terminal provided in the embodiments of this application.

[0103] S501, Create socket s1.

[0104] After the application starts, it creates a third socket (socket s1).

[0105] S502 and S1 connect to the server.

[0106] The application connects to the file descriptor property_change created under / dev / socket / through the third socket (socket s1).

[0107] S503. Merge the properties to be monitored into a property group.

[0108] The application combines multiple properties that need to be monitored into a property group.

[0109] S504, Send attribute group via s1.

[0110] The application sends the attribute group to the server via the third socket (socket s1). After the server receives the data, it returns a success flag for attribute listening to the application.

[0111] S505, Add s1 to the event wait loop.

[0112] The application adds the third socket (socket s1) to the event wait loop to wait for attribute change notifications.

[0113] S506, Receive attribute change notifications.

[0114] The application receives the name of the target attribute whose attribute has changed and calls the specified interface to read the current attribute value of the target attribute.

[0115] S507, Business Logic Processing.

[0116] In summary, this application provides an attribute notification method for an IPTV system. After a system attribute change is completed, other applications are selectively notified, avoiding polling of attributes by the applications. Furthermore, when an attribute needs monitoring, the application sends the required attributes to the server, and the notification is disabled when no longer needed, resulting in high efficiency. Since notifications are only given based on message changes, applications without access permissions cannot obtain the corresponding attribute values, ensuring the security of the IPTV system.

[0117] Furthermore, Android employs strict security controls in its usage scenarios. Apps typically have the highest privilege level of system, and some functions requiring root access cannot be performed by apps. Therefore, they need to be encoded in Native C as binary executables before execution. Existing technologies typically only notify APK applications, not Native binary programs. In this embodiment, a file descriptor is created under ` / dev / socket / ` through the init process. Both C and Java code can connect to this file descriptor, thus enabling notification not only to APK applications but also to Native binary programs developed in C, demonstrating universal consistency.

[0118] For example, in an IPTV system, there exists a running binary program that can capture network packets by monitoring changes in attributes. This functionality must be implemented in a native C binary program. Due to Android's security mechanisms, Android applications can only implement system privileges at most; functions requiring root privileges are not supported. Therefore, some programs requiring root privileges can be grouped into a single native C binary program, and different functions can be switched within this process through configured attributes.

[0119] Based on the same inventive concept, such as Figure 6 As shown in the illustration, this application also provides an attribute notification device for an IPTV system, which is configured in the server of the IPTV system. The IPTV system also includes multiple application terminals; the device includes:

[0120] The creation module is used by the init process to establish a file descriptor under / dev / socket / to create the first socket;

[0121] The connection module is used to establish connections with multiple application clients through the first socket; the multiple application clients include APK applications and native binary programs;

[0122] The modification module is used to modify the attribute value of the target attribute in the IPTV system when the init process receives an attribute change request for the target attribute, and to query whether the target attribute exists in the pre-stored hash list; wherein, the hash list includes multiple attributes and the socket associated with each attribute;

[0123] The notification module is used to notify the target application of a change in the target attribute if the target attribute exists in the hash list, through the target socket associated with the target attribute.

[0124] It should be noted that each module in the attribute notification device of the IPTV system in this embodiment corresponds one-to-one with each step in the attribute notification method of the IPTV system in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the attribute notification method of the aforementioned IPTV system, and will not be repeated here.

[0125] In addition, in one embodiment, this application also provides a computer device, equivalent to the set-top box discussed above, the computer device including a processor, a memory and a computer program stored in the memory, the computer program being executed by the processor to implement the aforementioned attribute notification method of the IPTV system.

[0126] In addition, in one embodiment, this application also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the aforementioned attribute notification method for an IPTV system.

[0127] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a device including one or any combination of the above-mentioned memories. The computer may be a variety of computing devices, including smart terminals and servers.

[0128] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0129] As an example, executable instructions may, but do not necessarily, correspond to files in the file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborative files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0130] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0131] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0132] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not indicate the superiority or inferiority of the embodiments.

[0133] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device to execute the methods described in the various embodiments of this application.

[0134] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for attribute notification in an IPTV system, characterized in that, The method is applied to the server side of an IPTV system, which also includes multiple application terminals; the method includes: The init process creates a file descriptor under / dev / socket / to create the first socket; A connection is established with the plurality of application clients through the first socket; the plurality of application clients include APK applications and native binary programs; the step of establishing a connection with the plurality of application clients through the first socket includes: Add the first socket to epoll and receive connection requests from any application through the first socket; the connection request is initiated by the application through the newly created third socket; Create a second socket for communicating with either of the said applications; after creating the second socket for communicating with either of the said applications, the method further includes: Add the second socket to epoll and receive the attribute group requested by any application through the second socket; the attribute group is initiated by any application through the third socket; the attribute group includes at least one attribute; The method further includes writing the at least one attribute and the second socket association into the hash list; after writing the at least one attribute and the second socket association into the hash list, the method further includes: The method further includes sending an attribute listening success flag to the third socket of any of the applications via the second socket; the attribute listening success flag indicates that at least one attribute has been successfully listened to; after sending the attribute listening success flag to any of the applications, the method further includes: If an error message is received through the second socket, the second socket is removed from the hash list and closed; the error message is used to instruct either application to disconnect, and the removed second socket is obtained based on the application's monitoring of its associated attributes; When the init process receives a request to change the attribute of a target attribute, it modifies the attribute value of the target attribute in the IPTV system and queries the pre-stored hash list to see if the target attribute exists; wherein, the hash list includes multiple attributes and the socket associated with each attribute; If the target attribute exists in the hash list, the target application is notified that the target attribute has changed through the target socket associated with the target attribute.

2. The attribute notification method for an IPTV system as described in claim 1, characterized in that, The attribute change request includes the name of the target attribute and the changed attribute value; the step of notifying the target application that the target attribute has changed through the target socket associated with the target attribute includes: The target socket associated with the target attribute sends the name of the target attribute and the value of the changed attribute to the target application.

3. The attribute notification method for an IPTV system as described in claim 1, characterized in that, The change request also includes the name of the target attribute and the changed attribute value; the step of notifying the target application that the target attribute has changed through the target socket associated with the target attribute includes: The target socket associated with the target attribute sends the name of the target attribute to the target application, so that the target application calls the specified interface to read the changed attribute value from the IPTV system according to the name of the target attribute.

4. An attribute notification device for an IPTV system, characterized in that, The device is located in the server side of the IPTV system, which also includes multiple application terminals; the device includes: Create a module to establish a file descriptor under / dev / socket / via the init process to create the first socket; A connection module is configured to establish connections with the plurality of application clients via the first socket; the plurality of application clients include APK applications and native binary programs; establishing connections with the plurality of application clients via the first socket includes: Add the first socket to epoll and receive connection requests from any application through the first socket; the connection request is initiated by the application through the newly created third socket; Create a second socket for communicating with either of the said applications; after creating the second socket for communicating with either of the said applications, the method further includes: Add the second socket to epoll and receive the attribute group requested by any application through the second socket; the attribute group is initiated by any application through the third socket; the attribute group includes at least one attribute; Write the at least one attribute and the second socket association into the hash list; after writing the at least one attribute and the second socket association into the hash list, the method further includes: Sending an attribute listening success flag to the third socket of any of the applications via the second socket; the attribute listening success flag indicates that at least one attribute has been successfully listened to; after sending the attribute listening success flag to any of the applications, the method further includes: If an error message is received through the second socket, the second socket is removed from the hash list and closed; the error message is used to instruct either application to disconnect, and the removed second socket is obtained based on the application's monitoring of its associated attributes; The modification module is used to modify the attribute value of the target attribute in the IPTV system and query whether the target attribute exists in the pre-stored hash list when the init process receives an attribute change request for the target attribute; wherein, the hash list includes multiple attributes and the socket associated with each attribute; The notification module is used to notify the target application that the target attribute has changed if the target attribute exists in the hash list, through the target socket associated with the target attribute.

5. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the attribute notification method of the IPTV system as described in any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the attribute notification method of the IPTV system as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Method and device for informing system attribute updating

    CN106055348A

  • Application program updating method and device and storage medium

    CN113110864A