A method, device, equipment and medium for synchronizing time of a private network of Internet television

By obtaining the system time in the intelligent device and adding the value synchronized with the time to determine the target time synchronized with the NTP server, the problem of the inability to synchronize the system time of the intelligent device in the IPTV private network is solved, efficient time synchronization is achieved, and network requests and device resource consumption is reduced.

CN115412192BActive Publication Date: 2025-05-16CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210986214.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2025-05-16
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

In the IPTV private network environment, the system time of the smart device cannot be synchronized with the NTP server, resulting in problems in business scenarios such as time shift, back viewing, and order authentication. The existing technology time synchronization scheme has the problems of large network request overhead and large equipment resource consumption.

Method used

By responding to the change operation of the electronic program menu page in the smart device, the current system time is obtained, and the sum of the adjustment values ​​synchronized with the time is determined as the target time synchronized with the NTP server. The time synchronization adjustment value is determined based on the network time obtained from the NTP server and the current system time of the smart device during the soft terminal application startup process.

Benefits of technology

It realizes the efficiency of synchronization time in the IPTV private network environment, reduces the overhead of network requests and device performance, reduces device resource consumption, and ensures the consistency between the EGP page data returned by the IPTV service platform and the service request.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115412192B_ABST
    Figure CN115412192B_ABST
Patent Text Reader

Abstract

The present application relates to the field of network television technology, and in particular to a method, device, equipment and medium for time synchronization of a network television private network. The method is used to solve the problems of large network request overhead and large device resource consumption in the traditional IPTV private network time synchronization solution. The method is as follows: in response to the change operation of the electronic program menu page in the smart device, the current first system time of the smart device is obtained, and the sum of the first system time and the time synchronization adjustment value is determined as the target time, wherein the time synchronization adjustment value is determined based on the network time of the NTP server obtained and the current second system time of the smart device during the startup of the soft terminal application; and then the service request generated based on the change operation and the target time is sent to the IPTV service platform to obtain the corresponding EGP page data; in this way, the efficiency of synchronization time in the IPTV private network environment is improved, and the overhead of network requests and device performance is also reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet television, and in particular to a method, device, equipment and medium for synchronizing a time of an Internet television private network. Background Art

[0002] Currently, soft terminals are mostly used in Internet Protocol Television (IPTV) private networks. However, most devices, such as Android TVs and projection devices, do not have the function of recording time. This leads to problems such as being unable to obtain the playback program list, time-shifted programs not matching the live interface, and abnormal subscription authentication cycles in business scenarios such as IPTV time shifting, playback, subscription authentication, history records, and home page clocks.

[0003] Since most of the business scenarios in the IPTV field rely on the time parameters of the device, and the device's own Network Time Protocol (NTP) server is on the Internet, the device's system time cannot be synchronized; although the application installed in the device can synchronize the time with the NTP server through the NTP protocol, since the application usually does not have root permissions, it cannot directly modify the device's system time.

[0004] In related technologies, when a device receives a soft terminal service request, there are usually two traditional solutions to achieve time synchronization between the system time of the smart device and the network time of the NTP server:

[0005] Solution 1: Use the browser component in the application to frequently interact with the NTP server to achieve time synchronization.

[0006] However, due to the huge number of users of IPTV services, if solution 1 is adopted, the NTP server needs to interact with many terminals, which not only causes huge interaction pressure on the NTP server, but also increases the overhead of network requests.

[0007] Solution 2: After completing a time synchronization with the NTP server, the application in the device maintains a timer and updates the time at a frequency of seconds based on the acquired time, thereby achieving time synchronization.

[0008] However, when using solution 2, a timer needs to be maintained in the device, which not only increases the resource consumption of the device, but also increases the development cost of EPG and APP. Summary of the invention

[0009] The embodiments of the present application provide a method, apparatus, device and medium for synchronizing time in an IPTV private network, so as to improve the efficiency of synchronizing time in an IPTV private network environment and reduce the overhead of network requests and device performance.

[0010] The specific technical solutions provided by the embodiments of this application are as follows:

[0011] In a first aspect, an embodiment of the present application provides a time synchronization method for an Internet TV private network, which is applied to a smart device, including:

[0012] In response to a change operation on an electronic program menu page in the smart device, obtaining a current first system time of the smart device;

[0013] Determine the sum of the first system time and the time synchronization adjustment value as the target time for synchronization with the network time protocol server, wherein the time synchronization adjustment value is determined during the startup of the soft terminal application in the smart device based on the network time obtained from the network time protocol server and the current second system time of the smart device obtained;

[0014] Based on the change operation and the target time, a service request is generated, and the service request is sent to the network television service platform.

[0015] In a possible implementation manner, the time synchronization adjustment value is determined by:

[0016] Sending an acquisition request to the network time protocol server, receiving the network time returned by the network time protocol server, and acquiring the current second system time of the smart device;

[0017] A time difference is determined based on the network time and the second system time, and the time difference is determined as the time synchronization adjustment value.

[0018] In a possible implementation manner, determining the time difference based on the network time and the second system time includes:

[0019] According to a preset conversion rule, the network time and the second system time are converted respectively to obtain respective corresponding timestamps;

[0020] A timestamp difference between the converted timestamps is determined, and the timestamp difference is used as the time difference.

[0021] In a possible implementation, the acquiring the second system time of the smart device includes:

[0022] Calling a time acquisition function to acquire the current second system time of the smart device;

[0023] After determining the time difference as the time synchronization adjustment value, the method further includes:

[0024] Based on the time synchronization adjustment value, modify the source code corresponding to the target time generation function, and compile and store the modified source code;

[0025] The step of determining the sum of the first system time and the time synchronization adjustment value as the target time for synchronization with the network time protocol server comprises:

[0026] The target time generation function is called to obtain the target time synchronized with the network time protocol server based on the first system time.

[0027] In a possible implementation manner, after sending the service request to the network television service platform, the method further includes:

[0028] Receiving electronic program menu data returned by the Internet TV service platform;

[0029] Based on the electronic program menu data, rendering an electronic program menu page corresponding to the service request;

[0030] Display the rendered electronic program menu page.

[0031] In a possible implementation, the service request includes part or all of the following requests:

[0032] Network TV time-shift request;

[0033] Online TV catch-up requests;

[0034] Internet TV subscription authentication request;

[0035] Network TV history viewing requests;

[0036] Request to display the clock on the home page of Internet TV.

[0037] In a second aspect, an embodiment of the present application provides a time synchronization device for an Internet TV private network, which is applied to a smart device, including:

[0038] an acquisition module, configured to respond to a change operation on an electronic program menu page in the smart device and acquire a current first system time of the smart device;

[0039] a determination module, configured to determine the sum of the first system time and the time synchronization adjustment value as a target time for synchronization with a network time protocol server, wherein the time synchronization adjustment value is determined during the startup of a soft terminal application in the smart device based on a network time obtained from the network time protocol server and a second system time currently obtained for the smart device;

[0040] The generating module is used to generate a service request based on the change operation and the target time, and send the service request to the network television service platform.

[0041] In a possible implementation manner, the determining module is used to determine the time synchronization adjustment value in the following manner:

[0042] Sending an acquisition request to the network time protocol server, receiving the network time returned by the network time protocol server, and acquiring the current second system time of the smart device;

[0043] A time difference is determined based on the network time and the second system time, and the time difference is determined as the time synchronization adjustment value.

[0044] In a possible implementation manner, the determining of the time difference based on the network time and the second system time, the determining module is configured to:

[0045] According to a preset conversion rule, the network time and the second system time are converted respectively to obtain respective corresponding timestamps;

[0046] A timestamp difference between the converted timestamps is determined, and the timestamp difference is used as the time difference.

[0047] In a possible implementation, the obtaining the current second system time of the smart device, the determining module is used to:

[0048] Calling a time acquisition function to acquire the current second system time of the smart device;

[0049] After determining the time difference as the time synchronization adjustment value, the determining module is further used to:

[0050] Based on the time synchronization adjustment value, modify the source code corresponding to the target time generation function, and compile and store the modified source code;

[0051] The sum of the first system time and the time synchronization adjustment value is determined as the target time synchronized with the network time protocol server, and the determination module is used to:

[0052] The target time generation function is called to obtain the target time synchronized with the network time protocol server based on the first system time.

[0053] In a possible implementation, after sending the service request to the Internet TV service platform, the generating module is further configured to:

[0054] Receiving electronic program menu data returned by the Internet TV service platform;

[0055] Based on the electronic program menu data, rendering an electronic program menu page corresponding to the service request;

[0056] Display the rendered electronic program menu page.

[0057] In a possible implementation, the service request includes part or all of the following requests:

[0058] Network TV time-shift request;

[0059] Online TV catch-up requests;

[0060] Internet TV subscription authentication request;

[0061] Network TV history viewing requests;

[0062] Request to display the clock on the home page of Internet TV.

[0063] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0064] Memory, used to store computer programs or instructions;

[0065] A processor is used to execute the computer program or instructions in the memory so that any method described in the first aspect above is executed.

[0066] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any method described in the first aspect above.

[0067] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, when the computer program code is run on a computer, the computer executes any method as described in the first aspect above.

[0068] In an embodiment of the present application, in response to a change operation on an electronic program menu page in a smart device, the current first system time of the smart device is obtained, and the sum of the first system time and the time synchronization adjustment value is determined as the target time for synchronization with the NTP server, wherein the time synchronization adjustment value is determined during the startup of a soft terminal application in the smart device based on the network time obtained from the NTP server and the current second system time of the smart device obtained; then, based on the change operation and the target time, a service request is generated, and the service request is sent to the IPTV service platform so that the IPTV service platform returns the EGP page data corresponding to the service request, thereby improving the efficiency of synchronization time in the IPTV private network environment, achieving one-time NTP synchronization and subsequent continuous time calibration, while also reducing the overhead of network requests and device performance, reducing the resource consumption of the device, and further ensuring the consistency of the EGP page data returned by the IPTV service platform with the service request. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 This is a schematic diagram of network topology comparison between an IPTV private network and a broadband public network in an embodiment of the present application;

[0070] Figure 2 A schematic diagram of an application scenario in an embodiment of the present application;

[0071] Figure 3 A schematic diagram of a time synchronization method for an Internet TV private network in an embodiment of the present application;

[0072] Figure 4 A schematic diagram of a flow chart of a method for determining a time synchronization adjustment value in an embodiment of the present application;

[0073] Figure 5 A schematic diagram of a flow chart of a method for determining a time difference in an embodiment of the present application;

[0074] Figure 6 A schematic diagram of a flow chart of a method for generating an electronic program menu page in an embodiment of the present application;

[0075] Figure 7 A schematic diagram of the logical architecture of a time synchronization device for an Internet TV private network in an embodiment of the present application;

[0076] Figure 8 It is a schematic diagram of the physical structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0078] In order to help those skilled in the art to better understand the technical solution of the present application, some terms in the embodiments of the present application are explained below.

[0079] (1) In the embodiments of the present application, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0080] (2) The term "soft terminal application" in the embodiments of the present application refers to a pure Android application (Application, APP) in the field of IPTV, which supports the playback of high-definition, 4K HDR and other programs. The soft terminal application can be independently installed on Android devices, such as TVs, projectors and other devices, providing a new way for operators' broadband network users to watch IPTV, which is an extension of the form of IPTV services.

[0081] (3) In the embodiments of the present application, the term "IPTV private network" refers to a private network independently built by the operator outside the public network for broadband users, which is not interoperable with the public network environment. The purpose is to ensure the efficient and safe broadcasting of IPTV program content without occupying the bandwidth of the user's broadband. The IPTV private network and the broadband public network share the metropolitan area network and the broadband network element equipment on the access side.

[0082] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0083] Figure 1 The figure shows the network topology comparison diagram of IPTV private network and broadband public network. In the current IPTV field, in order to ensure the efficient and safe broadcast of IPTV program content and not occupy the bandwidth of user broadband, IPTV private network is deployed for IPTV services. Figure 1As shown in the figure, the IPTV private network and the broadband public network share the broadband network element equipment on the access side and the metropolitan area network (i.e., the core aggregation side), such as the optical line terminal (OLT) and switch (SW) on the access side, and the broadband remote access server (BRAS), iTV switch, city content delivery network (CDN) node, core router (CR) and edge device (PE) on the metropolitan area network; on the backbone side, the IPTV private network and the broadband public network are configured separately, such as the broadband public network - ChinaNet, and the IPTV private network - the multi-service bearer network (ChinaNet Next Carrying Network, CN2).

