Method and apparatus for multi-source downloading of streaming media data, terminal device and storage medium

CN122994299APending Publication Date: 2026-10-27XUNLEI NETWORKING TECHNOLOGIES LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611206737.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]然而,在分片传输场景中,流媒体数据流的内容源常因插入或替换部分分片而产生局部变化,分片文件的校验匹配易出现对应失效的情况,无法稳定建立分片文件与校验基准的对应关系,难以持续调度多个内容源完成并行下载,影响了流媒体数据下载效率的稳定发挥

Benefits of technology

[0013]本申请实施例中,响应于用户针对目标多媒体数据流的下载请求,先获取目标多媒体数据流的分片文件的资源获取地址序列,并根据资源获取地址序列,从下载请求对应的原始内容源下载对应的分片文件,保障核心流媒体数据的基础获取,然后,分别计算各分片文件的第一校验值,并按资源获取地址序列的顺序生成校验值序列,建立统一、规范且与分片顺序强关联的分片校验基准,为多源匹配提供精确的比对依据,再根据下载请求查询中心数据库以获取与下载请求关联的参考校验值序列,并将该校验值序列与该参考校验值序列进行比对,在比对结果出现不匹配时,基于预设偏移容忍范围确定各第一校验值在参考校验值序列中的映射位置,有效适配流媒体分发过程中因广告插入或替换导致的分片内容局部变化及分片位置偏移等实际场景,提升流媒体数据分发传输的场景适配性,避免因个别分片不匹配而整体否定内容关联性,从而提高多源下载的匹配成功率,最后,根据该映射位置确定与下载请求关联的至少一个关联内容源,并向用户返回原始内容源的地址信息和至少一个关联内容源的地址信息,使用户能够从原始内容源和关联内容源交错下载目标多媒体数据流的分片文件,充分发挥多源资源的协同下载能力,减少单一内容源的下载压力,缩短流媒体数据的整体下载耗时,实现下载加速。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122994299A_ABST
    Figure CN122994299A_ABST
Patent Text Reader

Abstract

The application is suitable for the field of computer technology, and provides a stream media data multi-source downloading method and device, terminal equipment and storage medium, the method comprises the following steps: in response to a downloading request, obtaining a resource acquisition address sequence of a target multimedia data stream file, and downloading the corresponding file from the original content source, calculating the first check value of each file, and generating a check value sequence; obtaining a reference check value sequence; when the check value sequence and the reference check value sequence comparison result do not match, determining the mapping position of each first check value in the reference check value sequence in the check value sequence based on a preset offset tolerance range, and determining the associated content source based on the mapping position; returning the address information of the original content source and the address information of the associated content source to the user, so that the user can download the file of the target multimedia data stream from the original content source and the associated content source. The application can improve the multi-source downloading matching success rate and realize downloading acceleration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, terminal device, and storage medium for multi-source downloading of streaming media data. Background Technology

[0002] Streaming media data transmission is widely used in online playback and data download scenarios. To adapt to different network environments, streaming media data streams are often divided into multiple independent segment files for distribution and transmission. By relying on multiple content sources to obtain segment files in parallel, the overall data download speed can be effectively improved, meeting users' needs for data acquisition efficiency.

[0003] However, in the scenario of segmented transmission, the content source of the streaming media data stream often undergoes local changes due to the insertion or replacement of some segments. The verification and matching of segment files are prone to failure, making it impossible to stably establish the correspondence between segment files and verification benchmarks. This makes it difficult to continuously schedule multiple content sources to complete parallel downloads, affecting the stable performance of streaming media data download efficiency.

[0004] Therefore, improving the scenario adaptability of streaming media data distribution and transmission, increasing the success rate of multi-source download matching, and accelerating downloads are problems that need to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, terminal device, and storage medium for multi-source streaming media data download, which can improve the scenario adaptability of streaming media data distribution and transmission, increase the success rate of multi-source download matching, and accelerate download.

[0006] In a first aspect, embodiments of this application provide a method for downloading streaming media data from multiple sources, including: In response to a user's download request for a target multimedia data stream, obtain the resource acquisition address sequence of the segmented files of the target multimedia data stream; Based on the resource acquisition address sequence, download the corresponding fragment file from the original content source corresponding to the download request; Calculate the first check value for each of the fragment files, and generate a check value sequence composed of the first check values ​​in the order of the resource acquisition address sequence; The central database is queried based on the download request to obtain a sequence of reference verification values ​​associated with the download request; The verification value sequence is compared with the reference verification value sequence. When a mismatch occurs in the comparison result, the mapping position of each first verification value in the verification value sequence in the reference verification value sequence is determined based on a preset offset tolerance range. Based on the mapping location, at least one associated content source is determined that is associated with the download request; The address information of the original content source corresponding to the download request and the address information of the at least one associated content source are returned to the user so that the user can download the segmented files of the target multimedia data stream from the original content source and the associated content source in an alternating manner.

[0007] Secondly, embodiments of this application provide a method for downloading streaming media data from multiple sources, including: In response to a download request for a target multimedia data stream, obtain the resource acquisition address sequence of the segmented files of the target multimedia data stream; Based on the resource acquisition address sequence, download the segmented file starting from the original content source corresponding to the download request, and calculate the first checksum of the downloaded segmented file; Query the central database based on the download request to obtain a reference verification value sequence; The first check value of the downloaded fragment file is compared with the reference check value sequence. If a mismatch occurs in the comparison result, the mapping position of the downloaded fragment file in the reference check value sequence is determined based on a preset offset tolerance range. Based on the mapping location, determine the address information of at least one associated content source associated with the reference check value sequence; The original content source and the at least one associated content source are scheduled to download the fragmented files in the resource acquisition address sequence that have not yet been downloaded in an interleaved manner.

[0008] Thirdly, embodiments of this application provide a streaming media data multi-source download device, including: The address sequence acquisition unit is used to acquire the resource acquisition address sequence of the segmented files of the target multimedia data stream in response to a user's download request for the target multimedia data stream. The initial download unit is used to download the corresponding segmented file from the original content source corresponding to the download request based on the address sequence obtained from the resource; The check value generation unit is used to calculate the first check value of each of the fragment files and generate a check value sequence composed of the first check values ​​in the order of the resource acquisition address sequence; The query and comparison unit is used to query the central database according to the download request to obtain a reference verification value sequence associated with the download request; compare the verification value sequence with the reference verification value sequence; and when a mismatch occurs in the comparison result, determine the mapping position of each first verification value in the verification value sequence in the reference verification value sequence based on a preset offset tolerance range. The associated source determination unit is used to determine at least one associated content source associated with the download request based on the mapping location; The download acceleration unit is used to return to the user the address information of the original content source corresponding to the download request and the address information of the at least one associated content source, so that the user can download the segmented files of the target multimedia data stream from the original content source and the associated content source in an alternating manner.

[0009] Fourthly, embodiments of this application provide a streaming media data multi-source download device, including: The address acquisition unit is used to acquire the resource acquisition address sequence of the segmented files of the target multimedia data stream in response to a download request for the target multimedia data stream. The verification value calculation unit is used to download the segmented file starting from the original content source corresponding to the download request based on the resource acquisition address sequence, and to calculate the first verification value of the downloaded segmented file; The offset matching unit is used to query the central database according to the download request to obtain a reference check value sequence; compare the first check value of the downloaded segment file with the reference check value sequence; and when a mismatch occurs in the comparison result, determine the mapping position of the downloaded segment file in the reference check value sequence based on a preset offset tolerance range. The associated source determination unit is used to determine the address information of at least one associated content source associated with the reference check value sequence based on the mapping location; A multi-source download unit is used to schedule the original content source and the at least one associated content source to interleave the download of fragment files that have not yet been downloaded in the resource acquisition address sequence.

