Content recording method, playback method, CDN system, storage medium
By pre-recording the live streams of hot channels to a high-speed cache device, the problem of delayed channel stream popularity statistics is solved, rapid response to high-real-time services is achieved, user experience is improved, and server load is reduced.
Patent Information
- Application Number
- CN202111338139.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-11-12
AI Technical Summary
In the existing technology, the popularity statistics and migration of channel code streams have a lag, which makes it difficult to meet the requirements of high-real-time services such as live broadcast time-shifting, resulting in prolonged response time and reduced user experience.
By pre-acquiring the hot time information of hot channels, the live stream is recorded to the cache device in advance to form a cache stream, avoiding the heat statistics and migration steps, and reading the stream directly from the cache device to meet high real-time business needs.
It effectively speeds up the response time of playback or time-shifted access, improves user experience, and reduces the overall operating load of the server.
Smart Images

Figure CN116132698B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to, but is not limited to, the field of video media services, and in particular to a content recording method, a playback method, a CDN system, and a storage medium. Background Art
[0002] Content Delivery Networks (CDNs) can provide caching acceleration at the network edge, thereby delivering media services to users at service nodes close to them. This effectively reduces the pressure on service origins and bearer networks, providing users with faster service responses and more stable streaming media services. Internet Protocol Television (IPTV) can store live program channel streams on streaming media devices in the CND system, then send network packets to set-top boxes for video reassembly and playback, offering users channel playback or time-shifting services.
[0003] To provide a faster response, file blocks can be stored in high-speed cache devices such as solid-state drives (SSDs) or non-volatile memory express (NVME). However, high-speed cache devices are expensive and cannot be used on a large scale. Therefore, operators usually record channel streams to low-speed cache devices, perform heat statistics on the accessed content for playback or time-shifting, and then copy the highly popular file blocks from the low-speed cache devices to the high-speed cache devices. When the file blocks of the accessed content have a copy in the cache device, the content is read from the high-speed cache device first. However, the heat statistics and copy migration of file blocks have a certain lag and will consume a certain amount of operation time, making it difficult to meet the requirements of high-real-time services such as live broadcast and time-shifting. Summary of the Invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The embodiments of the present invention provide a content recording method, a playback method, a CDN system, and a storage medium, which can collect statistics on the KPIs of the RRC connections of the physical cells and improve the convenience of operation and maintenance.
[0006] In a first aspect, an embodiment of the present invention provides a content recording method, which is applied to a CDN system, wherein the CDN system includes a cache device, and the method includes:
[0007] Get the hotspot time information pre-associated with the hotspot channel;
[0008] According to the hot spot time information, the live stream of the hot spot channel is recorded to the cache device to obtain a cache stream.
[0009] In a second aspect, an embodiment of the present invention provides a content playback method, which is applied to a CDN system, wherein the CDN system includes a cache device, and the method includes:
[0010] Obtaining a live broadcast service request and determining the live broadcast content corresponding to the live broadcast service request;
[0011] Obtaining a target stream corresponding to the live content from a cached stream, wherein the cached stream is a live stream recorded on a hot channel according to hot time information, and the hot time information is associated with the hot channel;
[0012] Play the target stream.
[0013] In a third aspect, an embodiment of the present invention provides a CDN system, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the content recording method described in the first aspect is implemented, or the content playback method described in the second aspect is implemented.
[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the content recording method as described in the first aspect, or to implement the content playback method as described in the second aspect.
[0015] This embodiment of the present invention includes: obtaining hotspot time information pre-associated with a hotspot channel; and recording the live stream of the hotspot channel to a cache device based on the hotspot time information to obtain a cached stream. The technical solution of this embodiment can pre-determine the live stream to be recorded, effectively speeding up the response time for playback or time-shifted access of high-real-time services, improving the user experience, and effectively reducing the overall operating load of the server.
[0016] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation to the technical solution of the present invention.
[0018] Figure 1 is a flowchart of a content recording method provided by one embodiment of the present invention;
[0019] Figure 2 is a module diagram of a CDN system provided by another embodiment of the present invention;
[0020] Figure 3 is a flowchart of determining hot channels provided by another embodiment of the present invention;
[0021] Figure 4 is a flowchart of determining hot content provided by another embodiment of the present invention;
[0022] Figure 5 is a flowchart of determining a hot channel list provided by another embodiment of the present invention;
[0023] Figure 6 is a flowchart of determining a target directory provided by another embodiment of the present invention;
[0024] Figure 7 is a flowchart of synchronous recording provided by another embodiment of the present invention;
[0025] Figure 8 is a flowchart of a content playback method provided by another embodiment of the present invention;
[0026] Figure 9 is a flowchart of obtaining a target bitstream provided by another embodiment of the present invention;
[0027] Figure 10 is a flowchart of obtaining a target stream from a target directory provided by another embodiment of the present invention;
[0028] Figure 11 This is a flow chart of reporting a service call record provided by another embodiment of the present invention;
[0029] Figure 12 is a flowchart of an example provided by the present invention;
[0030] Figure 13 It is a device diagram of a CDN system provided by another embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0032] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and the like in the specification, claims, or accompanying drawings are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0033] The present invention provides a content recording method, a playback method, a CDN system, and a storage medium. The content recording method includes: obtaining hotspot time information pre-associated with a hotspot channel; and recording the live stream of the hotspot channel to a cache device based on the hotspot time information to obtain a cached stream. The technical solution of this embodiment can pre-determine the live stream to be recorded, effectively accelerating the response time for playback or time-shifted access of high-real-time services, improving the user experience, and effectively reducing the overall operating load of the server.
[0034] The embodiments of the present invention are further described below with reference to the accompanying drawings.
[0035] like Figure 1 As shown, Figure 1 This is a flowchart of a content recording method provided by an embodiment of the present invention. The content recording method is applied to a CDN system. The CDN system includes a cache device, including but not limited to step S110 and step S120.
[0036] Step S110: Acquire hot time information pre-associated with the hot channel.
[0037] It should be noted that the hot time information is for specific hot channels. In actual use, the number of hot channels can be arbitrary, and hot channels are channels with hot content. Therefore, hot time information can be configured for each hot channel so that each hot channel can trigger the recording of the live stream according to its own hot time information.
[0038] It should be noted that this embodiment pre-configures the hot spot time information, starts recording after the hot spot time begins, and stops recording after the hot spot time ends. The live stream has been obtained during the live broadcast. When a live broadcast playback request or a live broadcast time-shift request is obtained, the recorded live broadcast stream can be directly read for playback. There is no need to perform heat statistics and file migration after the live broadcast content is broadcast, which effectively improves the response efficiency of live broadcast playback or live broadcast time-shift, gives full play to the response advantages of the cache device, and improves the user experience.
[0039] It should be noted that hot channels can be determined through historical data, such as performing a heat analysis on the content played in the past period of time to determine historical hot content. Television programs usually have a certain periodic regularity, so predicting hot channels based on historical hot content has a certain reference value, and the time corresponding to the hot content is determined as the hot time information, thereby realizing the pre-configuration of the hot time information. Of course, hot channels can also be pre-determined according to other methods, and this embodiment does not limit this.
[0040] Step S120 , recording the live stream of the hot channel to a cache device according to the hot time information, to obtain a cache stream.
[0041] It should be noted that the technical solution of this embodiment can be applied to Figure 2 In the CDN system shown in FIG, the CDN system includes an encoder and a streaming channel recording module. After the hot time starts, refer to Figure 2 The dashed portion shown uses an encoder to encode the live content of the hot channel to generate a live stream. The live stream is recorded by the streaming channel recording module, and the resulting file is stored in a cache device via the file storage server module. It should be noted that the file type stored in the cache device can be adjusted according to actual needs. For example, it can be a live stream or, of course, a file block derived from the live stream. This embodiment does not impose any restrictions on this.
[0042] It is worth noting that in common solutions, in order to improve the request response speed, a full-speed storage device mode is usually adopted, but this will result in high costs. The technical solution of this embodiment is adopted to pre-determine the hot channel and record the live stream of the hot channel to the cache device according to the pre-configured hot time information. For the live stream of the non-hot channel, the probability of receiving a playback request or a time-shift request is low, so it can be achieved through Figure 2 The ordinary storage devices shown are used for storage, such as low-speed cache devices such as mechanical hard disks. The live stream of hot content is stored in high-speed cache devices, which can greatly reduce the cost of storage devices while ensuring the user experience of hot content as much as possible.
[0043] It is worth noting that the operations of step S110 and step S120 are for a hot time period of a hot channel. In actual use, the number of hot channels can be arbitrary, and each hot channel can also have multiple hot time information. The above operations can be performed on each hot channel according to each hot time information, and this embodiment will not be repeated.
[0044] In addition, refer to Figure 3 In one embodiment, when executing Figure 1Before step S110 in the illustrated embodiment, the following steps are also included but not limited to:
[0045] Step S310: Obtain a historical service call list of the channel to be evaluated. The historical service call list includes the service start time, service end time, and popularity index of the content to be evaluated. The historical service call list belongs to the live playback service and / or the live time-shift service.
[0046] Step S320: When the popularity index meets the preset conditions, the content to be evaluated is determined as hot content, and the channel to be evaluated is determined as a hot channel;
[0047] Step S330: determining hotspot time information according to the service start time and the service end time, and associating the hotspot time information with the hotspot channel.
[0048] It should be noted that after completing each live broadcast or live broadcast time shift service, you can Figure 2 The hot content analysis module shown obtains service data to generate a service call bill, and performs hot content analysis after collecting historical service call bills for a period of time, so as to determine the hot channel and the hot time information of the hot channel. For example, for IPTV, TV programs usually have a certain periodicity on a weekly basis. The historical service call bills of the past week can be collected, and the heat analysis of the content of each channel can be performed to determine the historical hot content. For example, based on the historical service call bills, the heat indicators such as the service traffic and number of clicks of the live content are determined, and the heat indicators are counted, and the content with higher service traffic or number of clicks is determined as the hot content. Of course, other heat evaluation methods can also be used, and this embodiment does not make any restrictions here.
[0049] It is worth noting that the period for obtaining historical service call records can be determined based on actual needs and can also be updated based on the period. For example, if the period is determined to be one week, then after obtaining the historical service call records for the new week, a new hot content analysis can be performed to determine the new hot channel and hot time information. In addition, since hot channel and hot time information have a certain predictive component, the collection period of historical service call records can also be set. For example, historical service call records for the past several weeks can be collected. After collecting the data for the new week, the data for the earliest week can be discarded, thereby achieving data update iteration and ensuring that the hot channel and hot time information can have a good reference value.
[0050] It should be noted that the preset conditions can be set according to actual needs, for example, the popularity index meets a certain threshold, or the popularity index is sorted, and the top several positions are hot content, etc. Technical personnel in this field can set the preset conditions according to actual needs, and no further restrictions are made here.
[0051] It should be noted that the content to be evaluated can be a live program that uses live playback or live time shift. When generating a service call record, the content identifier corresponding to the live program can be added, so that when conducting hot content analysis, different content can be distinguished by content identifiers. The specific content identifier type can be selected according to actual needs.
[0052] In addition, refer to Figure 4 In one embodiment, Figure 3 Step S320 of the illustrated embodiment further includes but is not limited to the following steps:
[0053] Step S410, determining the popularity value of the content to be evaluated according to the popularity index;
[0054] Step S420: When the popularity value meets a preset threshold, the content to be evaluated is determined to be hot content.
[0055] It should be noted that popularity indicators may include service traffic or number of clicks, etc., and since IPTV is not targeted at specific users but has a certain degree of universality, taking service traffic as an example, service traffic is not limited to coming from one user, but can come from the sum of service traffic of all users who use live playback or live time-shifting services at the same time. Determining popularity indicators based on the universal behavior of users can make the predicted hot content more in line with the general user needs and provide users with a better experience.
[0056] It should be noted that for TV programs, there are usually peak periods and non-peak periods. When the business is at its peak, more service call records can be obtained during the peak period, and the corresponding hot content is also more. If sorting is used to determine the hot content, it is likely that multiple hot content will be determined during the non-peak period of the business. In fact, there are not many users of these hot content. If high-speed caching is performed, the effect of improving the user experience is not significant. Therefore, by setting a preset threshold, when the heat value of the content to be evaluated meets the preset threshold, it is determined to be hot content, which can effectively improve the reference value of the hot content.
[0057] It should be noted that the heat value can be calculated based on the heat index. For example, the heat index includes service flow and number of counts. Different weights can be assigned to the service flow and number of counts respectively, and the calculated value is determined as the heat value. It can also be calculated according to other methods. This embodiment does not impose too many restrictions on the specific calculation method of the heat value.
[0058] In addition, refer to Figure 5 In one embodiment, when executing Figure 3 Before step S330 in the illustrated embodiment, the following steps are also included but not limited to:
[0059] Step S510, determining at least two hot channels;
[0060] Step S520: Generate a hot channel list based on at least two hot channels, wherein the hot channels in the hot channel list are sorted from large to small according to their popularity values, and the hot channel list records the channel identifier, hot time information and popularity value of the hot channels.
[0061] It should be noted that, for IPTV, there are many channels online at the same time, but this embodiment does not limit the number of hot channels. Figure 2 The hot content analysis module shown can identify several hot content. When the hot content belongs to different channels, at least two hot channels can be identified. To configure hot time information for hot channels, the hot content analysis module can provide a hot channel list to the streaming channel recording module, recording the channel ID, hot time information, and popularity value of the hot channel in the hot channel list. The streaming channel recording module determines the hot channel based on the channel ID and incorporates the hot time information into the channel recording management process for the hot channel, recording after the hot time begins.
[0062] It is worth noting that after determining multiple hot channels, the ranking of heat values can be calculated according to unit time, and the hot channels can be ranked from high to low according to the heat values in the hot channel list.
[0063] It should be noted that the heat values carried in the hot channel list can be used in a variety of ways. For example, during the simultaneous recording of multiple hot channels, when the cache device resources are limited, the resources can be allocated according to the heat value, with priority given to hot channels with high heat values. The technicians of this embodiment are motivated to adjust the use of heat values according to actual needs, and no further restrictions are made here.
[0064] In addition, refer to Figure 6 In one embodiment, Figure 1 Step S120 of the illustrated embodiment further includes but is not limited to the following steps:
[0065] Step S610, determining the target directory of the cache device;
[0066] Step S620: Write the live stream into the target directory.
[0067] It should be noted that for historical playback content, its real-time performance is relatively low. Even if it is recorded to a low-speed cache device using a conventional solution and migrated to a high-speed cache device after heat analysis, it will not have much impact on the user experience. Therefore, in order to distinguish it from non-live content, a specific target directory can be configured in the cache device to save the cached code stream recorded in the live broadcast stream in this embodiment, and to respond to live broadcast playback requests or live broadcast time-shift requests. After detecting a live broadcast playback request or live broadcast time-shift request for hot content, the code stream is located and searched from the target directory, which can further reduce the response time.
[0068] In addition, in one embodiment, the CDN system further includes a low-speed cache device, referring to Figure 7 , Figure 1 Step S120 of the illustrated embodiment further includes but is not limited to the following steps:
[0069] Step S710 , synchronously recording the live stream of the hot channel to the high-speed cache device and the low-speed cache device, thereby obtaining the high-speed cache stream stored in the high-speed cache device and the low-speed cache stream stored in the low-speed cache device.
[0070] It should be noted that the low-speed cache device can be a common mechanical hard disk, etc., which has a lower reading rate than the high-speed cache device but has an advantage in cost compared to the high-speed cache device.
[0071] It is worth noting that the low-speed cache device can keep recording the live stream without judging whether it is a hot content. The low-speed cache stream and the high-speed cache stream recorded in the same live content can be distinguished by the content identifier. Figure 2 The streaming media user service module shown can send a content identifier to the file storage server, and obtain the code stream from the high-speed cache device or the low-speed cache device for playback according to the content identifier.
[0072] It is worth noting that, unlike conventional technology in which live streams are recorded through a low-speed cache device and then moved to a high-speed cache device after heat analysis, the technical solution of this embodiment adopts a method of synchronous recording of hot content. According to the hot time information, the live streams of the hot channel are written into the high-speed cache device and the low-speed cache device at the same time, eliminating the steps of migration and heat analysis. When reading the stream, it can be read directly from the high-speed cache device, effectively improving the response efficiency and being able to respond to services within a shorter response time.
[0073] In addition, refer to Figure 8 An embodiment of the present invention further provides a content playback method, which is applied to a CDN system. The CDN system includes a cache device. The content playback method includes but is not limited to step S810, step S820 and step S830.
[0074] Step S810: Obtain a live broadcast service request and determine the live broadcast content corresponding to the live broadcast service request.
[0075] It should be noted that since the live broadcast service request is for the content being broadcast live, after obtaining the live broadcast service request, you can directly obtain the content identifier of the content being broadcast live, determine the live broadcast content through the content identifier, or determine the live broadcast content through other methods. No further restrictions are made here.
[0076] It should be noted that the live broadcast service request can be a live broadcast replay request or a live broadcast time-shift request. For example, while watching a TV program, a replay instruction or a time-shift instruction is sent to the set-top box through the control terminal, thereby forming a live broadcast service request. Of course, it can also be an instruction to operate the live broadcast content. This embodiment does not impose any restrictions on this.
[0077] Step S820: Obtain a target stream corresponding to the live content from the cached stream, wherein the cached stream is a live stream recorded on the hot channel according to the hot time information, and the hot time information is associated with the hot channel.
[0078] It should be noted that the recording method of cache stream can refer to Figure 1 The description of the illustrated embodiment will not be repeated here for the sake of brevity.
[0079] It is worth noting that since the cached code streams stored in the cache device can come from multiple hot channels, for example, live code streams are recorded simultaneously from multiple hot channels during the same hot time period, in this case, the target code stream can be obtained from the cache device through the channel ID or content ID. The specific matching method can be adjusted according to actual needs and is not limited here.
[0080] Step S830: Play the target code stream.
[0081] It should be noted that since the cached code stream is recorded according to the predetermined hot channel and hot time information, the target code stream can be directly read for playback when a live service request is obtained. From receiving the live service request to playback, only the reading operation is performed, which eliminates the heat analysis and file migration operations, and can effectively improve the response efficiency of playing the target code stream and improve the user experience.
[0082] In addition, in one embodiment, the CDN system further includes a low-speed cache device, which stores a low-speed cache stream, and the low-speed cache stream and the high-speed cache stream are synchronously recorded in the live stream of the hot channel. Figure 9 , Figure 8 Step S820 of the illustrated embodiment further includes but is not limited to the following steps:
[0083] Step S910: When the live content is determined to be hot content, a target stream is obtained from the cached stream;
[0084] Step S920: When the target code stream fails to be obtained from the high-speed cache code stream, the target code stream is obtained from the low-speed cache code stream.
[0085] It should be noted that the technical solution of this embodiment is to improve the response efficiency for high real-time services. Therefore, before obtaining the target code stream from the cache code stream, it is possible to first determine whether the live content is hot content. For example, each hot channel is pre-configured with hot time information. When the time corresponding to the live content corresponds to the hot time information, it can be determined to be hot content. Other methods can also be used to determine that the live content is hot content. No further restrictions are made here.
[0086] It should be noted that after determining that the live content is hot content, you can first try to read the target stream from the cache stream. If the read is successful, it will be played directly. If it is unsuccessful, since the low-speed cache device has recorded all the streams, the target stream can be obtained from the low-speed cache stream. It can be understood that in the technical solution of this embodiment, the hot channel and hot time information are obtained based on the historical service call list. When special hot content appears in the live content, it is not necessarily possible to determine that the content of the channel in that time period is hot content based on the historical service call list. For example, for a TV channel, a highly popular program is temporarily inserted, and this program has not been broadcast before. Therefore, it may generate high popularity at the moment and be determined as hot content. However, according to the historical service call list, the content in that time period will not be determined as hot content, and thus it will not be recorded in the cache stream. In this case, the corresponding target stream can be obtained from the low-speed cache stream to ensure that the target stream can be successfully obtained.
[0087] It should be noted that the method for recording low-speed cache streams on low-speed cache devices can refer to Figure 7 The description of the illustrated embodiment will not be repeated here for the sake of brevity.
[0088] In addition, refer to Figure 10 In one embodiment, Figure 8 Step S820 of the illustrated embodiment further includes but is not limited to the following steps:
[0089] Step S1010, determining a target directory of a cache device, wherein the target directory stores a cache stream;
[0090] Step S1020: Acquire the target code stream from the cache code stream stored in the target directory.
[0091] It should be noted that the principles and methods of setting the target directory in the cache device can be referred to Figure 6 The description of the illustrated embodiment will not be repeated here for the sake of brevity.
[0092] It should be noted that, since the target directory is used to store the recorded content of the live stream, the target directory can be directly located during the process of obtaining the target stream from the cache stream, thereby further improving the efficiency of obtaining the target stream.
[0093] In addition, refer to Figure 11 In one embodiment, when executing Figure 8 After step S830 in the illustrated embodiment, the following steps are also included but not limited to:
[0094] Step S1110: Generate a service call sheet based on the live broadcast service request. The service call sheet includes the service start time, service end time, and popularity index.
[0095] Step S1120: Update the hotspot time information of the hotspot channel according to the service call list.
[0096] It should be noted that after executing the live broadcast service request, those skilled in the art are familiar with how to obtain the service start time and service end time, and referring to the description of the above embodiment, the heat index can be the service traffic, number of clicks, etc. obtained for the live broadcast content. Those skilled in the art are also familiar with how to obtain the above parameters, and there are no major restrictions on the service call record generation process here.
[0097] It should be noted that after obtaining the service call sheet, the service call sheet can be used as a historical service call sheet. Figure 2 The streaming media user service module sends the hot channel and hot time information to the hot content analysis module. For details, please refer to Figure 3 The description of the illustrated embodiment will not be repeated here for the sake of brevity.
[0098] In addition, in order to better illustrate the technical solution of the present invention, a specific example is given below. Figure 2 The CDN system architecture shown in Figure 12 This example includes but is not limited to the following steps:
[0099] Step S1210: When a user initiates a service request to the streaming media server, the streaming media user service module completes the service and reports a service call record to the hot content analysis module. The service call record includes the service type, service content ID, service start and end time, service traffic, and number of clicks.
[0100] In step S1220, the hot content analysis module determines the popularity value of the content of each channel based on the collected service call records, service traffic, and number of clicks, and then sorts the hot content by the popularity value per unit time to form a hot channel list, wherein the hot channel list includes the hot channel ID, hot start time, hot end time, and popularity value;
[0101] Step S1230: The hot content analysis module periodically pushes the hot channel list to the streaming channel recording module;
[0102] Step S1240: The streaming channel recording module incorporates the hot channel list into the channel recording management process. When the system time reaches the hot start time, the live stream of the hot channel is recorded and synchronously written to the target directory of the low-speed cache device and the high-speed cache device.
[0103] Step S1250: When the system time reaches the hotspot end time, the streaming channel recording module stops writing the live stream to the target directory of the cache device;
[0104] Step S1260: When receiving a service request for live time shift or live playback, the streaming media user service module determines that the corresponding live content is hot content;
[0105] Step S1270: When the streaming media user service module obtains the target stream from the target directory of the high-speed cache device, the target stream obtained from the high-speed cache device is played. When the target stream cannot be obtained from the target directory of the high-speed cache device, the target stream is obtained from the low-speed cache device and played.
[0106] In addition, refer to Figure 13 An embodiment of the present invention further provides a CDN system. The CDN system 1300 includes: a memory 1310 , a processor 1320 , and a computer program stored in the memory 1310 and executable on the processor 1320 .
[0107] The processor 1320 and the memory 1310 may be connected via a bus or other means.
[0108] The non-transitory software program and instructions required to implement the content recording method of the above embodiment are stored in the memory 1310. When executed by the processor 1320, the content recording method of the above embodiment is executed, for example, the above-described Figure 1 Steps S110 to S120 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S420 of the method, Figure 5 Steps S510 to S520 of the method, Figure 6Steps S610 to S620 of the method, Figure 7 Alternatively, the method of step S710 in the above embodiment is executed, for example, the method of playing content in the above embodiment is executed. Figure 8 Steps S810 to S830 of the method, Figure 9 Steps S910 to S920 of the method, Figure 10 Steps S1010 to S1020 of the method, Figure 11 Method steps S1110 to S1120.
[0109] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0110] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by a processor or controller, for example, by a processor in the above CDN system embodiment, so that the processor can execute the content recording method in the above embodiment, for example, execute the above-described Figure 1 Steps S110 to S120 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S420 of the method, Figure 5 Steps S510 to S520 of the method, Figure 6 Steps S610 to S620 of the method, Figure 7 Alternatively, the method of step S710 in the above embodiment is executed, for example, the method of playing content in the above embodiment is executed. Figure 8 Steps S810 to S830 of the method, Figure 9 Steps S910 to S920 of the method, Figure 10 Steps S1010 to S1020 of the method, Figure 11Method steps S1110 to S1120 in the method. It will be appreciated by those skilled in the art that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0111] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above implementation. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A content recording method, applied to a CDN system, wherein the CDN system includes a cache device, the method comprising: Get the hotspot time information pre-associated with the hotspot channel; According to the hotspot time information, the live stream of the hotspot channel is recorded to the cache device to obtain a cache stream; Before acquiring the hotspot time information pre-associated with the hotspot channel, the method further includes: Obtaining a historical service call list of the channel to be evaluated, wherein the historical service call list includes a service start time, a service end time, and a popularity index of the content to be evaluated, wherein the historical service call list belongs to a live playback service and / or a live time-shifted service; When the popularity index meets a preset condition, the content to be evaluated is determined as hot content, and the channel to be evaluated is determined as the hot channel; The hotspot time information is determined according to the service start time and the service end time, and the hotspot time information is associated with the hotspot channel.
2. The method according to claim 1, characterized in that When the popularity index meets a preset condition, determining the content to be evaluated as hot content includes: Determining the popularity value of the content to be evaluated according to the popularity index; When the popularity value meets a preset threshold, the content to be evaluated is determined to be the hot content.
3. The method according to claim 2, characterized in that After associating the hotspot time information with the hotspot channel, the method further includes: determining at least two of the hot channels; A hot channel list is generated based on at least two of the hot channels, wherein the hot channels in the hot channel list are sorted from large to small according to the heat value, and the hot channel list records the channel ID of the hot channel, the hot time information and the heat value.
4. The method according to claim 1, wherein The step of recording the live stream of the hot channel to the cache device includes: determining a target directory of the cache device; Write the live stream into the target directory.
5. The method according to claim 1 or 4, characterized in that The CDN system further includes a low-speed cache device, and recording the live stream of the hot channel to the high-speed cache device to obtain the high-speed cache stream includes: The live stream of the hot channel is synchronously recorded to the high-speed cache device and the low-speed cache device, thereby obtaining a high-speed cache stream stored in the high-speed cache device and a low-speed cache stream stored in the low-speed cache device.
6. A content playback method, applied to a CDN system, wherein the CDN system includes a cache device, the method comprising: Obtaining a live broadcast service request and determining the live broadcast content corresponding to the live broadcast service request; Obtaining a target stream corresponding to the live content from a cached stream, wherein the cached stream is a live stream recorded on a hot channel according to hot time information, and the hot time information is associated with the hot channel; Play the target stream; After playing the target code stream, the method further includes: Generate a service call sheet according to the live broadcast service request, wherein the service call sheet includes a service start time, a service end time, and a popularity index; Determine the service call record as a historical service call record of the channel to be evaluated, wherein the historical service call record includes a service start time, a service end time, and a popularity index of the content to be evaluated, wherein the historical service call record belongs to a live playback service and / or a live time-shifted service; When the popularity index meets a preset condition, the content to be evaluated is determined as hot content, and the channel to be evaluated is determined as the hot channel; The hotspot time information is determined according to the service start time and the service end time, and the hotspot time information is associated with the hotspot channel.
7. The method according to claim 6, characterized in that The CDN system further includes a low-speed cache device, wherein the low-speed cache device stores a low-speed cache stream, wherein the low-speed cache stream and the high-speed cache stream are synchronously recorded on the live stream of the hot channel, and obtaining a target stream corresponding to the live content from the high-speed cache stream includes: When determining that the live content is hot content, obtaining the target stream from the cache stream; When the target code stream fails to be obtained from the high-speed cache code stream, the target code stream is obtained from the low-speed cache code stream.
8. The method according to claim 6, characterized in that The step of obtaining a target stream corresponding to the live content from a cached stream includes: Determining a target directory of the cache device, wherein the target directory stores the cache stream; The target code stream is obtained from the cache code stream stored in the target directory.
9. A CDN system comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the content recording method described in any one of claims 1 to 5, or implements the content playback method described in any one of claims 6 to 8.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer-executable instructions are used to execute the content recording method according to any one of claims 1 to 5, or to execute the content playing method according to any one of claims 6 to 8.
Citation Information
Patent Citations
Start-Over media service method in IPTV
CN104080000A
Predictive Popular Content Replication
US20080059721A1