[0084] In the related art, soft terminal applications are mostly used in IPTV private networks. Soft terminal services involve the display of a large number of Electronic Program Guide (EPG) pages, and involve a large number of parameters that need to be obtained based on the interaction of the V8 Javascript virtual machine of the browser in the device.

[0085] However, most Android TVs and projectors do not have the function of recording time. The following abnormal situations may occur in business scenarios such as IPTV time-shifting, playback, subscription authentication, history recording and home page clock: Case 1: In the channel playback program list display business scenario, the date of the business request generated based on the system time of the smart device is usually filtered; when the date exceeds the preset time range, the device cannot respond to the business request, or outputs an error message, such as there is no playback program list content.

[0086] Case 2: In the live channel time-shift service scenario, the program is usually rolled back according to the system time of the smart device. If the system time of the smart device is not synchronized with the network time of the NTP server, the time-shifted program will not match the live broadcast, and the service request cannot be accurately responded to.

[0087] 3. In the subscription authentication business scenario, when the system time of the device is not synchronized with the network time of the NTP server, errors will occur in the subscription cycle of broadband users.

[0088] In summary, since most business scenarios in the IPTV field rely on the time parameters of the device, and the device's own NTP server is on the Internet, the device's system time cannot be synchronized with it; although the application installed in the device can synchronize time with the NTP server through the NTP protocol, since the application usually does not have root permissions, it cannot directly modify the device's system time.

[0089] There are currently two traditional solutions to synchronize the system time of the above devices with the network time of the NTP server:

[0090] Solution 1 is to achieve time synchronization by frequently interacting with the device's system time through the browser in the application. However, due to the large number of users of the current IPTV service, the NTP server needs to interact with many terminals when using Solution 1. This not only causes huge interaction pressure on the NTP server, but also increases the overhead of network requests.

[0091] Solution 2: After completing a time synchronization with the NTP server, the application maintains a timer and updates the time at a frequency of seconds based on the acquired time, thereby achieving time synchronization. However, with Solution 2, a timer needs to be maintained on the device side, which not only increases the resource consumption of the device, but also increases the development cost of the EPG and application.

[0092] In view of this, in order to solve the problems of large network request overhead and large device resource consumption in the time synchronization solution in the traditional IPTV private network, the embodiment of the present application provides a time synchronization method for an Internet TV private network, the method comprising: responding to the change operation of the electronic program menu page in the smart device, obtaining the current first system time of the smart device, and determining the sum of the first system time and the time synchronization adjustment value as the target time synchronized with the NTP server, wherein the time synchronization adjustment value is determined during the startup process of the soft terminal application in the smart device based on the network time obtained from the NTP server and the current second system time of the smart device obtained; then, based on the change operation and the target time, a service request is generated, and the service request is sent to the IPTV service platform, so that the IPTV service platform returns the EGP page data corresponding to the service request, thereby improving the efficiency of synchronization time in the IPTV private network environment, achieving one NTP synchronization, and subsequent time continuous calibration, while also reducing the overhead of network requests and device performance, reducing the resource consumption of the device, and further ensuring the consistency of the EGP page data returned by the IPTV service platform with the service request.

[0093] like Figure 2As shown, it is a schematic diagram of an application scenario in an embodiment of the present application. The application scenario schematic diagram includes a smart device 100, an IPTV service platform 110 and an NTP server 120. The smart device 100 and the NTP server 120, and the smart device 100 and the IPTV service platform 110 can communicate through a communication network. Optionally, the communication network can be a wired network or a wireless network. The above-mentioned smart device 100 and the IPTV service platform 110, as well as the smart device 100 and the NTP server 120 can be directly or indirectly connected through wired or wireless communication, and this application does not limit this.

