WO2023093322A1 - Live broadcast method and device - Google Patents

Live broadcast method and device Download PDF

Info

Publication number
WO2023093322A1
WO2023093322A1 PCT/CN2022/124310 CN2022124310W WO2023093322A1 WO 2023093322 A1 WO2023093322 A1 WO 2023093322A1 CN 2022124310 W CN2022124310 W CN 2022124310W WO 2023093322 A1 WO2023093322 A1 WO 2023093322A1
Authority
WO
WIPO (PCT)
Prior art keywords
live
source
live stream
stream
subtitle data
Prior art date
Application number
PCT/CN2022/124310
Other languages
French (fr)
Chinese (zh)
Inventor
商红宾
Original Assignee
京东科技信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东科技信息技术有限公司 filed Critical 京东科技信息技术有限公司
Publication of WO2023093322A1 publication Critical patent/WO2023093322A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440236Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by media transcoding, e.g. video is transformed into a slideshow of still pictures, audio is converted into text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4856End-user interface for client configuration for language selection, e.g. for the menu or subtitles

Definitions

  • the present disclosure relates to the field of computer technology, in particular to the field of live broadcast technology, and in particular to a live broadcast method and device.
  • Embodiments of the present disclosure provide a live broadcast method, device, device, and storage medium.
  • an embodiment of the present disclosure provides a live broadcast method, the method includes: in response to detecting the relevant information of the source live stream reported by the source station, based on the live translation process, the audio in the source live stream in the source station Translate the data to obtain subtitle data; encode the subtitle data into the source live stream to obtain the target live stream; transcode the target live stream to obtain the transcoded live stream; perform live broadcast based on the transcoded live stream.
  • the audio data in the source live stream in the source station is translated to obtain subtitle data, including: establishing communication between the AI voice translation engine and the live translation process; based on the AI voice translation engine The communication with the live translation process translates the audio data in the source live stream in the source station to obtain subtitle data.
  • establishing the communication between the AI speech translation engine and the live translation process includes: establishing the communication between the AI speech translation engine and the live translation process through websocket.
  • encoding the subtitle data into the source live stream to obtain the target live stream includes: in response to obtaining the subtitle data, aligning the subtitle data and the source live stream with time stamps to obtain the aligned subtitle data and Source live stream; merge and encode the aligned subtitle data with the source live stream to obtain the target live stream.
  • the method further includes: in response to detecting relevant information of the source live stream reported by the source station, locally caching the source live stream based on a live translation process.
  • an embodiment of the present disclosure provides a live broadcast device, the device includes a translation module configured to respond to the detection of information about the source live stream reported by the source station, based on the live translation process, the source station in the source station The audio data in the live stream is translated to obtain subtitle data; the encoding module is configured to encode the subtitle data into the source live stream to obtain the target live stream; the transcoding module is configured to transcode the target live stream to obtain the transcoded The transcoded live stream; the live module is configured to perform live broadcast based on the transcoded live stream.
  • the translation module includes: an establishment unit configured to establish communication between the AI speech translation engine and the live translation process; a communication unit configured to communicate based on the communication between the AI speech translation engine and the live translation process The audio data in the source live stream in the source site is translated to obtain subtitle data.
  • the establishment unit is further configured to: establish the communication between the AI speech translation engine and the live translation process through the websocket communication protocol.
  • the encoding module includes: an alignment unit configured to, in response to obtaining the subtitle data, perform time stamp alignment on the subtitle data and the source live stream to obtain the aligned subtitle data and the source live stream; a merging unit configured to It is configured to merge and encode the aligned subtitle data with the source live stream to obtain the target live stream.
  • the device further includes: a cache module configured to locally cache the source live stream based on the live translation process in response to detecting relevant information of the source live stream reported by the source site.
  • a cache module configured to locally cache the source live stream based on the live translation process in response to detecting relevant information of the source live stream reported by the source site.
  • an embodiment of the present disclosure provides an electronic device, the electronic device includes one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are Multiple processors are executed, so that one or more processors implement the live broadcast method according to any embodiment of the first aspect.
  • an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the live broadcast method according to any embodiment of the first aspect is implemented.
  • FIG. 1 is an exemplary system architecture diagram in which the present disclosure can be applied
  • Fig. 2 is a flow chart according to one embodiment of the live broadcast method of the present disclosure
  • FIG. 3 is a schematic diagram of an application scenario of the live broadcast method according to the present disclosure.
  • Fig. 4 is a flow chart according to another embodiment of the live broadcast method of the present disclosure.
  • FIG. 5 is a schematic diagram of an embodiment of a live broadcast device according to the present disclosure.
  • FIG. 6 is a schematic structural diagram of a computer system suitable for implementing a server according to an embodiment of the present disclosure.
  • the relevant technology realizes live broadcast real-time translation and multilingual subtitle functions through offline manual simultaneous interpretation + subtitle machine equipment.
  • the above method mainly has the following problems:
  • FIG. 1 shows an exemplary system architecture 100 to which an embodiment of the live broadcast method of the present disclosure can be applied.
  • a system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 .
  • the network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 .
  • Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.
  • the terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages and the like.
  • Various communication client applications may be installed on the terminal devices 101, 102, 103, for example, live broadcast applications, communication applications, and the like.
  • the terminal devices 101, 102, and 103 may be hardware or software.
  • the terminal devices 101, 102, 103 When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to mobile phones and notebook computers.
  • the terminal devices 101, 102, 103 When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, for providing live broadcast services), or as a single software or software module. No specific limitation is made here.
  • the server 105 may be a server that provides various services. For example, in response to detecting the relevant information of the source live stream reported by the source station, the audio data in the source live stream in the source station is translated based on the live translation process to obtain subtitle data ; Encode the subtitle data into the source live stream to obtain the target live stream; transcode the target live stream to obtain the transcoded live stream; perform live broadcast based on the transcoded live stream.
  • the server 105 may be hardware or software.
  • the server 105 can be implemented as a distributed server cluster composed of multiple servers, or as a single server.
  • the server is software, it can be implemented as multiple software or software modules (for example, for providing live broadcast services), or as a single software or software module. No specific limitation is made here.
  • the live broadcast method may be executed by the server 105, or executed by the terminal devices 101, 102, 103, or executed by the server 105 and the terminal devices 101, 102, 103 in cooperation with each other.
  • each part (such as each unit, subunit, module, submodule) that the live broadcasting device includes can be all set in the server 105, also can be all set in the terminal equipment 101, 102, 103, can also be set in the server respectively 105 and terminal devices 101, 102, 103.
  • terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
  • FIG. 2 shows a schematic flowchart 200 of a live broadcast method applicable to the present disclosure.
  • the live broadcast method includes the following steps:
  • Step 201 in response to detecting the relevant information of the source live stream reported by the source station, based on the live translation process, the audio data in the source live stream in the source station is translated to obtain subtitle data.
  • the execution subject (server 105 or terminal equipment 101, 102, 103 as shown in Figure 1) can detect whether there is relevant information about the source live stream reported by the source station in real time or at intervals of preset durations, if detected The relevant information of the source live stream reported to the source station can send a task to the preset live translation process to control the live translation process to pull the audio data of the source live stream in the source station and translate it to obtain subtitle data .
  • the relevant information of the source live stream may include stream name, stream status, stream address, etc. of the source live stream, for example, vhost, app, name, ip, port, etc.
  • the execution subject can obtain the video source stream and aac (Advanced Audio Coding, Advanced Audio Coding) audio stream of the source live stream at the same time, and transcode the aac audio stream into an alphabet audio stream, and translate according to the alphabet audio stream to obtain subtitle data.
  • aac Advanced Audio Coding, Advanced Audio Coding
  • the translation refers to translating the content corresponding to the audio stream into one or more languages.
  • the executive body can directly control the live translation process to translate the audio data, or create an AI (Artificial Intelligence, artificial intelligence) voice translation engine to communicate with the live translation process to translate the audio data and obtain the translated audio data.
  • AI Artificial Intelligence, artificial intelligence
  • the subtitles are not limited in this disclosure.
  • the method further includes: in response to detecting relevant information of the source live stream reported by the source station, locally caching the source live stream based on the live translation process.
  • the execution subject if it detects the relevant information of the source live stream reported by the source station, it can issue a task to the preset live translation process to control the live translation process to obtain the audio of the source live stream in the source station The data is translated, and at the same time, the obtained source live stream is cached locally.
  • the execution subject can issue two ffmpeg tasks to the preset live translation process, and one ffmpeg task is used to instruct the live translation process to obtain the source information in the source station.
  • the audio data of the live stream is translated, and a ffmpeg task is used to instruct the live translation process to cache the obtained source live stream locally to ensure the synchronization of the source live stream and the obtained subtitle data.
  • ffmpeg is a set of open source computer programs that can be used to record, convert digital audio and video, and convert them into streams.
  • the source live stream is locally cached, and the audio data in the source live stream is translated to obtain subtitle data, and the subtitle The data is encoded into the source live stream to obtain the target live stream, and then transcoded live based on the target live stream, which effectively improves the real-time performance of generating subtitles from the live stream.
  • Step 202 encoding the subtitle data into the source live stream to obtain the target live stream.
  • the execution subject can directly encode the subtitle data into the corresponding source live stream, or align the subtitle data with the timestamp of the source live stream and perform encoding to obtain the target live stream stream, and push the target live stream to the source site.
  • encoding the subtitle data into the source live stream to obtain the target live stream includes: in response to obtaining the subtitle data, aligning the subtitle data with the source live stream to obtain the aligned subtitle data and Source live stream; merge and encode the aligned subtitle data with the source live stream to obtain the target live stream.
  • the execution subject can detect the subtitle data in real time, and in response to obtaining the subtitle data, can align the subtitle data with the video frame and audio frame in the source live stream to obtain the aligned subtitle data and the source live stream flow.
  • the subtitle data may multiplex the time stamp carried by the audio frame.
  • the execution subject merges and encodes the aligned subtitle data and the source live stream to obtain the target live stream, that is, the video stream with subtitles.
  • the subtitle data and the source live stream are time-stamp aligned to obtain the aligned subtitle data and the source live stream; the aligned subtitle data and the source live stream are merged and encoded to obtain the target
  • the live stream ensures the three-way synchronization of audio, video and subtitles.
  • Step 203 transcoding the target live stream to obtain the transcoded live stream for live broadcasting.
  • the execution subject can issue a task to the preset live transcoding process to control the live transcoding process to pull the target from the source station
  • the live stream is transcoded to obtain the transcoded live stream.
  • transcoding is used to indicate that the live stream in the source station is converted into different encoding formats, different resolutions, and different bit rates on the cloud and pushed to the audience, so as to meet the requirements of different network environments and different terminal devices. playback requirements in various scenarios.
  • the executive body can control the live transcoding process to convert the target live stream into transcoded streams of different resolutions, and users can choose video streams with different code rates to play according to their own network conditions to ensure smooth playback.
  • Step 204 perform live broadcast based on the transcoded live stream.
  • the execution subject after the execution subject generates the transcoded live stream, it can push the transcoded live stream to the source station.
  • the source station can forward the transcoded live stream to CDN (Content Delivery Network, that is, content distribution network) for end users to access.
  • CDN Content Delivery Network, that is, content distribution network
  • CDN is an intelligent virtual network built on the basis of the existing network. Relying on the edge servers deployed in various places, through the load balancing, content distribution, scheduling and other functional modules of the central platform, users can obtain the required content nearby and reduce network traffic. Congestion, improve user access response speed and hit rate.
  • FIG. 3 is a schematic diagram of an application scenario of the live broadcast method according to this embodiment.
  • the executive body 301 can detect whether there is a source station 302 in real time or at preset intervals, for example, the tp source station, the relevant information of the source live stream reported by the source station, if the source live stream reported by the source station is detected relevant information, then a task can be issued to the live translation process 303 to control the live translation process 303 to obtain the audio data 304 of the source live stream in the source station 302 and perform translation to obtain subtitle data 305 .
  • a source station 302 in real time or at preset intervals, for example, the tp source station, the relevant information of the source live stream reported by the source station, if the source live stream reported by the source station is detected relevant information, then a task can be issued to the live translation process 303 to control the live translation process 303 to obtain the audio data 304 of the source live stream in the source station 302 and perform translation to obtain subtitle data 305 .
  • the encoding process 308 issues a task to control the live transcoding process 308 to pull the target live stream 307 from the source station 302 and perform transcoding 309 to obtain the transcoded live stream 310, such as a multi-definition live stream with subtitles stream, and push the transcoded live stream to the source station 302 for live broadcasting.
  • the audio data in the source live stream in the source station is translated to obtain subtitle data; the subtitle data is encoded into The source live stream is used to obtain the target live stream; the target live stream is transcoded to obtain the transcoded live stream; live broadcast based on the transcoded live stream effectively improves the efficiency of real-time generation of live stream subtitles.
  • FIG. 4 it shows a flow 400 of another embodiment of the live broadcast method.
  • the process 400 of the live broadcast method of this embodiment may include the following steps:
  • Step 401 in response to detecting the relevant information of the source live stream reported by the source station, establish communication between the AI speech translation engine and the live translation process.
  • the execution subject can detect whether there is relevant information about the source live stream reported by the source station in real time or at intervals of a preset period of time, and in response to detecting the relevant information about the source live stream reported by the source station, an AI voice translation engine is established Communication with the live translation process.
  • the executive body can adopt the communication protocol in the existing technology or the future development technology, such as http, websocket, etc., to establish the communication between the AI speech translation engine and the live translation process.
  • the communication protocol in the existing technology or the future development technology, such as http, websocket, etc.
  • establishing the communication between the AI speech translation engine and the live translation process includes: establishing the communication between the AI speech translation engine and the live translation process through websocket.
  • the executive body can use the websocket communication protocol to establish communication between the AI speech translation engine and the live translation process.
  • websocket is a technology used for arbitrary two-way data transmission between applications and servers.
  • the websocket protocol is implemented based on the TCP (Transmission Control Protocol, Transmission Control Protocol) protocol, including the initial handshake process and the subsequent two-way transmission of multiple data frames. Its purpose is that when the websocket application and the websocket server perform frequent two-way communication, the server can avoid opening multiple HTTP (HyperText Transfer Protocol, hypertext transfer protocol) connections to save resources and improve work efficiency and resource utilization.
  • HTTP HyperText Transfer Protocol, hypertext transfer protocol
  • the execution subject controls the live translation process to translate the audio data in the source live stream may include: obtaining the aac audio stream in the source live stream and transcoding it into an alphabet audio stream, and then writing it into a unix socket The socket, further, reads the audio stream in the unix socket socket and sends it to the AI translation engine, and establishes a websocket connection with the AI translation engine at the same time, and detects the progress of the translation task in real time to obtain the translation output result.
  • This implementation method establishes the communication between the AI voice translation engine and the live translation process through websocket, and then based on the communication between the AI voice translation engine and the live translation process, the audio data in the live source stream in the source station is translated to obtain subtitle data , perform live broadcasting according to subtitle data and source live stream, effectively improving the efficiency of generating subtitles from live stream.
  • Step 402 Based on the communication between the AI speech translation engine and the live translation process, the audio data in the source live stream is translated to obtain subtitle data.
  • the audio data in the live source stream can be translated through the communication between the AI speech translation engine and the live translation process, and according to The translation result obtains subtitle data.
  • Step 403 encoding the subtitle data into the source live stream to obtain the target live stream.
  • step 403 for implementation details and technical effects of step 403, reference may be made to the description of step 202, which will not be repeated here.
  • Step 404 transcoding the target live stream to obtain the transcoded live stream.
  • step 404 for implementation details and technical effects of step 404, reference may be made to the description of step 203, which will not be repeated here.
  • Step 405 perform live broadcast based on the transcoded live stream.
  • step 405 for implementation details and technical effects of step 405, reference may be made to the description of step 204, which will not be repeated here.
  • the process 400 of the live broadcast method in this embodiment reflects the establishment of an AI voice translation engine and
  • the communication between the live translation process is based on the communication between the AI voice translation engine and the live translation process to translate the audio data in the source live stream in the source station to obtain the subtitle data, and then obtain the target according to the subtitle data and the source live stream
  • the live stream is transcoded based on the target live stream, which does not occupy the resources of the live translation process, and at the same time helps to improve the validity and reliability of the obtained subtitle data, thereby improving the effectiveness and reliability of the obtained live stream with subtitles. reliability.
  • the present disclosure provides an embodiment of a live broadcast device.
  • This device embodiment corresponds to the method embodiment shown in FIG. 2 , and the device can specifically be applied to in various electronic devices.
  • the live broadcast device 500 of this embodiment includes: a translation module 501 , an encoding module 502 , a transcoding module 503 and a live broadcast module 504 .
  • the translation module 501 may be configured to translate the audio data in the source live stream in the source site based on the live translation process to obtain subtitle data in response to detecting the relevant information of the source live stream reported by the source site.
  • the encoding module 502 can be configured to encode the subtitle data into the source live stream to obtain the target live stream.
  • the transcoding module 503 may be configured to transcode the target live stream to obtain the transcoded live stream.
  • the live broadcast module 504 can be configured to push the transcoded live stream to the source station for live broadcast.
  • the translation module includes: an establishment unit configured to establish communication between the AI speech translation engine and the live translation process; a communication unit configured to communicate with the live translation process based on the AI speech translation engine The communication between processes translates the audio data in the source live stream in the source station to obtain subtitle data.
  • the establishment unit is further configured to: establish the communication between the AI speech translation engine and the live translation process through websocket.
  • the encoding module includes: an alignment unit configured to, in response to obtaining the subtitle data, perform timestamp alignment on the subtitle data and the source live stream, and obtain the aligned subtitle data and the source live stream stream; a merging unit configured to merge and encode the aligned subtitle data with the source live stream to obtain a target live stream.
  • the device further includes: a caching module configured to locally cache the source live stream based on the live translation process in response to detecting the relevant information of the source live stream reported by the source station.
  • a caching module configured to locally cache the source live stream based on the live translation process in response to detecting the relevant information of the source live stream reported by the source station.
  • the present disclosure also provides an electronic device and a readable storage medium.
  • FIG. 6 it is a block diagram of an electronic device according to a live broadcast method according to an embodiment of the present disclosure.
  • Electronic device 600 is a block diagram of an electronic device according to the live broadcast method of an embodiment of the present disclosure.
  • Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • the electronic device includes: one or more processors 601, a memory 602, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces.
  • the various components are interconnected using different buses and can be mounted on a common motherboard or otherwise as desired.
  • the processor may process instructions executed within the electronic device, including instructions stored in or on the memory, to display graphical information of a GUI on an external input/output device such as a display device coupled to an interface.
  • multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired.
  • multiple electronic devices may be connected, with each device providing some of the necessary operations (eg, as a server array, a set of blade servers, or a multi-processor system).
  • a processor 601 is taken as an example.
  • the memory 602 is a non-transitory computer-readable storage medium provided in the present disclosure.
  • the memory stores instructions executable by at least one processor, so that the at least one processor executes the live broadcast method provided by the present disclosure.
  • the non-transitory computer-readable storage medium of the present disclosure stores computer instructions, and the computer instructions are used to make the computer execute the live broadcast method provided by the present disclosure.
  • the memory 602 as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the live broadcast method in the embodiments of the present disclosure (for example, the accompanying drawings 5 shows the translation module 501, encoding module 502, transcoding module 503 and live broadcast module 504).
  • the processor 601 runs the non-transitory software programs, instructions and modules stored in the memory 602 to execute various functional applications of the server and live broadcast, that is, to realize the live broadcast method in the above method embodiments.
  • the memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created by using live electronic devices, and the like.
  • the memory 602 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
  • the storage 602 may optionally include storages that are set remotely relative to the processor 601, and these remote storages may be connected to the live electronic device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the electronic equipment of the live broadcast method may further include: an input device 603 and an output device 604 .
  • the processor 601, the memory 602, the input device 603, and the output device 604 may be connected through a bus or in other ways. In FIG. 6, connection through a bus is taken as an example.
  • the input device 603 can receive input digital or character information, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick and other input devices.
  • the output device 604 may include a display device, an auxiliary lighting device (eg, LED), a tactile feedback device (eg, a vibration motor), and the like.
  • the display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
  • Various implementations of the systems and techniques described herein can be implemented in digital electronic circuitry, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
  • machine-readable medium and “computer-readable medium” refer to any computer program product, apparatus, and/or means for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals.
  • machine-readable signal refers to any signal used to provide machine instructions and/or data to a programmable processor.
  • the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for live broadcast to the user; and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer.
  • a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
  • the systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
  • a computer system may include clients and servers.
  • Clients and servers are generally remote from each other and typically interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present application relates to the technical field of live broadcast, and discloses a live broadcast method and device. A specific embodiment of the method comprises: in response to detecting related information of a source live broadcast stream reported by a source station, translating audio data in the source live broadcast stream in the source station on the basis of the live broadcast translation process to obtain subtitle data; encoding the subtitle data into the source live broadcast stream to obtain a target live broadcast stream; transcoding the target live broadcast stream in the source station to obtain a transcoded live broadcast stream; and performing live broadcast on the basis of the transcoded live broadcast stream.

