Live broadcast synchronization method and device, electronic equipment and storage medium

By pre-constructing object mapping relationships and corresponding relationships with live data streams, the problem of live content synchronization delay was solved, achieving efficient and stable live content synchronization.

CN120881301APending Publication Date: 2025-10-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511120892.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-07-15
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

During the synchronization of live streaming content, latency issues affect the user's viewing experience, and improving the timeliness of live streaming content is an urgent problem to be solved.

Method used

An object mapping relationship is pre-built. The associated second object is determined through the first relationship in the object mapping relationship. The live data stream is obtained based on the second correspondence of the live data stream to achieve synchronization between the first object and the second object.

Benefits of technology

It effectively ensures the real-time nature of messages and improves the stability of live streaming synchronization, especially in the case of massive live streaming synchronization, it can quickly complete the synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120881301A_ABST
    Figure CN120881301A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a live broadcast synchronization method and device, electronic equipment and a storage medium, which are used for improving the timeliness of live broadcast content synchronization. The method comprises the following steps: receiving a live broadcast message sent by a first client corresponding to a first object; if it is determined that the first object starts live broadcast based on the live broadcast message, obtaining a pre-constructed object mapping relationship; determining a second object mapped by the first object based on a first corresponding relation in the object mapping relation; and based on a second corresponding relationship in the object mapping relationship, obtaining an obtaining address of a live broadcast data stream related to the first object, and after obtaining the live broadcast data stream according to the obtaining address, returning the live broadcast data stream to a second client corresponding to the second object, the second client corresponding to the second object being used for starting live broadcast based on the live broadcast data stream. When the live broadcast message is received, the live broadcast synchronization of the associated object can be realized through the pre-constructed object mapping relationship, and the timeliness of the live broadcast synchronization is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent with application number 202110799169.8, application date July 15, 2021, and invention title "A live streaming synchronization method, device, electronic device and storage medium". Technical Field

[0002] This application relates to the field of computer technology, and in particular to a live streaming synchronization method, apparatus, electronic device, and storage medium. Background Technology

[0003] Live streaming is a crucial channel for information dissemination on the internet. As the live streaming industry develops, businesses considering enriching their content need to expand the breadth and depth of their own platforms' content and sign more streamers. They can also consider collaborating with other platforms and integrating their content. In other words, live streaming platforms can share high-quality content through strategic partnerships, which not only increases streamer exposure but also brings substantial traffic to the platform, achieving a win-win situation. In this scenario, delays in live content synchronization can negatively impact the overall viewing experience. Therefore, improving the timeliness of live content synchronization across different platforms is a critical issue that needs to be addressed. Summary of the Invention

[0004] This application provides a live streaming synchronization method, apparatus, electronic device, and storage medium to improve the timeliness of live streaming content synchronization.

[0005] This application provides a live streaming synchronization method, including:

[0006] Receive live stream messages sent by the first client corresponding to the first object;

[0007] If it is determined based on the live broadcast message that the first object has started live broadcasting, then a pre-constructed object mapping relationship is obtained. The object mapping relationship includes a first correspondence between the first object and the second object, and a second correspondence between the live broadcast data streams of the first object and the second object.

[0008] Based on the first correspondence, at least one second object is determined to be mapped from the first object;

[0009] Based on the second correspondence, the acquisition address of the live data stream related to the first object is obtained, and after acquiring the live data stream according to the acquisition address, the live data stream is returned to the second client corresponding to the at least one second object. The second client corresponding to the at least one second object is used to start a live broadcast based on the live data stream.

[0010] This application provides a live streaming synchronization device, comprising:

[0011] The receiving unit is used to receive live broadcast messages sent by the first client corresponding to the first object;

[0012] The acquisition unit is configured to acquire a pre-built object mapping relationship if it is determined based on the live broadcast message that the first object has started live broadcasting. The object mapping relationship includes a first correspondence between the first object and the second object, and a second correspondence between the live broadcast data streams of the first object and the second object.

[0013] A mapping unit is configured to determine at least one second object mapped to the first object based on the first correspondence relationship;

[0014] A synchronization unit is used to obtain the acquisition address of the live data stream related to the first object based on the second correspondence relationship, and after obtaining the live data stream according to the acquisition address, return the live data stream to the second client corresponding to the at least one second object, wherein the second client corresponding to the at least one second object is used to start a live broadcast based on the live data stream.

[0015] Optionally, the device further includes:

[0016] The construction unit is used to pre-construct a first correspondence between each first object and each second object, and a second correspondence between each first object and its corresponding second object for the live data stream, before the receiving unit receives the live message sent by the first client corresponding to the first object;

[0017] The object mapping relationships containing the first and second correspondences are stored in a relational database and a distributed cache, respectively.

[0018] Optionally, the building unit is further configured to:

[0019] After storing the object mapping relationships containing the first and second correspondences into a relational database and a distributed cache, respectively, index information is added to the object mapping relationships stored in the relational database.

[0020] Optionally, the device further includes:

[0021] The monitoring unit is used to periodically traverse and check the broadcast status of at least one second object corresponding to the first object based on the first correspondence relationship.

[0022] If the broadcast status of at least one second object is broadcast failure, the broadcast service process notifies the second client corresponding to the at least one second object to restart the live broadcast and synchronize the live broadcast content with the first client corresponding to the first object.

[0023] Optionally, the monitoring unit is further configured to:

[0024] After the second client corresponding to the at least one second object is notified to restart the live broadcast through the live broadcast service process, the live broadcast status of the at least one second object is monitored through a preset monitoring mechanism.

[0025] If the number of times the at least one second object fails to start a live stream reaches a preset limit, then relevant failure message will be displayed.

[0026] An electronic device provided in this application includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor performs the steps of any of the above-described live streaming synchronization methods.

[0027] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the above-described live streaming synchronization methods.

[0028] This application provides a computer-readable storage medium including program code. When the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps of any of the above-described live streaming synchronization methods.

[0029] The beneficial effects of this application are as follows:

[0030] This application provides a live streaming synchronization method, apparatus, electronic device, and storage medium. Because this application pre-constructs an object mapping relationship based on content synchronization and distribution, when a first object starts a live stream, the associated second objects—that is, the second objects that need to synchronize their live stream content with the first object—can be determined through the first relationship in the object mapping relationship. Then, the live stream is obtained based on the second correspondence of the live stream data stream in the object mapping relationship and distributed to the client corresponding to the second object, thus achieving live streaming synchronization between the first and second objects. The live streaming synchronization method proposed in this application can effectively guarantee the real-time nature of messages, and in the case of massive live streaming synchronization, it can complete the live streaming synchronization simply by relying on the received live stream messages and the pre-constructed corresponding mapping relationship, exhibiting high stability.

[0031] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0032] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0033] Figure 1 This is an optional schematic diagram of an application scenario in an embodiment of this application;

[0034] Figure 2 This is an optional schematic diagram of a live streaming synchronization method in an embodiment of this application;

[0035] Figure 3 This is a diagram of a live streaming content synchronization architecture in related technologies;

[0036] Figure 4 This is a diagram illustrating the architecture of a distribution relationship construction module in one embodiment of this application.

[0037] Figure 5 This is a diagram of a live data stream synchronization architecture in an embodiment of this application;

[0038] Figure 6 This is a diagram illustrating a live interactive information synchronization architecture in an embodiment of this application.

[0039] Figure 7 This is a schematic diagram illustrating one method of storing live interactive messages in an embodiment of this application.

[0040] Figure 8A This is a schematic diagram of a live streaming interface in an embodiment of this application;

[0041] Figure 8B This is a schematic diagram of another live streaming interface in an embodiment of this application;

[0042] Figure 9 This is a timing diagram of a live streaming synchronization method according to an embodiment of this application;

[0043] Figure 10 This is a schematic diagram of the composition structure of a live streaming synchronization device according to an embodiment of this application;

[0044] Figure 11 This is a schematic diagram of the hardware structure of an electronic device using an embodiment of this application;

[0045] Figure 12 This is a schematic diagram of the hardware structure of another electronic device using an embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical methods, and advantages of the embodiments of this application clearer, the technical methods of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical methods of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical methods of this application.

[0047] The following describes some of the concepts involved in the embodiments of this application.

[0048] Live interactive information refers to the information generated during a live stream when viewers interact with the streamer. In this embodiment, live interactive information includes, but is not limited to, bullet comments (danmu) and live stream gifts (gift-giving). Bullet comments refer to commentary text that pops up when watching a video on a live streaming platform. Bullet comments can give viewers the illusion of "real-time interaction." Although different bullet comments are sent at different times, they only appear at a specific point in the video. Therefore, bullet comments sent at the same time generally have the same theme, creating the illusion of commenting simultaneously with other viewers. Gift-giving refers to the act of viewers tipping streamers on a live streaming platform. Viewers pay to purchase gifts on the platform and give them to the streamer as gifts.

[0049] Data stream and live stream: A data stream is an ordered sequence of bytes with a start and an end. A live stream typically refers to a stable, continuous video data stream that can be transmitted and processed over a network. In this embodiment, a live stream refers to a stable, continuous, and ordered video data stream generated by the live streamer (host) during the live stream.

[0050] Object mapping relationship: This is a mapping relationship constructed in the embodiments of this application to represent objects with an association relationship. It can specifically include two parts: a first correspondence between a first object and a second object, and a second correspondence between the live data streams of the first object and the second object. Here, an object can refer to a user, or a user's registered account, etc. Taking an account as an example, the object mapping relationship includes a first correspondence between account information and a second correspondence between account video streams.

[0051] Distributed caching: The ability of caching to improve the speed of instruction and data retrieval has led to its widespread application in distributed computing as local computer systems have expanded into distributed systems. This is known as distributed caching. Distributed caching is managed and controlled by a server, with multiple client nodes storing data, further improving data retrieval speed. In this embodiment, the distributed cache can use Redis, a key-value storage system that supports a wider range of value types, including strings, lists, sets, and sorted sets (zsets).

[0052] Sorted Set (zset): Each element in a zset is associated with a score, and scores can be repeated. Because of the sorting, adding, deleting, and modifying elements in a sorted set is very fast, even accessing data in the middle of the set is highly efficient. Like sets, Redis zsets are collections of string elements and do not allow duplicate members. The difference is that each element in a zset is associated with a score (scores can be repeated), and Redis uses these scores to sort the elements in ascending order.

[0053] Client: Also known as user terminal, it refers to a program that provides local services to clients in contrast to a server. Except for some applications that run only locally, it is generally installed on ordinary client machines and needs to cooperate with the server to run. With the development of the Internet, commonly used client machines include web browsers used for the World Wide Web, email clients for sending and receiving emails, and instant messaging client software. For these types of applications, corresponding servers and service programs on the network are required to provide the corresponding services, such as database services, email services, etc. Therefore, a specific communication connection needs to be established between the client and the server to ensure the normal operation of the application. In the embodiments of this application, the client refers to an application running on a terminal device that provides various services, such as a live streaming client, video client, or short video client.

[0054] The design concept of the embodiments of this application is briefly introduced below:

[0055] With the development of live streaming technology, more and more people are registering accounts on various live streaming platforms and interacting with the public through video live streaming via smart devices. Influencer streamers, with their large fan base and high-quality live streaming content, are highly sought after by live streaming platforms, becoming a scarce resource that these platforms compete for. Live streaming platforms can share high-quality live streaming content through strategic partnerships, which not only increases the streamer's exposure but also brings considerable traffic to the platform, achieving a win-win situation.

[0056] Therefore, when businesses consider enriching their live streaming content, they need to expand the breadth and depth of their platform's content and sign more streamers. They can also consider collaborating with other platforms and introducing their content. In this scenario, improving the timeliness of live streaming content is a pressing issue.

[0057] In view of this, embodiments of this application provide a live streaming synchronization method, apparatus, electronic device, and storage medium. Since embodiments of this application pre-construct an object mapping relationship based on content synchronization and distribution, when a first object starts live streaming, the associated second objects—that is, the second objects that need to synchronize live streaming content with the first object—can be determined through the first relationship in the object mapping relationship. Then, the live streaming data stream is obtained based on the second correspondence of the live streaming data stream in the object mapping relationship and distributed to the client corresponding to the second object, thus achieving live streaming synchronization between the first and second objects. The live streaming synchronization method proposed in this application can effectively guarantee the real-time nature of messages, and in the case of massive live streaming synchronization, live streaming synchronization can be completed simply based on the received live streaming messages and the pre-constructed corresponding mapping relationship, exhibiting high stability.