[0094] In the embodiment of the present application, the smart device 100 is an electronic device used by a user, which may be a smart TV, a personal computer, a mobile phone, a tablet computer, a notebook, an e-book reader, or other device; a soft terminal application in the IPTV field may be installed in the smart device 100, and the soft terminal application includes a browser component.

[0095] It should be noted that Figure 2 This is an example introduction to the application scenarios of the time synchronization method for an IPTV private network. In fact, the application scenarios to which the method in the embodiments of the present application can be applied are not limited to these.

[0096] The preferred implementation modes of the present application are further described in detail below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application, and the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0097] See also Figure 3 As shown, in an embodiment of the present application, a time synchronization method for an IPTV private network is provided, and the specific process is as follows:

[0098] Step 300: In response to a change operation on an electronic program menu page in a smart device, a current first system time of the smart device is obtained.

[0099] In an embodiment of the present application, when a broadband user performs a change operation on the EGP page in the smart device through a control device, the soft terminal application in the smart device responds to the change operation on the electronic program menu page in the smart device and obtains the current first system time of the smart device, wherein the control device can be an infrared remote control or a terminal device, etc.

[0100] In a specific implementation, after the broadband user performs a change operation on the EGP page in the smart device through the control device, the soft terminal application responds to the change operation, calls the time acquisition function, and acquires the current first system time of the smart device.

[0101] In actual applications, the first system time can be obtained through the following sample code:

[0102] DateTimeUtil.getCurrentTimestamp().

[0103] Step 310: Determine the sum of the first system time and the time synchronization adjustment value as the target time for synchronization with the network time protocol server, wherein the time synchronization adjustment value is determined during the startup of the soft terminal application in the smart device based on the network time obtained from the network time protocol server and the current second system time of the smart device obtained.

[0104] In the embodiment of the present application, before explaining step 310, the process of determining the above-mentioned time synchronization adjustment value is first introduced.

[0105] In the specific implementation, during the startup of the soft terminal application in the smart device, refer to Figure 4 As shown, the above time synchronization adjustment value is determined by executing the following steps:

[0106] Step 400: Send an acquisition request to a network time protocol server, and receive the network time returned by the network time protocol server.

[0107] In an embodiment of the present application, when executing step 400, the soft terminal application synchronizes the current latest time with the NTP server through the NTP protocol, that is, sends an acquisition request to the NTP server, and receives the network time returned by the NTP server, wherein the network time is the current time of the NTP server.

[0108] In actual applications, you can use the following sample code to synchronize the current network time with the NTP server, that is, to obtain the accurate time in the IPTV private network:

[0109] long serverTime=sntpClient.getNtpTime();

[0110] DateTimeUtil.getStrByTimestamp(serverTime).

[0111] Step 410: Obtain the current second system time of the smart device.

[0112] In the embodiment of the present application, after obtaining the network time of the NTP server, step 410 is executed to obtain the current second system time of the smart device.

[0113] It should be noted that since the soft terminal application is installed in the smart device, there is almost no delay in obtaining the system time of the smart device. Therefore, after obtaining the network time of the NTP server, the system time of the smart device can be obtained.

[0114] In a specific implementation, when executing step 410, it specifically includes: calling the above time acquisition function to acquire the current second system time of the smart device.

[0115] It should be noted that in the IPTV private network environment, smart devices cannot directly access their own configured NTP servers, and soft terminal applications usually cannot obtain and modify the NTP service configuration of smart devices. Therefore, when the soft terminal application obtains the current second system time of the smart device, the obtained second system time is usually the system default date of the smart device, such as 1970-01-01 00:00.

[0116] Step 420: Determine a time difference based on the network time and the second system time.

[0117] In the present application, see Figure 5 As shown, when executing step 420, the following steps are specifically performed:

[0118] Step 4201: According to the preset conversion rules, the network time and the second system time are converted respectively to obtain their corresponding timestamps.

[0119] In an embodiment of the present application, in order to facilitate the subsequent calculation of the time difference, when executing step 4201, the network time is converted according to the preset conversion rules to obtain the corresponding timestamp, and the second system time is converted according to the preset conversion rules to obtain the corresponding timestamp, wherein the preset conversion rules are pre-set according to actual needs, and their specific form is not limited in the embodiment of the present application.