Description

直播方法和装置Live broadcast method and device
本申请要求于2021年11月25日提交的、申请号为202111414398.X、发明名称为“直播方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请。This application claims the priority of the Chinese patent application with application number 202111414398.X and titled "Live Streaming Method and Apparatus" filed on November 25, 2021, the entirety of which is incorporated herein by reference.
技术领域technical field
本公开涉及计算机技术领域,具体涉及直播技术领域,尤其涉及一种直播方法和装置。The present disclosure relates to the field of computer technology, in particular to the field of live broadcast technology, and in particular to a live broadcast method and device.
背景技术Background technique
随着时代的发展,直播行业有了质的飞跃,对高清画质、低延时、声画同步等问题已经优化到了极致,然而用户的需求并不满足于此。With the development of the times, the live broadcast industry has made a qualitative leap, and issues such as high-definition picture quality, low latency, and synchronization of audio and video have been optimized to the extreme. However, the needs of users are not satisfied with this.
在某些场景例如各大体育赛事、大型会议报告、在线教育培训等,都需要对直播进行实时翻译并添加多语言字幕。In some scenarios, such as major sports events, large-scale conference reports, online education and training, etc., it is necessary to translate live broadcasts in real time and add multilingual subtitles.
发明内容Contents of the invention
本公开实施例提供了一种直播方法、装置、设备以及存储介质。Embodiments of the present disclosure provide a live broadcast method, device, device, and storage medium.
根据第一方面,本公开实施例提供了一种直播方法,该方法包括:响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源站中的源直播流中的音频数据进行翻译,得到字幕数据;将字幕数据编码进源直播流,得到目标直播流;对目标直播流进行转码,得到转码后的直播流;基于转码后的直播流进行直播。According to the first aspect, an embodiment of the present disclosure provides a live broadcast method, the method includes: in response to detecting the relevant information of the source live stream reported by the source station, based on the live translation process, the audio in the source live stream in the source station Translate the data to obtain subtitle data; encode the subtitle data into the source live stream to obtain the target live stream; transcode the target live stream to obtain the transcoded live stream; perform live broadcast based on the transcoded live stream.
在一些实施例中,基于直播翻译进程对源站中的源直播流中的音频数据进行翻译,得到字幕数据,包括:建立AI语音翻译引擎与直播翻译进程之间的通信;基于AI语音翻译引擎与直播翻译进程之间的通信对源站中的源直播流中的音频数据进行翻译,得到字幕数据。In some embodiments, based on the live translation process, the audio data in the source live stream in the source station is translated to obtain subtitle data, including: establishing communication between the AI voice translation engine and the live translation process; based on the AI voice translation engine The communication with the live translation process translates the audio data in the source live stream in the source station to obtain subtitle data.
在一些实施例中,建立AI语音翻译引擎与直播翻译进程之间的通信,包括:通过websocket建立AI语音翻译引擎与直播翻译进程之间的通信。In some embodiments, establishing the communication between the AI speech translation engine and the live translation process includes: establishing the communication between the AI speech translation engine and the live translation process through websocket.
在一些实施例中,将字幕数据编码进所述源直播流,得到目标直播流,包括:响应于获取到字幕数据,将字幕数据与源直播流进行时间戳对齐,得到对齐后的字幕数据与源直播流;将对齐后的字幕数据与源直播流进行合并编码,得到目标直播流。In some embodiments, encoding the subtitle data into the source live stream to obtain the target live stream includes: in response to obtaining the subtitle data, aligning the subtitle data and the source live stream with time stamps to obtain the aligned subtitle data and Source live stream; merge and encode the aligned subtitle data with the source live stream to obtain the target live stream.
在一些实施例中,该方法还包括:响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对所述源直播流进行本地缓存。In some embodiments, the method further includes: in response to detecting relevant information of the source live stream reported by the source station, locally caching the source live stream based on a live translation process.
根据第二方面,本公开实施例提供了一种直播装置,该装置包括翻译模块,被配置成响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源站中的源直播流中的音频数据进行翻译,得到字幕数据;编码模块,被配置成将字幕数据编码进源直播流,得到目标直播流;转码模块,被配置成对目标直播流进行转码,得到转码后的直播流;直播模块,被配置基于转码后的直播流进行直播。According to the second aspect, an embodiment of the present disclosure provides a live broadcast device, the device includes a translation module configured to respond to the detection of information about the source live stream reported by the source station, based on the live translation process, the source station in the source station The audio data in the live stream is translated to obtain subtitle data; the encoding module is configured to encode the subtitle data into the source live stream to obtain the target live stream; the transcoding module is configured to transcode the target live stream to obtain the transcoded The transcoded live stream; the live module is configured to perform live broadcast based on the transcoded live stream.
在一些实施例中,翻译模块包括:建立单元,被配置成建立AI语音翻译引擎与直播翻译进程之间的通信;通信单元,被配置成基于AI语音翻译引擎与直播翻译进程之间的通信对源站中的源直播流中的音频数据进行翻译,得到字幕数据。In some embodiments, the translation module includes: an establishment unit configured to establish communication between the AI speech translation engine and the live translation process; a communication unit configured to communicate based on the communication between the AI speech translation engine and the live translation process The audio data in the source live stream in the source site is translated to obtain subtitle data.
在一些实施例中,建立单元进一步被配置成:通过websocket通信协议建立AI语音翻译引擎与直播翻译进程之间的通信。In some embodiments, the establishment unit is further configured to: establish the communication between the AI speech translation engine and the live translation process through the websocket communication protocol.
在一些实施例中,编码模块包括:对齐单元,被配置成响应于获取到字幕数据,将字幕数据与源直播流进行时间戳对齐,得到对齐后的字幕数据与源直播流;合并单元,被配置成将对齐后的字幕数据与源直播流进行合并编码,得到目标直播流。In some embodiments, the encoding module includes: an alignment unit configured to, in response to obtaining the subtitle data, perform time stamp alignment on the subtitle data and the source live stream to obtain the aligned subtitle data and the source live stream; a merging unit configured to It is configured to merge and encode the aligned subtitle data with the source live stream to obtain the target live stream.
在一些实施例中,该装置还包括:缓存模块,被配置成响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源直播流进行本地缓存。In some embodiments, the device further includes: a cache module configured to locally cache the source live stream based on the live translation process in response to detecting relevant information of the source live stream reported by the source site.
根据第三方面,本公开实施例提供了一种电子设备,该电子设备包括一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被该一个或多个处理器执行,使得一个或多个处理器实现如第一方面的任一实施例的直播方法。According to a third aspect, an embodiment of the present disclosure provides an electronic device, the electronic device includes one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are Multiple processors are executed, so that one or more processors implement the live broadcast method according to any embodiment of the first aspect.
根据第四方面,本公开实施例提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面的任一实施例的直播方法。According to a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the live broadcast method according to any embodiment of the first aspect is implemented.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其他特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be easily understood from the following description.
附图说明Description of drawings
图1是本公开可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram in which the present disclosure can be applied;
图2是根据本公开的直播方法的一个实施例的流程图;Fig. 2 is a flow chart according to one embodiment of the live broadcast method of the present disclosure;
图3是根据本公开的直播方法的一个应用场景的示意图;FIG. 3 is a schematic diagram of an application scenario of the live broadcast method according to the present disclosure;
图4是根据本公开的直播方法的另一个实施例的流程图;Fig. 4 is a flow chart according to another embodiment of the live broadcast method of the present disclosure;
图5是根据本公开的直播装置的一个实施例的示意图;FIG. 5 is a schematic diagram of an embodiment of a live broadcast device according to the present disclosure;
图6是适于用来实现本公开实施例的服务器的计算机系统的结构示意图。FIG. 6 is a schematic structural diagram of a computer system suitable for implementing a server according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that, in the case of no conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.
相关技术通过线下人工同传+字幕机设备实现直播实时翻译和多语言字幕功能。The relevant technology realizes live broadcast real-time translation and multilingual subtitle functions through offline manual simultaneous interpretation + subtitle machine equipment.
上述方式主要存在如下问题:The above method mainly has the following problems:
1、成本高,每一场直播都需要专业的同传人员和相关的硬件设备;1. The cost is high, and each live broadcast requires professional simultaneous interpreters and related hardware equipment;
2、效率低,受人工和设备的影响,效率低下,不具备大规模使用 的条件。2. Low efficiency, affected by labor and equipment, low efficiency, does not have the conditions for large-scale use.
图1示出了可以应用本公开的直播方法的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which an embodiment of the live broadcast method of the present disclosure can be applied.
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , a system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 . Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.
终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如,直播类应用、通讯类应用等。The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages and the like. Various communication client applications may be installed on the terminal devices 101, 102, 103, for example, live broadcast applications, communication applications, and the like.
终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于手机和笔记本电脑。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供直播服务),也可以实现成单个软件或软件模块。在此不做具体限定。The terminal devices 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to mobile phones and notebook computers. When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, for providing live broadcast services), or as a single software or software module. No specific limitation is made here.
服务器105可以是提供各种服务的服务器,例如,响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源站中的源直播流中的音频数据进行翻译,得到字幕数据;将字幕数据编码进源直播流,得到目标直播流;对目标直播流进行转码,得到转码后的直播流;基于转码后的直播流进行直播。The server 105 may be a server that provides various services. For example, in response to detecting the relevant information of the source live stream reported by the source station, the audio data in the source live stream in the source station is translated based on the live translation process to obtain subtitle data ; Encode the subtitle data into the source live stream to obtain the target live stream; transcode the target live stream to obtain the transcoded live stream; perform live broadcast based on the transcoded live stream.
需要说明的是,服务器105可以是硬件,也可以是软件。当服务器105为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供直播服务),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the server 105 may be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, for providing live broadcast services), or as a single software or software module. No specific limitation is made here.
需要指出的是,本公开的实施例所提供的直播方法可以由服务器105执行,也可以由终端设备101、102、103执行,还可以由服务器105和终端设备101、102、103彼此配合执行。相应地,直播装置包括的各个部分(例如各个单元、子单元、模块、子模块)可以全部设置 于服务器105中,也可以全部设置于终端设备101、102、103中,还可以分别设置于服务器105和终端设备101、102、103中。It should be noted that the live broadcast method provided by the embodiments of the present disclosure may be executed by the server 105, or executed by the terminal devices 101, 102, 103, or executed by the server 105 and the terminal devices 101, 102, 103 in cooperation with each other. Correspondingly, each part (such as each unit, subunit, module, submodule) that the live broadcasting device includes can be all set in the server 105, also can be all set in the terminal equipment 101, 102, 103, can also be set in the server respectively 105 and terminal devices 101, 102, 103.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
图2示出了可以应用于本公开的直播方法的流程示意图200。在本实施例中,直播方法包括以下步骤:FIG. 2 shows a schematic flowchart 200 of a live broadcast method applicable to the present disclosure. In this embodiment, the live broadcast method includes the following steps:
步骤201,响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源站中的源直播流中的音频数据进行翻译,得到字幕数据。 Step 201, in response to detecting the relevant information of the source live stream reported by the source station, based on the live translation process, the audio data in the source live stream in the source station is translated to obtain subtitle data.
在本实施例中,执行主体(如图1中所示的服务器105或终端设备101、102、103)可实时或间隔预设时长检测是否存在源站上报的源直播流的相关信息,若检测到源站上报的源直播流的相关信息,则可向预设的直播翻译进程下发任务,以控制直播翻译进程拉取源站中的源直播流的音频数据,并进行翻译,得到字幕数据。In this embodiment, the execution subject (server 105 or terminal equipment 101, 102, 103 as shown in Figure 1) can detect whether there is relevant information about the source live stream reported by the source station in real time or at intervals of preset durations, if detected The relevant information of the source live stream reported to the source station can send a task to the preset live translation process to control the live translation process to pull the audio data of the source live stream in the source station and translate it to obtain subtitle data .
其中,源直播流的相关信息可以包括源直播流的流名、流状态、流地址等,例如,vhost、app、name、ip、port等。Wherein, the relevant information of the source live stream may include stream name, stream status, stream address, etc. of the source live stream, for example, vhost, app, name, ip, port, etc.
这里,执行主体可同时获取源直播流的视频源流和aac(Advanced Audio Coding,高级音频编码)音频流,并将aac音频流转码为opus音频流,并根据opus音频流进行翻译,得到字幕数据。Here, the execution subject can obtain the video source stream and aac (Advanced Audio Coding, Advanced Audio Coding) audio stream of the source live stream at the same time, and transcode the aac audio stream into an opus audio stream, and translate according to the opus audio stream to obtain subtitle data.
其中,翻译是指将音频流对应的内容翻译成一种或多种语言。The translation refers to translating the content corresponding to the audio stream into one or more languages.
需要指出的是,执行主体可直接控制直播翻译进程对音频数据进行翻译,也可创建AI(Artificial Intelligence,人工智能)语音翻译引擎与直播翻译进程进行通信以对音频数据进行翻译,得到翻译后的字幕,本公开对此不作限定。It should be pointed out that the executive body can directly control the live translation process to translate the audio data, or create an AI (Artificial Intelligence, artificial intelligence) voice translation engine to communicate with the live translation process to translate the audio data and obtain the translated audio data. The subtitles are not limited in this disclosure.
在一些可选的方式中,该方法还包括:响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源直播流进行本地缓存。In some optional manners, the method further includes: in response to detecting relevant information of the source live stream reported by the source station, locally caching the source live stream based on the live translation process.
在本实现方式中,执行主体若检测到源站上报的源直播流的相关信息,则可向预设的直播翻译进程下发任务,以控制直播翻译进程获取源站中的源直播流的音频数据,进行翻译,同时将获取的源直播流 进行本地缓存。In this implementation, if the execution subject detects the relevant information of the source live stream reported by the source station, it can issue a task to the preset live translation process to control the live translation process to obtain the audio of the source live stream in the source station The data is translated, and at the same time, the obtained source live stream is cached locally.
具体地,执行主体若检测到源站上报的源直播流的相关信息,则可向预设的直播翻译进程下发两个ffmpeg任务,一个ffmpeg任务用于指示直播翻译进程获取源站中的源直播流的音频数据进行翻译,一个ffmpeg任务用于指示直播翻译进程将获取的源直播流进行本地缓存,以保障源直播流与获取的字幕数据的同步。Specifically, if the execution subject detects the relevant information of the source live stream reported by the source station, it can issue two ffmpeg tasks to the preset live translation process, and one ffmpeg task is used to instruct the live translation process to obtain the source information in the source station. The audio data of the live stream is translated, and a ffmpeg task is used to instruct the live translation process to cache the obtained source live stream locally to ensure the synchronization of the source live stream and the obtained subtitle data.
其中,ffmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。Among them, ffmpeg is a set of open source computer programs that can be used to record, convert digital audio and video, and convert them into streams.
该实现方式通过响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源直播流进行本地缓存,以及对源直播流中的音频数据进行翻译,得到字幕数据,并将字幕数据编码进源直播流,得到目标直播流,进而基于目标直播流进行转码直播,有效提升了直播流生成字幕的实时性。In this implementation, by responding to the detection of the relevant information of the source live stream reported by the source station, based on the live translation process, the source live stream is locally cached, and the audio data in the source live stream is translated to obtain subtitle data, and the subtitle The data is encoded into the source live stream to obtain the target live stream, and then transcoded live based on the target live stream, which effectively improves the real-time performance of generating subtitles from the live stream.
步骤202,将字幕数据编码进源直播流,得到目标直播流。 Step 202, encoding the subtitle data into the source live stream to obtain the target live stream.
在本实施例中,执行主体在获取到字幕数据后,可直接将字幕数据编码进对应的源直播流,也可以将字幕数据与源直播流的时间戳进行对齐后,进行编码,得到目标直播流,并将目标直播流推送至源站。In this embodiment, after obtaining the subtitle data, the execution subject can directly encode the subtitle data into the corresponding source live stream, or align the subtitle data with the timestamp of the source live stream and perform encoding to obtain the target live stream stream, and push the target live stream to the source site.
在一些可选的方式中,将字幕数据编码进源直播流,得到目标直播流,包括:响应于获取到字幕数据,将字幕数据与源直播流进行时间戳对齐,得到对齐后的字幕数据与源直播流;将对齐后的字幕数据与源直播流进行合并编码,得到目标直播流。In some optional manners, encoding the subtitle data into the source live stream to obtain the target live stream includes: in response to obtaining the subtitle data, aligning the subtitle data with the source live stream to obtain the aligned subtitle data and Source live stream; merge and encode the aligned subtitle data with the source live stream to obtain the target live stream.
在本实现方式中,执行主体可实时检测字幕数据,响应于获取到字幕数据,可将字幕数据与源直播流中的视频帧和音频帧进行时间戳对齐,得到对齐后的字幕数据和源直播流。这里,字幕数据可以复用音频帧携带的时间戳。In this implementation, the execution subject can detect the subtitle data in real time, and in response to obtaining the subtitle data, can align the subtitle data with the video frame and audio frame in the source live stream to obtain the aligned subtitle data and the source live stream flow. Here, the subtitle data may multiplex the time stamp carried by the audio frame.
进一步地,执行主体将对齐后的字幕数据与源直播流进行合并编码,得到目标直播流,即带字幕的视频流。Further, the execution subject merges and encodes the aligned subtitle data and the source live stream to obtain the target live stream, that is, the video stream with subtitles.
该实现方式通过响应于获取到字幕数据,将字幕数据与源直播流进行时间戳对齐,得到对齐后的字幕数据与源直播流;将对齐后的字幕数据与源直播流进行合并编码,得到目标直播流,保障了音、画、 字幕三方同步。In this implementation, in response to the acquisition of the subtitle data, the subtitle data and the source live stream are time-stamp aligned to obtain the aligned subtitle data and the source live stream; the aligned subtitle data and the source live stream are merged and encoded to obtain the target The live stream ensures the three-way synchronization of audio, video and subtitles.
步骤203,对目标直播流进行转码,得到转码后的直播流以进行直播。 Step 203, transcoding the target live stream to obtain the transcoded live stream for live broadcasting.
在本实施例中,执行主体可在检测到源站上报的目标直播流已生成的信息后,可以向预设的直播转码进程下发任务以控制直播转码进程从源站中拉取目标直播流进行转码,得到转码后的直播流。In this embodiment, after detecting the information that the target live stream reported by the source station has been generated, the execution subject can issue a task to the preset live transcoding process to control the live transcoding process to pull the target from the source station The live stream is transcoded to obtain the transcoded live stream.
这里,转码用于指示将源站中的直播流在云端转换为不同的编码格式、不同分辨率、不同码率的转码流推送给观众,以满足不同网络环境、不同终端设备的等各种场景下的播放需求。Here, transcoding is used to indicate that the live stream in the source station is converted into different encoding formats, different resolutions, and different bit rates on the cloud and pushed to the audience, so as to meet the requirements of different network environments and different terminal devices. playback requirements in various scenarios.
具体地,执行主体可控制直播转码进程将目标直播流转换为不同清晰度的转码流,用户可根据自己的网络情况选择不同的码率的视频流进行播放,以保证播放的流畅性。Specifically, the executive body can control the live transcoding process to convert the target live stream into transcoded streams of different resolutions, and users can choose video streams with different code rates to play according to their own network conditions to ensure smooth playback.
步骤204,基于转码后的直播流进行直播。 Step 204, perform live broadcast based on the transcoded live stream.
在本实施例中,执行主体在生成转码后的直播流后,可将转码后的直播流推送至源站。源站可将转码后的直播流转推给CDN(Content Delivery Network,即内容分发网络)以供终端用户访问。In this embodiment, after the execution subject generates the transcoded live stream, it can push the transcoded live stream to the source station. The source station can forward the transcoded live stream to CDN (Content Delivery Network, that is, content distribution network) for end users to access.
其中,CDN是构建在现有网络基础之上的智能虚拟网络,依靠部署在各地的边缘服务器,通过中心平台的负载均衡、内容分发、调度等功能模块,使用户就近获取所需内容,降低网络拥塞,提高用户访问响应速度和命中率。Among them, CDN is an intelligent virtual network built on the basis of the existing network. Relying on the edge servers deployed in various places, through the load balancing, content distribution, scheduling and other functional modules of the central platform, users can obtain the required content nearby and reduce network traffic. Congestion, improve user access response speed and hit rate.
继续参见图3,图3是根据本实施例的直播方法的应用场景的一个示意图。Continue to refer to FIG. 3 , which is a schematic diagram of an application scenario of the live broadcast method according to this embodiment.
在图3的应用场景中,执行主体301可实时或间隔预设时长检测是否存在源站302,例如,tp源站,上报的源直播流的相关信息,若检测到源站上报的源直播流的相关信息,则可向直播翻译进程303下发任务,以控制直播翻译进程303获取源站302中的源直播流的音频数据304,并进行翻译,得到字幕数据305。将字幕数据305编码进源直播流306,得到目标直播流307,并将目标直播流307推送至源站302;执行主体响应于检测到目标直播流已推送至源站302,则可向直播转 码进程308下发任务,以控制直播转码进程308从源站302拉取目标直播流307并进行转码309,以得到转码后的直播流310,如,带字幕的多清晰度的直播流,并将转码后的直播流推送至源站302以进行直播。In the application scenario in Figure 3, the executive body 301 can detect whether there is a source station 302 in real time or at preset intervals, for example, the tp source station, the relevant information of the source live stream reported by the source station, if the source live stream reported by the source station is detected relevant information, then a task can be issued to the live translation process 303 to control the live translation process 303 to obtain the audio data 304 of the source live stream in the source station 302 and perform translation to obtain subtitle data 305 . Encode the subtitle data 305 into the source live stream 306 to obtain the target live stream 307, and push the target live stream 307 to the source station 302; the execution subject can transfer to the live broadcast in response to detecting that the target live stream has been pushed to the source station 302 The encoding process 308 issues a task to control the live transcoding process 308 to pull the target live stream 307 from the source station 302 and perform transcoding 309 to obtain the transcoded live stream 310, such as a multi-definition live stream with subtitles stream, and push the transcoded live stream to the source station 302 for live broadcasting.
本公开的直播方法,通过响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源站中的源直播流中的音频数据进行翻译,得到字幕数据;将字幕数据编码进源直播流,得到目标直播流;对目标直播流进行转码,得到转码后的直播流;基于转码后的直播流进行直播,有效提升了实时生成直播流字幕的效率。In the live broadcast method of the present disclosure, by responding to the relevant information of the source live stream reported by the source station, based on the live translation process, the audio data in the source live stream in the source station is translated to obtain subtitle data; the subtitle data is encoded into The source live stream is used to obtain the target live stream; the target live stream is transcoded to obtain the transcoded live stream; live broadcast based on the transcoded live stream effectively improves the efficiency of real-time generation of live stream subtitles.
进一步参考图4,其示出了直播方法的又一个实施例的流程400。在本实施例中,本实施例的直播方法的流程400,可包括以下步骤:Further referring to FIG. 4 , it shows a flow 400 of another embodiment of the live broadcast method. In this embodiment, the process 400 of the live broadcast method of this embodiment may include the following steps:
步骤401,响应于检测到源站上报的源直播流的相关信息,建立AI语音翻译引擎与直播翻译进程之间的通信。 Step 401, in response to detecting the relevant information of the source live stream reported by the source station, establish communication between the AI speech translation engine and the live translation process.
在本实施例中,执行主体可实时或间隔预设时长检测是否存在源站上报的源直播流的相关信息,响应于检测到源站上报的源直播流的相关信息,则建立AI语音翻译引擎与直播翻译进程之间的通信。In this embodiment, the execution subject can detect whether there is relevant information about the source live stream reported by the source station in real time or at intervals of a preset period of time, and in response to detecting the relevant information about the source live stream reported by the source station, an AI voice translation engine is established Communication with the live translation process.
这里,执行主体可以采用现有技术或未来发展技术中的通信协议,例如,http、websocket等,建立AI语音翻译引擎与直播翻译进程之间的通信。Here, the executive body can adopt the communication protocol in the existing technology or the future development technology, such as http, websocket, etc., to establish the communication between the AI speech translation engine and the live translation process.
在一些可选的方式中,建立AI语音翻译引擎与直播翻译进程之间的通信,包括:通过websocket建立AI语音翻译引擎与直播翻译进程之间的通信。In some optional ways, establishing the communication between the AI speech translation engine and the live translation process includes: establishing the communication between the AI speech translation engine and the live translation process through websocket.
在本实现方式中,执行主体可以采用websocket通信协议建立AI语音翻译引擎与直播翻译进程之间的通信。In this implementation, the executive body can use the websocket communication protocol to establish communication between the AI speech translation engine and the live translation process.
其中,websocket用于在应用和服务器之间进行任意的双向数据传输的一种技术。websocket协议基于TCP(Transmission Control Protocol,传输控制协议)协议实现,包含初始的握手过程,以及后续的多次数据帧双向传输过程。其目的是在websocket应用和websocket服务器进行频繁双向通信时,可以使服务器避免打开多个HTTP(HyperText  Transfer Protocol,超文本传输协议)连接进行工作来节约资源,提高了工作效率和资源利用率。Among them, websocket is a technology used for arbitrary two-way data transmission between applications and servers. The websocket protocol is implemented based on the TCP (Transmission Control Protocol, Transmission Control Protocol) protocol, including the initial handshake process and the subsequent two-way transmission of multiple data frames. Its purpose is that when the websocket application and the websocket server perform frequent two-way communication, the server can avoid opening multiple HTTP (HyperText Transfer Protocol, hypertext transfer protocol) connections to save resources and improve work efficiency and resource utilization.
具体地,执行主体控制直播翻译进程对源直播流中的音频数据进行翻译的操作可以包括:获取源直播流中的aac音频流并将其转码为opus音频流,进而将其写入unix socket套接字,进一步地,读取unix socket套接字中的音频流并送入AI翻译引擎,同时与AI翻译引擎建立websocket链接,并实时检测翻译任务进程,获取翻译输出结果。Specifically, the execution subject controls the live translation process to translate the audio data in the source live stream may include: obtaining the aac audio stream in the source live stream and transcoding it into an opus audio stream, and then writing it into a unix socket The socket, further, reads the audio stream in the unix socket socket and sends it to the AI translation engine, and establishes a websocket connection with the AI translation engine at the same time, and detects the progress of the translation task in real time to obtain the translation output result.
该实现方式通过websocket建立AI语音翻译引擎与直播翻译进程之间的通信,进而基于AI语音翻译引擎与直播翻译进程之间的通信对源站中的直播源流中的音频数据进行翻译,得到字幕数据,根据字幕数据和源直播流进行直播,有效提高了直播流生成字幕的效率。This implementation method establishes the communication between the AI voice translation engine and the live translation process through websocket, and then based on the communication between the AI voice translation engine and the live translation process, the audio data in the live source stream in the source station is translated to obtain subtitle data , perform live broadcasting according to subtitle data and source live stream, effectively improving the efficiency of generating subtitles from live stream.
步骤402,基于AI语音翻译引擎与直播翻译进程之间的通信对源直播流中的音频数据进行翻译,得到字幕数据。Step 402: Based on the communication between the AI speech translation engine and the live translation process, the audio data in the source live stream is translated to obtain subtitle data.
在本实施例中,执行主体在建立AI语音翻译引擎与直播翻译进程之间的通信后,可通过AI语音翻译引擎与直播翻译进程之间的通信对直播源流中的音频数据进行翻译,并根据翻译结果得到字幕数据。In this embodiment, after the execution subject establishes the communication between the AI speech translation engine and the live translation process, the audio data in the live source stream can be translated through the communication between the AI speech translation engine and the live translation process, and according to The translation result obtains subtitle data.
步骤403,将字幕数据编码进源直播流,得到目标直播流。 Step 403, encoding the subtitle data into the source live stream to obtain the target live stream.
在本实施例中,步骤403的实现细节和技术效果,可以参考对步骤202的描述,在此不再赘述。In this embodiment, for implementation details and technical effects of step 403, reference may be made to the description of step 202, which will not be repeated here.
步骤404,对目标直播流进行转码,得到转码后的直播流。 Step 404, transcoding the target live stream to obtain the transcoded live stream.
在本实施例中,步骤404的实现细节和技术效果,可以参考对步骤203的描述,在此不再赘述。In this embodiment, for implementation details and technical effects of step 404, reference may be made to the description of step 203, which will not be repeated here.
步骤405,基于转码后的直播流进行直播。 Step 405, perform live broadcast based on the transcoded live stream.
在本实施例中,步骤405的实现细节和技术效果,可以参考对步骤204的描述,在此不再赘述。In this embodiment, for implementation details and technical effects of step 405, reference may be made to the description of step 204, which will not be repeated here.
本公开的上述实施例,与图2对应的实施例相比,本实施例中的直播方法的流程400体现了响应于检测到源站上报的源直播流的相关信息,建立AI语音翻译引擎与直播翻译进程之间的通信,基于AI语音翻译引擎与直播翻译进程之间的通信对源站中的源直播流中的音频数据进行翻译,得到字幕数据,进而根据字幕数据和源直播流得到目 标直播流,并基于目标直播流进行转码直播,可不占用直播翻译进程的资源,同时有助于提升获取的字幕数据的有效性和可靠性,进而提升获取的带字幕的直播流的有效性和可靠性。In the above-mentioned embodiment of the present disclosure, compared with the embodiment corresponding to FIG. 2 , the process 400 of the live broadcast method in this embodiment reflects the establishment of an AI voice translation engine and The communication between the live translation process is based on the communication between the AI voice translation engine and the live translation process to translate the audio data in the source live stream in the source station to obtain the subtitle data, and then obtain the target according to the subtitle data and the source live stream The live stream is transcoded based on the target live stream, which does not occupy the resources of the live translation process, and at the same time helps to improve the validity and reliability of the obtained subtitle data, thereby improving the effectiveness and reliability of the obtained live stream with subtitles. reliability.
进一步参考图5,作为对上述各图所示方法的实现,本公开提供了一种直播装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。With further reference to FIG. 5 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a live broadcast device. This device embodiment corresponds to the method embodiment shown in FIG. 2 , and the device can specifically be applied to in various electronic devices.
如图5所示,本实施例的直播装置500包括:翻译模块501、编码模块502、转码模块503和直播模块504。As shown in FIG. 5 , the live broadcast device 500 of this embodiment includes: a translation module 501 , an encoding module 502 , a transcoding module 503 and a live broadcast module 504 .
其中,翻译模块501,可被配置成响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对源站中的源直播流中的音频数据进行翻译,得到字幕数据。Wherein, the translation module 501 may be configured to translate the audio data in the source live stream in the source site based on the live translation process to obtain subtitle data in response to detecting the relevant information of the source live stream reported by the source site.
编码模块502,可被配置成将字幕数据编码进源直播流,得到目标直播流。The encoding module 502 can be configured to encode the subtitle data into the source live stream to obtain the target live stream.
转码模块503,可被配置成对目标直播流进行转码,得到转码后的直播流。The transcoding module 503 may be configured to transcode the target live stream to obtain the transcoded live stream.
直播模块504,可被配置成基于转码后的直播流推送至源站以进行直播。The live broadcast module 504 can be configured to push the transcoded live stream to the source station for live broadcast.
在本实施例的一些可选的方式中,翻译模块包括:建立单元,被配置成建立AI语音翻译引擎与直播翻译进程之间的通信;通信单元,被配置成基于AI语音翻译引擎与直播翻译进程之间的通信对源站中的源直播流中的音频数据进行翻译,得到字幕数据。In some optional forms of this embodiment, the translation module includes: an establishment unit configured to establish communication between the AI speech translation engine and the live translation process; a communication unit configured to communicate with the live translation process based on the AI speech translation engine The communication between processes translates the audio data in the source live stream in the source station to obtain subtitle data.
在本实施例的一些可选的方式中,建立单元进一步被配置成:通过websocket建立AI语音翻译引擎与直播翻译进程之间的通信。In some optional manners of this embodiment, the establishment unit is further configured to: establish the communication between the AI speech translation engine and the live translation process through websocket.
在本实施例的一些可选的方式中,编码模块包括:对齐单元,被配置成响应于获取到字幕数据,将字幕数据与源直播流进行时间戳对齐,得到对齐后的字幕数据与源直播流;合并单元,被配置成将对齐后的字幕数据与源直播流进行合并编码,得到目标直播流。In some optional manners of this embodiment, the encoding module includes: an alignment unit configured to, in response to obtaining the subtitle data, perform timestamp alignment on the subtitle data and the source live stream, and obtain the aligned subtitle data and the source live stream stream; a merging unit configured to merge and encode the aligned subtitle data with the source live stream to obtain a target live stream.
在本实施例的一些可选的方式中,该装置还包括:缓存模块,被配置成响应于检测到源站上报的源直播流的相关信息,基于直播翻译 进程对源直播流进行本地缓存。In some optional manners of this embodiment, the device further includes: a caching module configured to locally cache the source live stream based on the live translation process in response to detecting the relevant information of the source live stream reported by the source station.
根据本公开的实施例,本公开还提供了一种电子设备和一种可读存储介质。According to the embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
如图6所示,是根据本公开实施例的直播方法的电子设备的框图。As shown in FIG. 6 , it is a block diagram of an electronic device according to a live broadcast method according to an embodiment of the present disclosure.
600是根据本公开实施例的直播方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。600 is a block diagram of an electronic device according to the live broadcast method of an embodiment of the present disclosure. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图6所示,该电子设备包括:一个或多个处理器601、存储器602,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图6中以一个处理器601为例。As shown in FIG. 6, the electronic device includes: one or more processors 601, a memory 602, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be mounted on a common motherboard or otherwise as desired. The processor may process instructions executed within the electronic device, including instructions stored in or on the memory, to display graphical information of a GUI on an external input/output device such as a display device coupled to an interface. In other implementations, multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired. Likewise, multiple electronic devices may be connected, with each device providing some of the necessary operations (eg, as a server array, a set of blade servers, or a multi-processor system). In FIG. 6, a processor 601 is taken as an example.
存储器602即为本公开所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本公开所提供的直播方法。本公开的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本公开所提供的直播方法。The memory 602 is a non-transitory computer-readable storage medium provided in the present disclosure. Wherein, the memory stores instructions executable by at least one processor, so that the at least one processor executes the live broadcast method provided by the present disclosure. The non-transitory computer-readable storage medium of the present disclosure stores computer instructions, and the computer instructions are used to make the computer execute the live broadcast method provided by the present disclosure.
存储器602作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本公开实施例中的直播方法对应的程序指令/模块(例如,附图5所示的翻译模块501、 编码模块502、转码模块503和直播模块504)。处理器601通过运行存储在存储器602中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及直播,即实现上述方法实施例中的直播方法。The memory 602, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the live broadcast method in the embodiments of the present disclosure (for example, the accompanying drawings 5 shows the translation module 501, encoding module 502, transcoding module 503 and live broadcast module 504). The processor 601 runs the non-transitory software programs, instructions and modules stored in the memory 602 to execute various functional applications of the server and live broadcast, that is, to realize the live broadcast method in the above method embodiments.
存储器602可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储直播的电子设备的使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器602可选包括相对于处理器601远程设置的存储器,这些远程存储器可以通过网络连接至直播的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created by using live electronic devices, and the like. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the storage 602 may optionally include storages that are set remotely relative to the processor 601, and these remote storages may be connected to the live electronic device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
直播方法的电子设备还可以包括:输入装置603和输出装置604。处理器601、存储器602、输入装置603和输出装置604可以通过总线或者其他方式连接,图6中以通过总线连接为例。The electronic equipment of the live broadcast method may further include: an input device 603 and an output device 604 . The processor 601, the memory 602, the input device 603, and the output device 604 may be connected through a bus or in other ways. In FIG. 6, connection through a bus is taken as an example.
输入装置603可接收输入的数字或字符信息,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置604可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。The input device 603 can receive input digital or character information, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 604 may include a display device, an auxiliary lighting device (eg, LED), a tactile feedback device (eg, a vibration motor), and the like. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein can be implemented in digital electronic circuitry, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编 程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computing programs (also referred to as programs, software, software applications, or codes) include machine instructions for a programmable processor and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine language calculation program. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or means for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户直播显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for live broadcast to the user; and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
根据本公开实施例的技术方案,有助于提升生成直播字幕的效率。According to the technical solutions of the embodiments of the present disclosure, it is helpful to improve the efficiency of generating live subtitles.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发申请中记载的各步骤可以并行地执行也可 以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the present application may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The specific implementation manners described above do not limit the protection scope of the present disclosure. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.