[0058] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0059] like Figure 1 The diagram shown is an application scenario illustration of an embodiment of this application. The application scenario diagram includes three terminal devices 110 and one server 120.

[0060] It should be noted that the terminal device 110 in this embodiment may be equipped with a live streaming client, which is used for live streaming. The server 120 may include a live streaming server. The live streaming server is used to provide live streaming data to the live streaming client, which is used to display the live streaming room and the live streaming that is taking place in the live streaming room on the live streaming client.

[0061] In one alternative implementation, the terminal device 110 and the server 120 can communicate via a communication network.

[0062] For example, user A registers account A on live streaming client A, user B registers account B on live streaming client B, and user C registers account C on live streaming client C. In this embodiment, the object can refer to a user or the account a user logs into; here, we use an account as an example. Assume the first object is account A, and accounts B and C are the second objects associated with account A. The corresponding first client is live streaming client A, and the second clients include live streaming client B and live streaming client C.

[0063] When account A starts broadcasting, it can send a broadcast start message to service 120 through terminal device 110. After receiving the broadcast start message, if server 120 determines that account A has started broadcasting based on the live broadcast message, it obtains the pre-built object mapping relationship; determines account B and account C mapped to account A based on the first correspondence relationship; obtains the acquisition address of the live broadcast data stream related to account A based on the second correspondence relationship, and after obtaining the live broadcast data stream according to the acquisition address, returns the live broadcast data stream to the second client corresponding to account B and account C, so that live broadcast client B and live broadcast client C can start broadcasting based on the live broadcast data stream.

[0064] It should be noted that the above examples are for live streaming synchronization between different live streaming platforms. Of course, the live streaming synchronization method in this application is also applicable to live streaming synchronization between different accounts on the same live streaming platform (live streaming client), and will not be repeated here.

[0065] In one alternative implementation, the communication network is a wired network or a wireless network.

[0066] In this embodiment, the terminal device 110 is a computer device used by a user. This computer device can be a personal computer, mobile phone, tablet computer, laptop, e-book reader, in-vehicle terminal, or any other computer device with a certain computing power that runs instant messaging software and websites or social networking software and websites. Each terminal device 110 is connected to the server 120 via a wireless network. The server 120 is a single server, a server cluster composed of several servers, a cloud computing center, or a virtualization platform.

[0067] It should be noted that, Figure 1 The examples shown are merely illustrative; in reality, the number of terminal devices and servers is unlimited and is not specifically limited in the embodiments of this application.

[0068] In one alternative implementation, such as the live streaming synchronization method or apparatus disclosed in this application, multiple servers may be configured into a blockchain, and the servers are nodes on the blockchain.

[0069] In one possible application scenario, to reduce communication latency, servers 120 can be deployed in various regions, or for load balancing, different servers 120 can serve the regions corresponding to each terminal device 110. Multiple servers 120 can share data through blockchain, forming a data-sharing system. For example, terminal device 110 located at location a communicates with server 120, while terminal device 110 located at location b communicates with other servers 120.

[0070] Each server 120 in the data sharing system has a corresponding node identifier. Each server 120 can also store the node identifiers of other servers 120 in the data sharing system, so that the generated blocks can be broadcast to other servers 120 in the data sharing system based on their node identifiers. Each server 120 can maintain a node identifier list as shown in the table below, storing the server 120 name and node identifier in the list. The node identifier can be an Internet Protocol (IP) address or any other information that can be used to identify the node. Table 1 only uses IP addresses as an example.

[0071] Table 1

[0072] Server Name Node identifier Node 1 119.115.151.174 Node 2 118.116.189.145 … … Node N 119.124.789.258

[0073] The following describes the live streaming synchronization method provided by the exemplary embodiments of this application in conjunction with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0074] It should be noted that the live streaming synchronization method in this application embodiment can be executed by the server or the terminal device alone, or by the server and the terminal device together.

[0075] See Figure 2 The diagram shown is a flowchart illustrating the implementation of a live streaming synchronization method provided in this application. The example uses a server as the execution entity. The specific implementation flow of this method is as follows:

[0076] S21: The server receives the live broadcast message sent by the first client corresponding to the first object;

[0077] The live streaming synchronization method in this application embodiment can be used to synchronize live streaming content between different services in a live streaming scenario. Accordingly, the first object and the second object can refer to different accounts associated with each other on the same platform, or different accounts associated with each other on different platforms. In this document, the first object can be referred to as the main account, and the second object as the sub-account. The following explanation mainly uses main account 1 and three sub-accounts associated with main account 1 as examples: sub-account 2, sub-account 3, and sub-account 4. Assume that main account 1 is an account on one live streaming platform, referred to as service provider A account, and sub-accounts 2, 3, and 4 are different accounts on another live streaming platform, referred to as service provider B account.

[0078] S22: If the server determines that the first object has started live streaming based on the live streaming message, it obtains the pre-built object mapping relationship. The object mapping relationship includes the first correspondence between the first object and the second object, and the second correspondence between the live streaming data stream between the first object and the second object.

[0079] The following is combined Figure 3 The live streaming synchronization method in the embodiments of this application will be briefly introduced. Figure 3 This is a diagram illustrating a live streaming content synchronization architecture in an embodiment of this application. The entire video stream synchronization architecture can be divided into two main modules: a distribution relationship establishment module and a content synchronization module. The distribution relationship establishment module is further divided into three parts: a content distribution management platform, a distribution relationship establishment module, and data storage. The live streaming content synchronization in this embodiment mainly includes video stream synchronization and live interactive information synchronization; therefore, the content synchronization module is further divided into a video stream synchronization module and a live interactive information synchronization module. The video stream synchronization module is mainly divided into two parts: a mapping relationship module and a stream address generation module.

[0080] In this embodiment, the object mapping relationship can be pre-built through the distribution relationship building module, and then the synchronization of the live data stream between the first object and the related second object can be realized based on the video stream synchronization module in the synchronization content module. In addition, the synchronization of interactive information during the live broadcast can also be realized through the live interactive information synchronization module. The specific implementation method will be described in detail below.

[0081] S23: The server determines at least one second object mapped to the first object based on the first correspondence;

[0082] S24: Based on the second correspondence, the server obtains the address of the live stream associated with the first object, and after obtaining the live stream according to the address, returns the live stream to at least one second client corresponding to the second object. The at least one second client corresponding to the second object is used to start a live stream based on the live stream to achieve live stream synchronization with the first client.