[0010] Fifthly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the streaming media data multi-source download method as described in the first aspect above.

[0011] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the streaming media data multi-source download method as described in the first aspect above.

[0012] In a seventh aspect, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the streaming media data multi-source download method as described in the first aspect above.

[0013] In this embodiment, in response to a user's download request for a target multimedia data stream, the resource acquisition address sequence of the target multimedia data stream's segmented files is first obtained. Based on the resource acquisition address sequence, the corresponding segmented files are downloaded from the original content source corresponding to the download request, ensuring the basic acquisition of core streaming media data. Then, the first checksum of each segmented file is calculated, and a checksum sequence is generated according to the order of the resource acquisition address sequence, establishing a unified, standardized, and strongly correlated segmented file checksum benchmark to provide accurate comparison basis for multi-source matching. Next, the central database is queried based on the download request to obtain a reference checksum sequence associated with the download request, and this checksum sequence is compared with the reference checksum sequence. When a mismatch occurs in the comparison result, the first checksum of each segmented file is determined based on a preset offset tolerance range. The mapping position of a checksum in the reference checksum sequence effectively adapts to real-world scenarios such as local changes in segment content and segment position offsets caused by ad insertion or replacement during streaming media distribution. This improves the scenario adaptability of streaming media data distribution and transmission, avoids negating the overall content relevance due to mismatches in individual segments, and thus increases the matching success rate of multi-source downloads. Finally, based on this mapping position, at least one associated content source is determined to be associated with the download request, and the address information of the original content source and at least one associated content source are returned to the user. This allows the user to download segment files of the target multimedia data stream from the original content source and associated content sources in an interleaved manner, fully leveraging the collaborative download capabilities of multi-source resources, reducing the download pressure of a single content source, shortening the overall download time of streaming media data, and achieving download acceleration. Attached Figure Description

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

[0015] Figure 1 This is a flowchart illustrating the implementation of the method for accelerating multi-source download of streaming media data on the server side, as provided in this application embodiment. Figure 2 This is a flowchart illustrating a specific implementation of the method for determining the mapping position of the first verification value in the multi-source streaming media data download method provided in this application embodiment; Figure 3 This is a flowchart illustrating a specific implementation of the method for downloading streaming media data from multiple sources provided in this application, specifically a method for verifying the first verification value of the subsequent sequence position. Figure 4 This is a flowchart illustrating a specific implementation of the method for removing associated content sources in the multi-source streaming media data download method provided in this application embodiment; Figure 5 This is a flowchart illustrating the implementation of the client-side multi-source streaming media data download method provided in this application embodiment; Figure 6 This is a structural block diagram of the streaming media data multi-source download device provided in the embodiments of this application; Figure 7 This is a structural block diagram of another streaming media data multi-source download device provided in the embodiments of this application; Figure 8 This is a schematic diagram of the terminal device provided in the embodiments of this application. Detailed Implementation

[0016] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0017] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0018] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0019] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0020] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0021] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0022] By way of example and not limitation, the streaming media data multi-source download method provided in this application is applicable to various types of terminal devices that need to perform streaming media data multi-source download. Specific terminal devices may include mobile phones, tablets, wearable devices, laptops, ultra-mobile personal computers (UMPCs), desktop computers, interactive large screens, and servers, etc. This application does not impose any restrictions on the specific type of terminal device.

[0023] Figure 1 This paper illustrates the implementation flow of a multi-source streaming media data download method provided in an embodiment of this application. The method is executed by an acceleration server, and the method flow includes steps S101 to S107. The specific implementation principle of each step is as follows: Step S101: In response to a user's download request for a target multimedia data stream, obtain the resource acquisition address sequence of the segmented files of the target multimedia data stream.

[0024] The target multimedia data stream is audio and video streaming media based on the HLS protocol, representing the streaming content the user expects to download, such as a TV series or a video program. In the HLS protocol, audio and video files are divided into multiple segments with independent playback durations. These segments are the smallest data units for streaming media transmission, download, and verification, and are typically stored in TS format. Each segment corresponds to a Uniform Resource Locator (URL) address, uniquely identifying its storage location on the network. The resource retrieval address sequence refers to the complete set of addresses formed by sequentially arranging the network access addresses of all segment files according to the playback and download order of the target multimedia data stream, possessing a fixed arrangement logic. In the HLS protocol, the resource retrieval address sequence can be obtained by parsing the M3u8 index file, which contains the URL addresses of each TS segment file and their playback order information.

[0025] The acceleration server listens for user-initiated streaming media download requests in real time. By using the identification information of the target multimedia data stream carried in the download request (such as the address information of the original content source), it obtains the index file pointed to by the address information. The index file includes the main playlist file and nested playlist files at all levels. The URL addresses of all segment files are parsed from the playlist file and arranged according to the playback order defined in the playlist file to obtain the resource acquisition address sequence.

[0026] In this embodiment, by accurately locking all the fragment resources and standard arrangement order of the target multimedia data stream, the execution benchmark for subsequent fragment download, verification calculation, and data comparison is unified, providing standardized and complete basic data support for subsequent full-process data processing.

[0027] Step S102: Download the corresponding fragment file from the original content source corresponding to the download request according to the resource acquisition address sequence.

[0028] The original content source refers to the content distribution server pointed to by the URL address carried in the user's download request. It is the initial data source that carries the complete fragmented resources of the target multimedia data stream.

[0029] The acceleration server first sends a download request to the original content source based on the URL address of each segment file in the resource acquisition address sequence, and then retrieves the corresponding segment files from the original content source sequentially or in parallel.

[0030] For example, when a user requests to download a TV series from a video platform, the acceleration server obtains the corresponding M3u8 index file for the TV series, extracts the network download addresses of all TS segment files within the file in batches, sorts all addresses according to the playback order defined in the M3u8 file, and generates a resource acquisition address sequence corresponding to the TV series streaming media: [https: / / cdn.com / seg1.ts, https: / / cdn.com / seg2.ts, https: / / cdn.com / seg3.ts,...]. Each address corresponds to a TS segment file, and the position of the address in the sequence corresponds to the playback order of the segment files. If the address information of the original content source corresponding to the user's download request is URL2, the acceleration server downloads all segment files from the content source corresponding to URL2, including seg1.ts, seg2.ts, seg3.ts, etc., according to the resource acquisition address sequence.

[0031] In this embodiment of the application, the baseline data of the target multimedia data stream is obtained from the original content source to ensure the basic acquisition of core streaming media data, which serves as the data baseline for subsequent multi-source matching and verification.

[0032] Step S103: Calculate the first check value of each of the fragment files, and generate a check value sequence composed of each first check value in the order of the resource acquisition address sequence.

[0033] The first checksum is the hash value obtained by performing a cryptographic hash function operation on a single fragment file. It can accurately identify the data content of a single fragment file and is used to determine whether the fragment data has been modified. In one feasible implementation, the cryptographic hash function uses the SHA1 algorithm, that is, the SHA1 hash value of each TS format fragment file is calculated separately and used as the first checksum of that fragment file.

