Live broadcast interaction method and system based on terminal centralized control platform
By registering and managing the status of the terminal device on the terminal centralized control platform and using the SDK of the streaming media server for push-pull stream processing, the unified control and economic cost of live broadcast interaction in large fixed devices is solved, and efficient, secure and real-time live broadcast interaction functions are achieved.
Patent Information
- Application Number
- CN202411592078.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
AI Technical Summary
In large fixed equipment, such as interactive classrooms and interactive meetings, it is difficult for the existing technology to achieve unified control, no software download and economical live broadcast interaction, especially in the domestic education industry.
Through the live broadcast interaction method based on the terminal centralized control platform, the terminal device registers and manages its status on the terminal centralized control platform, uses the SDK of the streaming media server to perform push-pull stream processing, realizes live broadcast interaction between terminals, and realizes real-time communication through broadcast messages and barrage message callbacks.
It realizes efficient, secure and real-time live broadcast interaction functions, simplifies the registration process, monitors terminal status in real time, flexibly handles interactive requests, and centrally controls live broadcast interactions, ensuring the efficiency, security and stability of the system.
Smart Images

Figure CN119545107A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing, and in particular relates to a live broadcast interactive method and system based on a terminal centralized control platform. Background Art
[0002] We have already entered the Warring States era of live broadcasting. As a new social method, online live broadcasting has triggered a new round of media revolution and quickly become a new frontier for new media marketing. With the advancement of mobile Internet technology, live broadcasting technology is developing in the direction of mobility, interactivity and intelligence. Real-time communication capabilities will also become a basic capability of mobile Internet applications, and thus be embedded in almost all APPs.
[0003] The live broadcast field has now entered the fields of live shows, video social networking, interactive classrooms, telemedicine, corporate annual meetings, stock analysis, e-commerce promotion, etc. In other fields, live broadcast interaction relies on mobile devices, combined with various apps or small programs to achieve the gradual saturation of the market. In large fixed equipment, such as interactive classrooms and interactive conferences, large fixed terminal equipment either relies on downloading and using the same audio and video communication software for live broadcast interaction, and this method is often independent of the terminal centralized control platform. First, it is not convenient for unified control, second, the same software must be downloaded before use, and third, in the education industry that promotes localization, this type of software may have various restrictions; or a set of live broadcast interactive equipment is built in the classroom or conference room to form a part of the smart classroom. The economic cost of this method will of course increase accordingly.
[0004] This method provides a way of audio and video transmission for such large fixed equipment terminals, achieving convenient, unified management, and economical live interaction. Summary of the invention
[0005] In view of the above problems, the present invention provides a live interactive method based on a terminal centralized control platform, which specifically includes the following steps:
[0006] Step S1, terminals 1, 2, 3, 4, ... n access the internal server interface of the terminal centralized control platform through the registration module of the terminal centralized control platform, complete the registration and save the registration information;
[0007] Step S2: The terminal management module of the terminal centralized control platform accesses the internal server interface of the terminal centralized control platform, graphically displays the status of the terminal in real time, including the power-on status, camera and screen sharing permissions; and performs real-time detection, and promptly provides a callback prompt through a broadcast message if there is no permission during live interaction;
[0008] Step S3, terminal x requests to interact with terminals 1, 2, 3, 4, ... n through live broadcast;
[0009] Step S44, terminal x sends a request to the internal server of the terminal centralized control platform to interact with terminals 1, 2, 3, 4...n in live broadcasting;
[0010] Step S5: The internal server of the terminal centralized control platform queries the terminal management module database of the terminal centralized control platform, and forms a live broadcast terminal list for the terminals that will be interactively broadcast, so as to control the closing of the live broadcast;
[0011] Step S6: The internal server of the terminal centralized control platform calls the streaming media server SDK;
[0012] Step S7: The streaming media server returns the key information to the internal server of the terminal centralized control platform, creates a room number, and provides broadcast message and barrage message callbacks;
[0013] Step S8, the internal server of the terminal centralized control platform returns the key information and room number to the live broadcast terminal list described in step S5;
[0014] Step S9, terminal x carries the key information and its own sn code as userId to access the streaming media server, logs in to the room according to the room number, and adds the room number + userId + channel ID as the stream ID to the stream list of the room to start streaming, and monitors the callback of the stream list in real time until other streamIds are added to the stream list, and the broadcast message callback shows that a new stream has been added to the room to start pulling the stream;
[0015] Step S10: Each terminal 1, 2, 3, 4, ... n that logs into the room executes step S8, and the broadcast message callback notifies other terminals to pull the stream;
[0016] Step S11, the live interactive terminal sends text and expression information through the bullet screen message callback and displays it on the terminal screen in real time;
[0017] Step S12: When the stream of a terminal changes, the terminal stops pushing the stream first, deletes the original streamId in the stream list, generates a new streamId and adds it to the stream list, and other terminal devices that listen to the stream list callback stop pulling the original streamId and re-pull the new streamId, and notify other terminals through a broadcast message callback;
[0018] Step S13: When a terminal wants to stop live interaction, it first stops pushing and pulling streams, deletes the streamId in the stream list, accesses the streaming media server to call the callback of exiting the room, and notifies other terminals through the broadcast message callback. Other terminals receive the stream list monitoring callback and the broadcast message and stop pulling this stream.
[0019] Step S14: When the stream list is an empty array and the userIds of all terminals that log in and out of the room in step S13 correspond one to one successfully, the streaming media server will automatically destroy the room;
[0020] Step S15, when all terminals close the live broadcast interaction, the terminal centralized control platform management module can directly close the live broadcast interaction in the live broadcast terminal list, directly notify the streaming media server to destroy the room through the terminal centralized control platform management server, and at the same time clear the live broadcast terminal list of the terminal centralized control platform management module to release the cache.
[0021] According to another aspect of the present application, the registration information in step S1 includes: the physical address of the terminal, i.e., longitude and latitude, SN code, camera call permission and screen sharing permission.
[0022] According to another aspect of the present application, the terminals for live broadcast interaction in step S5 are terminals 1, 2, 3, 4...n, including terminal x.
[0023] According to another aspect of the present application, the key information in step S7 includes the streaming media server identifier appId and the streaming media service address server.
[0024] According to another aspect of the present application, the room number created by the streaming media in step S7 uses a snowflake algorithm to ensure uniqueness, and the specific method is as follows:
[0025] Step S71, initialization, includes:
[0026] Timestamp initialization: Get the current timestamp and subtract a fixed starting timestamp to get a relative timestamp;
[0027] Machine ID initialization: Get the machine ID based on the configuration file or environment variable to ensure that it is unique in the distributed system;
[0028] Serial number initialization: initialized to 0;
[0029] Step S72, generating a room number, including:
[0030] Get current timestamp: Get the current timestamp and subtract the start timestamp to get the relative timestamp;
[0031] Check the timestamp: if the current timestamp is the same as the timestamp of the last generated room number, the sequence number is increased by 1; if the sequence number reaches the maximum value of 4095, wait for the next millisecond to generate the room number again;
[0032] Generate room number: Combine the timestamp, machine ID and serial number into a 64-bit room number.
[0033] According to another aspect of the present application, a live interactive system based on a terminal centralized control platform is also provided, which mainly includes the following modules:
[0034] Terminal 1, 2, 3, ... n: All-in-one machine, smart blackboard, electronic class sign, advertising machine fixed equipment; the permissions involved include camera call permission and screen sharing permission; the built-in system interacts with the server of the terminal centralized control platform and accesses the streaming media server for push and pull stream processing, and the fixed devices interact with each other for live broadcast;
[0035] Terminal centralized control platform - registration module: The terminal device registers its physical address, i.e. longitude and latitude, SN code, as well as camera call permission and screen sharing permission information into the registration module of the terminal centralized control platform to facilitate subsequent unified management and control;
[0036] Terminal centralized control platform - terminal management module: After the terminal device is registered through the registration module of the terminal centralized control platform, a list graphically displays the terminal status in the terminal management module of the terminal centralized control platform;
[0037] Terminal centralized control platform - internal server: provides an interface to write the registered terminal device information into the database; caches the status of each terminal device in the terminal management module; calls the SDK of the streaming media server to obtain the key information and then passes it to the device terminal; notifies the streaming media server to close the live interactive room; serves as a transfer station for the push and pull streams between the terminal device and the streaming media server to transmit information;
[0038] Streaming media server: Provide SDK for the internal server of the terminal centralized control platform to call; provide key information for terminal access; create a room for the terminal to push and pull streams; provide stream list callback for terminal listening; provide broadcast messages and barrage messages to the terminal; when there is no stream ID in the stream list, it is responsible for destroying the live interactive room to release resources.
[0039] Beneficial effects: This solution realizes efficient, secure and real-time live interactive functions through the collaborative work of the terminal centralized control platform and the streaming media server; it ensures the efficiency, security and stability of the live interactive system through simplified registration process, real-time status monitoring, flexible interactive requests, centralized control, real-time message callback, efficient push and pull streams, flexible processing of stream changes, safe exit and room destruction, centralized management and resource release. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is an overall flow chart of the scheme of the present invention.
[0041] Figure 2 It is a simplified diagram of the interaction between the modules of the solution of the present invention.
[0042] Figure 3 It is a schematic diagram of registration of the terminal centralized control platform of the solution of the present invention.
[0043] Figure 4 It is a schematic diagram of the live interactive page of the solution of the present invention.
[0044] Figure 5 Schematic diagram of the live broadcast terminal list of the solution of the present invention. DETAILED DESCRIPTION
[0045] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features well known in the art are not described.
[0046] The applicant believes that in large-scale fixed equipment, such as interactive classrooms and interactive conferences, large-scale fixed terminal equipment either relies on downloading and using the same audio and video communication software for live interaction, and this method is often independent of the terminal control platform. First, it is not convenient for unified management and control. Second, the same software must be downloaded before use. Third, in the education industry that promotes localization, this type of software may have various limitations. Or, a set of live interactive equipment is built in the classroom or conference room to form a part of the smart classroom. The economic cost of this method will of course increase accordingly.
[0047] To this end, the applicant proposes a live interactive method based on a terminal centralized control platform. The method of the present invention includes the following contents: several fixed device terminals want to communicate with each other for live interactive audio and video, which can be integrated into the terminal centralized control platform. After these terminals successfully register their longitude and latitude, device SN code, and the camera or screen permissions opened in the registration module of the terminal centralized control platform, the internal server of the terminal centralized control platform writes the detailed information of the device into the database, and then forms a visual list in the terminal management module of the terminal centralized control platform. This step is to integrate the terminal into the terminal centralized control platform for convenient unified management. If one of the smart blackboards wants to interact with two integrated machines in live broadcast, this blackboard can access the internal server of the terminal centralized control platform, which calls the SDK of the streaming media server to obtain the key and room number, and then returns it to the blackboard and the two integrated machines. Then these three terminals can access the streaming media server with the key information and then log in to the room with the SN code and the selected channel to switch, which can be a camera or a screen (if only one channel is open, the default is this channel) to push and pull the stream. In addition to audio and video communication, the three terminals in the room can also send and receive barrage text emoticons, and can also receive and send broadcast messages to notify other terminals to process the flow. When you want to end the live interaction, there are two ways: one is to stop all devices from pushing and pulling streams one by one and exit until the room is destroyed; the other is to destroy the room directly. The purpose of the present invention is to solve the various limitations that fixed device terminals need to build a set of live interactive equipment in physical space, or rely on downloading and using the same audio and video communication software, etc., saving space and cost for audio and video transmission, and facilitating unified management and control.
[0048] like Figure 1 As shown, the method specifically comprises the following steps:
[0049] Step S1, terminals 1, 2, 3, 4, ... n access the internal server interface of the terminal centralized control platform through the registration module of the terminal centralized control platform, complete the registration and save the registration information;
[0050] Step S2: The terminal management module of the terminal centralized control platform accesses the internal server interface of the terminal centralized control platform, graphically displays the status of the terminal in real time, including the power-on status, camera and screen sharing permissions; and performs real-time detection, and promptly provides a callback prompt through a broadcast message if there is no permission during live interaction;
[0051] Step S3, terminal x requests to interact with terminals 1, 2, 3, 4, ... n through live broadcast;
[0052] Step S44, terminal x sends a request to the internal server of the terminal centralized control platform to interact with terminals 1, 2, 3, 4...n in live broadcasting;
[0053] Step S5: The internal server of the terminal centralized control platform queries the terminal management module database of the terminal centralized control platform, and forms a live broadcast terminal list for the terminals that will be interactively broadcast, so as to control the closing of the live broadcast;
[0054] Step S6: The internal server of the terminal centralized control platform calls the streaming media server SDK;
[0055] Step S7: The streaming media server returns the key information to the internal server of the terminal centralized control platform, creates a room number, and provides broadcast message and barrage message callbacks;
[0056] Step S8, the internal server of the terminal centralized control platform returns the key information and room number to the live broadcast terminal list described in step S5;
[0057] Step S9, terminal x carries the key information and its own sn code as userId to access the streaming media server, logs in to the room according to the room number, and adds the room number + userId + channel ID as the stream ID to the stream list of the room to start streaming, and monitors the callback of the stream list in real time until other streamIds are added to the stream list, and the broadcast message callback shows that a new stream has been added to the room to start pulling the stream;
[0058] Step S10: Each terminal 1, 2, 3, 4, ... n that logs into the room executes step S8, and the broadcast message callback notifies other terminals to pull the stream;
[0059] Step S11, the live interactive terminal sends text and expression information through the bullet screen message callback and displays it on the terminal screen in real time;
[0060] Step S12: When the stream of a terminal changes, the terminal stops pushing the stream first, deletes the original streamId in the stream list, generates a new streamId and adds it to the stream list, and other terminal devices that listen to the stream list callback stop pulling the original streamId and re-pull the new streamId, and notify other terminals through a broadcast message callback;
[0061] Step S13: When a terminal wants to stop live interaction, it first stops pushing and pulling streams, deletes the streamId in the stream list, accesses the streaming media server to call the callback of exiting the room, and notifies other terminals through the broadcast message callback. Other terminals receive the stream list monitoring callback and the broadcast message and stop pulling this stream.
[0062] Step S14: When the stream list is an empty array and the userIds of all terminals that log in and out of the room in step S13 correspond one to one successfully, the streaming media server will automatically destroy the room;
[0063] Step S15, when all terminals close the live broadcast interaction, the terminal centralized control platform management module can directly close the live broadcast interaction in the live broadcast terminal list, directly notify the streaming media server to destroy the room through the terminal centralized control platform management server, and at the same time clear the live broadcast terminal list of the terminal centralized control platform management module to release the cache.
[0064] This solution realizes efficient, secure, and real-time live interactive functions through the collaborative work of the terminal control platform and the streaming media server. The terminal registration process is automated to reduce manual intervention and improve registration efficiency. Administrators can understand the terminal status in real time and promptly discover and solve problems. Terminals can flexibly initiate live interactive requests to meet diverse interactive needs. All interactive requests are centrally processed by the internal server of the terminal control platform to ensure the reliability and security of the requests. Through the live terminal list, administrators can centrally control the opening and closing of live interactions to ensure the security of live interactions. By calling the streaming media server SDK, the data transmission and processing during the live interactive process are safe and reliable. A unique room number is generated through the snowflake algorithm to ensure the uniqueness and orderliness of the room number. Broadcast message and barrage message callbacks are provided to ensure real-time communication and interaction between terminals. Terminals can efficiently Push streaming and pull streaming ensure the smoothness and real-time nature of live interaction. Through broadcast message callback, the terminal can understand the joining and exiting of other terminals in real time to ensure the real-time nature of interaction. The system can flexibly handle changes in terminal streams to ensure the continuity and stability of live interaction. Through broadcast message callback, other terminals can update the stream list in real time to ensure the real-time nature of interaction. The terminal can safely exit the live interaction to ensure the stability and security of the system. When there is no terminal in the room, the system automatically destroys the room and releases resources to ensure the resource utilization of the system. The administrator can centrally manage the opening and closing of live interaction to ensure the stability and security of the system. The system automatically releases resources to ensure the resource utilization of the system and improve the performance and stability of the system.
[0065] According to another aspect of the present application, the registration information in step S1 includes: the physical address of the terminal, i.e., longitude and latitude, SN code, camera call permission and screen sharing permission.
[0066] According to another aspect of the present application, the terminals for live broadcast interaction in step S5 are terminals 1, 2, 3, 4...n, including terminal x.
[0067] According to another aspect of the present application, the key information in step S7 includes the streaming media server identifier appId and the streaming media service address server.
[0068] According to another aspect of the present application, the room number created by the streaming media in step S7 uses a snowflake algorithm to ensure uniqueness, and the specific method is as follows:
[0069] Step S71, initialization, includes:
[0070] Timestamp initialization: Get the current timestamp and subtract a fixed starting timestamp to get a relative timestamp;
[0071] Machine ID initialization: Get the machine ID based on the configuration file or environment variable to ensure that it is unique in the distributed system;
[0072] Serial number initialization: initialized to 0;
[0073] Step S72, generating a room number, including:
[0074] Get current timestamp: Get the current timestamp and subtract the start timestamp to get the relative timestamp;
[0075] Check the timestamp: if the current timestamp is the same as the timestamp of the last generated room number, the sequence number is increased by 1; if the sequence number reaches the maximum value of 4095, wait for the next millisecond to generate the room number again;
[0076] Generate room number: Combine the timestamp, machine ID and serial number into a 64-bit room number.
[0077] According to another aspect of the present application, a live interactive system based on a terminal centralized control platform is also provided, which mainly includes the following modules:
[0078] Terminal 1, 2, 3, ... n: All-in-one machine, smart blackboard, electronic class sign, advertising machine fixed equipment; the permissions involved include camera call permission and screen sharing permission; the built-in system interacts with the server of the terminal centralized control platform and accesses the streaming media server for push and pull stream processing, and the fixed devices interact with each other for live broadcast;
[0079] Terminal centralized control platform - registration module: The terminal device registers its physical address, i.e. longitude and latitude, SN code, as well as camera call permission and screen sharing permission information into the registration module of the terminal centralized control platform to facilitate subsequent unified management and control;
[0080] Terminal centralized control platform - terminal management module: After the terminal device is registered through the registration module of the terminal centralized control platform, a list graphically displays the terminal status in the terminal management module of the terminal centralized control platform;
[0081] Terminal centralized control platform - internal server: provides an interface to write the registered terminal device information into the database; caches the status of each terminal device in the terminal management module; calls the SDK of the streaming media server to obtain the key information and then passes it to the device terminal; notifies the streaming media server to close the live interactive room; serves as a transfer station for the push and pull streams between the terminal device and the streaming media server to transmit information;
[0082] Streaming media server: Provide SDK for the internal server of the terminal centralized control platform to call; provide key information for terminal access; create a room for the terminal to push and pull streams; provide stream list callback for terminal listening; provide broadcast messages and barrage messages to the terminal; when there is no stream ID in the stream list, it is responsible for destroying the live interactive room to release resources.
[0083] The present invention includes the following features: the method relies on the original terminal device and does not need to build a live broadcast device separately; the method is uniformly controlled by the terminal centralized control platform, and the real-time status of the terminal device and the entrance to close the live broadcast interaction can be seen; the method is driven by the terminal device's own system and a separate streaming media server to pull and push streams, and no additional software applications need to be downloaded; the camera and screen permissions can be set to be turned off or on separately and are not mandatory, protecting privacy; during live broadcast interaction, channels can be switched, the camera and screen can be switched with each other, and one device will only push one stream and will not affect each other; in addition to providing an interface for its own platform module, the internal server of the terminal centralized control platform Writing to the database does not consume memory during live interaction, but only serves as a transit station to transmit messages to terminal devices and streaming media servers; when the stream list is an empty array, the streaming media server will destroy the room to release memory resources; the room number created by the streaming media uses the snowflake algorithm to ensure uniqueness, and the terminal's userId uses its own unique identifier sn code. The streamId contains the room number, userId and frequent identifier to clearly know the source of the push and pull streams without confusion; barrage messages and broadcast messages are callbacks provided by the streaming media and will not occupy one audio or video stream; this method can realize live interaction based on the public network and can be applied to domestic equipment.
[0084] Although the present invention is described in detail in this embodiment, it should be understood by those skilled in the art that any modification, improvement or replacement of the present invention, as long as it does not deviate from its basic concept and creative contribution, should be regarded as the protection scope of the present invention. The protection scope of the present invention should include all equivalent technical solutions that achieve its purpose and function, regardless of whether these solutions are explicitly mentioned in the present invention.
Claims
1. A live interactive method based on a terminal centralized control platform, characterized in that: The following steps are involved: Step S1, terminals 1, 2, 3, 4, ... n access the internal server interface of the terminal centralized control platform through the registration module of the terminal centralized control platform, complete the registration and save the registration information; Step S2: The terminal management module of the terminal centralized control platform accesses the internal server interface of the terminal centralized control platform, graphically displays the status of the terminal in real time, including the power-on status, camera and screen sharing permissions; and performs real-time detection, and promptly provides a callback prompt through a broadcast message if there is no permission during live interaction; Step S3, terminal x requests to interact with terminals 1, 2, 3, 4, ... n through live broadcast; Step S44, terminal x sends a request to the internal server of the terminal centralized control platform to interact with terminals 1, 2, 3, 4...n in live broadcasting; Step S5: The internal server of the terminal centralized control platform queries the terminal management module database of the terminal centralized control platform, and forms a live broadcast terminal list for the terminals that will be interactively broadcast, so as to control the closing of the live broadcast; Step S6: The internal server of the terminal centralized control platform calls the streaming media server SDK; Step S7: The streaming media server returns the key information to the internal server of the terminal centralized control platform, creates a room number, and provides broadcast message and barrage message callbacks; Step S8, the internal server of the terminal centralized control platform returns the key information and room number to the live broadcast terminal list described in step S5; Step S9, terminal x carries the key information and its own sn code as userId to access the streaming media server, logs in to the room according to the room number, and adds the room number + userId + channel ID as the stream ID to the stream list of the room to start streaming, and monitors the callback of the stream list in real time until other streamIds are added to the stream list, and the broadcast message callback shows that a new stream has been added to the room to start pulling the stream; Step S10: Each terminal 1, 2, 3, 4, ... n that logs into the room executes step S8, and the broadcast message callback notifies other terminals to pull the stream; Step S11, the live interactive terminal sends text and expression information through the bullet screen message callback and displays it on the terminal screen in real time; Step S12: When the stream of a terminal changes, the terminal stops pushing the stream first, deletes the original streamId in the stream list, generates a new streamId and adds it to the stream list, and other terminal devices that listen to the stream list callback stop pulling the original streamId and re-pull the new streamId, and notify other terminals through a broadcast message callback; Step S13: When a terminal wants to stop live interaction, it first stops pushing and pulling streams, deletes the streamId in the stream list, accesses the streaming media server to call the callback of exiting the room, and notifies other terminals through the broadcast message callback. Other terminals receive the stream list monitoring callback and the broadcast message and stop pulling this stream. Step S14: When the stream list is an empty array and the userIds of all terminals that log in and out of the room in step S13 correspond one to one successfully, the streaming media server will automatically destroy the room; Step S15, when all terminals close the live broadcast interaction, the terminal centralized control platform management module can directly close the live broadcast interaction in the live broadcast terminal list, directly notify the streaming media server to destroy the room through the terminal centralized control platform management server, and at the same time clear the live broadcast terminal list of the terminal centralized control platform management module to release the cache.
2. A live interactive method based on a terminal centralized control platform according to claim 1, characterized in that: The registration information in step S1 includes: the physical address of the terminal, i.e., longitude and latitude, SN code, camera calling permission and screen sharing permission.
3. A live interactive method based on a terminal centralized control platform according to claim 1, characterized in that: The terminals for live broadcast interaction in step S5 are terminals 1, 2, 3, 4...n, including terminal x.
4. A live interactive method based on a terminal centralized control platform according to claim 1, characterized in that: The key information in step S7 includes the identifier of the streaming media server appId and the streaming media service address server.
5. A live interactive method based on a terminal centralized control platform according to claim 1, characterized in that: The room number created by the streaming media in step S7 uses the snowflake algorithm to ensure uniqueness. The specific method is as follows: Step S71, initialization, includes: Timestamp initialization: Get the current timestamp and subtract a fixed starting timestamp to get a relative timestamp; Machine ID initialization: Get the machine ID based on the configuration file or environment variable to ensure that it is unique in the distributed system; Serial number initialization: initialized to 0; Step S72, generating a room number, including: Get current timestamp: Get the current timestamp and subtract the start timestamp to get the relative timestamp; Check the timestamp: if the current timestamp is the same as the timestamp of the last generated room number, the sequence number is increased by 1; if the sequence number reaches the maximum value of 4095, wait for the next millisecond to generate the room number again; Generate room number: Combine the timestamp, machine ID and serial number into a 64-bit room number.
6. A live interactive system based on a terminal centralized control platform, characterized in that: Contains the following modules: Terminal 1, 2, 3, ... n: All-in-one machine, smart blackboard, electronic class sign, advertising machine fixed equipment; the permissions involved include camera call permission and screen sharing permission; The built-in system interacts with the server of the terminal centralized control platform and accesses the streaming media server to process push and pull streams, and the fixed devices between them interact with each other in live broadcasting; Terminal centralized control platform - registration module: The terminal device registers its physical address, i.e. longitude and latitude, SN code, as well as camera call permission and screen sharing permission information into the registration module of the terminal centralized control platform to facilitate subsequent unified management and control; Terminal centralized control platform - terminal management module: After the terminal device is registered through the registration module of the terminal centralized control platform, a list graphically displays the terminal status in the terminal management module of the terminal centralized control platform; Terminal centralized control platform - internal server: provides an interface to write the registered terminal device information into the database; caches the status of each terminal device in the terminal management module; Call the streaming media server's SDK to obtain key information and then pass it to the device terminal; Notify the streaming media server to close the live interactive room; serve as a transfer station for the push and pull streams between the terminal device and the streaming media server to transmit information; Streaming media server: provides SDK for the internal server of the terminal centralized control platform to call; Providing key information for terminal access; Create a room to push and pull streams to the terminal; Provide stream list callback to the terminal for listening; provide broadcast messages and barrage messages to the terminal; when there is no stream ID in the stream list, it is responsible for destroying the live interactive room and releasing resources.