Service management method, device and system, electronic equipment and storage medium

By redirecting audio and video stream requests to other normally running services when streaming service is abnormal, and using cached data to ensure the continuity of the flow, the problem of the inability to transfer abnormal streaming services in the prior art is solved, and system stability and user experience are improved.

CN119854538APending Publication Date: 2025-04-18SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311364802.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-18
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing service management method cannot transfer to the streaming media service in an abnormal state when the streaming media service is abnormal, resulting in the audio and video playback task being unable to play normally.

Method used

Through the redirection service, redirect audio and video stream requests to other normally running streaming services, and use cached data to ensure the continuity of audio and video streams.

Benefits of technology

Improves the stability of system operation and ensures that users can still use audio and video streams normally when streaming media services are abnormal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854538A_ABST
    Figure CN119854538A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a service management method, and the method comprises the steps: determining a corresponding target streaming media service in a plurality of streaming media services based on load balancing scheduling when a video and audio stream request of a user is received, obtaining video and audio stream information corresponding to target front-end equipment information through the target streaming media service, and sending the video and audio stream information to a server; the method comprises the following steps: acquiring video and audio stream information, sending the video and audio stream information to a cache service for cache processing to obtain cache data of the video and audio stream information, and performing redirection management on a plurality of streaming media services based on a redirection service and the cache data of the video and audio stream information when an abnormal state of a target streaming media service is detected. According to the method, the system service is managed, when the service is abnormal, the system can manage the service according to the method, it is ensured that the abnormal service can rapidly schedule the task flow in the service, the system function of the abnormal service is recovered to be normal, and therefore the stability of system operation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a service management method, device, system, electronic equipment and storage medium. Background Art

[0002] With the development of streaming media systems, users have higher and higher requirements for the stability of audio and video playback, so there is an urgent need for a method service management method that can improve the stability of streaming media systems during playback. In the existing service management method, when the streaming media service is abnormal, it is impossible to transfer the audio and video playback task to the abnormal streaming media service, resulting in the inability of the ongoing audio and video playback task to be connected to the terminal through the streaming media service, so that the user can play normally through the terminal. Therefore, the existing service management method has the problem that when the streaming media service is abnormal, it is impossible to transfer the audio and video playback task in the streaming media service in an abnormal state, resulting in the audio and video playback task cannot be played normally. Summary of the invention

[0003] The embodiment of the present invention provides a service management method, which aims to solve the problem that the existing service management method cannot transfer the audio and video playback task to the abnormal streaming media service when the streaming media service is abnormal, resulting in the inability of the ongoing audio and video playback task to connect with the terminal through the streaming media service, so that the user can play normally through the terminal. Through the redirection service, the audio and video stream request originally sent to the target streaming media service is redirected to other normally operating streaming media services, and these streaming media services continue to provide audio and video stream information. At the same time, because the cached data has stored the audio and video stream information, even if the target streaming media service is abnormal, it will not affect the user's experience of the audio and video stream, thereby improving the stability of the system operation.

[0004] In a first aspect, an embodiment of the present invention provides a service management method, characterized in that the method comprises the following steps:

[0005] When receiving a video and audio stream request from a user, determining a corresponding target streaming media service from multiple streaming media services based on load balancing scheduling, wherein the video and audio stream request includes target front-end device information;

[0006] Acquire the video and audio stream information corresponding to the target front-end device information through the target streaming media service, and send the video and audio stream information to the cache service for cache processing to obtain cache data of the video and audio stream information;

[0007] When it is detected that the target streaming media service is in an abnormal state, redirection management is performed on the plurality of streaming media services based on the redirection service and the cached data of the video and audio stream information.

[0008] Optionally, the service management method, when receiving a video or audio stream request from a user, determines a corresponding target streaming media service from a plurality of streaming media services based on load balancing scheduling, including:

[0009] Obtaining load status of a plurality of the streaming media services, and determining a streaming media service with the smallest load status;

[0010] Determining a target streaming media service based on the streaming media service with the smallest load status;

[0011] The video and audio stream request is dispatched to a target streaming media service.

[0012] Optionally, in the service management method, the step of obtaining the video and audio stream information corresponding to the target front-end device information through the target streaming media service includes:

[0013] Obtain the transmission protocol and domain name URL corresponding to the target front-end device;

[0014] Based on the transmission protocol and the domain name URL, the video and audio stream information corresponding to the target front-end device information is obtained.

[0015] Optionally, in the service management method, the video and audio stream information includes a video and audio stream key, and the sending of the video and audio stream information to a cache service for cache processing to obtain cache data of the video and audio stream information includes:

[0016] In the cache service, the video and audio stream information is searched by using the video and audio stream key;

[0017] If the video and audio stream information is found in the cache service, the video and audio stream in the cache service is replaced with the video and audio stream information obtained through the target streaming media service;

[0018] If the video and audio stream information is not found in the cache service, cache data is generated from the video and audio stream information obtained through the target streaming media service and added to the cache service.