[0034] A checksum sequence is a sequence formed by concatenating the first checksums of all the segmented files according to the order of the segmented files in the resource acquisition address sequence. In other words, it's the sequence of SHA1 hashes of each segmented file arranged sequentially according to the playback order, forming a complete data sequence. For example, if the target multimedia data stream contains N segmented files from the first to the Nth segmented file, corresponding to first checksums H1, H2, ..., HN respectively, then the checksum sequence formed by concatenating them in order is H1-H2-...-HN.

[0035] Specifically, the acceleration server independently calculates the first checksum for each downloaded file segment. Then, it concatenates all the first checksums according to the order of the file segments in the resource acquisition address sequence to generate a checksum sequence. The checksum sequence preserves the independent characteristics of each file segment, enabling subsequent comparisons to pinpoint the specific segment location, and also serves as the basis for calculating the global content fingerprint.

[0036] In one possible implementation, after generating the checksum sequence, the acceleration server performs another hash operation on the checksum sequence to generate a global content fingerprint. The global content fingerprint is a hash value obtained by performing a cryptographic hash function operation on the entire checksum sequence, used to uniquely identify the overall content characteristics of the target multimedia data stream. The global content fingerprint (TGcid) differs from the checksum sequence (TBcid); the global content fingerprint is a fixed-length hash value obtained by hashing the checksum sequence as a whole, used as a fast index key in the central database to improve query efficiency. Compared to the checksum sequence, the global content fingerprint has a fixed length, used for quickly locating and retrieving the corresponding checksum sequence in the central database.

[0037] For example, the acceleration server calculates the SHA1 hash value of seg1.ts to obtain hash1, calculates hash2 for seg2.ts to obtain hash3, and then concatenates hash1, hash2, and hash3 in sequence to form the checksum sequence hash1hash2hash3, denoted as TBcid. The acceleration server performs SHA1 hash calculation on the checksum sequence TBcid to obtain the global content fingerprint, denoted as TGcid. The acceleration server associates TGcid with the address information of the original content source and the checksum sequence and stores it in the central database for quick location during subsequent queries.

[0038] In this embodiment of the application, by establishing a unified, standardized, and strongly correlated fragmentation verification benchmark, the content of the target multimedia data stream can be uniquely identified and accurately compared through the verification value sequence, providing a quantifiable basis for comparison.

[0039] Step S104: Query the central database according to the download request to obtain the reference verification value sequence associated with the download request.

[0040] The central database is used to uniformly store the address information of the content sources corresponding to various streaming media resources in historical download tasks, along with their corresponding checksum sequences. The central database is a distributed storage system that supports high-concurrency read / write operations and persistent data storage.

[0041] In one possible implementation, the central database is deployed as an independent public service on a separate third-party server or cloud database service. Acceleration servers or clients can remotely access this central database via the network to perform operations such as querying and storage. The acceleration servers do not bear the computational and storage resource overhead required for database operation and can focus on download scheduling and acceleration services themselves. Multiple acceleration servers can share the same central database, facilitating horizontal system scalability.

[0042] In one possible implementation, the central database and the acceleration server are deployed on the same physical device or the same virtual machine instance, and the database service process and the acceleration server process run on the same host. The acceleration server can access the database without going through the network, resulting in low data read and write latency. There is no need to purchase a separate database server, making the deployment architecture relatively simple.

[0043] The reference checksum sequence is a sequence of checksums stored in the central database that are related to the content of the current download request. These checksums can be reported to the central database by existing users or acceleration servers after completing the download of a content source, serving as a comparison benchmark for subsequent matching of identical or similar content. The reference checksum sequence and the address information of candidate associated content sources are stored in association in the central database; that is, one reference checksum sequence corresponds to the address information of one or more previously reported content sources.

[0044] In one possible implementation, the acceleration server initiates a query request to the central database based on the identification information (e.g., the address information of the original content source) carried in the download request. If a record matching the identification information already exists in the central database, the checksum sequence stored in that record is returned to the acceleration server as a reference checksum sequence.

[0045] For example, the acceleration server queries the central database based on the URL2 requested by the user. The central database contains a check value sequence TBcid1 associated with URL1, which is the reference check value sequence.

[0046] In this embodiment of the application, historical download data is used to mine existing related content sources that are the same as or similar to the content of the current target multimedia data stream, so as to provide a comparison benchmark for subsequent multi-source matching and avoid repeatedly obtaining data from a single original content source.

[0047] In one possible implementation, if no reference checksum sequence corresponding to the identifier information of the download request is found in the central database, then after returning the address information of the original content source corresponding to the download request to the user, the generated checksum sequence is used as a new reference checksum sequence, associated with the identifier information corresponding to the download request, and stored in the central database. The identifier information corresponding to the download request is used to identify the target multimedia data stream corresponding to this download request.

[0048] Specifically, when the acceleration server queries the central database based on a download request, if no record matching the identifier information is found in the central database, it indicates that the target multimedia data stream is being requested for download for the first time, and there is no corresponding reference checksum sequence available for matching in the central database. At this point, the acceleration server downloads the corresponding segment files from the original content source based on the resource acquisition address sequence, calculates the first checksum of each segment file, and generates a checksum sequence. After returning the address information of the original content source to the user, the generated checksum sequence is used as a new reference checksum sequence, associated with the identifier information (the address information of the original content source) corresponding to the download request, and stored in the central database.

[0049] In one possible implementation, the acceleration server also performs a hash operation on the generated checksum sequence to obtain a global content fingerprint, and stores the global content fingerprint together with the address information of the original content source to improve subsequent query efficiency.

[0050] In one possible implementation, since the check value sequence contains the first check values ​​of all the fragmented files arranged in order, its data volume increases with the increase of the number of fragments. In order to reduce storage space occupation and improve query speed, the server can also compress the check value sequence before storage, or store it using the hash value of the check value sequence as the index key.

[0051] In this embodiment of the application, when the target multimedia data stream is requested to be downloaded for the first time, the verification value sequence generated by this download is stored in the central database, so that subsequent download requests for the same content can obtain the reference verification value sequence by querying, thereby realizing the dynamic expansion of the central database. At the same time, through the timely reporting mechanism after the first download, the integrity and timeliness of the content in the central database are ensured.

[0052] Step S105: Compare the check value sequence with the reference check value sequence. If a mismatch occurs in the comparison result, determine the mapping position of each first check value in the check value sequence in the reference check value sequence based on a preset offset tolerance range.

[0053] The preset offset tolerance range refers to the pre-defined offset interval used to find matching positions during the comparison process. The acceleration server compares the generated checksum sequence with the acquired reference checksum sequence bit by bit. Bit-by-bit comparison means comparing the first checksum of the first bit in the checksum sequence with the first checksum of the reference checksum sequence, the second bit with the second bit, and so on. The mapping position refers to the correspondence between the sequence positions in the checksum sequence and the sequence positions in the reference checksum sequence.

[0054] As one possible implementation of this application Figure 2 This paper illustrates a specific implementation flow of determining the mapping position of the first check value in the multi-source streaming media data download method provided in this application embodiment, which is described in detail below: A1: When the first check value at the first sequence position in the check value sequence does not match the check value at the first sequence position in the reference check value sequence, within the preset offset tolerance range, a check value identical to the first check value is searched in a preset order. The first sequence position refers to any sequence position in the check value sequence, which corresponds to a fragment file at the same sequence position in the resource acquisition address sequence.