[0083] In the above implementation, an object mapping relationship is pre-built based on the content synchronization and distribution. When the first object starts live streaming, the associated second objects can be determined through the first relationship in the object mapping relationship. These are the second objects that need to synchronize their live streaming content with the first object. Then, the live streaming data stream is obtained based on the second correspondence of the live streaming data stream in the object mapping relationship and distributed to the client corresponding to the second object, thus achieving live streaming synchronization between the first and second objects. The live streaming synchronization method proposed in this application can effectively guarantee the real-time nature of messages. Moreover, in the case of massive live streaming synchronization, live streaming synchronization can be completed simply by relying on the received live streaming messages and the pre-built corresponding mapping relationship, resulting in high stability.

[0084] The following will refer to other accompanying figures for further discussion. Figure 3 The distribution relationship building module and the synchronization content module in the architecture shown are described in detail.

[0085] In one alternative implementation, it can be based on Figure 3 The distribution relationship construction module shown pre-constructs a first correspondence between each first object and each second object, as well as a second correspondence between each first object and its corresponding second object for the live data stream. Because... Figure 3 The distribution relationship building module shown further includes a content distribution management platform, a distribution relationship establishment module, and a data storage module. The following will combine... Figure 4 The process of constructing object mapping relationships is explained in detail.

[0086] See Figure 4 As shown, this is an architecture diagram of a distribution relationship construction module corresponding to one embodiment of this application. The operation side establishes account mapping relationships for content distribution on the content distribution management platform. The constructed relationships mainly consist of two parts: the account information relationship for distribution and the video stream mapping relationship. For example... Figure 4As shown, the first correspondence can represent the association between accounts, that is, the association between business party A account and business party B account listed above, while the second correspondence can represent the video stream mapping relationship between accounts, that is, the video stream mapping between business party A account video stream and business party B account video stream. Here, the account mapping relationship is the object mapping relationship in this application embodiment, the account information relationship is the first correspondence in this application embodiment, also known as account association information, and the video stream mapping relationship is the second correspondence in this application embodiment.

[0087] In this embodiment, after mapping based on the distribution relationship establishment module, the object mapping relationship containing the first and second correspondence relationships can be stored. Regarding data storage, considering stability and persistence issues, an optional implementation is to prioritize storing the object mapping relationship in a relational database like MySQL, while also considering the efficiency of queries as query volume increases, storing the object mapping relationship in a distributed cache like Redis. Account association information is stored using a Redis hash map, with the following storage structure:

[0088] Table 2

[0089] key (keyword) type illustrate m_uid int (integer) Main account ID s_uid int Sub-account ID m_appid int Main account business ID s_appid int Sub-account business ID m_roomid int Main account room ID s_roomid int Sub-account room ID create_time int Creation time

[0090] As shown in Table 2, the first correspondence in the embodiments of this application includes at least one of the following:

[0091] I. The correspondence between the object identifier of the first object and the object identifier of the second object;

[0092] As shown in Table 2, the account ID represents the object identifier. This correspondence is the relationship between the main account ID (m_uid) and the sub-account ID (s_uid).

[0093] II. The correspondence between the business identifier of the first object and the business identifier of the second object;

[0094] As shown in Table 2, the account service ID represents the service identifier. This correspondence is the relationship between the main account service ID (m_appid) and the sub-account service ID (s_appid).

[0095] III. The correspondence between the room identifier of the first object and the live broadcast identifier of the second object.

[0096] As shown in Table 2, the account room ID represents the live broadcast identifier. This correspondence is the relationship between the main account business ID (m_roomid) and the sub-account business ID (s_roomid).

[0097] It should be noted that Table 2 illustrates the first correspondence relationship by including the three types mentioned above. The first correspondence relationship in this application embodiment may include at least one of the above, and is not specifically limited here. Furthermore, the creation time of this mapping relationship can be further stored, i.e., `create_time` in Table 2. When modifying account association information, information such as the modification time can be further stored.

[0098] In one alternative implementation, after storing the object mapping relationships in a relational database and a distributed cache respectively, the server may also add index information to the object mapping relationships stored in the relational database.

[0099] For example, when adding corresponding indexes to MySQL, the server usually performs a first-order correspondence query using the main account ID and sub-account ID, so indexes should also be added to the m_uid and s_uid fields of MySQL.

[0100] In the above implementation, by adding the corresponding index to MySQL, the occurrence of slow queries caused by directly querying MySQL when the data volume increases and Redis cache has problems can be effectively reduced.

[0101] Additionally, it should be noted that in this application embodiment, the establishment of all relationships requires personnel with the corresponding business permissions to operate, and the establishment of relationships also requires approval from both business parties. Furthermore, it supports the blocking of certain businesses to handle special circumstances.

[0102] After establishing the object mapping relationship based on the above process, the live broadcast can be synchronized based on the object mapping relationship when the broadcaster starts broadcasting.

[0103] In this application embodiment, to ensure message stability and reliability, an optional implementation is as follows: when the broadcaster starts broadcasting, a live broadcast message (also called a broadcast start message) is simultaneously sent to the Kafka queue, such as... Figure 5 As shown, when business account A (main account 1) starts broadcasting, it sends a Kafka broadcast start message to the Kafka queue. Upon receiving this message, the content synchronization module queries the pre-built object mapping relationship through the mapping relationship in the video stream synchronization module. Based on the first correspondence in the object mapping relationship, it retrieves each sub-account associated with the main account and simultaneously starts broadcasting from all sub-accounts associated with the main account. Then, based on the stream address generation module in the video stream synchronization module, it determines the address for obtaining the live data stream associated with main account 1, i.e., it calculates and generates the stream address based on the video stream mapping relationship stored in Redis. Afterwards, all associated accounts can obtain the same live stream content using the same pull address.

[0104] It should be noted that, Figure 5 The business party accounts B, C, and D shown are all sub-accounts associated with business party A, determined by the mapping module. The correspondences listed here are merely illustrative. In this application, the sub-accounts 2, 3, and 4 associated with the main account 1 are those corresponding to business party B.