[0019] Optionally, the service management method, when detecting that the target streaming media service is in an abnormal state, redirecting management of the plurality of streaming media services based on the redirection service and the cached data of the video and audio stream information, comprises:

[0020] Determining a redirection URL corresponding to the target streaming media service based on the cached data of the video and audio stream information;

[0021] Determine the optimal streaming media service based on the redirection URL and load balancing scheduling;

[0022] The video and audio stream information is redirected for access through the optimal streaming media service.

[0023] Optionally, in the service management method, redirecting access to the video and audio stream information through the optimal streaming media service includes:

[0024] If the video and audio stream information needs to be updated, the target streaming media service is scheduled to delete the video and audio stream information, and then scheduled to the optimal streaming media service, and the video and audio stream information is updated in a preset cache structure;

[0025] If the video and audio stream information needs to be deleted, the target streaming media service is scheduled to delete the video and audio stream information, and cache data corresponding to the video and audio stream information is deleted in a preset cache structure.

[0026] In a second aspect, an embodiment of the present invention further provides a service management system, characterized in that the service management system includes a streaming media service, a redirection service, a central management service, a domain name resolution system, and a cache service;

[0027] The streaming media service is used to access the target front-end device, thereby obtaining the video and audio stream information corresponding to the target front-end device, and pulling the stream according to the preset protocol;

[0028] The redirection service is used to stream a preset redirection protocol to the streaming media service;

[0029] The cache service is provided with a preset cache structure, and the preset cache structure includes address data of each device;

[0030] The domain name resolution system is used to resolve the address data corresponding to the target connection device;

[0031] The central management service is used to determine the corresponding target streaming media service from multiple streaming media services based on load balancing scheduling when receiving a user's audio and video stream request, the audio and video stream request includes target front-end device information, obtain the audio and video stream information corresponding to the target front-end device information through the target streaming media service, and send the audio and video stream information to the cache service for cache processing to obtain the cache data of the audio and video stream information. When an abnormal state is detected in the target streaming media service, redirect management of the multiple streaming media services is performed based on the cache data of the audio and video stream information.

[0032] In a third aspect, an embodiment of the present invention further provides a service management device, the service management device comprising:

[0033] A first determination module is used to determine a corresponding target streaming media service from multiple streaming media services based on load balancing scheduling when receiving a video and audio streaming request from a user, wherein the video and audio streaming request includes target front-end device information;

[0034] An acquisition module is used to acquire video and audio stream information corresponding to the target front-end device information through the target streaming media service, and send the video and audio stream information to a cache service for cache processing to obtain cache data of the video and audio stream information;

[0035] The redirection module is used to redirect and manage the plurality of the streaming media services based on the redirection service and the cached data of the video and audio stream information when an abnormal state of the target streaming media service is detected.

[0036] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the service management method provided in the embodiment of the present invention when executing the computer program.

[0037] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the service management method provided in the embodiment of the invention are implemented.

[0038] In an embodiment of the present invention, when a user's audio and video stream request is received, a corresponding target streaming media service is determined from multiple streaming media services based on load balancing scheduling, and audio and video stream information corresponding to the target front-end device information is obtained through the target streaming media service, and the audio and video stream information is sent to the cache service for cache processing to obtain cache data of the audio and video stream information. When an abnormal state is detected in the target streaming media service, multiple streaming media services are redirected and managed based on the redirection service and the cache data of the audio and video stream information. Through the redirection service, the audio and video stream request originally sent to the target streaming media service is redirected to other normally running streaming media services, and these streaming media services continue to provide audio and video stream information. At the same time, since the cache data has stored the audio and video stream information, even if the target streaming media service is abnormal, it will not affect the user's experience of the audio and video stream, thereby improving the stability of the system operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a system architecture diagram of a service management system provided in an embodiment of the present invention;

[0041] Figure 2 is a flow chart of a service management method provided by an embodiment of the present invention;

[0042] Figure 3 This is a timing diagram for starting a video and audio task provided by an embodiment of the present invention;

[0043] Figure 4 This is a video and audio playback flow chart provided by an embodiment of the present invention;

[0044] Figure 5 This is a video and audio playback timing diagram provided by an embodiment of the present invention;

[0045] Figure 6 This is a dynamic load balancing flow chart provided by an embodiment of the present invention;

[0046] Figure 7 is a structural diagram of a service management device provided in an embodiment of the present invention;