[0055] When a mismatch is found between the first check value at a certain sequence position (i.e., the first sequence position) in the check value sequence and the check value at the same sequence position in the reference check value sequence, an offset lookup process is triggered. The preset order refers to the order in which the searches are performed within a preset offset tolerance range. In one possible implementation, the preset order starts with the first sequence position and searches sequentially in the following order: offset one position before the first position, offset one position after the first position, offset two positions before the first position, and offset two positions after the first position, until the entire preset offset tolerance range has been traversed. For example, if the preset offset tolerance range is three offset positions, the search order would be: first sequence position, offset position before the first sequence position, offset position after the first sequence position, two offset positions before the first sequence position, two offset positions after the first sequence position, three offset positions before the first sequence position, and three offset positions after the first sequence position.

[0056] A2: If a check value identical to the first check value is found within the preset offset tolerance range, then the sequence position of the identical check value in the reference check value sequence is determined as the mapping position corresponding to the first sequence position.

[0057] When the acceleration server finds a check value that matches the first check value at an offset position within a preset offset tolerance range, it determines that offset position as the mapping position of the first sequence position in the reference check value sequence. In one possible implementation, the preset offset tolerance range is set to three offset positions before and after the current position. The specific comparison process includes: when comparing the first check value of a sequence position in the check value sequence with the check value of the same sequence position in the reference check value sequence, if they are the same, it indicates that the fragment content at that position is consistent, no offset processing is needed, and the position is determined to be a successful match; if they are different, the acceleration server does not immediately determine that the two content sources are different content, but instead starts from the current position and searches within the preset offset tolerance range in a preset order before and after that position (e.g., first searching the adjacent previous position, then the adjacent next position, then the two previous positions, then the two next positions, and so on) for a check value that matches the first check value. If a matching check value is found at an offset position within the preset offset tolerance range, that offset position is determined as the mapping position corresponding to that sequence position.

[0058] For example, in the reference checksum sequence, positions 0, 1, 2, 3, and 4 correspond to checksums A, B, C, D, and E, respectively. The checksum at position 0 in this checksum sequence is B, which does not match the checksum at position 0 in the reference checksum sequence. Therefore, a search is performed within the preset offset tolerance range. If the checksum at position 1 in the reference checksum sequence is found to be B, then the mapping position corresponding to position 0 is determined to be position 1. If no checksum matching the first checksum is found within the preset offset tolerance range, then it is determined that the corresponding position in this checksum sequence has no corresponding mapping position in the reference checksum sequence. The mapping position represents the correct actual position of the currently downloaded file segment in the reference checksum sequence.

[0059] In this embodiment, when the first check value at a certain sequence position in the check value sequence does not match the check value at the corresponding position in the reference check value sequence, the matching failure is not directly determined at that position. Instead, the same check value is searched for in a preset order within a preset offset tolerance range, and when it is found, the sequence position is determined as the mapping position. This achieves accurate matching when the fragment position is offset, so that even if the position of the fragment content in the sequence changes, the correct correspondence can still be established, providing a basis for improving the success rate of multi-source matching.

[0060] As one possible implementation of this application Figure 3 This application provides a specific implementation flow for verifying the first check value of the subsequent sequence position in the multi-source streaming media data download method, as detailed below: B1: Establish an offset mapping relationship between the first sequence position and the mapped position. The offset mapping relationship is a fixed position correspondence rule generated based on the index difference between the first sequence position and the mapped position, used to characterize the overall offset pattern of the current streaming media segment.

[0061] In one possible implementation, the acceleration server maintains two record arrays. The first array records the mapping positions in the reference check value sequence corresponding to each sequence position in the check value sequence. The second array records the sequence positions in the check value sequence corresponding to each sequence position in the reference check value sequence. When a mapping position is determined for a first sequence position, the first sequence position is pointed to the mapping position in the first array, and simultaneously, the mapping position is pointed to the first sequence position in the second array, thus establishing a bidirectional offset mapping relationship. This offset mapping relationship includes the offset between the first sequence position and the mapping position, which is the difference between the sequence number of the mapping position and the sequence number of the first sequence position. For example, if the mapping position corresponding to sequence position 0 in the check value sequence is sequence position 1 in the reference check value sequence, then the offset mapping relationship records the correspondence between sequence position 0 and sequence position 1, and records the offset as positive 1.

[0062] B2: Based on the offset mapping relationship, verify the first check value at the subsequent sequence position in the check value sequence. The subsequent sequence position refers to the sequence position in the check value sequence that follows the first sequence position.

[0063] The acceleration server obtains the offset between the first sequence position and the mapped position from the established offset mapping relationship. This offset is used as the reference offset and applied to the check value comparison of subsequent sequence positions. Specifically, the target position obtained by adding the reference offset to the subsequent sequence position is determined as the mapped position corresponding to that subsequent sequence position, and the check value of the mapped position is verified to be consistent with the first check value of the subsequent sequence position.

[0064] For example, if the mapping position corresponding to sequence position 0 in the check value sequence is sequence position 1 in the reference check value sequence, then the baseline offset is positive 1. For the first check value at sequence position 1 in the check value sequence, the acceleration server directly compares and verifies it with the check value at sequence position 2 in the reference check value sequence, and so on. If the verification passes, the offset mapping relationship is confirmed to continue; if the verification fails, a new offset lookup process is triggered to redetermine the mapping position.

[0065] In this embodiment, the acceleration server records the offset correspondence and offset amount found during the matching process in a structured manner, and uses the offset amount recorded in the established offset mapping relationship to quickly verify the position of the subsequent sequence. It does not need to perform a complete offset lookup for each subsequent sequence position, thereby improving the verification efficiency.

[0066] In one possible implementation, during the download of the segmented file from the original content source, if the calculated first check value does not match the check value at the corresponding sequence position in the reference check value sequence within the preset offset tolerance range, then the check value at the corresponding sequence position in the check value sequence is updated to the calculated first check value.

[0067] Step S106: Based on the mapping location, determine at least one associated content source related to the download request.

[0068] Related content sources are other content sources whose core content is the same as the original content source, but whose segment sequence may have local offsets. They can be used as backup legitimate data sources for multi-source downloads.

[0069] When the acceleration server successfully confirms the mapping position of each first checksum in the reference checksum sequence through offset matching, it indicates that the original content source corresponding to the current download request is consistent with the content source associated with the reference checksum sequence in terms of core content, with only local differences caused by ad insertion or replacement. At this time, the acceleration server determines the candidate associated content source stored in the reference checksum sequence as the associated content source associated with the download request.

[0070] For example, the reference check value sequence TBcid1 is associated with URL1. The acceleration server establishes the mapping position of each first check value in the check value sequence TBcid2 in TBcid1 through offset matching, and then determines that URL1 is the associated content source associated with the current download request.

[0071] In this embodiment, the determination of associated content sources depends on the success of offset matching, rather than solely on the accurate matching of the global content fingerprint. This enables the effective discovery of available associated download sources even when the global content fingerprint differs due to local variations, providing a list of available content source addresses for subsequent multi-source parallel downloads.

[0072] Step S107: Return the address information of the original content source corresponding to the download request and the address information of the at least one associated content source to the user, so that the user can download the segmented files of the target multimedia data stream from the original content source and the associated content source in an alternating manner.

[0073] After identifying the associated content sources, the acceleration server returns both the address information of the original content source and the address information of the associated content sources to the user. Upon receiving the address information, the user can simultaneously initiate file chunk download requests to both the original and associated content sources, obtaining different file chunks from multiple sources in an interleaved manner. Interleaved downloading means distributing the file chunks to be downloaded to different content sources, with each source handling a portion of the file's transmission, thus achieving multi-source parallel acceleration. Users do not need to wait for the acceleration server to relay data; instead, they directly obtain file chunks from each content source, reducing data transmission latency in intermediate stages.

