A method, apparatus and system for multimedia recording

By determining the identifier of the recording start segment when the recording server switches, sending an index file request to the live broadcast server and saving the segment, the problem of content missing during the recording process is solved, and a seamless recording process and improved user experience are achieved.

CN114390301BActive Publication Date: 2025-10-10HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011127450.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-20
Publication Date
2025-10-10
Estimated Expiration
2040-10-20

AI Technical Summary

Technical Problem

During the network recording process, when the recording server fails, the existing technology cannot achieve seamless connection of the recording process, resulting in missing recorded content and poor user experience.

Method used

By using the recording information to determine the identifier of the recording start segment when the recording server switches, sending an index file request to the live broadcast server, receiving and saving the segment, we can ensure seamless connection of the recording content and avoid content loss.

Benefits of technology

It achieves seamless connection during the recording process, improves user experience, and avoids interruption and loss of recorded content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114390301B_ABST
    Figure CN114390301B_ABST
Patent Text Reader

Abstract

The application discloses a multimedia recording method, device and system, and relates to the technical field of communication, and avoids the problem that the recorded content is lost due to switching of a recording server during recording. The recording method comprises the following steps: when a recording server receives a recording task, the recording server determines the identification of a recording starting slice according to recording information, and sends an index file request to a live server, wherein the index file request carries the identification of the recording starting slice. The recording server receives an index file sent by the live server, wherein the identification of the first slice in the index file is the identification of the recording starting slice. The recording information comprises the identification of a recorded slice written by another recording server performing the recording task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device and system for multimedia recording. Background Art

[0002] With the development of live streaming, network recording services are also gradually emerging. Network recording refers to using a recording server to record user-specified live programs to a storage server, unlike traditional recording services that record live content to the user's local hard drive through the user's device.

[0003] If a network recording server fails during recording, existing methods typically allocate another server to continue recording and complete the user-assigned recording task. In this scenario, there's often a significant delay between the time the current server stops functioning and the time the new server starts functioning, as the system detects the failure, allocates a new server, and initializes the new server. This delay can result in missing portions of the final recorded content, resulting in a poor user experience. Summary of the Invention

[0004] The multimedia recording method, device and system provided in this application help to achieve seamless connection of the recording process when switching the recording server during the recording process, avoid the problem of missing recorded content due to switching the recording server, and improve the user experience.

[0005] To achieve the above objectives, this application provides the following technical solutions:

[0006] In a first aspect, the present application provides a method for multimedia recording, which is applied to a recording server. The method includes: when a recording task is received, determining the identifier of the recording start segment based on the stored recording information. The recording information includes the identifier of the recorded segment written by other recording servers that execute the recording task. When the identifier of the recording start segment determined above is a valid value, an index file request is sent to the live broadcast server, and the index file request carries the identifier of the recording start segment; and the index file sent by the live broadcast server is received accordingly, and the identifier of the first segment in this index file is the identifier of the recording start segment.

[0007] Through the first aspect of this application, during the process of recording live content, it is possible to start recording from a specified segment of the live broadcast history, breaking the limitation of only being able to start recording from the current live broadcast point. Furthermore, during the recording process, it is possible to start recording after the segment recorded by other recording servers, thereby achieving seamless connection of the recorded content and improving user experience.

[0008] In conjunction with the first aspect, in one possible implementation, the method further includes: after receiving the index file sent by the live streaming server, sending a segment request to the live streaming server based on the contents of the index file; and upon receiving the segment sent by the live streaming server, saving the received segment. Then, writing the identifier of the saved segment (i.e., the identifier of the segment that has been recorded) into the recording information, so that when the recording task is switched to another recording server, the other recording server can determine the identifier of the starting segment based on the recording information.

[0009] In conjunction with the first aspect, in one possible implementation, the method further includes: when the determined identifier of the recording start segment is an invalid value, sending an index file request to the live broadcast server, wherein the index file request does not carry the identifier of the recording start segment. Correspondingly, the index file received from the live broadcast server at this time is the current live broadcast index file. Then, based on the contents of the live broadcast index file, a segment request is sent to the live broadcast server. Upon receiving the segment sent by the live broadcast server, the segment is saved and the segment identifier is written into the recording information. This allows the other recording server to determine the identifier of the recording start segment based on the recording information when the recording task is switched to another recording server.

[0010] Optionally, in the above process, before writing the identifier of the segment into the recording information, when it is determined that the recording information already contains the identifier of the segment, stop sending the segment request to the live broadcast server to avoid multiple recording servers executing the same recording task at the same time.

[0011] In a second aspect, the present application provides a multimedia recording method, which is applied to a recording system, the system comprising a first recording server, a second recording server, and a recording management server. The method is characterized in that when the recording management server receives a recording task, it sends the task to the first recording server. When a failure of the first recording server is detected, the recording task is sent to the second recording server so that the second recording server can continue to complete the recording task. The method comprises: the second recording server receives the recording task and determines the identifier of the recording start segment based on stored recording information, the recording information including the identifier of the recorded segment written by the first recording server when executing the recording task. When the determined identifier of the recording start segment is a valid value, an index file request is sent to the live broadcast server, the index file request carrying the identifier of the recording start segment; and the index file sent by the live broadcast server is received, the identifier of the first segment in the index file being the identifier of the recording start segment.

[0012] Through the second aspect of the present application, when the recording task is switched to the second recording server due to the failure of the first recording server during the recording process, the content of the recording is seamlessly connected, the problem of missing recording content caused by switching the recording server is avoided, and the user experience is improved.

[0013] In combination with the second aspect, in a possible implementation, the method further includes: after receiving the index file sent by the live server, the second recording server sends a segment request to the live server according to the content of the index file. When receiving the segment sent by the live server, the segment is saved. Then, the identifier of the saved segment, i.e., the identifier of the recorded segment, is written into the recording information, so that when the recording task is switched to another recording server, the other recording server can determine the identifier of the recording starting segment according to the recording information.

[0014] Optionally, in the above process, before writing the identifier of the segment into the recording information, when it is determined that the identifier of the segment is already included in the recording information, the second recording server stops sending the segment request to the live server, so as to avoid the situation that the first recording server and the second recording server simultaneously perform the same recording task.

[0015] The third aspect, the present application provides a kind of multimedia recording method, applied to live server, this method includes: receiving the index file request sent by recording server, the request includes recording starting segment identifier. Then, according to the recording starting segment identifier determined recording index file, the first segment identifier in the recording index file is the identifier of the recording starting segment;And the above recording index file is sent to the recording server.

[0016] In combination with the third aspect, in a possible implementation, the process of determining the recording index file according to the recording starting segment identifier includes: when it is determined that the identifier of the recording starting segment is inconsistent with the identifier of the first segment in the current live index file, the segment information from the identifier of the recording starting segment to the identifier of the last segment in the current live index file is sequentially written into the recording index file.