[0047] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] like Figure 1 As shown, Figure 1A service management system is provided by an embodiment of the present invention, and the service management system includes: a streaming media service 101, a redirection service 102, a central management service 103 and a cache service 104, wherein the central management service 103 receives audio and video stream requests from users, and dispatches the audio and video stream requests to the streaming media service 101 through a load balancing method, the streaming media service 101 obtains the audio and video stream information of the target front-end device by accessing the target front-end device, and sends the audio and video stream information to the cache service 104, and the audio and video stream information is cached by the cache service 104 to obtain the cache data of the audio and video stream information, and when the streaming media service connected to the target front-end device is in an abnormal state, the central management service 103 dispatches the redirection service 102 and the cache service 104 to replace the streaming media service in the abnormal state. Among them, when the streaming media service is in an abnormal state and the streaming media service is redirected, the corresponding audio and video stream information can be found in the cache service 104 through the domain name resolution system, and after resolving it, the URL of the real address of the above-mentioned audio and video stream information can be obtained, and the above-mentioned redirection service 102 can be accessed through the URL of the real address of the above-mentioned audio and video stream information. The above-mentioned redirection service 102 will query the above-mentioned audio and video stream information in the cache service 104 according to the deviceid information in the URL of the real address of the above-mentioned audio and video stream information, and return the redirection URL. The user accesses the above-mentioned streaming media service 101 through the above-mentioned returned redirection URL, thereby achieving the effect of not interrupting the audio and video stream playback when the streaming media service is abnormal.

[0050] In an embodiment of the present invention, the above-mentioned central management service may refer to a management module in a service management system, which may be used to monitor and manage devices in the service management system, thereby scheduling the service content of the devices through the devices. The above-mentioned audio and video stream request includes target front-end device information, wherein the above-mentioned target front-end device includes but is not limited to network devices such as IPC or NVR, and the above-mentioned target front-end device information may include but is not limited to information such as the address and communication protocol corresponding to the target front-end device. For example, it may include but is not limited to receiving audio and video information from an IPC or NVR device. The address corresponding to the above-mentioned target front-end device may refer to a unique identifier of the target front-end device in network communication, which is used to determine the identity of the device. The communication protocol corresponding to the above-mentioned target front-end device may refer to the method by which the target front-end device transmits audio and video stream information to the system. Generally speaking, the above-mentioned audio and video stream information can be transmitted through the two protocols of RTSP and HTTP_FLV. The above-mentioned load balancing method may include but is not limited to balancing methods such as polling method, random method, minimum connection number method and source address hash method. In this embodiment, the minimum connection number method is preferably used to calculate the load of the above-mentioned streaming media service. Generally speaking, the above-mentioned central management service monitors the load of each current streaming media service through the above-mentioned load balancing method. When the target streaming media service is abnormal, the above-mentioned audio and video stream information is transferred to the streaming media service with the smallest load, that is, the least number of connections, so that after receiving the above-mentioned audio and video stream information, it will not add too much burden to each streaming media service in the system. The above-mentioned audio and video stream information can be audio or video data transmitted through the Internet in the form of bit stream through the above-mentioned streaming media service. For example, the corresponding audio file or video file on a certain device is pulled through the above-mentioned streaming media service, and then played through the terminal.

[0051] The cache service contains a preset cache structure, which stores the video and audio stream information. The preset cache structure includes the status of each streaming media service. The status of the streaming media service may be abnormal status such as disconnection and timeout.

[0052] The redirection service (Redirect Server) is used to redirect RTSP and HTTP-FLV protocol streams to the streaming media service. Specifically, in this embodiment, the domain name URL is used to redirect to a new streaming media service for streaming, so as to achieve the purpose of not losing the video and audio stream information.

[0053] The above domain name resolution system can be used to resolve the address data corresponding to the target connection device.

[0054] In one embodiment, if Figure 3As shown, the user (USER) first sends a task to create a video stream for a certain device to the central management service (CS). After receiving the task, the central management service dispatches it to the streaming media service (MS) through the load balancing. After receiving the dispatch command of the central management service, the streaming media service accesses the corresponding target front-end device (IPC) according to the audio and video stream request in the task, thereby obtaining the audio and video stream information corresponding to the target front-end device, and adds the audio and video stream information to the cache structure preset in the cache service through the cache service. Finally, the central management service returns the RTSP / HTTP-FLV URL carrying the domain name to the user. The user obtains the audio and video stream information through the RTSP / HTTP-FLV URL on the terminal or player to play it.

[0055] The above playback process is as follows Figure 4 As shown, in the initial stage, the user uses a URL with a domain name to obtain the stream through a player or terminal, wherein the URL with the domain name is resolved through a domain name resolution system (DNS domain name resolution). If the resolution fails, the step of using the URL with the domain name to obtain the stream is returned. If the resolution is successful, the redirection service (RS redirection) is accessed through the result of the resolution. If the redirection service cannot find the corresponding audio and video stream information in the cache service according to the result of the resolution, the step of using the URL with the domain name to obtain the stream is returned. If the redirection service can find the corresponding audio and video stream information in the cache service according to the result of the resolution, the redirection URL is returned to the player or terminal. When the player or terminal uses the redirection URL to access the streaming media service, if the streaming media service status is abnormal, it returns to the step of using the URL with the domain name to obtain the stream. If the streaming media service status is normal, the streaming media service is used to obtain the stream (MS stream) for playback. And during the playback process, if the current playback is abnormal, it returns to the step of using the URL with the domain name to obtain the stream. If the playback is normal, the playback operation continues.