[0074] In this embodiment, by returning the address information of multiple content sources to the user, the user can use the network resources of multiple content sources to collaboratively complete the download of segmented files, giving full play to the collaborative download capability of multi-source resources, reducing the download pressure of a single content source, and shortening the overall download time of streaming media data.

[0075] As one possible implementation of this application Figure 4 This paper illustrates a specific implementation process for removing associated content sources in the multi-source streaming media data download method provided in this application embodiment, detailed below: C1: During the process of the user downloading the fragmented file from the associated content source, receive error count information reported by the user. The error count information is used to record the number of times the fragmented file provided by the associated content source is determined to be invalid.

[0076] When a user downloads a fragmented file from an associated content source, the checksum of that fragment is calculated and compared with the checksum at the corresponding mapped position in the reference checksum sequence. If they do not match, the fragmented file is determined to be invalid data, the user discards the data, and an error count is generated and reported to the acceleration server. This error count includes the identifier of the associated content source and a record of the error.

[0077] In one possible implementation, the user maintains an error count for each associated content source. Whenever a checksum comparison of a fragment file obtained from that associated content source fails, the user increments the error count for that content source and reports it. Each report corresponds to one count.

[0078] C2: When the error count exceeds a preset threshold, the associated content source is removed from the resource pool for parallel download. The preset threshold is a critical value used to determine whether the associated content source has failed; for example, the removal operation is triggered when the error count reaches three or five. This preset threshold can be customized according to the actual application scenario.

[0079] When the cumulative error count of a certain associated content source exceeds a preset threshold, it indicates that the data of that content source is seriously inconsistent with the reference checksum sequence. Continuing to use this content source will not only fail to accelerate the process but may also introduce erroneous data. At this point, the acceleration server determines that the associated content source is insufficient to provide valid data and removes it from the parallel download resource pool, no longer returning its address information to the user. For example, taking a preset threshold of three consecutive checksum failures or ten cumulative checksum failures as an example, if the error count of a certain associated content source reaches three consecutive times or ten cumulative checksum failures, the acceleration server will delete that associated content source from the resource pool.

[0080] In one possible implementation, after receiving the error count information reported by the user, the acceleration server updates the central database on behalf of the user, or the acceleration server maintains the error count locally.

[0081] In this embodiment, by monitoring the data quality of each associated content source in real time, content sources with abnormal data quality are promptly removed during parallel downloading, thus preventing low-quality content sources from continuously occupying download resources and affecting the overall data accuracy, and ensuring the stability and data integrity of multi-source parallel downloading.

[0082] As can be seen from the above, in this embodiment, in response to a user's download request for a target multimedia data stream, the resource acquisition address sequence of the segmented files of the target multimedia data stream is first obtained. Based on the resource acquisition address sequence, the corresponding segmented files are downloaded from the original content source corresponding to the download request, ensuring the basic acquisition of core streaming media data. Then, the first checksum of each segmented file is calculated, and a checksum sequence is generated according to the order of the resource acquisition address sequence, establishing a unified, standardized, and strongly correlated segmented checksum benchmark to provide accurate comparison basis for multi-source matching. Next, the central database is queried based on the download request to obtain a reference checksum sequence associated with the download request, and this checksum sequence is compared with the reference checksum sequence. When a mismatch occurs in the comparison result, a predetermined offset tolerance range is used to determine the correct method. The system determines the mapping position of each first check value in the reference check value sequence, effectively adapting to actual scenarios such as local changes in segment content and segment position offsets caused by advertisement insertion or replacement during streaming media distribution. This improves the scenario adaptability of streaming media data distribution and transmission, avoids negating the overall content relevance due to mismatch of individual segments, and thus improves the matching success rate of multi-source downloads. Finally, based on the mapping position, at least one associated content source is determined to be associated with the download request, and the address information of the original content source and the address information of at least one associated content source are returned to the user. This allows the user to download segment files of the target multimedia data stream from the original content source and associated content sources in an alternating manner, giving full play to the collaborative download capability of multi-source resources, reducing the download pressure of a single content source, shortening the overall download time of streaming media data, and achieving download acceleration.

[0083] Figure 5 The implementation flow of the multi-source streaming media data download method provided in this application embodiment is illustrated. The method is executed by a client, and the method flow includes steps S501 to S506. The specific implementation principle of each step is as follows: Step S501: In response to a download request for the target multimedia data stream, obtain the resource acquisition address sequence of the segmented files of the target multimedia data stream.

[0084] The specific implementation principle of step S501 is the same as that of step S101. You can directly refer to the relevant content of step S101, and it will not be repeated here.

[0085] Step S502: Based on the resource acquisition address sequence, download the segmented file starting from the original content source corresponding to the download request, and calculate the first check value of the downloaded segmented file.

[0086] The first verification value is the hash value obtained by performing a cryptographic hash function operation on a single file fragment. In this embodiment, the file fragments are downloaded starting from the original content source, and the specific content of calculating the first verification value of the downloaded file fragments is as described in steps S102 and S103, and will not be repeated here.

[0087] In this embodiment, the client does not wait for all the file segments to be downloaded before calculating the first checksum. Instead, it calculates the SHA1 hash value of each file segment immediately after it is downloaded, and uses it as the first checksum of that file segment.

[0088] In one possible implementation, while downloading the segmented files from the original content source, the client also executes subsequent steps S503 to S505 in parallel. The client obtains the baseline data of the target multimedia data stream from the original content source to ensure the basic acquisition of the core streaming media data. At the same time, by calculating the first checksum in real time, it provides a data basis for subsequent comparison with the reference checksum sequence, eliminating the need to wait for all segmented files to be downloaded before matching, thereby shortening the overall processing time.

[0089] Step S503: Query the central database according to the download request to obtain a reference verification value sequence.

[0090] The client queries the central database based on the download request to obtain the reference verification value sequence. The query principle is the same as step S104, and we will directly refer to the relevant content of step S104. It will not be repeated here.

[0091] It is worth noting that in this embodiment, the client query operation can be executed in parallel with the segmented file download operation in step S502, without blocking each other. Historical download data is used to mine existing related content sources that are identical or similar to the current target multimedia data stream, providing a benchmark for subsequent comparison and matching, and avoiding delays in the download process due to waiting for query results.

[0092] In one possible implementation, if no reference check value sequence corresponding to the identification information of the download request is found in the central database, the generated check value sequence is associated with the identification information and recorded after all file segments are downloaded, and then reported to the central database.

[0093] In one feasible implementation, the identification information corresponding to the download request is the URL address of the original content source. When the client queries the central database based on the download request, if no record matching the URL address is found in the central database, it indicates that the target multimedia data stream is being requested for download for the first time, and there is no corresponding reference checksum sequence available for matching in the central database. After all file segments have been downloaded, the client concatenates the first checksums of all file segments into a complete checksum sequence according to the order of the resource acquisition address sequence, associates this checksum sequence with the URL address corresponding to the download request to form an association record, and reports this association record to the central database for storage.

[0094] In one possible implementation, the client also performs a hash operation on the verification value sequence to obtain a global content fingerprint, and stores the global content fingerprint together with the address information of the original content source to improve subsequent query efficiency.