[0017] In combination with the third aspect, in a possible implementation, the method further includes: receiving the segment request sent by the recording server and correspondingly sending the segment. Optionally, when the segment identifier in the above segment request is less than the current live segment identifier, the corresponding segment is accelerated to send, so as to make the progress of the recording task catch up with the current live progress.

[0018] The fourth aspect, the present application provides a kind of recording server, which can be used to execute any one of the methods provided in the first aspect.

[0019] In a possible design, the server can be divided into functional modules according to any of the methods provided in the first aspect above. In this implementation, the recording server includes a processing unit and a transceiver unit.

[0020] The processing unit is configured to determine the identifier of the recording start segment according to the stored recording information when the transceiver unit receives the recording task, wherein the recording information includes the identifier of the recording completed segment written by other recording servers executing the recording task.

[0021] The transceiver unit is configured to receive a recording task, send an index file request to a live streaming server, and correspondingly receive an index file from the live streaming server. When the identifier of the recording start segment determined by the processing unit is a valid value, the index file request includes the identifier of the determined recording start segment, and the identifier of the first segment in the index file is used as the identifier of the recording start segment.

[0022] The transceiver unit is further configured to send a segment request to the live broadcast server based on the content of the index file and to correspondingly receive the segment from the live broadcast server. The processing unit is further configured to, upon receiving the segment from the live broadcast server, store the segment and write the segment identifier into the recording information so that when the recording task is switched to another recording server, the other recording server can determine the identifier of the starting segment for recording based on the recording information.

[0023] Optionally, before writing the identifier of the segment into the recording information, the above-mentioned processing unit is also used to instruct the transceiver unit to stop sending the segment request to the live broadcast server when it is determined that the recording information already contains the identifier of the segment, so as to avoid the situation where multiple recording servers execute the same recording task at the same time.

[0024] In another possible design, the recording server includes: a memory and one or more processors; the memory and the processors are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the recording server, the recording server performs the recording method described in the first aspect and any possible design thereof.

[0025] In a fifth aspect, the present application provides a live broadcast server, which can be used to execute any of the methods provided in the third aspect above.

[0026] In a possible design, the live broadcast server can be divided into functional modules according to any of the methods provided in the third aspect above. In this implementation, the live broadcast server includes a processing unit and a transceiver unit.

[0027] The transceiver unit is used to receive an index file request sent by a recording server, where the request includes an identifier of a recording start segment; and is also used to send a recording index file to the recording server.

[0028] The processing unit is configured to determine the recording index file according to the identifier of the recording start segment when the transceiver unit receives the index file request, wherein the identifier of the first segment in the recording index file is the identifier of the recording start segment.

[0029] When the above-mentioned processing unit determines the recording index file based on the identifier of the recording start segment, it is specifically used to: when it is determined that the identifier of the recording start segment is inconsistent with the identifier of the first segment in the current live broadcast index file, the segment information between the identifier of the recording start segment and the identifier of the last segment in the current live broadcast index file will be written into the recording index file in sequence.

[0030] The transceiver unit is further configured to receive a fragment request and send the corresponding fragments. Optionally, the processing unit is further configured to determine whether the fragment identifier in the fragment request is smaller than the fragment identifier of the current live broadcast; if the processing unit determines that the fragment identifier in the fragment request is smaller than the fragment identifier of the current live broadcast, the transceiver unit is further configured to accelerate the sending of the fragment corresponding to the fragment request, so that the progress of the recording task catches up with the progress of the current live broadcast.

[0031] In another possible design, the live broadcast server includes: a memory and one or more processors; the memory and the processors are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the live broadcast server, the live broadcast server performs the recording method described in the second aspect and any possible design thereof.

[0032] In a sixth aspect, the present application provides a recording system that can be used to execute any of the methods provided in the first or second aspects above. The human-computer interaction system can record a management server and a first recording server.

[0033] Upon receiving a recording task from a recording management server, the first recording server is configured to determine the identifier of the recording start segment based on stored recording information. The recording information includes the identifier of the recorded segment written by the second recording server executing the recording task. The first recording server is further configured to send an index file request to the live streaming server, the index file request including the identifier of the recording start segment, and receive a recording index file from the live streaming server, the identifier of the first segment in the recording index file being the identifier of the recording start segment.

[0034] The recording management server is used to create a recording task when receiving a user's recording request and send the recording task to the second recording server; it is also used to send the recording task to the first recording server when a failure of the second recording server is detected, so that the first recording server can continue to complete the unfinished recording task of the first recording server.

[0035] In conjunction with the sixth aspect, in one possible implementation, the recording system further includes a first recording server configured to, upon receiving a recording task issued by a recording management server, determine an identifier for a recording start segment based on recording information. When the determined identifier for the recording start segment is an invalid value, the server creates a file storing the recording information and sends an index file request to a live broadcast server. The first recording server is further configured to receive a live broadcast index file sent by the live broadcast server and, based on the live broadcast index file, send a segment request to the live broadcast server. The first recording server is further configured to store the segments received from the live broadcast server and write the segment identifiers into the recording information.

[0036] In combination with the sixth aspect, in a possible implementation, the above-mentioned recording system also includes a live broadcast server, which is used to send the live broadcast index file to the second recording server when receiving the index file request sent by the above-mentioned second recording server; it is also used to receive the index file request sent by the above-mentioned first recording server, and the index file request includes an identifier of the recording start segment; determine the recording index file according to the identifier of the recording start segment, and the identifier of the first segment in the recording index file is the identifier of the recording start segment; and send the recording index file to the first recording server.

[0037] In combination with the sixth aspect, in a possible implementation, the above-mentioned first recording server is also used to: send a segment request to the live broadcast server according to the content of the index file, save the segment received from the live broadcast server, and write the identifier of the segment into the recording information, so that other recording servers can determine the identifier of the recording start segment based on the recording information.

[0038] In combination with the sixth aspect, in a possible implementation, the first recording server is further used to: before writing the identifier of the fragment into the recording information, when it is determined that the recording information already contains the identifier of the fragment, stop sending the fragment request to the live broadcast server.

[0039] With reference to the sixth aspect, in a possible implementation, when determining the recording index file according to the identifier of the recording start segment, the live server is specifically configured to: when it is determined that the identifier of the recording start segment is inconsistent with the identifier of the first segment in the current live index file, write the segment information from the identifier of the recording start segment to the identifier of the last segment in the current live index file into the recording index file in sequence.

[0040] With reference to the sixth aspect, in a possible implementation, the live server is further configured to: receive the segment request sent by the first recording server, and when it is determined that the segment identifier in the segment request is smaller than the identifier of the currently live segment, send the corresponding segment to the first recording server at a higher speed, so as to make the progress of the recording task catch up with the current live progress.