[0120] Step 4202: Determine the timestamp difference between the converted timestamps, and use the timestamp difference as the time difference.

[0121] In the embodiment of the present application, when executing step 4202, the timestamp difference of each timestamp after conversion is used as the time difference. In practical applications, the above time difference can be determined by the following example code:

[0122] long diffTime=serverNtpTime-DateTimeUtil.getCurrentTimestamp().

[0123] Step 430: Determine the time difference as the time synchronization adjustment value.

[0124] In the embodiment of the present application, after executing step 430, the source code corresponding to the target time generation function is modified based on the time synchronization adjustment value, and the modified source code is compiled and stored.

[0125] In a specific implementation, after executing step 430, the time synchronization adjustment value is injected into the source code corresponding to the target time generation function, so that the system time of the smart device obtained by subsequently calling the target time generation function is added with the time synchronization adjustment value.

[0126] In actual applications, the time synchronization adjustment value can be injected into the source code corresponding to the target time generation function of the browser component through JNI.

[0127] Then, since the source code is compiled and encapsulated in the browser component of the soft terminal application, there is no possibility of modifying the source code again. Therefore, the time synchronization method of the IPTV private network of the present application is adopted. During the startup of the soft terminal application, after determining the time synchronization adjustment value, the source code corresponding to the target time generation function is modified based on the time synchronization adjustment value. By modifying the generation time method of the underlying browser component in the soft terminal application, when the browser component is subsequently called to obtain the current system time of the smart device, the difference with the accurate time in the IPTV private network, that is, the time synchronization adjustment value, is always added. In this way, it is ensured that the acquired time can always be synchronized with the current actual time (the time of the NTP server), and there is no need for additional interaction processes with the NTP server. The effect of one NTP synchronization and subsequent continuous time calibration can be achieved, which reduces the overhead of network requests and also reduces the resource consumption of smart devices.

[0128] It should be noted that the traditional method of obtaining the system time of a smart device is implemented by calling the target time generation function before modification, and the target time generation function before modification is implemented by calling the above-mentioned time acquisition function, that is, the traditional way of obtaining the system time of a smart device is to use the time obtained by calling the above-mentioned time acquisition function as the result of the target time generation function before modification.

[0129] After introducing the method for determining the time synchronization adjustment value, in an embodiment of the present application, when executing step 310, the following operations are specifically performed: calling the above-mentioned target time generation function, based on the first system time, obtaining the target time synchronized with the network time protocol server.

[0130] In actual applications, when executing step 310, a target time generation function into which a time synchronization adjustment value has been injected may be called through JavaScript code to obtain a target time synchronized with the NTP server.

[0131] In the embodiment of the present application, since the time synchronization adjustment value is injected into the source code corresponding to the target time generation function during the startup process of the soft terminal application, when executing step 310, the target time generation function is directly called to obtain the time synchronized with the network time of the NTP server. In this way, there is no need to consume the resources of the smart device to maintain the timer, nor is there a need to interact with the NTP server every time to achieve time synchronization, and there is no need for the EPG provider to perform additional development work, which improves the efficiency of time synchronization and ensures that subsequent service requests sent to the IPTV service platform can successfully obtain the network resources requested by the service request.

[0132] Step 320: Generate a service request based on the change operation and the target time, and send the service request to the Internet TV service platform.

[0133] In an embodiment of the present application, after executing step 310 to determine the target time synchronized with the NTP server, step 320 is executed to generate a service request based on the change operation and the target time, and the service request is sent to the IPTV service platform to obtain EGP page data corresponding to the service request returned by the IPTV service platform.

[0134] In the embodiment of the present application, the above service request includes part or all of the following requests:

[0135] Request one: Internet TV time-shift request.

[0136] Request 2: Online TV replay request.

[0137] Request three, Internet TV subscription authentication request.

[0138] Request four: request to view online TV history.

[0139] Request five, request to display the clock on the home page of Internet TV.

[0140] It should be noted that the above service requests are only examples. In the IPTV field, all service requests that rely on time parameters (ie, target time) can adopt the time synchronization method of the Internet TV private network provided in the embodiment of the present application to achieve time synchronization, which will not be repeated here.