[0105] In this embodiment, the content distribution and synchronization method can be quickly integrated for different businesses because they all use the same account system. Therefore, different business parties only need to be identified by the account's appID, allowing for seamless integration without development and high scalability. Consequently, based on the second correspondence, the same acquisition address as the main account can be obtained as the streaming address corresponding to the sub-account, including the push and pull streaming addresses. For example... Figure 5 The diagram shown illustrates a live data stream synchronization architecture in an embodiment of this application. The push address is the address used by the broadcaster to perform uplink push streaming, i.e., the address where the broadcaster uploads the live data stream to the CDN. The pull address is the address used by the viewer to perform downlink pull streaming, i.e., the address where the viewer retrieves the live data stream from the CDN.

[0106] Based on the above implementation method, it can be ensured that different business parties use the same pull address to obtain the same live stream content, and realize the synchronization of live stream data streams between the main account and sub-accounts.

[0107] In addition, considering that in actual practice, the sub-account may fail to start broadcasting when a Kafka message is received for some reason, this application embodiment has a timed logic for starting sub-account broadcasting in the content synchronization module.

[0108] An optional implementation is as follows: based on the first correspondence, the broadcast status of at least one second object corresponding to the first object is checked periodically; if the broadcast status of at least one second object is broadcast failure, the broadcast service process notifies the second client corresponding to at least one second object to restart the live broadcast and synchronize the live broadcast content with the first client corresponding to the first object.

[0109] Since the object mapping relationship in this application embodiment can be modified, during the traversal check based on the first correspondence relationship, all active first correspondence relationships of the main account that is broadcasting can be checked each time to determine each sub-account associated with this type of main account. If at least one associated sub-account is not broadcasting, the non-broadcasting sub-account is launched through the broadcasting service process to broadcast the live content synchronously. In cases such as account cancellation or banning, the first object relationship related to that account can be considered invalid; if no abnormality exists, it is considered active.

[0110] For example, the main account 1 is associated with the sub-accounts: sub-account 2, sub-account 3, and sub-account 4. If the main account 1 is cancelled, this first correspondence becomes invalid. While this first relationship is active, it is necessary to check whether sub-account 2, sub-account 3, and sub-account 4 are all in a live streaming state. If sub-account 2 is not live, it is necessary to start sub-account 2 through the live streaming service process and synchronize the live streaming content.

[0111] It should be noted that in some special cases, there may be multiple instances where the broadcast fails to start. To address this issue, the synchronization content module in this embodiment also incorporates a monitoring mechanism, which allows for timely detection of problems and rapid manual intervention to resolve them.

[0112] One possible implementation is to monitor the broadcasting status of at least one second object through a preset monitoring mechanism; if the number of times at least one second object fails to start live streaming reaches a preset limit, relevant failure prompts are displayed. These failure prompts alert relevant operators to quickly intervene and resolve the aforementioned issues.

[0113] Failure messages can include text messages such as "Planned distribution creation failed," and can also include the sub-account that failed to start the live stream, as well as the ID of the relevant main account, for example: m_uid: 4597207138, m_appid: 1017, s_uid: 4376149102, s_appid: 1017. Additionally, the time the live stream occurred can be included, for example: begin_time: 2021-03-10 16:46:06.

[0114] It should be noted that failure messages can also be displayed via voice prompts, etc., and no specific restrictions are made here.

[0115] Because the embodiments of this application have set up timed synchronization checks in some scenarios where synchronization may fail, they can effectively prevent relationship establishment failures caused by network fluctuations and other reasons. For failures caused by some accounts or special reasons, the monitoring system has been improved so that manual intervention can be used to solve the problems, thus achieving high availability.

[0116] It should be noted that the above mainly describes the synchronization of live streaming data streams. Generally, live streaming content primarily consists of the live streaming data stream, with interactive information such as bullet comments and gift-giving as secondary. Delays in the video stream and the synchronization of interactive information can negatively impact the overall viewing experience. Therefore, this application's embodiments can also achieve the synchronization of interactive information. The above mainly describes video stream synchronization. Figure 3The synchronized content module shown includes not only a video stream synchronization module but also a live interactive information synchronization module, used to synchronize various live interactive information associated with the first object generated during the live stream. This live interactive information includes messages such as bullet comments and gifts sent by viewers during the live stream.

[0117] In one optional implementation, in addition to returning the live data stream to at least one second client corresponding to the second object, the live interactive messages associated with the first object can also be synchronized between the first object and the second object. Specifically, this is achieved as follows:

[0118] The process involves retrieving all live interactive messages associated with a first object, where each live interactive message is an interactive message sent by the first object to the first object or a second object corresponding to the first object during its live broadcast. Based on a first correspondence, a target object with a mapping relationship to the recipient of each live interactive message is determined. Then, each live interactive message is sent to the client corresponding to the respective target object. The recipient of each live interactive message is either the first object or a second object corresponding to the first object; the client corresponding to the target object includes either a first client or a second client. When the target object is the first object, the client corresponding to the target object is the first client; when the target object is the second object, the client corresponding to the target object is the second client.

[0119] For example, at time t1, user A sends a gift to the streamer in the live stream of main account 1. The recipient of this live stream interaction message is the first object – main account 1. The target objects associated with main account 1 are identified, including sub-accounts 2, 3, and 4. Therefore, this gift-giving message needs to be synchronized to the live streams corresponding to sub-accounts 2, 3, and 4 for display. If at time t2, user B sends a bullet comment in the live stream corresponding to sub-account 2, the recipient of this live stream interaction message is the second object – sub-account 2. Based on the pre-built first correspondence, the target objects associated with sub-account 2 are identified, including main account 1, 3, and 4. Therefore, this bullet comment needs to be synchronized to the live streams corresponding to main account 1, 3, and 4 for display.

[0120] In this embodiment of the application, when sending each live interactive message to the client corresponding to the target object, the server may send it proactively, or the client may poll the server.

[0121] The following section details the implementation process of the polling method:

[0122] Before sending each live interactive message to the corresponding client, the server needs to save each live interactive message to a preset storage location. Then, it receives polling messages from the client corresponding to the target object and distributes the live interactive messages according to the polling messages. The polling messages are used to instruct the server to retrieve live interactive messages from the preset storage location.

[0123] See Figure 6 The diagram shown illustrates a live interactive information synchronization architecture in this application. It primarily uses live interactive information, including bullet comments and gift messages, as examples. To ensure the stability and reliability of bullet comments and gift messages, live interactive messages sent by the viewer's client are sent to a Kafka queue. After receiving the Kafka message, the synchronization content module queries the account-related mapping information from the mapping relationship module, and then sends the live interactive messages to the corresponding live room of each account through the message channel module for display.