[0041] In a seventh aspect, the present application provides a computer readable storage medium, which includes computer instructions, when the computer instructions run on a recording system, make the recording system implement the recording method according to any possible design manner of the first aspect.

[0042] In an eighth aspect, the present application provides a computer readable storage medium, which includes computer instructions, when the computer instructions run on a recording system, make the recording system implement the recording method according to any possible design manner of the second aspect.

[0043] In a ninth aspect, the present application provides a computer program product, when the computer program product runs on a recording system, make the recording system implement the recording method according to any possible design manner of the first aspect.

[0044] In a tenth aspect, the present application provides a computer program product, when the computer program product runs on a recording system, make the recording system implement the recording method according to any possible design manner of the second aspect.

[0045] The detailed description of the second aspect to the tenth aspect and various implementation manners thereof in the present application can refer to the detailed description in the first aspect and various implementation manners thereof; and the beneficial effects of the second aspect to the tenth aspect and various implementation manners thereof can refer to the beneficial effect analysis in the first aspect and various implementation manners thereof, which will not be repeated here.

[0046] In the present application, the name of the recording system does not constitute a limitation to the device or functional module itself, and in actual implementation, these devices or functional modules can appear with other names. As long as the functions of each device or functional module are similar to those in the present application, they belong to the scope of the claims of the present application and equivalent technologies thereof.

[0047] These and other aspects of the present application will become more readily apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0049] Figure 1 This is a schematic diagram of a recording system architecture using an embodiment of the present application.

[0050] Figure 2 This is a flowchart of a recording method provided in an embodiment of the present application.

[0051] Figure 3 This is a schematic diagram of the physical structure of a live broadcast server provided in an embodiment of the present application.

[0052] Figure 4 This is a logical structure diagram of a live broadcast server provided in an embodiment of the present application.

[0053] Figure 5 This is a schematic diagram of the physical structure of a recording server provided in an embodiment of the present application.

[0054] Figure 6 This is a logical structure diagram of a recording server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following will describe in detail the implementation principle, specific implementation methods and corresponding beneficial effects of the technical solution of this application in conjunction with the accompanying drawings.

[0056] Figure 1 FIG. 1 is a schematic diagram of the architecture of the recording system 10 according to an embodiment of the present application. Figure 1 As shown, the recording system 10 includes: a recording management server 101, and a recording server 102. Normally, the recording server 102 usually includes multiple recording servers. In one possible scenario, for reliability reasons, the multiple recording servers used by the system have a master-slave relationship, and the multiple recording servers may execute the same recording task in succession. In another possible scenario, the multiple recording servers used by the system may not be in a master-slave relationship. For example, based on load balancing considerations, the system can evenly dispatch recording tasks to each recording server; at this time, there may also be a situation where multiple recording servers execute the same recording task in succession. In the above two scenarios, the situation where multiple recording servers execute the same recording task in succession is usually: when a recording server fails in the process of executing a recording task, the system can assign another recording server to continue executing the recording task so that the recording task can be completed normally.

[0057] The recording server can access the storage path according to the system configuration rules and save the received content to the corresponding storage path to complete the content recording. It is understood that when multiple recording servers execute the same recording task, they will access the same storage path and recording information when executing the same recording task, so that multiple recording servers can jointly complete the same recording task.

[0058] The storage path is located on a storage device, such as a storage server. The storage device can be deployed in the same physical area as the recording server, such as in the same computer room. The storage device can also be deployed in a different physical area from the recording server, such as a remote cloud storage server. This application does not limit the specific form or deployment location of the storage device.

[0059] This embodiment of the application takes the system including two recording servers as an example. Figure 1 The first recording server 1021 and the second recording server 1022 are shown; and the scenario in which the two recording servers successively execute the same recording task to achieve recording reliability is described.

[0060] The recording management server 101 is configured to create a corresponding recording task upon receiving a recording request from a user. The recording management server 101 is further configured to send the recording task to the first recording server 1021 and, upon detecting a transmission failure of the first recording server 1021, send the unfinished recording task to the second recording server 1022.

[0061] Upon receiving a recording task from the recording management server 101, the first recording server 1021 is configured to determine the identifier of the recording start segment based on the recording information. If the identifier of the recording start segment determined above is invalid, the first recording server 1021 is configured to create a file storing the recording information for the recording task, then send an index file request to the live streaming server and receive a live streaming index file from the live streaming server. The first recording server 1021 is further configured to send a segment request to the live streaming server based on the live streaming index file. Upon receiving a segment from the live streaming server, the first recording server 1021 saves the segment to complete recording of the segment and writes the identifier of the recorded segment into the created recording information.

[0062] The second recording server 1022 is configured to determine the identifier of the recording start segment according to the stored recording information when receiving the recording task issued by the recording management server 101. The recording information includes the identifier of the recorded segment written by the first recording server 1021 when performing the recording task. The second recording server 1022 is further configured to send an index file request to the live server and receive the index file sent by the live server. The index file request includes the identifier of the recording start segment, and the identifier of the first segment in the index file is the identifier of the recording start segment. The second recording server 1022 is further configured to send a segment request to the live server according to the index file, and save the segment received from the live server to complete the recording of the segment, and write the identifier of the recorded segment into the created recording information.

[0063] Optionally, the recording server 1021 and the recording server 1022 are further configured to periodically report the health status to the recording management server 101.

[0064] In actual application, the recording system 10 can further include the live server 100.

[0065] The live server 100 caches a first predetermined number of segments before and after the live point of the live program, and an index file of the live program, i.e., a live index file. The live index file includes the identifiers of a second predetermined number of segments before and after the live point of the live program and the corresponding access addresses, so that other devices, such as a live client, can request the current live content of the live program according to the content of the live index file. The first predetermined number is usually greater than the second predetermined number, and the specific values of the first predetermined number and the second predetermined number are determined by different live server manufacturers, which are not limited in the present application.

[0066] The live point refers to the current live progress of the live program, i.e., the position information (such as the index number or timestamp of the corresponding segment) of the latest content of the live program that can be accessed by the user. It can be understood that as the live program progresses, the live point will move, and the content of the segments and the index file of the live program cached on the live server 100 will also be refreshed periodically.

[0067] Live streaming server 100 is configured to receive an index file request from recording server 1021 and send the current live streaming index file thereto. It is also configured to receive an index file request from recording server 1022, which includes an identifier for a recording start segment. Live streaming server 100 is further configured to determine a recording index file based on the identifier for the recording start segment and send it to recording server 102. The identifier for the first segment in the recording index file is the identifier for the recording start segment.