[0141] In the present application, see Figure 6 As shown, after executing step 320, the following steps are further specifically included:

[0142] Step 500: Receive electronic program menu data returned by the Internet TV service platform.

[0143] Step 510: Rendering an electronic program menu page corresponding to the service request based on the electronic program menu data.

[0144] Step 520: Display the rendered electronic program menu page.

[0145] In the embodiment of the present application, the above steps 500 to 520 are the rendering and display process after receiving the EGP page data corresponding to the business request. This process can adopt the existing implementation method and will not be repeated here.

[0146] Based on the same inventive concept, see Figure 7 As shown, an embodiment of the present application provides a time synchronization device for an Internet TV private network, comprising:

[0147] The acquisition module 610 is used to respond to the change operation of the electronic program menu page in the smart device and acquire the current first system time of the smart device;

[0148] A determination module 620 is used to determine the sum of the first system time and the time synchronization adjustment value as the target time for synchronization with the network time protocol server, wherein the time synchronization adjustment value is determined during the startup of the soft terminal application in the smart device based on the network time obtained from the network time protocol server and the current second system time of the smart device obtained;

[0149] The generating module 630 is used to generate a service request based on the change operation and the target time, and send the service request to the Internet TV service platform.

[0150] In a possible implementation, the determining module 620 is configured to determine the time synchronization adjustment value in the following manner:

[0151] Sending an acquisition request to the network time protocol server, receiving the network time returned by the network time protocol server, and acquiring the current second system time of the smart device;

[0152] A time difference is determined based on the network time and the second system time, and the time difference is determined as the time synchronization adjustment value.

[0153] In a possible implementation, the time difference is determined based on the network time and the second system time, and the determination module 620 is used to:

[0154] According to a preset conversion rule, the network time and the second system time are converted respectively to obtain respective corresponding timestamps;

[0155] A timestamp difference between the converted timestamps is determined, and the timestamp difference is used as the time difference.

[0156] In a possible implementation, the obtaining of the second current system time of the smart device, the determining module 620 is configured to:

[0157] Calling a time acquisition function to acquire the current second system time of the smart device;

[0158] After determining the time difference as the time synchronization adjustment value, the determining module 620 is further configured to:

[0159] Based on the time synchronization adjustment value, modify the source code corresponding to the target time generation function, and compile and store the modified source code;

[0160] The sum of the first system time and the time synchronization adjustment value is determined as the target time synchronized with the network time protocol server, and the determination module 620 is used to:

[0161] The target time generation function is called to obtain the target time synchronized with the network time protocol server based on the first system time.

[0162] In a possible implementation, after sending the service request to the Internet TV service platform, the generating module 630 is further configured to:

[0163] Receiving electronic program menu data returned by the Internet TV service platform;

[0164] Based on the electronic program menu data, rendering an electronic program menu page corresponding to the service request;

[0165] Display the rendered electronic program menu page.

[0166] In a possible implementation, the service request includes part or all of the following requests:

[0167] Network TV time-shift request;

[0168] Online TV catch-up requests;

[0169] Internet TV subscription authentication request;

[0170] Network TV history viewing requests;

[0171] Request to display the clock on the home page of Internet TV.

[0172] See also Figure 8 As shown, an electronic device is provided in an embodiment of the present application, which can implement the function of the time synchronization method of the aforementioned network television private network, referring to Figure 8 , the electronic device comprises:

[0173] At least one processor 71, and a memory 72 connected to the at least one processor 71. The specific connection medium between the processor 71 and the memory 72 is not limited in the embodiment of the present application. Figure 8 In the example, the processor 71 and the memory 72 are connected via a bus 70. The bus 70 is Figure 8 The connection between other components is shown by bold lines, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 70 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 8 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 71 can also be called a controller, and there is no limitation on the name.

[0174] In the embodiment of the present application, the memory 72 stores instructions that can be executed by at least one processor 71. The at least one processor 71 can execute the time synchronization method of the network TV private network discussed above by executing the instructions stored in the memory 72. The processor 71 can implement the function of the time synchronization device of the network TV private network.