Claims (12)

  1. 一种直播方法,所述方法包括:A live broadcast method, the method comprising:
    响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对所述源站中的所述源直播流中的音频数据进行翻译,得到字幕数据;In response to detecting the relevant information of the source live stream reported by the source station, translating the audio data in the source live stream in the source station based on a live translation process to obtain subtitle data;
    将所述字幕数据编码进所述源直播流,得到目标直播流;Encoding the subtitle data into the source live stream to obtain the target live stream;
    对所述目标直播流进行转码,得到转码后的直播流;Transcoding the target live stream to obtain the transcoded live stream;
    基于所述转码后的直播流进行直播。Perform live broadcast based on the transcoded live stream.
  2. 根据权利要求1所述的方法,其中,所述基于直播翻译进程对所述源站中的所述源直播流中的音频数据进行翻译,得到字幕数据,包括:The method according to claim 1, wherein the audio data in the source live stream in the source station is translated based on the live translation process to obtain subtitle data, including:
    建立AI语音翻译引擎与直播翻译进程之间的通信;Establish communication between the AI voice translation engine and the live translation process;
    基于所述AI语音翻译引擎与直播翻译进程之间的通信对所述源站中的所述源直播流中的音频数据进行翻译,得到字幕数据。Based on the communication between the AI speech translation engine and the live translation process, the audio data in the source live stream in the source station is translated to obtain subtitle data.
  3. 根据权利要求2所述的方法,其中,所述建立AI语音翻译引擎与直播翻译进程之间的通信,包括:The method according to claim 2, wherein said establishing the communication between the AI speech translation engine and the live translation process comprises:
    通过websocket通信协议建立AI语音翻译引擎与直播翻译进程之间的通信。The communication between the AI speech translation engine and the live translation process is established through the websocket communication protocol.
  4. 根据权利要求1所述的方法,其中,将所述字幕数据编码进所述源直播流,得到目标直播流,包括:The method according to claim 1, wherein encoding the subtitle data into the source live stream to obtain the target live stream comprises:
    响应于获取到所述字幕数据,将所述字幕数据与所述源直播流进行时间戳对齐,得到对齐后的字幕数据与源直播流;In response to obtaining the subtitle data, aligning the subtitle data and the source live stream with time stamps to obtain the aligned subtitle data and the source live stream;
    将所述对齐后的字幕数据与源直播流进行合并编码,得到目标直播流。Merge and encode the aligned subtitle data and the source live stream to obtain the target live stream.
  5. 根据权利要求1所述的方法,所述方法还包括:The method according to claim 1, said method further comprising:
    响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对所述源直播流进行本地缓存。In response to detecting the relevant information of the source live stream reported by the source station, the source live stream is locally cached based on the live translation process.
  6. 一种直播装置,所述装置包括:A live broadcast device, said device comprising:
    翻译模块,被配置成响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对所述源站中的所述源直播流中的音频数据进行翻译,得到字幕数据;The translation module is configured to, in response to detecting the relevant information of the source live stream reported by the source station, translate the audio data in the source live stream in the source station based on the live translation process to obtain subtitle data;
    编码模块,被配置成将所述字幕数据编码进所述源直播流,得到目标直播流;An encoding module configured to encode the subtitle data into the source live stream to obtain a target live stream;
    转码模块,被配置成对所述目标直播流进行转码,得到转码后的直播流;The transcoding module is configured to transcode the target live stream to obtain the transcoded live stream;
    直播模块,被配置成基于所述转码后的直播流进行直播。The live broadcast module is configured to perform live broadcast based on the transcoded live stream.
  7. 根据权利要求6所述的装置,其中,所述翻译模块包括:The device according to claim 6, wherein the translation module comprises:
    建立单元,被配置成建立AI语音翻译引擎与直播翻译进程之间的通信;Establishing a unit configured to establish communication between the AI speech translation engine and the live translation process;
    通信单元,被配置成基于所述AI语音翻译引擎与直播翻译进程之间的通信对所述源站中的所述源直播流中的音频数据进行翻译,得到字幕数据。The communication unit is configured to translate the audio data in the source live stream in the source station based on the communication between the AI speech translation engine and the live translation process to obtain subtitle data.
  8. 根据权利要求7所述的装置,其中,所述建立单元进一步被配置成:The apparatus according to claim 7, wherein the establishing unit is further configured to:
    通过websocket通信协议建立AI语音翻译引擎与直播翻译进程之间的通信。The communication between the AI speech translation engine and the live translation process is established through the websocket communication protocol.
  9. 根据权利要求6所述的装置,其中,所述编码模块包括:The device according to claim 6, wherein the encoding module comprises:
    对齐单元,被配置成响应于获取到所述字幕数据,将所述字幕数据与所述源直播流进行时间戳对齐,得到对齐后的字幕数据与源直播流;The alignment unit is configured to, in response to acquiring the subtitle data, perform timestamp alignment on the subtitle data and the source live stream, to obtain the aligned subtitle data and the source live stream;
    合并单元,被配置成将所述对齐后的字幕数据与源直播流进行合 并编码,得到目标直播流。The merging unit is configured to merge and encode the aligned subtitle data and the source live stream to obtain the target live stream.
  10. 根据权利要求6所述的装置,所述装置还包括:The apparatus of claim 6, further comprising:
    缓存模块,被配置成响应于检测到源站上报的源直播流的相关信息,基于直播翻译进程对所述源直播流进行本地缓存。The caching module is configured to locally cache the source live stream based on the live translation process in response to detecting the relevant information of the source live stream reported by the source station.
  11. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    至少一个处理器;以及at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-5中任一项所述的方法。The memory stores information executable by the at least one processor, so that the at least one processor can execute the method according to any one of claims 1-5.
  12. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算指令用于使所述计算机执行权利要求1-5中任一项所述的方法。A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to make the computer execute the method according to any one of claims 1-5.