[0068] The live broadcast server 100 is further configured to send the requested segments to the recording server 1021 or the recording server 1022 upon receiving a segment request from the recording server 1021 or the recording server 1022 .

[0069] Optionally, the live broadcast server 100 is also used to send the current live broadcast index file and corresponding fragments to the live broadcast client when receiving index file requests and fragment requests sent by other devices outside the above-mentioned recording system 10, such as a live broadcast client, so that the live broadcast client can receive the content of the live broadcast program and provide it to the user for viewing.

[0070] It should be noted that Figure 1 The number and form of the live broadcast server, recording management server, and recording server in the system architecture diagram shown do not constitute a limitation on the embodiments of the present application. In addition, in actual applications, the above-mentioned recording system 10 may also include other devices or components, which are not limited by this application.

[0071] Through the recording system 10 provided in the embodiment of the present application, when the recording server fails during the recording process and the recording server is switched, the recording process can be seamlessly connected, avoiding the problem of missing recorded content when switching the recording server, and improving the user experience.

[0072] The embodiment of the present application also provides a recording method, which can be implemented by the above-mentioned recording system 10. Figure 2 Taking the example of a user completing the recording of a live program, such as live program A, through the recording function, the recording method provided in the embodiment of the present application is introduced in detail.

[0073] It should be noted that the above-mentioned live program A includes any content broadcast live on the Internet. It can be a program on a live TV channel provided by an operator, or it can be live content provided by other companies or individuals, such as live program content of companies or individuals in scenarios such as distance education, live shows, video conferencing, and online medical care.

[0074] The recording method includes but is not limited to the following steps:

[0075] S201, the recording management server 101 receives a recording request, and creates a recording task.

[0076] The user sets recording parameters through the interface of the client or webpage, and initiates a recording request to the recording management server 101. For example, the user sets recording parameters such as recording start and end time, and recording format on the interface of the live program A. After setting the recording parameters, the user submits the recording request on the interface.

[0077] The above client or webpage program sends the recording request submitted by the user to the recording management server 101.

[0078] When receiving the above recording request, the recording management server 101 creates a recording task, and generates an identifier of the recording task. For the convenience of description, it is assumed that the recording task identifier is A1234.

[0079] The above recording start and end time can be the start and end time of the live program A, and in this case, the complete live program A is recorded. The above start and end time can also be located in the middle of the start and end time of the live program A, and in this case, part of the live program A is recorded.

[0080] In addition, in the above process, the user can pre-book recording (i.e. the time of submitting the recording request is before the set recording start time, such as submitting the recording request before the live broadcast), or trigger real-time recording (i.e. the time of submitting the recording request is consistent with the set recording start time, such as setting the recording start time as the current time). Therefore, in one possible implementation, when receiving the recording request, the recording management server 101 detects whether the current recording start time of the recording request has arrived. For example, it is assumed that the user sets the recording start time as the 10th second of the live program A, and the recording management server 101 judges whether the live program A has broadcasted to the 10th second. If yes, it immediately executes step S202. Otherwise, it waits until the live program A broadcasts to the 10th second, and then executes step S202. In another possible implementation, when receiving the recording request, the recording management server 101 immediately executes step S202 regardless of whether the current recording start time has arrived. In this implementation, the recording server 102 itself monitors the arrival of the recording start time, and starts to execute the recording task.

[0081] S202, the recording management server 101 issues the recording task to the first recording server 1021.

[0082] The recording management server 101 may select one recording server from multiple recording servers, for example, the first recording server 1021, and issue a recording task to it, that is, send a recording task message to the first recording server 1021. The recording task message includes a recording task identifier A1234, the access address of live program A, and the recording parameters set by the user.

[0083] As previously mentioned, recording server 102 periodically reports its health status to recording management server 101, for example, by periodically sending heartbeat messages to recording management server 101. Upon receiving these messages, recording management server 101 can determine that the corresponding recording server is currently healthy. Therefore, recording management server 101 can select a recording server from the recording server cluster that is lightly loaded and in a healthy state, or it can use other system-defined methods, which are not limited in this application.

[0084] S203: The first recording server 1021 determines the identifier of the current recording start segment.

[0085] After receiving the recording task message, first recording server 1021 first determines the identifier of the current recording start segment for that recording task. The recording start segment for a recording task is determined based on the information about the currently completed segment, which is recorded in the recording information corresponding to that recording task. Therefore, first recording server 1021 must first access the recording information for recording task A1234 and read the information about the currently completed segment.

[0086] Specifically, the first recording server 1021 first determines the access address for the recording information of recording task A1234 according to predefined system rules. For example, assume the system defines the file name for storing the recording information of a recording task as RecordList.txt, and that this file is located in the shared storage path of the recording task. Furthermore, assume the system defines the shared storage path for each recording task as being located in the public path of the recording task on the storage server, and using the identifier of the recording task as its name. Therefore, if the system predefined the public path as / 101.10.125.13 / CloudPVR / , then the first server 1021 determines, according to the above rules, that the shared storage path for recording task A1234 is / 101.10.125.13 / CloudPVR / A1234, and the access address for its recording information is / 101.10.125.13 / CloudPVR / A1234 / RecordList.txt. In actual applications, the above predefined rules will depend on the actual system implementation and are not limited in this application.

[0087] It is understandable that each recording server determines the shared storage path of the recording task and the access address of the recording information according to the same rules. Therefore, for the same recording task, the shared storage path and the access address of the recording information finally determined by each recording server are the same.

[0088] In this example, because no other recording server has previously executed recording task A1234, the shared storage path / 101.10.125.13 / CloudPVR / A1234 / does not exist, and first recording server 1021 fails to access / 101.10.125.13 / CloudPVR / A1234 / RecordList.txt. Therefore, the identifier of the recording start segment determined by first recording server 1021 is empty, i.e., invalid.

[0089] At this time, the first recording server 1021 knows that no other recording server has executed the recording task A1234 before, so it creates a shared storage path A1234 / for the recording task A1234 under the public storage path / 101.10.125.13 / CloudPVR / of the recording task on the storage server, and creates a file RecordList.txt to save the recording information under the shared storage path.

[0090] S204-S208: First recording server 1021 sends an index file request to live streaming server 100, and live streaming server 100 sends the live streaming index file to first recording server 1021. First recording server 1021 sends a segment request to live streaming server 100 based on the contents of the live streaming index file, and live streaming server 100 sends the corresponding segment to first recording server 1021. First recording server 1021 saves the segment to the storage server and writes the segment identifier to the recording information.

[0091] Since the identifier of the recording start segment is invalid at this time, the index file request sent by the first recording server 1021 does not include the identifier of the recording start segment. After receiving the index file request, the live broadcast server 100 finds that the request does not contain the segment identifier and directly sends the current live broadcast index file to the first recording server 1021.