[0056] The specific playback process service interaction is as follows Figure 5As shown, the user (PLAYER) sends the URL with the domain name to the domain name resolution system (DNS Server) through the player or terminal. The domain name resolution system resolves the URL with the domain name and returns the URL with the real address. The URL with the real address can be obtained by resolving the domain name live.example.com to obtain the IP address of the redirection service (RS), such as 192.168.1.2. After obtaining the URL with the real address, the player or terminal accesses the redirection service through the URL with the real address. The redirection service will query the cache service for the audio and video stream information corresponding to the deviceid according to the identifier in the URL with the real address, such as deviceid. If it exists, the redirection URL is returned to the player or terminal. The redirection URL can be the address in the RTSP / HTTP_FLV protocol corresponding to the audio and video stream information found in the cache service (Redis). The player or terminal uses the address in the protocol to pull the stream through the normal streaming media service (MS), thereby playing the audio and video stream information.

[0057] In one embodiment, when the above-mentioned central management service schedules the above-mentioned streaming media service, there may be an abnormal state of the streaming media service. If the streaming media service has audio and video tasks at this time, it is necessary to schedule the above-mentioned abnormal streaming media service with audio and video tasks through the above-mentioned central management service to delete the above-mentioned audio and video tasks, and then schedule the existing audio and video tasks to the streaming media service with the smallest load through load balancing scheduling, and update the audio and video stream information of the above-mentioned streaming media service with the smallest load to the above-mentioned cache service. It should be noted that the state of the streaming media service with the smallest load needs to be a normal state in which it can pull streams for the device.

[0058] In another embodiment, if the user triggers the operation of deleting an audio and video task, a deletion task will be sent to the above-mentioned central management service. Subsequently, the above-mentioned central management service will schedule the corresponding streaming media service to delete the corresponding task according to the task content, and delete the audio and video stream information corresponding to the task in the cache service.

[0059] Specifically, after the system has been running for a long time, there may be a load imbalance between the various streaming services. Therefore, the central management service needs to regularly check the number of tasks in each streaming service, so as to reschedule the tasks so that the number of tasks between the various streaming services can reach a relatively balanced state. The specific operations are as follows: Figure 6As shown, at the beginning, a time threshold for periodic inspection and a dynamic balance threshold are set. The dynamic balance threshold can be set according to the number of streaming media services and the number of tasks corresponding to the streaming media services, and the system time is used to determine whether the time threshold is reached. If the above time threshold is reached, a sleep (SLEEP) operation is performed. If the above time threshold is reached, the streaming media services in the system are traversed to obtain the maximum streaming media service with the largest task load (MS_max) and the largest number of loads (max_task_number), and the minimum load (MS_min) and the minimum number of loads (min_task_number ), subtract the number of tasks in the minimum streaming service from the number of tasks in the maximum streaming service to obtain the difference in the number of tasks, compare the difference in the number of tasks with the above-mentioned dynamic balance threshold, if the above-mentioned difference in the number of tasks is less than the above-mentioned dynamic balance threshold, do not operate on the tasks of the streaming service, and return to the step of judging the time threshold; if the above-mentioned difference in the number of tasks is greater than or equal to the above-mentioned dynamic balance threshold, delete any task in the maximum streaming media, and schedule the deleted task to the minimum streaming service through the central management service, and then return to the step of finding the maximum streaming service and the minimum streaming service to repeat.

[0060] like Figure 2 As shown, Figure 2 : is a flow chart of a service management method provided by an embodiment of the present invention, the service management method comprising the steps of:

[0061] 201. When receiving a video or audio streaming request from a user, a corresponding target streaming service is determined from a plurality of streaming services based on load balancing scheduling.

[0062] In an embodiment of the present invention, the above-mentioned service management method can be applied to any service management system that can obtain streams through the RTSP protocol or the HTTP-FLV protocol. The above-mentioned service management system has the functions of data reception, data parsing and data transmission. The above-mentioned RTSP protocol is a real-time streaming protocol. RTSP can control the transmission of real-time audio and video data, and can provide multimedia content including video and audio as needed. The above-mentioned HTTP-FLV can encapsulate the audio and video data into FLV format and then transmit it through the HTTP protocol. In this way, the audio and video data can be lightweight and the data transmission can be faster. For example, the audio and video stream information of the target front-end device can be transmitted to the above-mentioned service management system through the RTSP protocol or the HTTP-FLV protocol, and the service management system sends it to the user terminal for playback.

[0063] The above-mentioned video and audio stream request includes target front-end device information. The above-mentioned target front-end device information may include but is not limited to information such as the address and communication protocol corresponding to the target front-end device, for example, may include but is not limited to receiving video and audio information from an IPC or NVR device.

[0064] The load balancing method may include but is not limited to balancing methods such as polling method, random method, minimum connection number method and source address hash method. In this embodiment, the minimum connection number method is preferably used to calculate the load of the streaming media service.

[0065] In a possible embodiment, when the above-mentioned service management system receives an audio and video stream request sent by a user, it monitors the load of each current streaming media service through the central management service in the system using the above-mentioned load balancing method, and selects the streaming media service with the smallest load status as the target streaming media service.