[0175] In one possible design, the processor 71 may include one or more processing units, and the processor 71 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 71. In some embodiments, the processor 71 and the memory 72 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0176] The processor 71 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the time synchronization method for the network television private network disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0177] The memory 72 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 72 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. The memory 72 is any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 72 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0178] By programming the processor 71, the code corresponding to the time synchronization method of the network television private network described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 3 The steps of the time synchronization method of the Internet TV private network in the embodiment shown are as follows: How to design and program the processor 71 is a technology well known to those skilled in the art and will not be described in detail here.

[0179] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any one of the methods in the above embodiments.

[0180] In some possible implementations, various aspects of the time synchronization method for an Internet TV private network provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a device, the program code is used to enable the device to execute the steps of the time synchronization method for an Internet TV private network according to various exemplary implementations of the present application described above in this specification.

[0181] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0182] The present application is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0183] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0185] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A time synchronization method for an Internet TV private network, characterized in that: Applied in smart devices, including: In response to a change operation on an electronic program menu page in the smart device, obtaining a current first system time of the smart device; Calling a target time generation function, and determining a target time synchronized with a network time protocol server based on the first system time, wherein the target time generation function is a time generation function in a browser component included in a soft terminal application in the smart device, and during the startup of the soft terminal application, based on a time synchronization adjustment value, source code corresponding to the target time generation function is modified, recompiled, and stored, and the time synchronization adjustment value is determined during the startup of the soft terminal application based on a network time obtained from the network time protocol server and a second system time currently obtained for the smart device; Based on the change operation and the target time, a service request is generated, and the service request is sent to the network television service platform.

2. The method according to claim 1, characterized in that The time synchronization adjustment value is determined by: Sending an acquisition request to the network time protocol server, receiving the network time returned by the network time protocol server, and acquiring the current second system time of the smart device; A time difference is determined based on the network time and the second system time, and the time difference is determined as the time synchronization adjustment value.

3. The method according to claim 2, characterized in that The determining the time difference based on the network time and the second system time includes: According to a preset conversion rule, the network time and the second system time are converted respectively to obtain respective corresponding timestamps; A timestamp difference between the converted timestamps is determined, and the timestamp difference is used as the time difference.

4. The method according to claim 2, characterized in that The obtaining the second system time currently in the smart device includes: Call a time acquisition function to acquire the current second system time of the smart device.

5. The method according to any one of claims 1 to 4, characterized in that: After sending the service request to the network television service platform, the method further includes: Receiving electronic program menu data returned by the Internet TV service platform; Based on the electronic program menu data, rendering an electronic program menu page corresponding to the service request; Display the rendered electronic program menu page.

6. The method according to claim 5, characterized in that The service request includes part or all of the following requests: Network TV time-shift request; Online TV catch-up requests; Internet TV subscription authentication request; Network TV history viewing requests; Request to display the clock on the home page of Internet TV.

7. A time synchronization device for an Internet TV private network, characterized in that: Applied in smart devices, including: an acquisition module, configured to respond to a change operation on an electronic program menu page in the smart device and acquire a current first system time of the smart device; a determination module, configured to call a target time generation function, and determine, based on the first system time, a target time synchronized with a network time protocol server, wherein the target time generation function is a time generation function in a browser component included in a soft terminal application in the smart device, and during the startup of the soft terminal application, based on a time synchronization adjustment value, source code corresponding to the target time generation function is modified, recompiled, and stored, wherein the time synchronization adjustment value is determined during the startup of the soft terminal application based on a network time obtained from the network time protocol server and a second system time currently obtained for the smart device; The generating module is used to generate a service request based on the change operation and the target time, and send the service request to the network television service platform.

8. The device according to claim 7, characterized in that The determining module is used to determine the time synchronization adjustment value in the following manner: Sending an acquisition request to the network time protocol server, receiving the network time returned by the network time protocol server, and acquiring the current second system time of the smart device; A time difference is determined based on the network time and the second system time, and the time difference is determined as the time synchronization adjustment value.

9. An electronic device, characterized in that: include: Memory, used to store computer programs or instructions; A processor is used to execute the computer program or instructions in the memory so that the method according to any one of claims 1 to 6 is performed.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for switching live broadcast time shift time axis under HLS protocol

    CN110809179A