[0092] For ease of understanding, let's assume that each segment of live program A lasts 2 seconds, and its segment identifier is the segment index number, with the first segment index number being 0. Furthermore, let's assume that the second predetermined number is 3, meaning that the live index file for live program A contains 3 segments. Since the live program is currently broadcasting until the 10th second, based on these assumptions, the segment identifiers in the current live index file are 5, 6, and 7, respectively.

[0093] It is understandable that this embodiment is described by taking the index number of the slice as the identifier of the slice. In practical applications, other information can also be used as the identifier of the slice, for example, the timestamp of the slice, which is not limited in this application.

[0094] Based on the content in the received live broadcast index file, first recording server 1021 first requests segment 5, identified by ID 5, from live broadcast server 101. After receiving segment 5 from live broadcast server 101, first recording server 1021 saves it to the shared storage path / 101.10.125.13 / CloudPVR / A1234 / , completing the recording of segment 5. First recording server 1021 then writes the ID of segment 5 to the recording information file, RecordList.txt, to indicate that recording of segment 5 has been completed.

[0095] Similar to the above process, the first recording server 1021 requests subsequent segments in sequence according to the content of the live broadcast index file and performs the same processing.

[0096] During the live broadcast and recording process, the live broadcast server 100 will periodically refresh the content in the live broadcast index file as the live broadcast program A progresses, and the first recording server 1021 will also periodically request the refreshed live broadcast index file from the live broadcast server 100. Therefore, the first recording server 1021 can request subsequent segments, such as segment 8, segment 9, etc., based on the refreshed live broadcast index file.

[0097] Optionally, when the first recording server 1021 detects that the format of the segments received from the live streaming server 100 is inconsistent with the recording parameters set by the user, it can convert the format of the segments to the format consistent with the recording parameters set by the user and then save them to the storage server. In this way, the adaptability of the recording system and the user experience can be further improved.

[0098] Assume that first recording server 1021 fails at the 14th second of live broadcast of program A. That is, recording server 1021 fails while recording the seventh segment. At this point, the last segment in the recording information on the shared storage path is identified as 6. Therefore, first recording server 1021 no longer sends heartbeat messages to the recording management server.

[0099] S209 - S210 , the recording management server 101 detects that the first recording server 1021 fails, and sends a recording task to the second recording server 1022 .

[0100] The recording management server 101 does not receive the heartbeat information sent by the first recording server 1021 within a predetermined time threshold, and therefore determines that the recording server has failed.

[0101] Then, the recording management server 101 reselects a recording server, for example, the second recording server 1022, and sends a recording task message to the second recording server 1022. The content of the recording task message is shown in step S202 and will not be described in detail here.

[0102] S211-S212, the second recording server 1022 determines the identifier of the current recording start segment; and sends an index file request to the live broadcast server 100, wherein the request includes the identifier of the recording start segment.

[0103] Similar to the description in the above step S203, after receiving the above recording task message, the second recording server 1022 also needs to first determine the identifier of the current recording start segment of the recording task.

[0104] In this embodiment, since the first recording server 1021 has already created the shared storage path / 101.10.125.13 / CloudPVR / A1234 / for the recording task and its recording task list file, RecordList.txt, and has written the IDs of the completed segments into RecordList.txt, the second recording server 1022 can normally access / 101.10.125.13 / CloudPVR / A1234 / RecordList.txt and, by reading its contents, learn that the ID of the last completed segment is 6. Since the recording start segment is the segment after the last completed segment, the second recording server 1022 determines that the ID of the current recording start segment is 7.

[0105] Then, the second recording server 1022 sends an index file request to the live broadcast server 100. The request includes the identifier of the recording start segment determined above. For example, the URL of the index file request can be: http: / / xxx / xxx.mpd?number=7.

[0106] S213: The live broadcast server 100 determines whether the identifier of the recording start segment is consistent with the identifier of the first segment in the current live broadcast index file.

[0107] Assume that when the live broadcast server 100 receives the index file request, live program A has already been broadcast to the 18th second. The segment identifiers contained in the current live broadcast index file are 9, 10, and 11. In other words, the identifier of the first segment in the current live broadcast index file is 9. Therefore, the live broadcast server 100 determines that the identifier of the recording start segment is inconsistent with the identifier of the first segment in the current live broadcast index file, and then executes step S214.

[0108] It is understandable that if the system responds quickly to a recording server failure, live streaming server 100 will have broadcast Program A for 15 seconds when it receives the recording index file request. At this point, the live streaming index file contains segment identifiers 7, 8, and 9. Live streaming server 100 will then determine that the identifier of the recording start segment matches the identifier of the first segment in the live streaming index file and will directly send the live streaming index file to second recording server 1022. The subsequent execution of second recording server 1022 is similar to that of first recording server 1021, and will not be further described.

[0109] S214 - S215 , the live broadcast server 100 generates a recording index file according to the identifier of the recording start segment, and sends the recording index file to the second recording server 1022 .

[0110] When generating a recording index file, the live broadcast server 100 writes the fragment information of the fragments from the recording start fragment to the last fragment in the current live broadcast index file into the recording index file in sequence.

[0111] In this embodiment, the live broadcast server will write the information of segments 7 to 11 in sequence into the recording index file, that is, the identifier of the first segment in the recording index file is the identifier of the recording start segment.

[0112] S216-S218: The second recording server 1022 sends a segmentation request to the live server 100 according to the content of the recording index file, and the live server 100 sends the segmentation to the second recording server 1022. The second recording server 1022 saves the segmentation to the storage server and writes the segmentation identifier into the recording information.

[0113] Similar to the introduction in steps S204-S208 above, after receiving the recording index file sent by the above-mentioned live broadcast server, the second recording server 1022 completes the recording of segment 7 and its subsequent segments in sequence according to the content of the recording index file, and appends the identifiers of the recorded segments to RecordList.txt.

[0114] In the above process, when the second recording server 1022 starts recording, the recording progress is segment 7, while the live broadcast progress at this time is segment 9. Therefore, optionally, the system can accelerate the recording at this time so that the recording progress catches up with the current live broadcast progress. Specifically, when the live broadcast server 100 receives a segment request, if it finds that the requested segment is a segment before the live broadcast point (i.e., a historical segment that has been live broadcast), it can accelerate the sending of the segment. For example, the segment can be sent at a rate twice the predetermined sending rate. In this way, the second recording server 1022 can receive the segment to be recorded in a shorter time, thereby allowing the recording progress to catch up with the current live broadcast progress.

[0115] It should be noted that the second recording server 1022 also needs to periodically request new index files from the live streaming server 100 to complete the request and recording of subsequent segments. Subsequent index file requests sent by the second recording server 1022 (except for the initial index file request sent in step S212 above) no longer need to include the identifier of the current recording start segment. Accordingly, the live streaming server 100 directly sends the current live streaming index file to the second recording server 1022, without having to regenerate the index file as described in step S214.