[0066] 202. Obtain video and audio stream information corresponding to the target front-end device information through the target streaming media service, and send the video and audio stream information to the cache service for cache processing to obtain cache data of the video and audio stream information.

[0067] In the embodiment of the present invention, the target front-end device information may include but is not limited to the address and communication protocol corresponding to the target front-end device. For example, it may include but is not limited to receiving audio and video information from an IPC or NVR device. The address corresponding to the target front-end device may refer to the unique identifier of the target front-end device in network communication, which is used to determine the device identity. The communication protocol corresponding to the target front-end device may refer to the method by which the target front-end device transmits audio and video stream information to the system. Generally speaking, the audio and video stream information can be transmitted through the RTSP and HTTP_FLV protocols.

[0068] The above-mentioned cache service may refer to a preset cache structure existing in the above-mentioned service management system, the above-mentioned preset cache structure stores the above-mentioned audio and video stream information, and the preset cache structure includes the status of each streaming media service, and the status of the above-mentioned streaming media service may be abnormal status such as disconnection, timeout, etc.

[0069] In a possible embodiment, in the above-mentioned service management system, when the above-mentioned streaming media service receives the scheduling command of the above-mentioned central management service, it accesses the corresponding target front-end device according to the audio and video stream request in the task, thereby obtaining the audio and video stream information corresponding to the above-mentioned target front-end device, and through the above-mentioned cache service, adds the above-mentioned audio and video stream information to the cache structure preset in the cache service to obtain the cache data corresponding to the audio and video stream information.

[0070] 203. When it is detected that the target streaming media service is in an abnormal state, redirection management is performed on multiple streaming media services based on the redirection service and cached data of the video and audio stream information.

[0071] In an embodiment of the present invention, the above-mentioned abnormal state may be a disconnection, timeout or other abnormal state. Specifically, it is generally caused by the disconnection between the streaming media service and the above-mentioned service management system, or due to excessive tasks on the streaming media service causing overload, thereby causing the streaming media service to crash.

[0072] The redirection service (Redirect Server) can be used in the service management system to redirect RTSP and HTTP-FLV protocol streams to the streaming media service. Specifically, in this embodiment, the domain name URL is used to redirect to a new streaming media service for streaming, so as to achieve the purpose of not losing audio and video stream information.

[0073] The above-mentioned redirection management may refer to the process of scheduling the above-mentioned streaming media service through the central management service in the above-mentioned service management system when the above-mentioned streaming media service is in an abnormal state, so that the cached data of the above-mentioned audio and video stream information can be pulled through other normal streaming media services and sent to the user end for playback.

[0074] In an embodiment of the present invention, when a user's audio and video stream request is received, a corresponding target streaming media service is determined from multiple streaming media services based on load balancing scheduling, and audio and video stream information corresponding to the target front-end device information is obtained through the target streaming media service, and the audio and video stream information is sent to the cache service for cache processing to obtain cache data of the audio and video stream information. When an abnormal state is detected in the target streaming media service, multiple streaming media services are redirected and managed based on the redirection service and the cache data of the audio and video stream information. Through the redirection service, the audio and video stream request originally sent to the target streaming media service is redirected to other normally running streaming media services, and these streaming media services continue to provide audio and video stream information. At the same time, since the cache data has stored the audio and video stream information, even if the target streaming media service is abnormal, it will not affect the user's experience of the audio and video stream, thereby improving the stability of the system operation.

[0075] Optionally, when a user's audio and video stream request is received, the step of determining a corresponding target streaming media service from multiple streaming media services based on load balancing scheduling includes obtaining the load status of multiple streaming media services, determining the streaming media service with the smallest load status, determining the target streaming media service based on the streaming media service with the smallest load status, and scheduling the audio and video stream request to the target streaming media service.

[0076] In an embodiment of the present invention, the above-mentioned load status may refer to the number of tasks and the task volume existing in the above-mentioned streaming media service. The above-mentioned task volume may refer to the number of steps required to complete the task. Generally speaking, in the above-mentioned streaming media service, the more tasks there are and the larger the task volume is, the greater the load status of the streaming media service is.

[0077] In a possible embodiment, the service management system adopts the minimum connection number method to calculate the load of the streaming media service. Specifically, the load of each current streaming media service is monitored through the load balancing method, the current number of tasks of each streaming media service is determined, and the streaming media service with the least number of tasks is used as the target streaming media service, and the audio and video stream request is dispatched to the target streaming media service.

[0078] Optionally, in the step of obtaining the audio and video stream information corresponding to the target front-end device information through the target streaming media service, you can also obtain the transmission protocol and domain name URL corresponding to the target front-end device, and then obtain the audio and video stream information corresponding to the target front-end device information based on the transmission protocol and domain name URL.

[0079] In an embodiment of the present invention, the transmission protocol corresponding to the above-mentioned target front-end device may refer to a method for transmitting data of the above-mentioned target front-end device. Specifically, it may be HTTP protocol, TCP / IP protocol, etc. In an embodiment of the present invention, RTSP and HTTP-FLV protocols are preferentially used to transmit data corresponding to the target front-end device.