PCT/CN2022/124310 2021-11-25 2022-10-10 Live broadcast method and device WO2023093322A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111414398.X 2021-11-25
CN202111414398.XA CN114040220A (en) 2021-11-25 2021-11-25 Live broadcasting method and device

Publications (1)

Publication Number Publication Date
WO2023093322A1 true WO2023093322A1 (en) 2023-06-01

Family

ID=80145558

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124310 WO2023093322A1 (en) 2021-11-25 2022-10-10 Live broadcast method and device

Country Status (2)

Country Link
CN (1) CN114040220A (en)
WO (1) WO2023093322A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116527840A (en) * 2023-07-05 2023-08-01 卓望数码技术(深圳)有限公司 Live conference intelligent subtitle display method and system based on cloud edge collaboration

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040220A (en) * 2021-11-25 2022-02-11 京东科技信息技术有限公司 Live broadcasting method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010138A (en) * 2000-06-20 2002-01-11 Nippon Telegr & Teleph Corp <Ntt> Method for processing information and device therefor
EP2106121A1 (en) * 2008-03-27 2009-09-30 Mundovision MGI 2000, S.A. Subtitle generation methods for live programming
CN108401192A (en) * 2018-04-25 2018-08-14 腾讯科技(深圳)有限公司 Video stream processing method, device, computer equipment and storage medium
CN111010614A (en) * 2019-12-26 2020-04-14 北京奇艺世纪科技有限公司 Method, device, server and medium for displaying live caption
CN111901615A (en) * 2020-06-28 2020-11-06 北京百度网讯科技有限公司 Live video playing method and device
CN112188241A (en) * 2020-10-09 2021-01-05 上海网达软件股份有限公司 Method and system for real-time subtitle generation of live stream
CN114040220A (en) * 2021-11-25 2022-02-11 京东科技信息技术有限公司 Live broadcasting method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596491A (en) * 2021-07-23 2021-11-02 深圳市通拓信息技术网络有限公司 Cross-border live broadcast system based on cloud server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010138A (en) * 2000-06-20 2002-01-11 Nippon Telegr & Teleph Corp <Ntt> Method for processing information and device therefor
EP2106121A1 (en) * 2008-03-27 2009-09-30 Mundovision MGI 2000, S.A. Subtitle generation methods for live programming
CN108401192A (en) * 2018-04-25 2018-08-14 腾讯科技(深圳)有限公司 Video stream processing method, device, computer equipment and storage medium
CN111010614A (en) * 2019-12-26 2020-04-14 北京奇艺世纪科技有限公司 Method, device, server and medium for displaying live caption
CN111901615A (en) * 2020-06-28 2020-11-06 北京百度网讯科技有限公司 Live video playing method and device
CN112188241A (en) * 2020-10-09 2021-01-05 上海网达软件股份有限公司 Method and system for real-time subtitle generation of live stream
CN114040220A (en) * 2021-11-25 2022-02-11 京东科技信息技术有限公司 Live broadcasting method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116527840A (en) * 2023-07-05 2023-08-01 卓望数码技术(深圳)有限公司 Live conference intelligent subtitle display method and system based on cloud edge collaboration