[0124] It should be noted that, Figure 6 The business party accounts B, C, and D shown are all sub-accounts associated with business party A, determined by the mapping module. The correspondences listed here are merely illustrative. In this application, the sub-accounts 2, 3, and 4 associated with the main account 1 are those corresponding to business party B.

[0125] The message channel module is a preset storage location in this embodiment. The message channel module uses a Redis zset structure, and the corresponding scores are incremented after each message insertion. Furthermore, the score information may differ between different clients. Figure 7 The diagram illustrates a storage method for live interactive messages in an embodiment of this application. Both the iOS and Android clients record a currently retrieved score, and each polling operation retrieves messages based on the score information. Specifically, the currently retrieved score for the Android client is msg4, and the currently retrieved score for the iOS client is msg2.

[0126] Each time a client polls the server, it can use the currently retrieved score information as an indication. When the server receives a polling message from a client, it retrieves the corresponding live interactive message from the message channel module according to the indication information in the polling message, and sends the retrieved live interactive message to the client corresponding to the target object.

[0127] It should be noted that in this embodiment, gifting and bullet comments refer to the live stream room. Each zset is determined by a command word of a message type plus the room ID, such as... Figure 7The command word shown is 0xa, and the room ID is roomID. The command word can represent the message type of the live interaction message, including but not limited to bullet comments and gift sending. The client only needs to poll the corresponding live interaction message in the live room based on the room ID and retrieve the information accordingly.

[0128] See Figure 8A and Figure 8B These are schematic diagrams of the live streaming interfaces corresponding to the two service providers in this application embodiment. Figure 8A This refers to the live streaming interface corresponding to business provider A. Figure 8B This refers to the live streaming interface corresponding to business provider B. The interface design of the live streaming interface may differ between different business providers, but they generally include areas for displaying the live streaming data stream and areas for displaying live interactive messages, such as... Figure 8A and Figure 8B As shown.

[0129] This application proposes a highly available, real-time, and scalable method for distributing and synchronizing live streaming content. Under conditions of massive numbers of live streaming rooms and diverse business operations, high availability is ensured through a content synchronization module and message channels. A robust alarm mechanism further guarantees the real-time synchronization of live streaming content. Furthermore, by integrating with a unified account system of a live streaming platform, it offers good scalability for different business systems, meeting the needs of businesses for rapid access and synchronization of live streaming content across different platforms.

[0130] See Figure 9 The diagram shown is a timing diagram of a live streaming synchronization method according to an embodiment of this application. The specific implementation process of this method is as follows:

[0131] Step S901: The server pre-constructs the object mapping relationship and stores the object mapping relationship;

[0132] Step S902: The server receives the live broadcast message sent by the first client corresponding to the first object;

[0133] Step S903: If the server determines that the first object has started live streaming based on the live streaming message, then it obtains the pre-built object mapping relationship;

[0134] Step S904: The server determines each second object in the first object mapping based on the first correspondence in the object mapping relationship;

[0135] Step S905: The server obtains the address of the live data stream related to the first object based on the second correspondence in the object mapping relationship;

[0136] Step S906: The server obtains the live data stream according to the address and returns the live data stream to the second client corresponding to each second object;

[0137] Step S907: The server obtains all the live interactive messages associated with the first object;

[0138] In step S907, each live interactive message can refer to the live interactive messages in each account's live room obtained by the server at the same time; of course, it can also refer to the live interactive messages in each account's live room obtained by the server within a certain time period, without specific limitation here.

[0139] Step S908: Based on the first correspondence, the server determines the target object that has a mapping relationship with the recipient of each live interactive message;

[0140] Step S909: The server saves each live interactive message to a preset storage location;

[0141] Step S910: Each time the server receives a polling message from a client of a target object, it retrieves the live interactive message corresponding to the indication information from a preset storage location according to the indication information in the polling message, and sends the retrieved live interactive message to the client corresponding to the target object.

[0142] Based on the above implementation method, the stability and timeliness of live streaming content such as synchronized video streams, bullet comments, and gift-giving between platforms can be effectively guaranteed.

[0143] Based on the same inventive concept, embodiments of this application also provide a live streaming synchronization device. For example... Figure 10 As shown, this is a structural schematic diagram of the live streaming synchronization device 1000, which may include:

[0144] The receiving unit 1001 is used to receive live broadcast messages sent by the first client corresponding to the first object;

[0145] The acquisition unit 1002 is used to acquire a pre-built object mapping relationship if it is determined that the first object has started live streaming based on the live streaming message. The object mapping relationship includes a first correspondence between the first object and the second object, and a second correspondence between the live streaming data streams of the first object and the second object.

[0146] Mapping unit 1003 is used to determine at least one second object mapped to the first object based on the first correspondence relationship;

[0147] Synchronization unit 1004 is used to obtain the acquisition address of the live data stream related to the first object based on the second correspondence relationship, and after obtaining the live data stream according to the acquisition address, return the live data stream to at least one second client corresponding to the second object, and the second client corresponding to at least one second object is used to start live streaming based on the live data stream.

[0148] Optionally, the device also includes:

[0149] The construction unit 1005 is used to pre-construct a first correspondence between each first object and each second object, and a second correspondence between each first object and its corresponding second object, before the receiving unit 1001 receives the live broadcast message sent by the first client corresponding to the first object.

[0150] The object mapping relationships containing the first and second correspondences are stored in a relational database and a distributed cache, respectively.

[0151] Optionally, building unit 1005 is also used for:

[0152] After storing the object mapping relationships containing the first and second correspondences in a relational database and a distributed cache, respectively, index information is added to the object mapping relationships stored in the relational database.

[0153] Optionally, the device also includes:

[0154] Monitoring unit 1006 is used to periodically traverse and check the broadcast status of at least one second object corresponding to the first object based on the first correspondence relationship;

[0155] If the broadcast status of at least one second object is broadcast failure, the broadcast service process will notify the second client corresponding to at least one second object to restart the broadcast and synchronize the broadcast content with the first client corresponding to the first object.

[0156] Optionally, the monitoring unit 1006 is also used for:

[0157] After notifying at least one second client corresponding to a second object to restart the live broadcast through the live broadcast service process, the live broadcast status of at least one second object is monitored through a preset monitoring mechanism.