[0116] Optionally, the second recording server 1022 may also convert the format of the received segments before writing them into the storage server, so as to improve the adaptability of the recording system and the user experience.

[0117] The second recording server 1022 continues the above process until the recording ends. The trigger condition for ending the recording can be that the second recording server 1022 detects that the recording end time set by the user has been reached; or it can be triggered in real time by the user (for example, the user triggers a request to end the recording before the recording end time has arrived).

[0118] It is understood that during the execution of the above-described recording task, if the second recording server 1022 also experiences a failure, the recording management server 101 can continue recording on the third recording server. If the first recording server has recovered, the first recording server can also be used for recording. The recording server selection strategy can be set according to actual needs and is not limited thereto. The specific recording process can be referred to the corresponding steps in the above-described embodiment and will not be further described here.

[0119] It can be seen that through the recording method provided by this application, when the recording server is switched during the recording process, the recording process can be seamlessly connected, avoiding the problem of missing recorded content due to switching the recording server, and improving the user experience.

[0120] It should be noted that, as mentioned above, since the live server 100 only caches the first predetermined number of the live program A, there can be a case that the live server 100 does not cache the recording start segment. For example, in the above embodiment, if the first predetermined number defined by the system is 4, when the live server 100 receives the first index file request of the second recording server 1022 (the request contains the recording start segment identification 7), the cached segments on the live server 100 are segment 8-segment 11. Thus, the case that the live server 100 does not cache the recording start segment occurs.

[0121] If the above case occurs, in the step S214, the live server 100 needs to first determine whether the recording start segment is cached locally. If the result of the determination is yes, the live server 100 generates the recording index file according to the step S214. Otherwise, if the result of the determination is no, when generating the recording index file, the live server can write the information from the nearest segment to the current latest segment into the recording index file in sequence. The nearest segment refers to the segment cached on the live server and closest to the recording start segment. In the above example, the nearest segment is segment 8. Thus, the information contained in the recording index file at this time is segment 8-segment 11, instead of segment 7-segment 11.

[0122] To avoid the above case, the system can set the first predetermined number to a larger value, that is, the system lets the live server 100 cache more segments.

[0123] Optionally, in actual application, there can be a case that multiple recording servers simultaneously perform a same recording task due to the misjudgment of the recording management server on the health status of the recording server. For example, during the normal recording of the first recording server 1021, due to network problems, the recording management server 101 cannot receive the heartbeat message of the first recording server 1021 and determines that the first recording server 1021 has failed. At this time, the recording management server 101 issues the recording task performed by the first recording server 1021 to the second recording server 1022, thus causing the above case that the two recording servers simultaneously perform the recording task.

[0124] If this happens, a recording server, such as the second recording server 1022, can first check whether the segment identifier already exists in the recording information before writing the segment identifier to the recording information. If it does, it indicates that another recording server (such as the first recording server 1021) is currently executing the recording task. Therefore, the second recording server 1022 can stop the recording task, thereby avoiding the problem of two recording servers executing the same recording task at the same time.

[0125] Furthermore, in the aforementioned situation, multiple recording servers may simultaneously write to the recording information or write to the same shard on the storage server. Therefore, to avoid these write conflicts, you can lock the file corresponding to the recording information and add an identifier to the shard name (for example, before writing the shard to the storage server, add the identifier of the corresponding recording server to its name).

[0126] The above embodiment takes the user's request to record one channel of live program A as an example to illustrate that the present application can avoid the problem of missing recorded content when switching recording servers. Optionally, the user can also request to record multiple channels of live program A at the same time. Specifically, in one possible scenario, the user requests to record multiple channels of live program A in different formats, for example, one channel is recorded in standard definition and the other channel is recorded in high definition. In another possible scenario, the user requests to record multiple channels of live program A in different scenes, for example, live program A is a show broadcast simultaneously by multiple anchors, and the user requests to record the pictures corresponding to the above multiple anchors at the same time (each anchor's picture is recorded as one channel).

[0127] In the above scenario, the method provided by this application can also avoid the problem of content loss caused by switching recording servers. Specifically, taking the above embodiment as an example, the first recording server 1021 can create a corresponding sub-path for each recording under the shared path / 101.10.125.13 / CloudPVR / A1234 / of the storage server of the recording task, and create a corresponding recording information file under each sub-path. Then, after saving each slice to the corresponding sub-path, the identifier of the slice is written to the corresponding recording information. In this way, when the first recording server 1021 fails, the second recording server 1022 can determine the identifier of the recording start slice corresponding to each recording, and request the subsequent slices of each recording based on the identifier. This can also avoid the problem of recorded content loss caused by switching recording servers in the scenario of simultaneous multi-channel recording.

[0128] See Figure 3, is a schematic diagram of the physical structure of a live broadcast server 100 provided in an embodiment of the present application. The live broadcast server 100 can be used to perform the above Figure 2 The recording method shown.

[0129] Since the execution process of the live broadcast server 100 has been described in detail in the above method embodiment, only a brief description of the structure and function of the live broadcast server 100 is given below. For specific content, please refer to the content of the above method embodiment.

[0130] like Figure 3 As shown, the live broadcast server 100 includes a processor 1001 , a transceiver 1002 and a memory 1003 .

[0131] The processor 1001 may be a controller, a central processing unit (CPU), a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present invention. The processor 1001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0132] The transceiver 1002 may be a communication module or a transceiver circuit, and may be used to communicate with other devices or a communication network.

[0133] The memory 1003 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed, but not limited to these. The memory 1003 may be independent of the processor 1001; may be connected to the processor 1001 via a communication bus; or may be integrated with the processor 1001.

[0134] The memory 1003 is used to store data, instructions or program codes. When the processor 1001 calls and executes the instructions or program codes stored in the memory 1003, the recording method provided in the embodiment of the present application can be implemented.

[0135] It should be noted that the structural diagram shown in the above figure does not constitute a limitation on the embodiments of the present application. In actual applications, the live broadcast server 100 may also include other components.

[0136] In addition, the embodiment of the present application can divide the above-mentioned live broadcast server 100 into functional modules according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.

[0137] like Figure 4 As shown in FIG, a logical structure diagram of the live broadcast server 100 provided in an embodiment of the present application is provided. The live broadcast server 100 may include a processing unit 2001 and a transceiver unit 2002.

[0138] The transceiver unit 2002 is used to receive an index file request sent by a recording server, where the index file request includes an identifier of a recording start segment; and is also used to send an index file to the recording server.