Also Published As

Publication number Publication date
CN114040220A (en) 2022-02-11

Similar Documents

Publication Publication Date Title
WO2023093322A1 (en) Live broadcast method and device
US7991801B2 (en) Real-time dynamic and synchronized captioning system and method for use in the streaming of multimedia data
WO2020248649A1 (en) Audio and video data synchronous playback method, apparatus and system, electronic device and medium
US9035991B2 (en) Collaboration system and method
WO2015053530A1 (en) Method and apparatus for content delivery
WO2017107499A1 (en) Information remote synchronization method, terminal and system
KR102611151B1 (en) Live broadcast message transmission method, apparatus, electronic equipment and medium
CN105637472B (en) The frame of screen content shared system with the description of broad sense screen
CN104168453A (en) Method for implementing video monitoring stream media application system
CN105281921A (en) Method and device enabling virtual desktop to realize multicast
WO2019196577A1 (en) Streaming media playback method, server, client and computer device
KR20180086112A (en) Apparatus and method for playing back and seeking media in web browser
JP2022111205A (en) Method and unit for processing audio/video, electronic apparatus, storage medium and computer program
CN114217996A (en) Sound mixing method and device
WO2021103741A1 (en) Content processing method and apparatus, computer device, and storage medium
US20220311652A1 (en) Intelligent network management system
US10579577B2 (en) Bridge and asynchronous channel based bus to provide UI-to-UI asynchronous communication
CN113542906A (en) RTSP video-based webpage plug-in-free playing method
US20210314103A1 (en) Optimized kernel for concurrent streaming sessions
CN104462220B (en) Web page screen-cutting and coding and transmission method and device
CN113473158A (en) Live broadcast data processing method, device, electronic equipment, medium and program product
CN108200481B (en) RTP-PS stream processing method, device, equipment and storage medium
US20130198399A1 (en) Input/output communication
US20230117444A1 (en) Ultra-low latency streaming of real-time media
US11902346B2 (en) Method and apparatus for processing streaming media service, electronic device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897407

Country of ref document: EP

Kind code of ref document: A1