[0158] If the number of times at least one second object fails to start a live stream reaches the preset limit, relevant failure message will be displayed.

[0159] In the above implementation, an object mapping relationship is pre-built based on the content synchronization and distribution. When the first object starts live streaming, the associated second objects can be determined through the first relationship in the object mapping relationship. These are the second objects that need to synchronize their live streaming content with the first object. Then, the live streaming data stream is obtained based on the second correspondence of the live streaming data stream in the object mapping relationship and distributed to the client corresponding to the second object, thus achieving live streaming synchronization between the first and second objects. The live streaming synchronization method proposed in this application can effectively guarantee the real-time nature of messages. Moreover, in the case of massive live streaming synchronization, live streaming synchronization can be completed simply by relying on the received live streaming messages and the pre-built corresponding mapping relationship, resulting in high stability.

[0160] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. Of course, in implementing this application, the functions of each module (or unit) can be implemented in one or more software or hardware components.

[0161] Having introduced the live streaming synchronization method and apparatus according to exemplary embodiments of this application, we will now introduce a live streaming synchronization apparatus according to another exemplary embodiment of this application.

[0162] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0163] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device. In one embodiment, the electronic device may be a server, such as... Figure 1 The server 120 is shown. In this embodiment, the structure of the electronic device can be as follows: Figure 11 As shown, it includes a memory 1101, a communication module 1103, and one or more processors 1102.

[0164] The memory 1101 is used to store computer programs executed by the processor 1102. The memory 1101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0165] Memory 1101 may be volatile memory, such as random-access memory (RAM); memory 1101 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1101 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1101 may be a combination of the above-described memories.

[0166] Processor 1102 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 1102 is used to implement the above-described live streaming synchronization method when calling computer programs stored in memory 1101.

[0167] The communication module 1103 is used to communicate with terminal devices and other servers.

[0168] This application embodiment does not limit the specific connection medium between the memory 1101, communication module 1103, and processor 1102. This application embodiment... Figure 11 The memory 1101 and the processor 1102 are connected via a bus 1104, and the bus 1104 is in Figure 11 The diagram uses thick lines to describe the connections between other components; these are for illustrative purposes only and should not be considered limiting. Bus 1104 can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 11 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.

[0169] The memory 1101 stores a computer storage medium, which stores computer-executable instructions for implementing the live streaming synchronization method of this application embodiment. The processor 1102 is used to execute the above-described live streaming synchronization method, such as... Figure 2 As shown.

[0170] In another embodiment, the electronic device may also be other electronic devices, such as... Figure 1 The terminal device 110 is shown. In this embodiment, the electronic device can be structured as follows: Figure 12As shown, it includes components such as: communication component 1210, memory 1220, display unit 1230, camera 1240, sensor 1250, audio circuit 1260, Bluetooth module 1270, processor 1280, etc.

[0171] The communication component 1210 is used to communicate with the server. In some embodiments, it may include a Circuit-Wireless Fidelity (WiFi) module, which is a short-range wireless transmission technology. Electronic devices can use the WiFi module to help users send and receive information.

[0172] The memory 1220 can be used to store software programs and data. The processor 1280 executes various functions of the terminal device 110 and performs data processing by running the software programs or data stored in the memory 1220. The memory 1220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The memory 1220 stores an operating system that enables the terminal device 110 to run. In this application, the memory 1220 may store the operating system and various applications, and may also store code that executes the live synchronization method of the embodiments of this application.

[0173] The display unit 1230 can also be used to display information input by the user or information provided to the user, as well as various menus of the terminal device 110, in a graphical user interface (GUI). Specifically, the display unit 1230 may include a display screen 1232 disposed on the front of the terminal device 110. The display screen 1232 may be configured as a liquid crystal display, a light-emitting diode, or the like. The display unit 1230 can be used to display the live streaming interface, etc., as shown in the embodiments of this application.

[0174] The display unit 1230 can also be used to receive input digital or character information and generate signal inputs related to user settings and function control of the terminal device 110. Specifically, the display unit 1230 may include a touch screen 1231 disposed on the front of the terminal device 110, which can collect touch operations of the user on or near it, such as clicking a button, dragging a scroll box, etc.

[0175] The touchscreen 1231 can be placed on top of the display screen 1232, or the touchscreen 1231 and the display screen 1232 can be integrated to realize the input and output functions of the terminal device 110. After integration, it can be referred to as a touch display screen. In this application, the display unit 1230 can display the application program and the corresponding operation steps.

[0176] Camera 1240 can be used to capture still images, which users can then post comments on via an application. There can be one or multiple cameras 1240. An object is projected onto a photosensitive element through a lens, generating an optical image. This photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the processor 1280 for conversion into a digital image signal.

[0177] The terminal device may also include at least one sensor 1250, such as an accelerometer 1251, a proximity sensor 1252, a fingerprint sensor 1253, and a temperature sensor 1254. The terminal device may also be equipped with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, and motion sensor.

[0178] Audio circuitry 1260, speaker 1261, and microphone 1262 provide an audio interface between the user and terminal device 110. Audio circuitry 1260 converts received audio data into electrical signals, which are then transmitted to speaker 1261, where they are converted into sound signals for output. Terminal device 110 may also be equipped with volume buttons for adjusting the volume of the sound signal. On the other hand, microphone 1262 converts collected sound signals into electrical signals, which are received by audio circuitry 1260, converted into audio data, and then output to communication component 1210 for transmission to, for example, another terminal device 110, or to memory 1220 for further processing.

[0179] Bluetooth module 1270 is used to interact with other Bluetooth devices that also have Bluetooth modules via the Bluetooth protocol. For example, a terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smartwatch) that also has a Bluetooth module through Bluetooth module 1270, thereby exchanging data.

[0180] The processor 1280 is the control center of the terminal device, connecting various parts of the terminal through various interfaces and lines. It executes various functions and processes data by running or executing software programs stored in the memory 1220 and calling data stored in the memory 1220. In some embodiments, the processor 1280 may include one or more processing units; the processor 1280 may also integrate an application processor and a baseband processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the baseband processor mainly handles wireless communication. It is understood that the baseband processor may not be integrated into the processor 1280. In this application, the processor 1280 can run the operating system, applications, user interface display and touch response, as well as the live streaming synchronization method of this embodiment. Furthermore, the processor 1280 is coupled to the display unit 1230.