[0080] The above domain name URL may include the domain name address information corresponding to the above target front-end device information.

[0081] In a possible embodiment, the service management system obtains package data by packaging the transmission protocol and URL of the target front-end device information, and marks the package data according to the deviceid identifier contained in the URL.

[0082] Optionally, in the step of sending the audio and video stream information to a cache service for caching to obtain cache data of the audio and video stream information when the audio and video stream information includes an audio and video stream key, the audio and video stream information can also be searched in the cache service by the audio and video stream key. If the audio and video stream information is found in the cache service, the audio and video stream in the cache service is replaced with the audio and video stream information obtained through the target streaming media service. If the audio and video stream information is not found in the cache service, cache data is generated using the audio and video stream information obtained through the target streaming media service and added to the cache service.

[0083] In the embodiment of the present invention, the above-mentioned video and audio stream key may refer to a unique identifier in the video and audio stream information, such as a deviceid identifier. It should be noted that one deviceid identifier corresponds to one video and audio stream information.

[0084] In a possible embodiment, after receiving the key of the audio and video stream information, the service management system searches in the cache service through the identifier of the key. The cache data corresponding to the audio and video stream information is obtained by matching the cache structure identified in the cache service. Furthermore, when the audio and video stream information corresponding to the same key is received, the audio and video stream information corresponding to the same key in the cache structure is verified. If the contents of the two audio and video stream information are different, the newly obtained audio and video stream information is added to the cache structure corresponding to the key to update and replace.

[0085] Optionally, when an abnormal state is detected in the target streaming media service, in the step of redirecting and managing multiple streaming media services based on the redirection service and the cached data of the audio and video stream information, the redirection URL corresponding to the target streaming media service can be determined based on the cached data of the audio and video stream information, and then the optimal streaming media service can be determined based on the redirection URL and load balancing scheduling, and finally the audio and video stream information can be redirected for access through the optimal streaming media service.

[0086] In an embodiment of the present invention, the redirection URL may refer to a data structure found in the cache service in the service management system and containing an address in the RTSP / HTTP_FLV protocol corresponding to the video and audio stream information. The user may use the address in the protocol on a player or terminal to pull the stream through a normal streaming media service, thereby playing the video and audio stream information.

[0087] In a possible embodiment, the redirection URL also needs to be obtained through a domain name resolution system. Specifically, the user uses a URL carrying a domain name corresponding to the audio and video stream information to obtain the stream through a player or terminal. The domain name resolution system will resolve the URL carrying the domain name and return a URL with a real address. After obtaining the URL with the real address, the user uses a player or terminal to redirect the URL with the real address to access the service. Subsequently, the service management system will identify the identifier in the URL with the real address, query the audio and video stream information corresponding to the identifier in the cache service, and find the optimal streaming media service with the smallest load according to the load balancing scheduling. The audio and video stream information is pulled through the optimal streaming media service and returned to the player or terminal for playback.

[0088] Optionally, in the step of redirecting access to the audio and video stream information through the optimal streaming media service, if the audio and video stream information needs to be updated, the target streaming media service is scheduled to delete the audio and video stream information, and then scheduled to the optimal streaming media service, and the audio and video stream information is updated in a preset cache structure; if the audio and video stream information needs to be deleted, the target streaming media service is scheduled to delete the audio and video stream information, and the cache data corresponding to the audio and video stream information is deleted in the preset cache structure.

[0089] In an embodiment of the present invention, when the above-mentioned central management service schedules the above-mentioned streaming media service, there may be an abnormal state of the streaming media service. If the streaming media service has audio and video tasks at this time, it is necessary to schedule the above-mentioned abnormal streaming media service with audio and video tasks through the above-mentioned central management service to delete the above-mentioned audio and video tasks, and then schedule the existing audio and video tasks to the streaming media service with the smallest load through load balancing scheduling, and update the audio and video stream information of the above-mentioned streaming media service with the smallest load to the above-mentioned cache service. It should be noted that the state of the streaming media service with the smallest load needs to be a normal state in which it can pull streams for the device.

[0090] In another embodiment, if the user triggers the operation of deleting an audio and video task, a deletion task will be sent to the above-mentioned central management service. Subsequently, the above-mentioned central management service will schedule the corresponding streaming media service to delete the corresponding task according to the task content, and delete the audio and video stream information corresponding to the task in the cache service.

[0091] like Figure 7 As shown, an embodiment of the present invention further provides a service management device, characterized in that it includes:

[0092] The first determination module 701 is used to determine a corresponding target streaming media service from multiple streaming media services based on load balancing scheduling when receiving a video and audio streaming request from a user, wherein the video and audio streaming request includes target front-end device information;

[0093] An acquisition module 702 is used to acquire video and audio stream information corresponding to the target front-end device information through the target streaming media service, and send the video and audio stream information to a cache service for cache processing to obtain cache data of the video and audio stream information;

[0094] The redirection module 703 is used to redirect the plurality of streaming media services based on the redirection service and the cached data of the video and audio stream information when an abnormal state of the target streaming media service is detected.