[0139] The processing unit 2001 is used to determine whether the identifier of the recording start segment is consistent with the identifier of the first segment in the current live broadcast index file when the transceiver unit 2002 receives the index file request; and when the judgment is no, generate a recording index file according to the identifier of the recording start segment, and the identifier of the first segment in the recording index file is the identifier of the recording start segment.

[0140] In the above process, when the processing unit 2001 generates a recording index file according to the identifier of the recording start segment, it is specifically used to: write the segment information between the identifier of the recording start segment and the identifier of the last segment in the current live broadcast index file into the recording index file in sequence.

[0141] The transceiver unit 2002 is further configured to receive a segment request from the recording server and send the segments to the recording server accordingly. Optionally, the processing unit 2001 is further configured to, upon receiving the segment request, determine whether the segment identifier in the segment request is smaller than the segment identifier of the current live broadcast. The transceiver unit 2002 is further configured to accelerate the delivery of the segment content if the processing unit 2001 determines that the segment identifier in the segment request is smaller than the segment identifier of the current live broadcast.

[0142] Combine Figure 2 The processing unit 2001 may be configured to execute S213 and S214. The transceiver unit 2002 may be configured to execute S205, S207, S215, and S217.

[0143] As an example, combining Figure 3 , the function of processing unit 2001 is the same as Figure 3 The function of the processor 1001 in the same manner as the transceiver unit 2002 is the same as the Figure 3 The function of the transceiver 1002 in is the same.

[0144] See Figure 5 , is a schematic diagram of the physical structure of a recording server 102 provided in an embodiment of the present application. The recording server 102 can be used to perform the above Figure 2 The recording method shown.

[0145] Since the execution process of the recording server 102 has been described in detail in the above method embodiment, only a brief description of the structure and function of the recording server 102 is given below. For specific details, please refer to the contents of the above method embodiment.

[0146] like Figure 5 As shown, the recording server 102 includes a processor 1021 , a transceiver 1022 and a memory 1023 .

[0147] The processor 1021 may be a controller, a central processing unit (CPU), a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present invention. The processor 1021 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0148] The transceiver 1022 may be a communication module or a transceiver circuit, and may be used to communicate with other devices or a communication network.

[0149] The memory 1023 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed, but not limited to these. The memory 1023 may be independent of the processor 1021; may be connected to the processor 1021 via a communication bus; or may be integrated with the processor 1021.

[0150] The memory 1023 is used to store data, instructions or program codes. When the processor 1021 calls and executes the instructions or program codes stored in the memory 1023, the recording method provided in the embodiment of the present application can be implemented.

[0151] It should be noted that the structural diagram shown in the above figure does not constitute a limitation on the embodiments of the present application. In actual applications, the recording server 102 may also include other components.

[0152] Furthermore, embodiments of the present application can divide the recording server 102 into functional modules based on the above-described method examples. For example, each functional module can be divided into corresponding functional modules, or two or more functions can be integrated into a single processing module. The integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the module division in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used.

[0153] like Figure 6 As shown in FIG, a logical structure diagram of the recording server 102 provided in an embodiment of the present application is provided. The recording server 102 may include a processing unit 2021 and a transceiver unit 2022.

[0154] The processing unit 2021 is configured to determine the identifier of the recording start segment according to the recording information on the storage server when the transceiver unit 202 receives the recording task, wherein the recording information includes the identifier of the recording completed segment written by other recording servers executing the recording task.

[0155] The transceiver unit 2022 is configured to receive a recording task, send an index file request to the live streaming server, and correspondingly receive an index file from the live streaming server. When the identifier of the recording start segment determined by the processing unit 2021 is a valid value, the index file request includes the identifier of the recording start segment, and the identifier of the first segment in the received index file is used as the identifier of the recording start segment.

[0156] The transceiver unit 2022 is further configured to send a segment request to the live broadcast server according to the content of the index file, and correspondingly receive segments from the live broadcast server.

[0157] The processing unit 2021 is further configured to save the segments received by the transceiver unit 2022 to a storage server, and write the segment identifiers to the recording information on the storage server, so that other recording servers can determine the identifiers of the recording start segments based on the recording information.

[0158] Optionally, in the above process, before writing the identifier of the fragment into the recording information of the storage server, the processing unit 2021 is also used to instruct the transceiver unit 2022 to stop sending the fragment request to the live broadcast server when it is determined that the recording information already contains the identifier of the fragment.

[0159] Combine Figure 2 The processing unit 2021 may be configured to execute S203, S208, S211, and S218. The transceiver unit 2022 may be configured to execute S204, S206, S212, and S216.

[0160] As an example, combining Figure 5 , the function of processing unit 2021 is the same as Figure 5 The function of the processor 1021 in is the same as that of the transceiver unit 2022. Figure 5 The function of the transceiver 1022 in is the same.

[0161] For the detailed description of the above optional manner, please refer to the above method embodiment, which will not be repeated here. In addition, the explanation of any processor or computer device provided above and the description of the beneficial effects can refer to the above corresponding method embodiment, which will not be repeated here.

[0162] Another embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a recording system, or a live broadcast server, or a recording server, the recording system, or the live broadcast server, or the recording server executes each step executed by the recording system, or the live broadcast server, or the recording server in the method flow shown in the above method embodiment.

[0163] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer execution instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more media that can be integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0164] The above is only a specific embodiment of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific embodiment provided in this application, and all such changes or substitutions shall fall within the scope of protection of this application.

Claims

1. A multimedia recording method, applied to a recording server, characterized in that: The method comprises: When a recording task is received, the identifier of the recording start segment is determined based on the stored recording information, where the recording information includes the identifiers of the recorded segments written by other recording servers that execute the recording task, and the recording start segment is the segment next to the last recorded segment; When the determined identifier of the recording start segment is a valid value, an index file request is sent to a live broadcast server, wherein the index file request carries the identifier of the recording start segment; the live broadcast server caches a preset number of segments before and after the live broadcast point and the segment identifiers; An index file sent by the live broadcast server is received, wherein the identifier of the first segment in the index file is the identifier of the recording start segment.

2. The method according to claim 1, wherein The method further comprises: A fragment request is sent to the live broadcast server according to the index file, the fragment received from the live broadcast server is saved, and an identifier of the fragment is written into the recording information.

3. The method according to claim 1, wherein The method further comprises: When the determined identifier of the recording start segment is an invalid value, sending an index file request to the live broadcast server, wherein the index file request does not carry the identifier of the recording start segment; Receive an index file sent by the live broadcast server, where the index file is a current live broadcast index file; A fragment request is sent to the live broadcast server according to the live broadcast index file, the fragment received from the live broadcast server is saved, and an identifier of the fragment is written into the recording information.