[0095] In this embodiment of the application, when the target multimedia data stream is requested to be downloaded for the first time, the client reports the verification value sequence generated by this download to the central database for storage, so that subsequent download requests for the same content can obtain the reference verification value sequence by querying, thereby realizing the dynamic expansion of the central database information base. At the same time, the timely reporting mechanism after the first download can ensure the integrity and timeliness of the content in the central database.

[0096] Step S504: Compare the first check value of the downloaded fragment file with the reference check value sequence, and when a mismatch occurs in the comparison result, determine the mapping position of the downloaded fragment file in the reference check value sequence based on a preset offset tolerance range.

[0097] After downloading each file segment and obtaining its first checksum, the client immediately compares this first checksum with the checksum at the corresponding position in the obtained reference checksum sequence. In one possible implementation, since file segment downloading and database querying are performed in parallel, the following scenarios exist: if the reference checksum sequence has not yet been successfully obtained, the client temporarily caches the first checksum of the downloaded file segment and performs the comparison after the reference checksum sequence is successfully obtained; if the reference checksum sequence has been successfully obtained, the client performs the comparison immediately. Based on the same offset matching principle, the specific steps of the comparison and correction matching are detailed in step S105 and will not be repeated here.

[0098] In this embodiment of the application, when the position of the segmented content in the sequence is shifted due to the insertion or replacement of advertisements during the distribution of streaming media data, a correct correspondence is established in the local interval by setting a preset offset tolerance range. This allows the local changes in the segmented sequence caused by the insertion or replacement of advertisements to be identified and tolerated, avoiding the overall denial of the correlation between the two content sources due to local mismatches. This improves the success rate of multi-source matching and enhances the scenario adaptability of streaming media data distribution and transmission.

[0099] In one possible implementation, during the download of a fragment file from the associated content source, if the calculated first check value does not match the check value at the corresponding sequence position in the reference check value sequence within the preset offset tolerance range, the downloaded fragment file is discarded, and the error count information of the associated content source is reported to the central database.

[0100] Specifically, the client obtains the sequence position of the file segment in the resource acquisition address sequence. First, it compares the first checksum with the checksum at the same sequence position in the reference checksum sequence. If they do not match, it searches for a checksum matching the first checksum within a preset offset tolerance range. If no checksum matching the first checksum is found within the preset offset tolerance range—meaning the first checksum of the file segment is inconsistent with all checksums at that sequence position in the reference checksum sequence and within the preset offset tolerance range before and after it—then the file segment is determined to be invalid data. The client discards the downloaded file segment and does not include it in the final multimedia data stream assembly. Simultaneously, the client generates an error count, which includes the identifier of the associated content source and a record of the error. The client reports this error count to the central database. The central database accumulates the error count for the associated content source based on the received error count.

[0101] For example, a user downloads a fragmented file from URL1 (the associated content source), calculates its first checksum, and compares it with a reference checksum sequence. If no matching checksum is found within a preset offset tolerance range, the user reports this error event to the central database. Upon receiving the report, the central database increments the error count corresponding to URL1 by one.

[0102] In one possible implementation, when the central database and the acceleration server are deployed on the same physical device or the same virtual machine instance, the client reports the error count information of the associated content source to the acceleration server, which maintains the error count locally and updates the central database on its behalf.

[0103] In one possible implementation, the error count information is accumulated according to the number of consecutive verification failures, or according to the total number of accumulated verification failures. The specific method is configured according to the actual application scenario, and this implementation does not impose any restrictions.

[0104] In one possible implementation, during the download of the segmented file from the original content source, if the calculated first check value does not match the check value at the corresponding sequence position in the reference check value sequence within the preset offset tolerance range, then the check value at the corresponding sequence position in the check value sequence is updated to the calculated first check value.

[0105] In this embodiment, during the download of segmented files from the original content source, the client calculates a first checksum for each segmented file after downloading it, and compares this first checksum with a reference checksum sequence. If the comparison fails (i.e., they do not match), a checksum matching the first checksum is searched within a preset offset tolerance range. If no checksum matching the first checksum is found within the preset offset tolerance range, meaning the first checksum of the segmented file is inconsistent with all checksums within the preset offset tolerance range before and after the corresponding position in the reference checksum sequence, it is determined that the segmented content at that position in the original content source has undergone substantial changes relative to the reference checksum sequence stored in the central database. At this point, the client updates the checksum at the corresponding position in the checksum sequence with the currently calculated first checksum to reflect the latest content status of the original content source.

[0106] In one possible implementation, the client will also re-report the updated complete checksum sequence to the central database after all fragment files have been downloaded, so that the reference checksum sequence in the central database remains synchronized with the actual content of the original content source. For example, if the original content source replaces the advertisement fragment at sequence position 5 in the resource acquisition address sequence after a certain point in time, causing the first checksum of that fragment file to change from the original value H5 to a new value H5', and this new value H5' cannot be matched within the preset offset tolerance range, the client will update the checksum at sequence position 5 in the checksum sequence from H5 to H5'.

[0107] In this embodiment of the application, when the actual content of the original content source undergoes a legitimate change, the check value at the corresponding sequence position in the check value sequence is updated to the latest value in a timely manner, so that subsequent check comparisons can be performed based on the updated check value sequence, avoiding the failure of all subsequent comparisons due to normal content updates of the original content source, thereby maintaining the effectiveness and adaptability of the multi-source matching mechanism.

[0108] Step S505: Based on the mapping location, determine the address information of at least one associated content source associated with the reference check value sequence.

[0109] Associated content sources are other content sources whose core content is the same as the original content source, but whose fragment sequence may have local offsets. They can be used as backup legitimate data sources for multi-source downloads. The specific steps of this step S505 are described in step S106, and will not be repeated here.

[0110] In one possible implementation, the central database stores a reference check value sequence and a list of multiple content source addresses corresponding to it. The client queries this list based on the identification information of the reference check value sequence to obtain the address information of the candidate associated content source stored with the reference check value sequence.

[0111] In this embodiment of the application, existing content sources with the same or similar content as the current download request are mined from the central database based on the mapping location, providing a list of available content source addresses for subsequent multi-source parallel downloads.

[0112] Step S506: Schedule the original content source and the at least one associated content source to interleave and download the fragment files that have not yet been downloaded in the resource acquisition address sequence.

[0113] After obtaining the address information of at least one associated content source, the client forms a multi-source download resource pool consisting of the original content source and all associated content sources. The client maintains a queue of fragment files that have not yet been downloaded in the resource acquisition address sequence, and allocates download tasks to each content source according to the scheduling strategy, so that each content source downloads different fragment files in parallel and interleaved.

[0114] In one possible implementation, the scheduling strategy includes: configuring different numbers of concurrent connections based on the network performance of each content source, for example, configuring three concurrent connections for the original content source and one concurrent connection for each associated content source; allocating a segment file to be downloaded to each idle connection of each content source; and after any connection completes the download of the current segment file, immediately obtaining the next unallocated segment file from the queue of segments to be downloaded to continue downloading.

[0115] For example, the original content source is configured with three concurrent connections to download the first, second, and third fragment files in the resource acquisition address sequence, respectively. The first associated content source is configured with one concurrent connection to download the fourth fragment file, and the second associated content source is configured with one concurrent connection to download the fifth fragment file, forming an interleaved parallel download pattern. After any connection completes the download of the current fragment file, it immediately obtains the next unallocated fragment file from the queue of fragment files to be downloaded and continues to download until all fragment files are downloaded.