[0095] Optionally, the first determining module 701 includes:

[0096] A first acquisition submodule is used to acquire the load status of the plurality of streaming media services and determine the streaming media service with the smallest load status;

[0097] A first determination submodule, configured to determine a target streaming media service based on the streaming media service with the smallest load status;

[0098] The first scheduling submodule is used to schedule the video and audio stream request to a target streaming media service.

[0099] Optionally, the acquisition module 702 includes:

[0100] The second acquisition submodule is used to obtain the transmission protocol and domain name URL corresponding to the target front-end device;

[0101] The third acquisition submodule is used to obtain the video and audio stream information corresponding to the target front-end device information based on the transmission protocol and the domain name URL.

[0102] Optionally, the above device further comprises:

[0103] A search module, used to search the video and audio stream information in a cache service by using the video and audio stream key;

[0104] A replacement module, configured to replace the video and audio stream in the cache service with the video and audio stream information obtained through the target streaming media service if the video and audio stream information is found in the cache service;

[0105] The adding module is used to generate cache data from the video and audio stream information obtained through the target streaming media service and add it to the cache service if the video and audio stream information is not found in the cache service.

[0106] Optionally, the above device further comprises:

[0107] A second determination module, configured to determine a redirection URL corresponding to a target streaming media service based on the cached data of the video and audio stream information;

[0108] A third determination module, configured to determine an optimal streaming media service based on the redirection URL and load balancing scheduling;

[0109] The redirection module is used to redirect the video and audio stream information to be accessed through the optimal streaming media service.

[0110] Optionally, the redirection module further includes:

[0111] A first judgment submodule is used for, if the video and audio stream information needs to be updated, scheduling the target streaming media service to delete the video and audio stream information, scheduling to the optimal streaming media service, and updating the video and audio stream information in a preset cache structure;

[0112] The second judgment submodule is used for scheduling the target streaming media service to delete the video and audio stream information if it is necessary to delete the video and audio stream information, and deleting the cache data corresponding to the video and audio stream information in a preset cache structure.

[0113] like Figure 8 As shown, an embodiment of the present invention further provides an electronic device, characterized in that it includes a processor, and the processor can execute any one of the above-mentioned service management methods.

[0114] Specifically, it includes a processor 801 and a memory 802, and a computer program for executing the service management method which is stored in the memory 802 and can be run on the processor 801, wherein:

[0115] The processor 801 runs the computer program of the service management method stored in the memory 802 and performs the following steps:

[0116] When receiving a video and audio stream request from a user, determining a corresponding target streaming media service from multiple streaming media services based on load balancing scheduling, wherein the video and audio stream request includes target front-end device information;

[0117] Acquire the video and audio stream information corresponding to the target front-end device information through the target streaming media service, and send the video and audio stream information to the cache service for cache processing to obtain cache data of the video and audio stream information;

[0118] When it is detected that the target streaming media service is in an abnormal state, redirection management is performed on the plurality of streaming media services based on the redirection service and the cached data of the video and audio stream information.

[0119] Optionally, in the service management method, it is characterized in that the processor 801 executes the step of determining a corresponding target streaming media service from a plurality of streaming media services based on load balancing scheduling when receiving a video or audio streaming request from a user, including:

[0120] Obtaining load status of a plurality of the streaming media services, and determining a streaming media service with the smallest load status;

[0121] Determining a target streaming media service based on the streaming media service with the smallest load status;

[0122] The video and audio stream request is dispatched to a target streaming media service.

[0123] Optionally, in the service management method, it is characterized in that the processor 801 executes the step of acquiring the video and audio stream information corresponding to the target front-end device information through the target streaming media service, including:

[0124] Obtain the transmission protocol and domain name URL corresponding to the target front-end device;

[0125] Based on the transmission protocol and the domain name URL, the video and audio stream information corresponding to the target front-end device information is obtained.

[0126] Optionally, in the service management method, the processor 801 executes the step of sending the video and audio stream information to a cache service for cache processing to obtain cache data of the video and audio stream information, wherein the video and audio stream information includes a video and audio stream key, and the step includes:

[0127] In the cache service, the video and audio stream information is searched by using the video and audio stream key;

[0128] If the video and audio stream information is found in the cache service, the video and audio stream in the cache service is replaced with the video and audio stream information obtained through the target streaming media service;

[0129] If the video and audio stream information is not found in the cache service, cache data is generated using the video and audio stream information obtained through the target streaming media service and added to the cache service.

[0130] Optionally, in the service management method, it is characterized in that the processor 801 executes the step of redirecting the plurality of streaming media services based on the redirection service and the cached data of the video and audio stream information when an abnormal state of the target streaming media service is detected, including:

[0131] Determine a redirection URL corresponding to a target streaming media service based on the cached data of the video and audio stream information;

[0132] Determine the optimal streaming media service based on the redirection URL and load balancing scheduling;

[0133] The video and audio stream information is redirected for access through the optimal streaming media service.