4. The method according to claim 2 or 3, wherein: include: Before writing the identifier of the segment into the recording information, when it is determined that the recording information already contains the identifier of the segment, stopping sending the segment request to the live broadcast server.

5. A multimedia recording method, applied to a live broadcast server, wherein the live broadcast server caches a preset number of segments and segment identifiers before and after a live broadcast point, characterized in that: include: Receive an index file request, wherein the request includes an identifier of a recording start segment, where the recording start segment is the next segment after the last recorded segment; Determine a recording index file according to the identifier of the recording start segment, wherein the identifier of the first segment in the recording index file is the identifier of the recording start segment; Send the recording index file.

6. The method according to claim 5, wherein The step of determining the recording index file according to the identifier of the recording start segment includes: When it is determined that the identifier of the recording start segment is inconsistent with the identifier of the first segment in the current live broadcast index file, the segment information from the identifier of the recording start segment to the identifier of the last segment in the current live broadcast index file is written into the recording index file in sequence.

7. The method according to claim 5, wherein The method further comprises: A fragment request is received, and when the playback time of the fragment in the fragment request is before the current live broadcast point, the fragment corresponding to the fragment request is accelerated.

8. A multimedia recording system, characterized in that: It includes a recording management server and a first recording server, wherein: The first recording server is configured to, upon receiving a recording task sent by the recording management server, determine an identifier of a recording start segment based on recording information, wherein the recording information includes an identifier of a segment that has been recorded and is written by a second recording server that executes the recording task, the recording start segment being the next segment of the last segment that has been recorded, send an index file request to a live broadcast server, wherein the index file request includes the identifier of the recording start segment, and receive a recording index file sent by the live broadcast server, wherein the identifier of the first segment in the recording index file is the identifier of the recording start segment; the live broadcast server caches a preset number of segments and segment identifiers before and after a live broadcast point; The recording management server is used to create the recording task and send the recording task to the second recording server when receiving the user's recording request; and is also used to send the recording task to the first recording server when detecting that the second recording server has a fault.

9. The system according to claim 8, wherein The system further includes a second recording server, wherein: The second recording server is used to determine the identifier of the recording start segment according to the recording information when receiving the recording task issued by the recording management server; when the determined identifier of the recording start segment is an invalid value, create a file to save the recording information and send an index file request to the live broadcast server; receive the live broadcast index file sent by the live broadcast server, and send a segment request to the live broadcast server according to the live broadcast index file; save the segment received from the live broadcast server, and write the identifier of the segment into the recording information.

10. The system according to claim 9, wherein: The system also includes the live broadcast server, wherein, The live broadcast server is used to send the live broadcast index file to the second recording server when receiving the index file request sent by the second recording server; receive the index file request sent by the first recording server, the index file request including the identifier of the recording start segment; determine the recording index file according to the identifier of the recording start segment, the identifier of the first segment in the recording index file is the identifier of the recording start segment; and send the recording index file to the first recording server.

11. The system according to any one of claims 8 to 10, wherein: The first recording server is further configured to: A fragment request is sent to the live broadcast server according to the recording index file, the fragment received from the live broadcast server is saved, and an identifier of the fragment is written into the recording information.

12. The system according to any one of claims 8 to 10, wherein: The first recording server is further configured to: Before writing the identifier of the segment into the recording information, when it is determined that the recording information already contains the identifier of the segment, stopping sending the segment request to the live broadcast server.

13. The system according to claim 10, wherein: The live broadcast server determines a recording index file according to the identifier of the recording start segment, including: When it is determined that the identifier of the recording start segment is inconsistent with the identifier of the first segment in the current live broadcast index file, the segment information from the identifier of the recording start segment to the identifier of the last segment in the current live broadcast index file is written into the recording index file.

14. The system according to claim 10, wherein: The live broadcast server is also used for: Receive a fragment request sent by the first recording server, and when it is determined that the fragment identifier in the fragment request is smaller than the fragment identifier of the current live broadcast, accelerate the sending of the fragment corresponding to the fragment request to the first recording server.

15. A recording server, characterized in that Including processing unit and transceiver unit: The processing unit is configured to determine, when the transceiver unit receives a recording task, an identifier of a recording start segment based on stored recording information, wherein the recording information includes identifiers of recorded segments written by other recording servers that execute the recording task, and the recording start segment is a segment next to the last recorded segment; The transceiver unit is used to receive a recording task, and is also used to send an index file request to a live broadcast server, and receive an index file from the live broadcast server; wherein, when the identifier of the recording start segment determined by the processing unit is a valid value, the index file request contains the identifier of the recording start segment, and the identifier of the first segment in the index file is the identifier of the recording start segment; the live broadcast server caches a preset number of segments before and after the live broadcast point and the segment identifiers.

16. The recording server according to claim 15, wherein: The transceiver unit is further configured to send a fragment request to the live broadcast server according to the index file, and receive fragments from the live broadcast server; The processing unit is also used to save the fragment when the transceiver unit receives the fragment from the live broadcast server, and write the identifier of the fragment into the recording information, so that other recording servers can determine the identifier of the recording start fragment based on the recording information.

17. The recording server according to claim 15, wherein: Before writing the identifier of the segment into the recording information, the processing unit is further configured to instruct the transceiver unit to stop sending the segment request to the live broadcast server when it is determined that the recording information already contains the identifier of the segment.

18. A live broadcast server, wherein the live broadcast server caches a preset number of fragments and fragment identifiers before and after a live broadcast point, characterized in that: include: The transceiver unit is used to receive an index file request, wherein the request includes an identifier of a recording start segment, and the recording start segment is the next segment after the last recorded segment; Also used to send recording index files; The processing unit is configured to determine the recording index file according to the identifier of the recording start segment when the transceiver unit receives the index file request, wherein the identifier of the first segment in the recording index file is the identifier of the recording start segment.

19. The live broadcast server according to claim 18, wherein: When the processing unit generates the recording index file according to the identifier of the recording start segment, it is specifically configured to: When it is determined that the identifier of the recording start segment is inconsistent with the identifier of the first segment in the current live broadcast index file, the segment information from the identifier of the recording start segment to the identifier of the last segment in the current live broadcast index file is written into the recording index file in sequence.

20. The live broadcast server according to claim 18, wherein: The transceiver unit is further configured to receive a fragmentation request; The processing unit is further configured to determine whether the fragment identifier in the fragment request is smaller than the fragment identifier of the current live broadcast; The transceiver unit is further configured to accelerate the sending of the fragment corresponding to the fragment request when the processing unit determines that the fragment identifier in the fragment request is smaller than the fragment identifier of the current live broadcast.

Citation Information

Patent Citations

  • Method, apparatus and system for implementing network personal video recorder

    CN101409823A

  • Data transmission method and device, server and computer readable storage medium

    CN111447392A