[0116] In one possible implementation, when all fragment files in the resource acquisition address sequence have been allocated to various content sources and there are idle connections, the client allocates the idle connection to the allocated but not yet completed fragment files, allowing multiple content sources to download the same fragment file simultaneously to speed up the process.

[0117] In one possible implementation, when there is a need for real-time playback, the client marks the segment file corresponding to the playback position as a priority segment and schedules multiple content sources to download the priority segment simultaneously.

[0118] In this embodiment, the download of segmented files is completed by scheduling the original content source and related content sources to work together, which fully leverages the collaborative download capabilities of multiple sources, reduces the download pressure of a single content source, and shortens the overall download time of streaming media data.

[0119] As can be seen from the above, in this embodiment, in response to a download request for a target multimedia data stream, the resource acquisition address sequence of the target multimedia data stream's segmented files is first obtained. Based on the resource acquisition address sequence, the segmented files are downloaded starting from the original content source corresponding to the download request. The first checksum of the downloaded segmented files is calculated, enabling parallel processing of download and verification. The subsequent matching process can be started without waiting for all segmented files to be downloaded. Then, a reference checksum sequence is obtained from the central database based on the download request. The first checksum of the downloaded segmented files is compared with this reference checksum sequence. If a mismatch occurs in the comparison result, the downloaded segmented files are determined to be within the reference checksum sequence based on a preset offset tolerance range. The mapping position in the verification value sequence effectively adapts to real-world scenarios such as local changes in segment content and segment position offsets caused by ad insertion or replacement during streaming media distribution. This improves the scenario adaptability of streaming media data distribution and transmission, avoids negating the overall content relevance due to mismatches in individual segments, and thus increases the matching success rate of multi-source downloads. Finally, based on this mapping position, the address information of at least one associated content source associated with the reference verification value sequence is determined, and the original content source and associated content source are scheduled to interleave download resources to obtain segment files that have not yet been downloaded in the address sequence. This fully leverages the collaborative download capabilities of multi-source resources, reduces the download pressure of a single content source, shortens the overall download time of streaming media data, and achieves download acceleration.

[0120] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0121] Corresponding to the multi-source streaming media data download method described in the above embodiments, Figure 6 A structural block diagram of a streaming media data multi-source download device provided in an embodiment of this application is shown. This streaming media data multi-source download device can be applied to an acceleration server. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0122] Reference Figure 6 The streaming media data multi-source download device includes: an address sequence acquisition unit 61, an initial download unit 62, a checksum generation unit 63, a query and comparison unit 64, an associated source determination unit 65, and a download acceleration unit 66, wherein: Address sequence acquisition unit 61 is used to acquire the resource acquisition address sequence of the segmented files of the target multimedia data stream in response to a user's download request for the target multimedia data stream. The initial download unit 62 is used to download the corresponding segmented file from the original content source corresponding to the download request according to the resource acquisition address sequence; The verification value generation unit 63 is used to calculate the first verification value of each of the fragment files and generate a verification value sequence composed of the first verification values ​​in the order of the resource acquisition address sequence. The query comparison unit 64 is used to query the central database according to the download request to obtain a reference verification value sequence associated with the download request; compare the verification value sequence with the reference verification value sequence; and when a mismatch occurs in the comparison result, determine the mapping position of each first verification value in the verification value sequence in the reference verification value sequence based on a preset offset tolerance range. The associated source determination unit 65 is used to determine at least one associated content source associated with the download request based on the mapping location; The download acceleration unit 66 is used to return to the user the address information of the original content source corresponding to the download request and the address information of the at least one associated content source, so that the user can download the segmented files of the target multimedia data stream from the original content source and the associated content source in an alternating manner.

[0123] As one possible implementation of this application, the streaming media data multi-source download device further includes an associated storage unit, used for: If no reference check value sequence corresponding to the identifier information of the download request is found in the central database, after returning the address information of the original content source corresponding to the download request to the user, the generated check value sequence is used as a new reference check value sequence, associated with the identifier information corresponding to the download request, and stored in the central database.

[0124] As one possible implementation of this application, the query comparison unit 64 is specifically used for: When the first check value at the first sequence position in the check value sequence does not match the check value at the first sequence position in the reference check value sequence, within the preset offset tolerance range, a check value that is the same as the first check value is searched in a preset order. If a check value identical to the first check value is found within the preset offset tolerance range, the sequence position of the identical check value in the reference check value sequence is determined as the mapping position corresponding to the first sequence position.

[0125] As one possible implementation of this application, the query comparison unit 64 is further configured to: Establish an offset mapping relationship between the first sequence position and the mapped position; According to the offset mapping relationship, the first check value at the subsequent sequence position in the check value sequence is checked.

[0126] As one possible implementation of this application, the streaming media data multi-source download device further includes a resource removal unit, used for: During the process of the user downloading the fragmented file from the associated content source, the error count information reported by the user is received; When the error count exceeds a preset threshold, the associated content source is removed from the resource pool for parallel download.

[0127] Corresponding to the multi-source streaming media data download method described in the above embodiments, Figure 7 A structural block diagram of a streaming media data multi-source download device provided in an embodiment of this application is shown. This streaming media data multi-source download device can be applied to a client. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0128] Reference Figure 7 The streaming media data multi-source download device includes: an address acquisition unit 71, a checksum calculation unit 72, an offset matching unit 73, an associated source determination unit 74, and a multi-source download unit 75, wherein: Address acquisition unit 71 is used to acquire the resource acquisition address sequence of the segmented files of the target multimedia data stream in response to a download request for the target multimedia data stream. The verification value calculation unit 72 is used to download the segmented file starting from the original content source corresponding to the download request according to the resource acquisition address sequence, and calculate the first verification value of the downloaded segmented file; Offset matching unit 73 is used to query the central database according to the download request to obtain a reference check value sequence; compare the first check value of the downloaded segment file with the reference check value sequence; and when a mismatch occurs in the comparison result, determine the mapping position of the downloaded segment file in the reference check value sequence based on a preset offset tolerance range. The associated source determination unit 74 is used to determine the address information of at least one associated content source associated with the reference check value sequence based on the mapping position; The multi-source download unit 75 is used to schedule the original content source and the at least one associated content source to interleave the download of the fragment files that have not yet been downloaded in the resource acquisition address sequence.

[0129] As one possible implementation of this application, the streaming media data multi-source download device further includes: The associated reporting unit is used to, if no reference check value sequence associated with the identification information corresponding to the download request is found in the central database, record the generated check value sequence with the identification information after all file segments have been downloaded, and report it to the central database.

[0130] As one possible implementation of this application, the offset matching unit 73 is further configured to: During the process of downloading a fragmented file from the associated content source, if the calculated first check value does not match the check value at the corresponding sequence position in the reference check value sequence within the preset offset tolerance range, the downloaded fragmented file is discarded, and the error count information of the associated content source is reported to the central database.

[0131] As one possible implementation of this application, the offset matching unit 73 is further configured to: During the download of the fragmented file from the original content source, if the calculated first check value does not match the check value at the corresponding sequence position in the reference check value sequence within the preset offset tolerance range, then the check value at the corresponding sequence position in the check value sequence is updated to the calculated first check value.

[0132] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0133] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements... Figures 1 to 5 This represents the steps of any method for downloading streaming media data from multiple sources.

[0134] This application embodiment also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements... Figures 1 to 5 This represents the steps of any method for downloading streaming media data from multiple sources.

[0135] This application also provides a computer program product that, when run on a terminal device, causes the terminal device to execute the implementation of... Figures 1 to 5 This represents the steps of any method for downloading streaming media data from multiple sources.