[0134] Optionally, in the service management method, it is characterized in that the processor 801 executes the step of redirecting the video and audio stream information to be accessed through the optimal streaming media service, including:

[0135] If the video and audio stream information needs to be updated, the target streaming media service is scheduled to delete the video and audio stream information, and then scheduled to the optimal streaming media service, and the video and audio stream information is updated in a preset cache structure;

[0136] If the video and audio stream information needs to be deleted, the target streaming media service is scheduled to delete the video and audio stream information, and cache data corresponding to the video and audio stream information is deleted in a preset cache structure.

[0137] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements the various processes of the service management method or the application-side service management method provided by the embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0138] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0139] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A service management method, characterized in that: The method comprises the following steps: When receiving a video and audio stream request from a user, determining a corresponding target streaming media service from multiple streaming media services based on load balancing scheduling, wherein the video and audio stream request includes target front-end device information; Acquire the video and audio stream information corresponding to the target front-end device information through the target streaming media service, and send the video and audio stream information to the cache service for cache processing to obtain cache data of the video and audio stream information; When it is detected that the target streaming media service is in an abnormal state, redirection management is performed on the plurality of streaming media services based on the redirection service and the cached data of the video and audio stream information.

2. The service management method according to claim 1, characterized in that: When receiving a video or audio stream request from a user, determining a corresponding target streaming media service from a plurality of streaming media services based on load balancing scheduling includes: Obtaining load status of a plurality of the streaming media services, and determining a streaming media service with the smallest load status; Determining a target streaming media service based on the streaming media service with the smallest load status; The video and audio stream request is dispatched to a target streaming media service.

3. The service management method according to claim 1 or 2, characterized in that: The step of obtaining the video and audio stream information corresponding to the target front-end device information through the target streaming media service includes: Obtain the transmission protocol and domain name URL corresponding to the target front-end device; Based on the transmission protocol and the domain name URL, the video and audio stream information corresponding to the target front-end device information is obtained.

4. The service management method according to any one of claims 1 to 3, characterized in that: The video and audio stream information includes a video and audio stream key, and the video and audio stream information is sent to a cache service for cache processing to obtain cache data of the video and audio stream information, including: In the cache service, the video and audio stream information is searched by using the video and audio stream key; If the video and audio stream information is found in the cache service, the video and audio stream in the cache service is replaced with the video and audio stream information obtained through the target streaming media service; If the video and audio stream information is not found in the cache service, cache data is generated from the video and audio stream information obtained through the target streaming media service and added to the cache service.

5. The service management method according to any one of claims 1 to 4, characterized in that: When an abnormal state of the target streaming media service is detected, redirection management is performed on the plurality of streaming media services based on the redirection service and the cached data of the video and audio stream information, including: Determining a redirection URL corresponding to the target streaming media service based on the cached data of the video and audio stream information; Determine the optimal streaming media service based on the redirection URL and load balancing scheduling; The video and audio stream information is redirected for access through the optimal streaming media service.

6. The service management method as claimed in claim 5, characterized in that: The step of redirecting the video and audio stream information to be accessed through the optimal streaming media service includes: If the video and audio stream information needs to be updated, the target streaming media service is scheduled to delete the video and audio stream information, and then scheduled to the optimal streaming media service, and the video and audio stream information is updated in a preset cache structure; If the video and audio stream information needs to be deleted, the target streaming media service is scheduled to delete the video and audio stream information, and cache data corresponding to the video and audio stream information is deleted in a preset cache structure.

7. A service management system, characterized in that: The system includes: streaming media service, redirection service, central management service and cache service; The streaming media service is used to access the target front-end device, thereby obtaining the video and audio stream information corresponding to the target front-end device, and pulling the stream according to the preset protocol; The redirection service is used to stream a preset redirection protocol to the streaming media service; The cache service is provided with a preset cache structure, and the preset cache structure includes address data of each device; The central management service is used to determine the corresponding target streaming media service from multiple streaming media services based on load balancing scheduling when receiving a user's audio and video stream request, the audio and video stream request includes target front-end device information, obtain the audio and video stream information corresponding to the target front-end device information through the target streaming media service, and send the audio and video stream information to the cache service for cache processing to obtain the cache data of the audio and video stream information. When an abnormal state is detected in the target streaming media service, redirection management is performed on the multiple streaming media services based on the redirection service and the cache data of the audio and video stream information.

8. A service management device, characterized in that: The service device comprises: A first determination module is used to determine a corresponding target streaming media service from multiple streaming media services based on load balancing scheduling when receiving a video and audio streaming request from a user, wherein the video and audio streaming request includes target front-end device information; An acquisition module is used to acquire video and audio stream information corresponding to the target front-end device information through the target streaming media service, and send the video and audio stream information to a cache service for cache processing to obtain cache data of the video and audio stream information; The redirection module is used to redirect and manage the plurality of the streaming media services based on the redirection service and the cached data of the video and audio stream information when an abnormal state of the target streaming media service is detected.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the service management method according to any one of claims 1 to 6 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the service management method according to any one of claims 1 to 6 are implemented.