[0181] In some possible implementations, various aspects of the live streaming synchronization method provided in this application can also be implemented as a program product, which includes program code. When the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps in the live streaming synchronization method according to the various exemplary embodiments of this application described above. For example, the electronic device can perform actions such as... Figure 2 The steps are shown in the figure.

[0182] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0183] The program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a computing device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with a command execution system, apparatus, or device.

[0184] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with a command execution system, apparatus, or device.

[0185] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0186] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0187] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0188] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A live streaming synchronization method, characterized in that, The method includes: Receive live stream messages sent by the first client corresponding to the first account; If it is determined that the first account has started a live broadcast based on the live broadcast message, a pre-constructed account mapping relationship is obtained. The account mapping relationship includes a first correspondence relationship, which represents the association relationship between the first account and the second account. Based on the first correspondence, at least one second account is determined to be mapped to the first account, and the second client corresponding to the at least one second account is used to start a live broadcast based on the live broadcast data stream related to the first account. Obtain each live interactive message associated with the first account, wherein each of the live interactive messages is an interactive message received by the first account or an interactive message received by the second account during the live broadcast. Determine the target account corresponding to each of the live interactive messages. The target account is an account that is associated with the recipient of each of the live interactive messages in the first correspondence relationship. The recipient of each of the live interactive messages is the first account or a second account mapped by the first account. Each of the live interactive messages is sent to the client corresponding to the target account, and the client corresponding to the target account includes the first client or the second client.

2. The method according to claim 1, characterized in that, Before sending each of the live interactive messages to the client corresponding to the respective target account, the method further includes: Each of the live interactive messages is saved to a preset storage location; The system receives polling messages sent by the client corresponding to the target account, which instructs the system to retrieve live interactive messages from the preset storage location.

3. The method according to claim 2, characterized in that, The step of sending each of the live interactive messages to the client corresponding to the respective target account includes: Upon receiving a polling message from a client of a target account, the system retrieves the corresponding live interactive message from the preset storage location based on the indication information in the polling message, and sends the retrieved live interactive message to the client corresponding to the target account.

4. The method according to claim 1, characterized in that, The account mapping relationship includes a second correspondence relationship, which represents the mapping relationship between the live streaming data stream corresponding to the first account and the live streaming data stream corresponding to the second account. The method further includes: Based on the second correspondence, the acquisition address of the live data stream associated with the first account is obtained, and after acquiring the live data stream according to the acquisition address, the live data stream is returned to the second client corresponding to the at least one second account.

5. The method according to claim 1, characterized in that, Before receiving the live stream message sent by the first client corresponding to the first account, the method further includes: A first correspondence relationship between each first account and each second account is pre-established, as well as a second correspondence relationship between each first account and its corresponding second account for live streaming data streams; The account mapping relationships, which include the first and second correspondences, are stored in a relational database and a distributed cache, respectively.

6. The method according to claim 5, characterized in that, After storing the account mapping relationships containing the first and second correspondences in a relational database and a distributed cache, respectively, the method further includes: Add index information to the account mapping relationships stored in the relational database.

7. The method according to claim 1, characterized in that, The receiving of live stream messages sent by the first client corresponding to the first account includes: Retrieve the live stream message sent by the first client corresponding to the first account from the message queue. The live stream message is sent to the message queue by the first client when the first account starts a live stream.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Based on the first correspondence, the broadcast status of at least one second account corresponding to the first account is checked periodically. If the broadcast status of at least one second account is "failed to start broadcasting", the second client corresponding to the at least one second account is notified through the broadcast service process to restart the live broadcast and synchronize the live broadcast content with the first client corresponding to the first account.

9. The method according to claim 8, characterized in that, After notifying the second client corresponding to the at least one second account to restart the live stream via the live streaming service process, the method further includes: The broadcasting status of at least one second account is monitored through a preset monitoring mechanism. If the number of times the live stream fails to start by at least one second account reaches a preset limit, relevant failure message will be displayed.

10. A live streaming synchronization device, characterized in that, The device includes: The receiving unit is used to receive live broadcast messages sent by the first client corresponding to the first account; The acquisition unit is used to acquire a pre-constructed account mapping relationship when it is determined that the first account has started live streaming based on the live streaming message. The account mapping relationship includes a first correspondence relationship, which represents the association relationship between the first account and the second account. A mapping unit is used to determine at least one second account mapped to the first account based on the first correspondence relationship, and a second client corresponding to the at least one second account is used to start a live broadcast based on the live broadcast data stream related to the first account. A synchronization unit is configured to acquire each live interactive message associated with the first account, wherein each live interactive message is an interactive message received by the first account or the second account during the live broadcast; determine the target account corresponding to each live interactive message, wherein the target account is an account associated with the recipient of each live interactive message in the first correspondence, and the recipient of each live interactive message is the first account or a second account mapped by the first account; and send each live interactive message to the client corresponding to the corresponding target account, wherein the client corresponding to the target account includes the first client or the second client.

11. The apparatus according to claim 10, characterized in that, The synchronization unit is also used for: Each of the live interactive messages is saved to a preset storage location; The system receives polling messages sent by the client corresponding to the target account, which instructs the system to retrieve live interactive messages from the preset storage location.

12. The apparatus according to claim 11, characterized in that, The synchronization unit is used for: Upon receiving a polling message from a client of a target account, the system retrieves the corresponding live interactive message from the preset storage location based on the indication information in the polling message, and sends the retrieved live interactive message to the client corresponding to the target account.

13. The apparatus according to claim 10, characterized in that, The account mapping relationship includes a second correspondence relationship, which represents the mapping relationship between the live streaming data stream corresponding to the first account and the live streaming data stream corresponding to the second account. The synchronization unit is also used for: Based on the second correspondence, the acquisition address of the live data stream associated with the first account is obtained, and after acquiring the live data stream according to the acquisition address, the live data stream is returned to the second client corresponding to the at least one second account.

14. The apparatus according to claim 10, characterized in that, The device further includes: The construction unit is used to pre-construct a first correspondence between each first account and each second account, and a second correspondence between each first account and its corresponding second account for live data streams; The account mapping relationships, which include the first and second correspondences, are stored in a relational database and a distributed cache, respectively.

15. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 9.

16. A computer-readable storage medium, characterized in that, It includes program code that, when the storage medium is run on an electronic device, causes the electronic device to perform the steps of the method of any one of claims 1 to 9.