[0136] Figure 8 This is a schematic diagram of a terminal device provided in an embodiment of this application. For example... Figure 8 As shown, the terminal device 8 in this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, it implements the steps in the various embodiments of the multi-source streaming media data download method described above, for example... Figure 1Steps S101 to S107 shown, or, Figure 5 Steps S501 to S506 are shown. Alternatively, when the processor 80 executes the computer program 82, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 6 Units 61 to 66 shown Figure 7 The functions of units 71 to 75 shown.

[0137] For example, the computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete this application. The one or more modules / units may be a series of computer-readable instruction segments capable of performing a specific function, which describe the execution process of the computer program 82 in the terminal device 8.

[0138] The terminal device 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will understand that... Figure 8 This is merely an example of terminal device 8 and does not constitute a limitation on terminal device 8. It may include more or fewer components than shown, or combine certain components, or different components. For example, terminal device 8 may also include input / output devices, network access devices, buses, etc.

[0139] The processor 80 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0140] The memory 81 can be an internal storage unit of the terminal device 8, such as a hard disk or memory of the terminal device 8. The memory 81 can also be an external storage device of the terminal device 8, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal device 8. Furthermore, the memory 81 can include both internal and external storage units of the terminal device 8. The memory 81 is used to store the computer program and other programs and data required by the terminal device. The memory 81 can also be used to temporarily store data that has been output or will be output.

[0141] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0142] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0143] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0144] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0145] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for downloading streaming media data from multiple sources, characterized in that, include: In response to a user's download request for a target multimedia data stream, obtain the resource acquisition address sequence of the segmented files of the target multimedia data stream; Based on the resource acquisition address sequence, download the corresponding fragment file from the original content source corresponding to the download request; Calculate the first check value for each of the fragment files, and generate a check value sequence composed of the first check values ​​in the order of the resource acquisition address sequence; The central database is queried based on the download request to obtain a sequence of reference verification values ​​associated with the download request; The verification value sequence is compared with the reference verification value sequence. When a mismatch occurs in the comparison result, the mapping position of each first verification value in the verification value sequence in the reference verification value sequence is determined based on a preset offset tolerance range. Based on the mapping location, at least one associated content source is determined that is associated with the download request; The address information of the original content source corresponding to the download request and the address information of the at least one associated content source are returned to the user so that the user can download the segmented files of the target multimedia data stream from the original content source and the associated content source in an alternating manner.

2. The method according to claim 1, characterized in that, The method further includes: If no reference check value sequence corresponding to the identifier information of the download request is found in the central database, after returning the address information of the original content source corresponding to the download request to the user, the generated check value sequence is used as a new reference check value sequence, associated with the identifier information corresponding to the download request, and stored in the central database.

3. The method according to claim 1, characterized in that, The step of determining the mapping position of each first check value in the check value sequence within the reference check value sequence based on a preset offset tolerance range includes: When the first check value at the first sequence position in the check value sequence does not match the check value at the first sequence position in the reference check value sequence, within the preset offset tolerance range, a check value that is the same as the first check value is searched in a preset order. If a check value identical to the first check value is found within the preset offset tolerance range, the sequence position of the identical check value in the reference check value sequence is determined as the mapping position corresponding to the first sequence position.

4. The method according to claim 3, characterized in that, The method further includes: Establish an offset mapping relationship between the first sequence position and the mapped position; According to the offset mapping relationship, the first check value at the subsequent sequence position in the check value sequence is checked.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: During the process of the user downloading the fragmented file from the associated content source, the error count information reported by the user is received; When the error count exceeds a preset threshold, the associated content source is removed from the resource pool for parallel download.

6. A method for downloading streaming media data from multiple sources, characterized in that, include: In response to a download request for a target multimedia data stream, obtain the resource acquisition address sequence of the segmented files of the target multimedia data stream; Based on the resource acquisition address sequence, download the segmented file starting from the original content source corresponding to the download request, and calculate the first checksum of the downloaded segmented file; Query the central database based on the download request to obtain a reference verification value sequence; The first check value of the downloaded fragment file is compared with the reference check value sequence. If a mismatch occurs in the comparison result, the mapping position of the downloaded fragment file in the reference check value sequence is determined based on a preset offset tolerance range. Based on the mapping location, determine the address information of at least one associated content source associated with the reference check value sequence; The original content source and the at least one associated content source are scheduled to download the fragmented files in the resource acquisition address sequence that have not yet been downloaded in an interleaved manner.

7. The method according to claim 6, characterized in that, The method further includes: If no reference check value sequence corresponding to the identification information of the download request is found in the central database, the generated check value sequence will be associated with the identification information and recorded after all file segments have been downloaded, and then reported to the central database.

8. The method according to any one of claims 6 or 7, characterized in that, The method further includes: During the process of downloading a fragmented file from the associated content source, if the calculated first check value does not match the check value at the corresponding sequence position in the reference check value sequence within the preset offset tolerance range, the downloaded fragmented file is discarded, and the error count information of the associated content source is reported to the central database.

9. The method according to any one of claims 6 or 7, characterized in that, The method further includes: During the download of the fragmented file from the original content source, if the calculated first check value does not match the check value at the corresponding sequence position in the reference check value sequence within the preset offset tolerance range, then the check value at the corresponding sequence position in the check value sequence is updated to the calculated first check value.

10. A streaming media data multi-source download device, characterized in that, include: The address sequence acquisition unit is used to acquire the resource acquisition address sequence of the segmented files of the target multimedia data stream in response to a user's download request for the target multimedia data stream. The initial download unit is used to download the corresponding segmented file from the original content source corresponding to the download request based on the address sequence obtained from the resource; The check value generation unit is used to calculate the first check value of each of the fragment files and generate a check value sequence composed of the first check values ​​in the order of the resource acquisition address sequence; The query and comparison unit is used to query the central database based on the download request to obtain a reference verification value sequence associated with the download request; The verification value sequence is compared with the reference verification value sequence. When a mismatch occurs in the comparison result, the mapping position of each first verification value in the verification value sequence in the reference verification value sequence is determined based on a preset offset tolerance range. The associated source determination unit is used to determine at least one associated content source associated with the download request based on the mapping location; The download acceleration unit is used to return to the user the address information of the original content source corresponding to the download request and the address information of the at least one associated content source, so that the user can download the segmented files of the target multimedia data stream from the original content source and the associated content source in an alternating manner.

11. A streaming media data multi-source download device, characterized in that, include: The address acquisition unit is used to acquire the resource acquisition address sequence of the segmented files of the target multimedia data stream in response to a download request for the target multimedia data stream. The verification value calculation unit is used to download the segmented file starting from the original content source corresponding to the download request based on the resource acquisition address sequence, and to calculate the first verification value of the downloaded segmented file; The offset matching unit is used to query the central database according to the download request to obtain a reference check value sequence; The first check value of the downloaded fragment file is compared with the reference check value sequence. If a mismatch occurs in the comparison result, the mapping position of the downloaded fragment file in the reference check value sequence is determined based on a preset offset tolerance range. The associated source determination unit is used to determine the address information of at least one associated content source associated with the reference check value sequence based on the mapping location. A multi-source download unit is used to schedule the original content source and the at least one associated content source to interleave the download of fragment files that have not yet been downloaded in the resource acquisition address sequence.

12. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the streaming media data multi-source download method as described in any one of claims 1 to 9.

13. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the streaming media data multi-source download method as described in any one of claims 1 to 9.