Server allocation scheduling method and device, equipment and storage medium
By obtaining the network operator information connected to the client equipment and monitoring equipment, dynamically selecting the target single-line server and the target multi-line server, the problem of high operating costs of BGP multi-line server is solved, and efficient and low-cost streaming media data is achieved transmission.
Patent Information
- Application Number
- CN202411540584.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
BGP多线服务器在视频通信领域中由于带宽成本高和维护难度大,导致运营成本较高。
By obtaining the network operator information connected to the client device and monitoring device, the target single-line server and the target multi-line server are determined, and the server is dynamically selected based on the transmission quality indicators to achieve efficient transmission of streaming media data.
Reduces bandwidth and maintenance costs, improves the refinement of server allocation, thereby reducing operational costs and ensuring the transmission quality of streaming data.
Smart Images

Figure CN119484904A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to, but is not limited to, the field of server technology, and in particular to a server allocation and scheduling method, apparatus, device, and storage medium. Background Art
[0002] BGP multi-line server is a server that uses Border Gateway Protocol (BGP) technology. In BGP multi-line server, the server is allowed to transmit data through multiple network lines to improve network reliability and access speed.
[0003] At present, in the field of video communication, in order to ensure the playback of high-definition video streams, enterprises usually tend to use BGP multi-line servers to improve the streaming media transmission effect. However, BGP multi-line servers have problems such as high bandwidth costs and difficult maintenance. Over-reliance on BGP multi-line servers to provide services leads to high operating costs. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The embodiments of the present application provide a server allocation scheduling method, apparatus, device and storage medium, which can improve the refinement of server allocation and thus reduce operating costs.
[0006] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a server allocation and scheduling method, which is applied to a client device, wherein the client device is communicatively connected to a background server, and the background server is communicatively connected to a monitoring device, and the server allocation and scheduling method comprises: obtaining first network information and second network information, wherein the first network information is used to indicate a first network operator connected to the client device, and the second network information is used to indicate a second network operator connected to the monitoring device; receiving node information sent by the background server, wherein the node information comprises an access address of a target multi-line server, access addresses of multiple candidate single-line servers, and access addresses of each of the candidate single-line servers. a third network operator connected to the server; determining a target single-line server from a plurality of candidate single-line servers based on the first network operator, the second network operator and the third network operator; constructing protocol information based on the target single-line server and the target multi-line server, and sending the protocol information to the monitoring device through the background server, so that the monitoring device transmits streaming media data to the client device through the target single-line server when the switching condition is not met, and transmits streaming media data to the client device through the target multi-line server when the switching condition is met, wherein the switching condition is determined by the transmission quality indicator of the target single-line server.
[0007] In some embodiments, the target multi-line server and the candidate single-line server are both located in the same area as the client device, and any two of the third network operators are different, and determining the target single-line server from the multiple candidate single-line servers based on the first network operator, the second network operator, and the third network operator includes: when the first network operator is the same as the second network operator, and the first network operator is the same as one of the third network operators, determining the target single-line server from the multiple candidate single-line servers, wherein the third network operator connected to the target single-line server is the same as the first network operator; or, when the first network operator is different from the second network operator, determining the target single-line server from the multiple candidate single-line servers.
[0008] In some embodiments, when the first network operator is different from the second network operator, determining a target single-line server from a plurality of the candidate single-line servers comprises: when the first network operator is different from the second network operator, and the second network operator is the same as one of the third network operators, determining a target single-line server from a plurality of the candidate single-line servers, wherein the third network operator connected to the target single-line server is the same as the second network operator; or, when the first network operator is different from the second network operator, and the second network operator is different from each of the third network operators, and the first network operator is the same as one of the third network operators, determining a target single-line server from a plurality of the candidate single-line servers, wherein the third network operator connected to the target single-line server is the same as the first network operator; or, when the first network operator is different from the second network operator, and the second network operator is different from each of the third network operators, and the first network operator is the same as each of the third network operators, randomly determining one of the candidate single-line servers from a plurality of the candidate single-line servers as the target single-line server.
[0009] In some embodiments, the server allocation scheduling method also includes: when the monitoring device transmits streaming media data to the client device through the target single-line server, determining the transmission quality index of the target single-line server; when the transmission quality index is less than a preset index threshold, sending a switching request to the monitoring device so that the monitoring device can transmit streaming media data to the client device through the target multi-line server.
[0010] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a server allocation and scheduling method, which is applied to a background server, wherein the background server is communicatively connected to a client device and a monitoring device, and the server allocation and scheduling method comprises: sending node information to the client device, wherein the node information comprises an access address of a target multi-line server, access addresses of multiple candidate single-line servers, and a third network operator to which each of the candidate single-line servers is connected; receiving protocol information sent by the client device, and sending the protocol information to the monitoring device, so that the monitoring device transmits streaming media data to the client device through the target single-line server when a switching condition is not met, and transmits streaming media data to the client device through the target single-line server when the switching condition is met. The target multi-line server transmits streaming media data to the client device; wherein the switching condition is determined by the transmission quality index of the target single-line server, the protocol information is constructed by the client device based on the target single-line server and the target multi-line server, the target single-line server is determined by the client device from a plurality of candidate single-line servers based on the first network operator, the second network operator and the third network operator, the first network operator is the network operator that the client device is connected to as indicated by the first network information, the second network operator is the network operator that the monitoring device is connected to as indicated by the second network information, and the first network information and the second network information are acquired by the client device.
[0011] In some embodiments, before sending the node information to the client device, the server allocation scheduling method further includes: obtaining an access address of the client device, access addresses of multiple reference multi-line servers, first performance information of each of the reference multi-line servers, access addresses of multiple reference single-line servers, and second performance information of each of the reference single-line servers, wherein the third network operators connected to at least two of the reference single-line servers are different; for each of the reference multi-line servers, based on the access address of the reference multi-line server and the access address of the client device, determining a first reference distance, inputting the first performance information and the first reference distance into a score prediction model for regression processing, and obtaining a first reference score corresponding to the reference multi-line server; in each of the reference multi-line servers, The reference multi-line server with the highest first reference score is determined as the target multi-line server; for each of the reference single-line servers, a second reference distance is determined based on the access address of the reference single-line server and the access address of the client device, and the second performance information and the second reference distance are input into the score prediction model for regression processing to obtain the second reference score corresponding to the reference single-line server; for each of the third network operators, among the reference single-line servers corresponding to the third network operators, the reference single-line server with the highest second reference score is determined as the candidate single-line server; and the node information is constructed according to the access address of the target multi-line server, the access addresses of each of the candidate single-line servers, and the third network operators to which each of the candidate single-line servers is connected.
[0012] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a server allocation and scheduling method, which is applied to a monitoring device, wherein the monitoring device is communicatively connected to a background server, and the background server is communicatively connected to a client device, and the server allocation and scheduling method comprises: receiving protocol information sent by the background server, wherein the protocol information is used to enable the monitoring device to transmit streaming media data to the client device through a target single-line server when a switching condition is not met, and to transmit streaming media data to the client device through a target multi-line server when the switching condition is met; wherein the switching condition is determined by a transmission quality index of the target single-line server, and the protocol information is sent to the background server by the client device after the target single-line server and the target multi-line server are constructed, and the target single-line server is the client The device is determined based on a first network operator, a second network operator and a third network operator among multiple candidate single-line servers, the target multi-line server is determined by the background server, the candidate single-line server is determined by the background server, the third network operator is the network operator connected to the candidate single-line server, the access address of the target multi-line server, the access addresses of multiple candidate single-line servers and the third network operator connected to each of the candidate single-line servers are determined based on the node information constructed by the background server, the first network operator is the network operator connected to the client device as indicated by the first network information, the second network operator is the network operator connected to the monitoring device as indicated by the second network information, and the first network information and the second network information are obtained by the client device.
[0013] To achieve the above-mentioned purpose, the fourth aspect of the embodiment of the present application proposes a server allocation and scheduling device, which is applied to a client device, wherein the client device is communicatively connected to a background server, and the background server is communicatively connected to a monitoring device, and the server allocation and scheduling device comprises: an acquisition module, which is used to acquire first network information and second network information, wherein the first network information is used to indicate a first network operator connected to the client device, and the second network information is used to indicate a second network operator connected to the monitoring device; a receiving module, which is used to receive node information sent by the background server, wherein the node information includes an access address of a target multi-line server, access addresses of multiple candidate single-line servers, and access addresses of each of the candidate single-line servers. a third network operator connected to the server; a selection module, used to determine a target single-line server from a plurality of candidate single-line servers based on the first network operator, the second network operator and the third network operator; a connection module, used to construct protocol information based on the target single-line server and the target multi-line server, and send the protocol information to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching condition is not met, and transmit streaming media data to the client device through the target multi-line server when the switching condition is met, wherein the switching condition is determined by the transmission quality indicator of the target single-line server.
[0014] To achieve the above-mentioned purpose, the fifth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the server allocation scheduling method described in the first aspect when executing the computer program.
[0015] To achieve the above-mentioned purpose, the sixth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, it implements the server allocation scheduling method described in the first aspect above.
[0016] The embodiments of the present application include at least the following beneficial effects: obtaining the first network operator connected to the client device by obtaining the first network information, and obtaining the second network operator connected to the monitoring device by obtaining the second network information, and then obtaining the access address of the target multi-line server, the access addresses of multiple candidate single-line servers, and the third network operator connected to each candidate single-line server by receiving the node information sent by the background server, and then determining the target single-line server from the multiple candidate single-line servers, and then constructing protocol information based on the target single-line server and the target multi-line server, and sending the protocol information to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching condition is not met, and when the switching condition is met When the switching condition is met, the streaming media data is transmitted to the client device through the target multi-line server. Since the switching condition is determined by the transmission quality index of the target single-line server, the target single-line server and the target multi-line server can be dynamically selected based on the transmission quality index during the transmission of the streaming media data, thereby ensuring the transmission quality of the streaming media data and improving the reliability of the streaming media transmission between the client device and the monitoring device. Compared with only using a multi-line server to transmit data, when the target single-line server is dynamically selected, the bandwidth cost and maintenance cost can be effectively reduced. Therefore, by configuring the target single-line server and the target multi-line server as data transmission servers between the monitoring device and the client device at the same time, the refinement of server allocation can be improved, thereby reducing operating costs.
[0017] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0019] Figure 1 A flow chart of an optional server allocation scheduling method for a client device is provided for an embodiment of the present application;
[0020] Figure 2 An optional flow chart of server allocation scheduling provided in an embodiment of the present application;
[0021] Figure 3 Another optional specific flow chart of server allocation and scheduling provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of an optional process of switching a server connection provided in an embodiment of the present application;
[0023] Figure 5 A flowchart of an optional server allocation and scheduling method for a backend server is provided for an embodiment of the present application;
[0024] Figure 6 A schematic diagram of an optional process for selecting a candidate server provided in an embodiment of the present application;
[0025] Figure 7 A flowchart of an optional server allocation and scheduling method for a monitoring device is provided for an embodiment of the present application;
[0026] Figure 8 An optional timing diagram of the server allocation scheduling method provided in an embodiment of the present application;
[0027] Fig. 9 An optional flow chart of selecting a target server provided in an embodiment of the present application;
[0028] Fig.10 An optional structural diagram of a server allocation scheduling device provided in an embodiment of the present application;
[0029] Fig.11 A schematic diagram of an optional hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. Among them, the target object can be a user. In addition, when the embodiment of the present application needs to obtain the target object attribute information, the target object's separate permission or separate consent will be obtained by means of a pop-up window or jumping to a confirmation page, etc., and after the separate permission or separate consent of the target object is clearly obtained, the necessary target object-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0032] In the description of this application, “several” means one or more, “more” means more than two, “greater than”, “less than”, “exceed”, etc. are understood to exclude the number, and “above”, “below”, “within”, etc. are understood to include the number.
[0033] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0034] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
[0035] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0036] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.
[0037] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0038] BGP multi-line server is a server that uses Border Gateway Protocol (BGP) technology. In BGP multi-line server, the server is allowed to transmit data through multiple network lines to improve network reliability and access speed.
[0039] At present, in the field of video communication, in order to ensure the playback of high-definition video streams, enterprises usually tend to use BGP multi-line servers to improve the streaming media transmission effect. However, BGP multi-line servers have problems such as high bandwidth costs and difficult maintenance. Over-reliance on BGP multi-line servers to provide services leads to high operating costs. In response to the problem of over-reliance on BGP multi-line servers to provide services, the present application provides a server allocation and scheduling method, apparatus, device and storage medium, the method comprising: obtaining first network information and second network information, wherein the first network information is used to indicate the first network operator connected to the client device, and the second network information is used to indicate the second network operator connected to the monitoring device; receiving node information sent by the background server, wherein the node information includes the access address of the target multi-line server, the access addresses of multiple candidate single-line servers and the third network operator connected to each of the candidate single-line servers; based on the first network operator, the second network operator and the third network operator, determining the target single-line server from the multiple candidate single-line servers; constructing protocol information based on the target single-line server and the target multi-line server, and sending the protocol information to the monitoring device through the background server, so that the monitoring device transmits streaming media data to the client device through the target single-line server when the switching condition is not met, and transmits streaming media data to the client device through the target multi-line server when the switching condition is met, wherein the switching condition is determined by the transmission quality indicator of the target single-line server.According to the solution provided in the embodiment of the present application, the first network operator connected to the client device is obtained by acquiring the first network information, and the second network operator connected to the monitoring device is obtained by acquiring the second network information, and then the access address of the target multi-line server, the access addresses of multiple candidate single-line servers and the third network operator connected to each candidate single-line server are obtained by receiving the node information sent by the background server, and then the target single-line server is determined from the multiple candidate single-line servers, and then protocol information is constructed based on the target single-line server and the target multi-line server, and the protocol information is sent to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching condition is not met, and when the switching condition is met When the switching condition is met, the streaming media data is transmitted to the client device through the target multi-line server. Since the switching condition is determined by the transmission quality index of the target single-line server, the target single-line server and the target multi-line server can be dynamically selected based on the transmission quality index during the transmission of the streaming media data, thereby ensuring the transmission quality of the streaming media data and improving the reliability of the streaming media transmission between the client device and the monitoring device. Compared with only using a multi-line server to transmit data, when the target single-line server is dynamically selected, the bandwidth cost and maintenance cost can be effectively reduced. Therefore, by configuring the target single-line server and the target multi-line server as data transmission servers between the monitoring device and the client device at the same time, the refinement of server allocation can be improved, thereby reducing operating costs.
[0040] The server allocation scheduling method, apparatus, device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the server allocation scheduling method in the embodiments of the present application is described.
[0041] The server allocation and scheduling method provided in the embodiment of the present application relates to the field of computer technology. The server allocation and scheduling method provided in the embodiment of the present application can be applied to a client device, a monitoring device or a background server, and can also be software running in a client device, a monitoring device or a background server. In some embodiments, the client device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., and the monitoring device includes but is not limited to a camera and a microphone; the background server can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and it can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the server allocation and scheduling method, etc., but is not limited to the above forms.
[0042] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0043] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0044] like Figure 1 As shown, Figure 1 An optional flow chart of a server allocation and scheduling method provided in an embodiment of the present application, the server allocation and scheduling method can be executed by a client device, a monitoring device or a background server, or can also be executed by a background server in cooperation with a client device or a monitoring device. The server allocation and scheduling method is applied to a client device, the client device is communicated with the background server, and the background server is communicated with the monitoring device, including but not limited to the following steps S110 to S140:
[0045] Step S110, obtaining first network information and second network information.
[0046] The first network information is used to indicate the first network operator to which the client device is connected, and the second network information is used to indicate the second network operator to which the monitoring device is connected.
[0047] Among them, the client device can be an app on a mobile phone terminal that can respond to user operations, and the monitoring device can be any camera device that obtains and transmits streaming media, which is not limited in the embodiments of the present disclosure.
[0048] The background server may include a first management server, a second management server and a signaling server, and the first management server, the second management server and the signaling server are connected to each other for communication.
[0049] It should be noted that the first management server is used to authenticate the client device. Specifically, the client sends a first login message to the first management server, and the first login message is used to indicate the identity information of the client device for the first management server to perform authentication. If the authentication is successful, the first management server returns the authentication success information and the list of devices bound to the user to the client device, and at the same time sends the corresponding authentication success information to the signaling server, so that the signaling server can provide services for the client device.
[0050] The signaling server can obtain the IP information of the client device, find the geographic location information and the corresponding first network operator corresponding to the client device in the IP library according to the IP information, and return the first network operator corresponding to the client device to the client device.
[0051] The protocol information sent by the client device to the target single-line server or the target multi-line server is the protocol information.
[0052] It should be noted that the process of the client device obtaining the second network information is specifically as follows: the client device receives the device list sent by the first management server, and the device list is provided with response windows corresponding to multiple monitoring devices, as well as the device identification, device status and the second network operator corresponding to each device. The response window is used to respond to the user's operation of selecting the target monitoring device. When the user selects the target monitoring device, the response window responds to the user's operation, so that the client device finds the device identification corresponding to the target monitoring device, and then determines the corresponding second network operator.
[0053] There may be multiple target monitoring devices, that is, a user can open multiple monitoring devices at the same time.
[0054] Among them, when the device status of the monitoring device in the device list is not logged in, the user cannot view the corresponding streaming media data; when the monitoring device with a device status of not logged in logs in, the second management server sends a signal that the monitoring device has logged in to the client management server, and the client management server generates update information of the device list on the client device and sends the update information to the client device. After the client device receives the update information, it updates the device list according to the update information. For example, when device A logs in, the client device changes the device status of device A from not logged in to logged in. At this time, the user can select device A as the target monitoring device to view the streaming media data of device A.
[0055] Step S120, receiving node information sent by the background server.
[0056] The node information includes the access address of the target multi-line server, the access addresses of multiple candidate single-line servers, and the third network operator to which each candidate single-line server is connected.
[0057] Among them, the first network operator, the second network operator and the third network operator refer to the operator types accessed by the device or server, which can be network operator B, network operator A, network operator C and other network operators, and the embodiments of the present disclosure are not limited here.
[0058] The third network operator of each candidate single-line server is different.
[0059] Among them, the target multi-line server is a BGP multi-line server, the access address of the target multi-line server can be the IP address corresponding to the target multi-line server, and the access address of the candidate single-line server can be the IP address corresponding to the candidate single-line server.
[0060] Among them, a single-line server is a server connected to one operator, and a multi-line server is a server connected to multiple operators.
[0061] Step S130 : determining a target single-line server from a plurality of candidate single-line servers based on the first network operator, the second network operator, and the third network operator.
[0062] In one possible implementation, for load balancing, the target single-line server can distribute the computing needs of processing streaming media data to other candidate single-line servers with lower loads, and then retrieve the computing results, which can improve the ability of the entire server system to process streaming media data.
[0063] Step S140, constructing protocol information based on the target single-line server and the target multi-line server, and sending the protocol information to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching conditions are not met, and transmit streaming media data to the client device through the target multi-line server when the switching conditions are met.
[0064] The switching condition is determined by the transmission quality index of the target single-line server.
[0065] The protocol information may include a session identifier, an initiator identifier, a receiver identifier, a protocol information type, an access address of a target single-line server, and an access address of a target multi-line server.
[0066] The client device may randomly generate a session identifier, an initiator identifier, and a receiver identifier, which together with the access address of the target single-line server and the access address of the target multi-line server constitute the main body of the protocol information.
[0067] It can be understood that by randomly generating a session identifier, an initiator identifier and a receiver identifier, the uniqueness of the session, as well as the uniqueness and accuracy of the initiator and the receiver can be guaranteed. The access address of the target single-line server and the access address of the target multi-line server are the information actually transmitted in the protocol information.
[0068] The monitoring device receives the protocol information and extracts the access address of the target single-line server and the access address of the target multi-line server from the protocol information.
[0069] It can be understood that by sending and receiving protocol information, the information of the client device and the monitoring device are aligned, thereby improving the reliability of information transmission.
[0070] It should be noted that the monitoring devices in the device list include commonly used devices and uncommonly used devices. For commonly used devices, after the client device logs in, the commonly used devices are automatically determined as target monitoring devices and protocol information is constructed; for uncommonly used devices, it is necessary to respond to the user's selection to determine the target monitoring device and then construct the protocol information.
[0071] Specifically, refer to Figure 8 , Figure 8 An optional timing diagram of the server allocation scheduling method provided in an embodiment of the present application, wherein the client device sends first login information to the background server so that the background server can query the IP library according to the first login information, and then receives the first network operator returned by the background server. Similarly, the monitoring device sends second login information to the background server so that the background server can query the IP library according to the second login information, and then receives the second network operator returned by the background server. After completing the above steps, the client device constructs protocol information and sends the protocol information to the background server, and the background server forwards the protocol information to the monitoring device. After receiving the protocol information, the monitoring device responds and sends a reply message to the background server, and the background server forwards the reply message to the client device. After completing the above process, the client device and the monitoring device establish a transmission channel for streaming media data through the target single-line server or the target multi-line server.
[0072] Based on this, the first network operator connected to the client device is obtained by acquiring the first network information, and the second network operator connected to the monitoring device is obtained by acquiring the second network information, and then the access address of the target multi-line server, the access addresses of multiple candidate single-line servers and the third network operator connected to each candidate single-line server are obtained by receiving the node information sent by the background server, and then the target single-line server is determined among the multiple candidate single-line servers, and then protocol information is constructed based on the target single-line server and the target multi-line server, and the protocol information is sent to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching conditions are not met, and when the switching conditions are met Streaming media data is transmitted to the client device through the target multi-line server. Since the switching condition is determined by the transmission quality index of the target single-line server, the target single-line server and the target multi-line server can be dynamically selected based on the transmission quality index during the transmission of the streaming media data, thereby ensuring the transmission quality of the streaming media data and improving the reliability of streaming media transmission between the client device and the monitoring device. Compared with only using a multi-line server to transmit data, when the target single-line server is dynamically selected, the bandwidth cost and maintenance cost can be effectively reduced. Therefore, by configuring the target single-line server and the target multi-line server as data transmission servers between the monitoring device and the client device at the same time, the refinement of server allocation can be improved, thereby reducing operating costs.
[0073] In one possible implementation, a candidate single-line server with the lowest load is selected from candidate single-line servers other than the target single-line server as a backup single-line server. When the monitoring device sends streaming media data to the target single-line server, it also sends streaming media data to the backup single-line server. If an error occurs in the data packet corresponding to the streaming media data in the target single-line server, the corresponding data packet is obtained from the backup server, thereby reducing the packet loss rate of the corresponding transmission link of the target single-line server.
[0074] In another possible implementation, after the client device establishes a connection with the monitoring device, when the load of the target single-line server continues to increase and there is no need to switch to the target multi-line server, the target single-line server can reduce the buffer of the streaming media data and open up a smaller buffer in other candidate single-line servers. The sum of the buffer sizes opened in other candidate single-line servers can be equivalent to the reduced buffer size of the target single-line server. All streaming media data corresponding to commonly used devices are received in the buffer of the target single-line server, and the streaming media data corresponding to multiple buffer frames of the current time period of uncommon devices are received in the buffer of the target single-line server. The streaming media data corresponding to multiple buffer frames of the next time period of uncommon devices are received in the newly opened buffers of other candidate single-line servers. When half of the buffer frames of the uncommon devices in the target single-line server are sent, multiple buffer frames of the next time period are obtained from other candidate single-line servers, thereby achieving balanced load on the server.
[0075] In addition, refer to Figure 2 In one embodiment, the target multi-line server and the candidate single-line server are located in the same area as the client device, and any two third network operators are different. Based on the first network operator, the second network operator, and the third network operator, the target single-line server is determined from multiple candidate single-line servers, including but not limited to the following steps S210 to S220:
[0076] Step S210: when the first network operator is the same as the second network operator, and the first network operator is the same as one of the third network operators, a target single-line server is determined from a plurality of candidate single-line servers.
[0077] Among them, the third network operator connected to the target single-line server is the same as the first network operator, which is equivalent to the first network operator, the second network operator and the third network operator corresponding to the target single-line server are all the same. For example, the first network operator, the second network operator and the third network operator corresponding to the target single-line server are all network operator A.
[0078] It can be understood that the first network operator, the second network operator and the third network operator corresponding to the target single-line server are all the same, and the transmission of streaming media data does not need to cross different network boundaries, thereby reducing network delays and reducing the cost of transmitting data across operators.
[0079] Step S220: when the first network operator is different from the second network operator, determining a target single-line server from a plurality of candidate single-line servers.
[0080] It can be understood that since the target multi-line server and the client device are located in the same area, the data transmission distance between the target multi-line server and the client device is shorter, and each candidate single-line server and the client device are located in the same area, so the data transmission distance between the target single-line server determined among multiple candidate single-line servers and the client device is also shorter, which can effectively reduce the network delay of the client device viewing the monitoring device and improve the user experience of the client device.
[0081] Based on this, when the first network operator is the same as the second network operator, and the first network operator is the same as one of the third network operators, determining the target single-line server from multiple candidate single-line servers is equivalent to the first network operator, the second network operator and the third network operator corresponding to the target single-line server are all the same, and the transmission of streaming media data does not need to cross different network boundaries, thereby reducing network delays and the cost of transmitting data across operators; in addition, when the first network operator is different from the second network operator, determining the target single-line server from multiple candidate single-line servers can comprehensively consider the compatibility of the first network operator or the second network operator with each candidate single-line server compared to randomly determining the target single-line server, so that the target single-line server is most suitable for the entire server system, thereby improving the operating efficiency of the entire server system.
[0082] In addition, refer to Figure 3 In one embodiment, when the first network operator and the second network operator are different, determining a target single-line server from a plurality of candidate single-line servers includes but is not limited to the following steps S310 to S330:
[0083] Step S310: when the first network operator is different from the second network operator, and the second network operator is the same as one of the third network operators, a target single-line server is determined from a plurality of candidate single-line servers.
[0084] Among them, the third network operator connected to the target single-line server is the same as the second network operator. For example, the first network operator is network operator A, the second network operator is network operator B, and the third network operator is network operator B, so that the third network operator of the target single-line server is the same as the second network operator of the monitoring device.
[0085] Based on this, the monitoring device, as the main executor of pushing streaming data, is the source of streaming data. The uncertainty of the data source is relatively large and can affect the entire transmission chain. When the streaming data is transmitted to the server, the server can transmit the streaming data to the client device through multiple paths with high reliability. Therefore, when the network operator of the target single-line server is the same as the network operator of the monitoring device, the success rate of streaming data transmission to the server can be improved, thereby improving the robustness and reliability of the entire server system.
[0086] Step S320: when the first network operator is different from the second network operator, the second network operator is different from each of the third network operators, and the first network operator is the same as one of the third network operators, determine a target single-line server from a plurality of candidate single-line servers.
[0087] Among them, the third network operator connected to the target single-line server is the same as the first network operator. For example, the first network operator is network operator A, the second network operator is network operator B, and the third network operator is network operator A, so that the third network operator of the target single-line server is the same as the first network operator of the client device.
[0088] Based on this, the client device, as a terminal receiving streaming media data, improves the reliability of receiving streaming media data, can reduce data packet loss, thereby reducing retransmission requests, and improves the overall efficiency of data transmission from another perspective.
[0089] Step S330: when the first network operator is different from the second network operator, the second network operator is different from each third network operator, and the first network operator is different from each third network operator, randomly determine one of the candidate single-line servers as the target single-line server among multiple candidate single-line servers.
[0090] Among them, the first network operator, the second network operator and the third network operator of the target single-line server are all different. For example, the first network operator is network operator D, the second network operator is network operator E, and the third network operators of each candidate single-line server are network operator B, network operator A and network operator C. At this time, the third network operator of the target single-line server is one of network operator B, network operator A and network operator C.
[0091] Based on this, when the monitoring device, client device and target single-line server cannot use the services of the same network operator, by randomly selecting a candidate single-line server as the target single-line server, the objectivity of the target single-line server selection can be maintained, the occurrence of the worst case scenario can be reduced, and the stability of the server system can be guaranteed.
[0092] Specifically, refer to Fig. 9 , Fig. 9 An optional flow chart of selecting a server provided in an embodiment of the present application, first, a client device obtains a device list, specifically, the client device receives a device list sent by a background server, and the background server obtains a forwarding server list, wherein the forwarding server list is an information list corresponding to multiple single-line servers and an information list corresponding to multiple multi-line servers stored in a database of the background server;
[0093] Then, the backend server determines and allocates three candidate single-line servers and one target multi-line server in the same area as the client device from the forwarding server list according to the geographic location information of the client device. The network operators corresponding to the three candidate single-line servers are network operator A, network operator B, and network operator C respectively.
[0094] Then, if a candidate single-line server of the same network operator as the client device and the monitoring device can be determined from the three candidate single-line servers, protocol information is constructed based on the target single-line server and the target multi-line server, and the protocol information is sent to the monitoring device through the background server; if a candidate single-line server of the same network operator as the client device and the monitoring device cannot be determined from the three candidate single-line servers, proceed to the next step; then, if a candidate single-line server of the same network operator as the monitoring device can be determined from the three candidate single-line servers, protocol information is constructed based on the target single-line server and the target multi-line server, and the protocol information is sent to the monitoring device through the background server; if a candidate single-line server of the same network operator as the monitoring device cannot be determined from the three candidate single-line servers, proceed to the next step;
[0095] Then, if a candidate single-line server of the same network operator as the client device can be determined from the three candidate single-line servers, protocol information is constructed based on the target single-line server and the target multi-line server, and the protocol information is sent to the monitoring device through the background server; if a candidate single-line server of the same network operator as the client device cannot be determined from the three candidate single-line servers, proceed to the next step;
[0096] Finally, a candidate single-line server is randomly determined from the three candidate single-line servers as the target single-line server, and protocol information is constructed based on the target single-line server and the target multi-line server, and the protocol information is sent to the monitoring device through the background server.
[0097] In addition, refer to Figure 4 In one embodiment, the server allocation and scheduling method further includes but is not limited to the following steps S410 to S420:
[0098] Step S410: when the monitoring device transmits streaming media data to the client device through the target single-line server, a transmission quality index of the target single-line server is determined.
[0099] Step S420: When the transmission quality index is less than a preset index threshold, a switching request is sent to the monitoring device so that the monitoring device transmits the streaming media data to the client device through the target multi-line server.
[0100] The transmission quality indicator is used to indicate the transmission quality of the current streaming media data, and may specifically be a value obtained by algebraically and weighted summing up multiple parameters. For example, the operation parameters of the transmission quality indicator may include the resolution, buffering frequency, delay, and packet loss rate of the streaming media, which are not limited in the embodiments of the present disclosure.
[0101] Among them, the indicator threshold needs to be determined by the calculation parameters of the transmission quality indicator. For example, when the resolution is at the lowest level, the buffering frequency is greater than or equal to 3 times per minute, or the delay is greater than or equal to 150 milliseconds, or the packet loss rate is greater than or equal to 1%, the determined indicator threshold is 30, that is, when the transmission quality indicator is less than 30, the client device sends a switching request to the monitoring device.
[0102] After the client device sends a switching request to the monitoring device, it switches to the target multi-line server; after receiving the switching request, the monitoring device also switches to the target multi-line server.
[0103] Among them, when the client device connects to the target multi-line server, it will also detect the transmission quality index of the target multi-line server. When the transmission quality index of the target multi-line server is less than the index threshold, a switching request is sent to the monitoring device so that the monitoring device can transmit streaming media data to the client device through the target single-line server.
[0104] Based on this, when the monitoring device transmits streaming media data to the client device through the target single-line server, the transmission quality index of the target single-line server is determined, and then when the transmission quality index is less than the preset index threshold, a switching request is sent to the monitoring device so that the monitoring device can transmit the streaming media data to the client device through the target multi-line server. Therefore, the transmission effect of the streaming media data can be monitored in real time to prevent the server system from falling into a long period of efficiency trough. Timely switching of the target multi-line server can also relieve the pressure of the target single-line server, so that the target single-line server can be restored as soon as possible, so that the entire server system can achieve uniform load and effectively utilize the computing resources of the entire server system, thereby reducing operating costs.
[0105] In a possible implementation, the client device determines the transmission quality index of the target single-line server once in each first time period and determines the transmission quality index of the target multi-line server once in each second time period, and the first time period is smaller than the second time period.
[0106] Among them, when the client device is connected to the target single-line server, the signaling server can predict the transmission quality index of the target multi-line server in real time through the index prediction model, and the signaling server can send the transmission quality index of the target multi-line server to the client device, or, when the client device is connected to the target multi-line server, the signaling server can predict the transmission quality index of the target single-line server in real time through the index prediction model, and the signaling server can send the transmission quality index of the target multi-line server to the monitoring device. When the transmission quality index of the server currently connected by the client device is lower than the index threshold, the transmission quality index of another server is compared, and a switching request is sent to the monitoring device so that the monitoring device can transmit streaming media data to the client device through the server with a higher transmission quality index.
[0107] It is understandable that the reliability of the target single-line server is less likely than that of the target multi-line server. Reducing the time period for polling the transmission quality indicator can better balance performance and stability, and the signaling server can predict the transmission quality indicator of the target single-line server or the target multi-line server in real time through the indicator prediction model. When the transmission quality indicator of the server currently connected to the client device is lower than the indicator threshold, the transmission quality indicator of another server is compared, and a switching request is sent to the monitoring device so that the monitoring device can transmit streaming media data to the client device through the server with a higher transmission quality indicator, so that the client device can obtain the transmission quality indicator of another server in advance, and switch servers after judgment, which can reduce the blindness of switching servers, avoid worse streaming media data transmission efficiency and unnecessary switching, save computing resources, and reduce operating costs.
[0108] In addition, refer to Figure 5 In one embodiment, the server allocation and scheduling method is applied to a background server, and the background server is communicatively connected with a client device and a monitoring device, including but not limited to the following steps S510 to S520:
[0109] Step S510: Send node information to the client device.
[0110] Step S520, receiving the protocol information sent by the client device, and sending the protocol information to the monitoring device, so that the monitoring device can transmit the streaming media data to the client device through the target single-line server when the switching conditions are not met, and transmit the streaming media data to the client device through the target multi-line server when the switching conditions are met.
[0111] The switching condition is determined by the transmission quality index of the target single-line server.
[0112] The node information includes the access address of the target multi-line server, the access addresses of multiple candidate single-line servers, and the third network operator to which each candidate single-line server is connected.
[0113] Among them, the protocol information is constructed by the client device based on the target single-line server and the target multi-line server, the target single-line server is determined by the client device from multiple candidate single-line servers based on the first network operator, the second network operator and the third network operator, the first network operator is the network operator that the client device is connected to as indicated by the first network information, the second network operator is the network operator that the monitoring device is connected to as indicated by the second network information, and the first network information and the second network information are acquired by the client device.
[0114] It should be noted that the server that sends node information to the client device, the server that receives the protocol information sent by the client device, and the server that sends the protocol information to the monitoring device are all signaling servers.
[0115] It should be noted that the database of the signaling server stores access addresses corresponding to multiple multi-line servers, as well as access addresses corresponding to multiple single-line servers and third network operators. The signaling server queries the IP library through the access address of the server to determine the geographical location corresponding to the server. Therefore, the target multi-line server and the candidate single-line server can be assigned to the same area as the client device.
[0116] Based on this, by sending node information to the client device, the access address of the target multi-line server, the access addresses of multiple candidate single-line servers and the third network operator connected to each candidate single-line server are obtained, and then the protocol information sent by the client device is received, and the protocol information is sent to the monitoring device, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching conditions are not met, and transmit streaming media data to the client device through the target multi-line server when the switching conditions are met. Since the switching conditions are determined by the transmission quality index of the target single-line server, the target single-line server and the target multi-line server can be dynamically selected based on the transmission quality index during the transmission of the streaming media data, thereby ensuring the transmission quality of the streaming media data and improving the reliability of the streaming media transmission between the client device and the monitoring device. Compared with only using a multi-line server to transmit data, when the target single-line server is dynamically selected, the bandwidth cost and maintenance cost can be effectively reduced. Therefore, by configuring the target single-line server and the target multi-line server as data transmission servers between the monitoring device and the client device at the same time, the refinement of server allocation can be improved, thereby reducing operating costs.
[0117] In a possible implementation, before sending the node information to the client device, the server allocation and scheduling method further includes: obtaining an access address of the client device, access addresses of multiple reference multi-line servers, and access addresses of multiple reference single-line servers, wherein at least two reference single-line servers are connected to different third network operators; for each reference multi-line server, determining a first reference distance based on the access address of the reference multi-line server and the access address of the client device; sorting each reference multi-line server in ascending order based on the first reference distance, obtaining a first reference load of the reference multi-line servers arranged in the first N positions, and determining the reference multi-line server with the smallest first reference load as the target multi-line server. server, where N is a positive integer; for each reference single-line server, determine the second reference distance based on the access address of the reference single-line server and the access address of the client device; for each third network operator, sort the reference single-line servers corresponding to the third network operator in ascending order based on the first reference distance, obtain the second reference load of the reference single-line servers arranged in the first M positions, and determine the reference single-line server with the smallest second reference load as the candidate single-line server, where M is a positive integer; construct node information according to the access address of the target multi-line server, the access address of each of the candidate single-line servers, and the third network operator to which each of the candidate single-line servers is connected.
[0118] Based on this, it is possible to quickly select a target multi-line server that is close to the client device and has a smaller load, and quickly select a candidate single-line server that is close to the client device and has a smaller load, which can effectively reduce the network delay of the client device viewing the monitoring device and improve the user experience of the client device. In another possible implementation, refer to Figure 6 Before sending the node information to the client device, the following steps are included but are not limited to S610 to S660:
[0119] Step S610, obtaining the access address of the client device, the access addresses of multiple reference multi-line servers, the first performance information of each reference multi-line server, the access addresses of multiple reference single-line servers and the second performance information of each reference single-line server.
[0120] Step S620, for each reference multi-line server, determine a first reference distance based on the access address of the reference multi-line server and the access address of the client device, input the first performance information and the first reference distance into the score prediction model for regression processing, and obtain a first reference score corresponding to the reference multi-line server.
[0121] Step S630: Determine, among the reference multi-line servers, a reference multi-line server with the highest first reference score as a target multi-line server.
[0122] Step S640: For each reference single-line server, determine the second reference distance based on the access address of the reference single-line server and the access address of the client device, input the second performance information and the second reference distance into the score prediction model for regression processing, and obtain the second reference score corresponding to the reference single-line server.
[0123] Step S650: For each third network operator, among each reference single-line server corresponding to the third network operator, a reference single-line server with the highest second reference score is determined as a candidate single-line server.
[0124] Step S660: construct node information according to the access address of the target multi-line server, the access addresses of each candidate single-line server, and the third network operator to which each candidate single-line server is connected.
[0125] Among them, the third network operators connected to at least two reference single-line servers are different.
[0126] Among them, the first performance information of each reference multi-line server and the second performance information of each reference single-line server are used to indicate the data processing capability of the reference multi-line server. Specifically, it can be a numerical value obtained by algebraically and weighted summing up multiple real-time parameters of the server. For example, the real-time parameters may include CPU utilization, memory utilization, disk I / O, network traffic, response time, system average load, disk utilization, error rate and temperature. The above parameters are quantified by algebraic methods and then weighted summed to obtain the first performance information or the second performance information.
[0127] It can be understood that the first performance information and the second performance information can be correlated with the transmission quality index of the streaming media data.
[0128] It can be understood that the third network operators connected to at least two reference single-line servers are different, so that the third network operators of all reference single-line servers will not be the same. Since the candidate single-line servers need to be determined from the reference single-line servers, the diversity of the candidate single-line servers can be improved and the robustness of the server system can be increased.
[0129] Among them, the access address of the reference multi-line server, the access address of the reference single-line server and the access address of the client device can be IP addresses, and the background server can determine the corresponding geographic location information by querying the IP library. Therefore, the first reference distance can be determined based on the access address of the reference multi-line server and the access address of the client device, and the first reference distance indicates the actual distance between the reference multi-line server and the client device. The second reference distance can be determined based on the access address of the reference single-line server and the access address of the client device, and the second reference distance indicates the actual distance between the reference single-line server and the client device. Generally, the greater the actual distance between the two ends of the communication connection, the worse the corresponding communication quality. Therefore, the first reference distance and the second reference distance are correlated with the transmission quality index of the streaming media data.
[0130] Based on this, for the first reference score, the score prediction model can simultaneously pay attention to the first performance information and the transmission performance characteristics contained in the first reference distance, thereby dynamically generating the first reference score, and evaluating the adaptability of the reference multi-line server to the entire server system through the first reference score, and determining the reference multi-line server with the highest first reference score as the target multi-line server, which can effectively improve the coordination of the entire server system, which is beneficial to improving the subsequent transmission quality indicators of streaming media data; in addition, for the second reference score, the score prediction model can simultaneously pay attention to the second performance information and the transmission performance characteristics contained in the second reference distance, thereby dynamically generating the second reference score, and evaluating the adaptability of the reference single-line server to the entire server system through the second reference score, and for each third network operator, determining the reference single-line server with the highest second reference score as a candidate single-line server, so that each candidate single-line server is the most suitable server corresponding to each third network operator, which can improve the coordination of the entire server system, which is beneficial to improving the subsequent transmission quality indicators of streaming media data.
[0131] In one possible implementation, the score prediction model is a pre-trained regression model, and the training steps of the score prediction model are as follows:
[0132] First, obtain reference performance information samples and reference distance information samples and corresponding reference score labels, extract the features of the reference performance information samples as reference performance information features, extract the features of the reference distance information samples as reference distance information features, input the reference performance information features and the reference distance information features into a score prediction model for regression processing to obtain a predicted reference score; then, determine the model loss based on the predicted reference score and the reference score label, and train the score prediction model based on the model loss so that the score prediction model can learn and understand the intrinsic connection between the reference performance information, the reference distance information and the reference score, and then predict an accurate reference score by combining the reference performance information and the reference distance information in the inference stage.
[0133] Among them, the reference performance information sample is the first performance information sample or the second performance information sample in the training data set, the reference distance information sample is the first reference distance sample or the second reference distance sample in the training data set, and the reference score label is the first reference score label or the second reference score label in the training data set.
[0134] Among them, when the reference performance information sample is the first performance information sample, the reference distance information sample is the first reference distance sample, and the reference score label is the first reference score label; when the reference performance information sample is the second performance information sample, the reference distance information sample is the second reference distance sample, and the reference score label is the second reference score label.
[0135] In addition, refer to Figure 7 In one embodiment, the server allocation scheduling method is applied to a monitoring device, the monitoring device is connected to a backend server for communication, and the backend server is connected to a client device for communication, including but not limited to the following steps:
[0136] Step S710, receiving protocol information sent by the background server, the protocol information is used to enable the monitoring device to transmit streaming media data to the client device through the target single-line server when the switching conditions are not met, and to transmit streaming media data to the client device through the target multi-line server when the switching conditions are met.
[0137] Among them, the switching condition is determined by the transmission quality indicator of the target single-line server, the protocol information is sent to the background server by the client device after the target single-line server and the target multi-line server are constructed, the target single-line server is determined by the client device among multiple candidate single-line servers based on the first network operator, the second network operator and the third network operator, the target multi-line server is determined by the background server, the candidate single-line server is determined by the background server, the third network operator is the network operator connected to the candidate single-line server, the access address of the target multi-line server, the access addresses of multiple candidate single-line servers and the third network operator connected to each candidate single-line server are determined according to the node information constructed by the background server, the first network operator is the network operator connected to the client device as indicated by the first network information, the second network operator is the network operator connected to the monitoring device as indicated by the second network information, and the first network information and the second network information are obtained by the client device.
[0138] It should be noted that the second management server is used to authenticate the monitoring device. Specifically, the client sends second login information to the second management server, and the second login information is used to indicate the identity information of the monitoring device for the second management server to perform authentication. If the authentication is successful, the second management server returns the authentication success information to the monitoring device, and at the same time sends the corresponding authentication success information to the signaling server, so that the signaling server can provide services for the monitoring device.
[0139] The signaling server can obtain the IP information of the monitoring device, find the geographical location information and the corresponding second network operator of the monitoring device in the IP library according to the IP information, and return the second network operator corresponding to the monitoring device to the monitoring device.
[0140] The monitoring device responds to the protocol information forwarded by the target single-line server or the target multi-line server, and sends a response message to the target single-line server or the target multi-line server.
[0141] Based on this, by receiving the protocol information sent by the background server, the protocol information is used to enable the monitoring device to transmit streaming media data to the client device through the target single-line server when the switching conditions are not met, and to transmit streaming media data to the client device through the target multi-line server when the switching conditions are met. Since the switching conditions are determined by the transmission quality index of the target single-line server, the target single-line server and the target multi-line server can be dynamically selected based on the transmission quality index during the transmission of the streaming media data, thereby ensuring the transmission quality of the streaming media data and improving the reliability of streaming media transmission between the client device and the monitoring device. Compared with only using a multi-line server to transmit data, when dynamically selecting the target single-line server, the bandwidth cost and maintenance cost can be effectively reduced. Therefore, by configuring the target single-line server and the target multi-line server as data transmission servers between the monitoring device and the client device at the same time, the degree of refinement of server allocation can be improved, thereby reducing operating costs.
[0142] In addition, refer to Fig.10 The present application also provides a server allocation and scheduling device 1000, including:
[0143] The acquisition module 1010 is used to acquire first network information and second network information, wherein the first network information is used to indicate a first network operator connected to the client device, and the second network information is used to indicate a second network operator connected to the monitoring device;
[0144] The receiving module 1020 is used to receive the node information sent by the background server, wherein the node information includes the access address of the target multi-line server, the access addresses of multiple candidate single-line servers, and the third network operator connected to each candidate single-line server;
[0145] A selection module 1030 is used to determine a target single-line server from a plurality of candidate single-line servers based on the first network operator, the second network operator, and the third network operator;
[0146] The connection module 1040 is used to construct protocol information based on the target single-line server and the target multi-line server, and send the protocol information to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching conditions are not met, and transmit streaming media data to the client device through the target multi-line server when the switching conditions are met, wherein the switching conditions are determined by the transmission quality index of the target single-line server.
[0147] It can be understood that the specific implementation of the server allocation and scheduling device 1000 is basically the same as the specific implementation of the above-mentioned server allocation and scheduling method, and will not be repeated here.
[0148] In addition, refer to Fig.11 , Fig.11 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0149] The processor 1101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0150] The memory 1102 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1102 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1102, and the processor 1101 calls and executes the server allocation and scheduling method of the embodiment of the present application.
[0151] Input / output interface 1103, used to implement information input and output;
[0152] The communication interface 1104 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0153] A bus 1105 that transmits information between various components of the device (e.g., the processor 1101, the memory 1102, the input / output interface 1103, and the communication interface 1104);
[0154] The processor 1101 , the memory 1102 , the input / output interface 1103 and the communication interface 1104 are connected to each other in communication within the device via the bus 1105 .
[0155] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned server allocation scheduling method.
[0156] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0157] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0158] It can be understood by those skilled in the art that Figures 1 to 11 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0159] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0160] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0161] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0162] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0163] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0164] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0167] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A server allocation and scheduling method, characterized in that: Applied to a client device, the client device is connected to a backend server for communication, the backend server is connected to a monitoring device for communication, and the server allocation and scheduling method includes: Acquire first network information and second network information, wherein the first network information is used to indicate a first network operator connected to the client device, and the second network information is used to indicate a second network operator connected to the monitoring device; Receiving node information sent by the background server, wherein the node information includes an access address of a target multi-line server, access addresses of multiple candidate single-line servers, and a third network operator to which each of the candidate single-line servers is connected; Determine a target single-line server from a plurality of candidate single-line servers based on the first network operator, the second network operator, and the third network operator; Protocol information is constructed based on the target single-line server and the target multi-line server, and the protocol information is sent to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching condition is not met, and transmit streaming media data to the client device through the target multi-line server when the switching condition is met, wherein the switching condition is determined by the transmission quality indicator of the target single-line server.
2. The server allocation and scheduling method according to claim 1, characterized in that: The target multi-line server and the candidate single-line server are both located in the same area as the client device, any two of the third network operators are different, and determining the target single-line server from the plurality of candidate single-line servers based on the first network operator, the second network operator, and the third network operator includes: When the first network operator is the same as the second network operator, and the first network operator is the same as one of the third network operators, determining a target single-line server from the plurality of candidate single-line servers, wherein the third network operator accessed by the target single-line server is the same as the first network operator; Alternatively, when the first network operator is different from the second network operator, a target single-line server is determined from a plurality of candidate single-line servers.
3. The server allocation and scheduling method according to claim 2, characterized in that: When the first network operator is different from the second network operator, determining a target single-line server from a plurality of candidate single-line servers comprises: When the first network operator is different from the second network operator, and the second network operator is the same as one of the third network operators, determining a target single-line server from the plurality of candidate single-line servers, wherein the third network operator connected to the target single-line server is the same as the second network operator; Alternatively, when the first network operator is different from the second network operator, and the second network operator is different from each of the third network operators, and the first network operator is the same as one of the third network operators, a target single-line server is determined from the plurality of candidate single-line servers, wherein the third network operator connected to the target single-line server is the same as the first network operator; Alternatively, when the first network operator is different from the second network operator, and the second network operator is different from each of the third network operators, and the first network operator is different from each of the third network operators, one of the candidate single-line servers is randomly determined as the target single-line server among the multiple candidate single-line servers.
4. The server allocation and scheduling method according to claim 1, characterized in that: Also includes: When the monitoring device transmits streaming media data to the client device through the target single-line server, determining a transmission quality indicator of the target single-line server; When the transmission quality index is less than a preset index threshold, a switching request is sent to the monitoring device so that the monitoring device transmits streaming media data to the client device through the target multi-line server.
5. A server allocation and scheduling method, characterized in that: Applied to a background server, the background server is communicatively connected to a client device and a monitoring device, and the server allocation and scheduling method includes: Sending node information to the client device, wherein the node information includes an access address of a target multi-line server, access addresses of multiple candidate single-line servers, and a third network operator to which each of the candidate single-line servers is connected; receiving protocol information sent by the client device, and sending the protocol information to the monitoring device, so that the monitoring device transmits streaming media data to the client device through the target single-line server when the switching condition is not met, and transmits streaming media data to the client device through the target multi-line server when the switching condition is met; Among them, the switching condition is determined by the transmission quality index of the target single-line server, the protocol information is constructed by the client device based on the target single-line server and the target multi-line server, the target single-line server is determined by the client device from multiple candidate single-line servers based on the first network operator, the second network operator and the third network operator, the first network operator is the network operator that the client device is connected to as indicated by the first network information, the second network operator is the network operator that the monitoring device is connected to as indicated by the second network information, and the first network information and the second network information are acquired by the client device.
6. The server allocation and scheduling method according to claim 5, characterized in that: Before sending the node information to the client device, the server allocation scheduling method further includes: Obtaining an access address of the client device, access addresses of multiple reference multi-line servers, first performance information of each of the reference multi-line servers, access addresses of multiple reference single-line servers, and second performance information of each of the reference single-line servers, wherein the third network operators accessed by at least two of the reference single-line servers are different; For each of the reference multi-line servers, based on the access address of the reference multi-line server and the access address of the client device, determining a first reference distance, inputting the first performance information and the first reference distance into a score prediction model for regression processing, and obtaining a first reference score corresponding to the reference multi-line server; Determining, among the reference multi-line servers, the reference multi-line server having the highest first reference score as the target multi-line server; For each of the reference single-line servers, based on the access address of the reference single-line server and the access address of the client device, determine a second reference distance, input the second performance information and the second reference distance into the score prediction model for regression processing, and obtain a second reference score corresponding to the reference single-line server; For each of the third network operators, among the reference single-line servers corresponding to the third network operators, determining the reference single-line server with the highest second reference score as a candidate single-line server; The node information is constructed according to the access address of the target multi-line server, the access address of each of the candidate single-line servers, and the third network operator to which each of the candidate single-line servers is connected.
7. A server allocation and scheduling method, characterized in that: Applied to a monitoring device, the monitoring device is connected to a backend server for communication, the backend server is connected to a client device for communication, and the server allocation and scheduling method includes: receiving protocol information sent by the background server, the protocol information being used to enable the monitoring device to transmit streaming media data to the client device through the target single-line server when a switching condition is not met, and to transmit streaming media data to the client device through the target multi-line server when the switching condition is met; The switching condition is determined by a transmission quality indicator of the target single-line server, the protocol information is sent to the backend server by the client device after the target single-line server and the target multi-line server are constructed, the target single-line server is determined by the client device from a plurality of candidate single-line servers based on a first network operator, a second network operator, and a third network operator, the target multi-line server is determined by the backend server, the candidate single-line server is determined by the backend server, the third network operator is a network operator connected to the candidate single-line server, the access address of the target multi-line server, the access addresses of the plurality of candidate single-line servers, and the third network operator connected to each of the candidate single-line servers are determined according to the node information constructed by the backend server, the first network operator is a network operator that the client device is connected to as indicated by the first network information, the second network operator is a network operator that the monitoring device is connected to as indicated by the second network information, and the first network information and the second network information are acquired by the client device.
8. A server allocation and scheduling device, characterized in that: Applied to a client device, the client device is connected to a backend server for communication, the backend server is connected to a monitoring device for communication, and the server allocation and scheduling device includes: an acquisition module, configured to acquire first network information and second network information, wherein the first network information is used to indicate a first network operator connected to the client device, and the second network information is used to indicate a second network operator connected to the monitoring device; A receiving module, configured to receive node information sent by the background server, wherein the node information includes an access address of a target multi-line server, access addresses of multiple candidate single-line servers, and a third network operator to which each of the candidate single-line servers is connected; a selection module, configured to determine a target single-line server from a plurality of candidate single-line servers based on the first network operator, the second network operator, and the third network operator; A connection module is used to construct protocol information based on the target single-line server and the target multi-line server, and send the protocol information to the monitoring device through the background server, so that the monitoring device can transmit streaming media data to the client device through the target single-line server when the switching condition is not met, and transmit streaming media data to the client device through the target multi-line server when the switching condition is met, wherein the switching condition is determined by the transmission quality indicator of the target single-line server.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the server allocation and scheduling method according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the server allocation and scheduling method described in any one of claims 1 to 7 is implemented.