Device scheduling access method, system, readable storage medium and program product
By introducing multiple forwarding servers and signaling servers in the SIP protocol, using consistent hashing processing to ensure that the requests of the same device are processed on the same signaling service instance, the problem of uneven load allocation in the SIP protocol is solved and efficient Load balancing and de-statement reduce the workload of device configuration modification.
Patent Information
- Application Number
- CN202411126140.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-16
AI Technical Summary
In the existing SIP protocol, the uneven load allocation problem caused by IP routing distribution on the public network leads to low resource utilization of signaling nodes. When the SIP signaling server fails, switching the standby server requires modifying the configuration of each device. Huge quantity and low feasibility.
By introducing multiple forwarding servers and signaling servers in the national standard gateway, the weighted turn-off strategy of the open source load balancer is used to distribute session requests to the target forwarding server, and consistent hashing is performed based on the device code and the number of signaling service instances to ensure that Requests from the same device are processed on the same signaling service instance, realizing platform destatement and efficient load balancing.
Implement a smaller granular load strategy to ensure that the requests of the same communication device are processed on the same signaling service instance, reducing the load uneven problem of signaling service nodes, reducing the workload of device configuration modification, and improving the system's Reliability and feasibility.
Smart Images

Figure CN118660023B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a device scheduling access method, system, readable storage medium and program product. Background Art
[0002] SIP (Session Initiation Protocol) is an application layer signaling control protocol. Its main purpose is to establish, modify and release multimedia sessions in an IP (Internet Protocol) network. Its main applications include but are not limited to voice, messaging, video, call control, etc. With the continuous development of Internet technology and mobile terminal equipment technology, the widespread application of SIP technology, and the continuous expansion of business needs, the number of communication devices that support SIP is increasing. For example, in the traditional SIP protocol video networking protocol framework standard, each camera needs to configure the corresponding SIP server information in the background management interface, and the SIP signaling server is a single-computer room deployment architecture mode.
[0003] In the related art, the signaling service node of the communication device is determined by distributing based on the public network IP routing, which has the problem of uneven load distribution. Therefore, a method that can improve the defects in the prior art is needed. Summary of the invention
[0004] Based on this, it is necessary to provide a device scheduling access method, system, computer-readable storage medium and computer program product that can solve the uneven load distribution in response to the above technical problems.
[0005] In a first aspect, the present application provides a device scheduling access method, which is applied to a national standard gateway, wherein the national standard gateway includes multiple forwarding servers and provincial nodes, and a target forwarding server and multiple signaling servers are deployed on the provincial nodes, and the method includes:
[0006] In response to a session request sent by a communication device, the session request is distributed to a target forwarding server through a weighted round-robin strategy of an open source load balancer; the target forwarding server is determined from the plurality of forwarding servers;
[0007] Determine the device code and the number of signaling service instances carried in the session request;
[0008] Determine a target signaling service instance from all signaling service instances registered on the target forwarding server according to the device code and the number of signaling service instances;
[0009] Performing consistent hashing on the device code through the target signaling service instance to obtain a hash value;
[0010] Determine a target signaling service identifier corresponding to the hash value according to a correspondence between the hash value and the signaling service identifier;
[0011] The session request is distributed to a target signaling server corresponding to the target signaling service identifier.
[0012] In one embodiment, the method further comprises:
[0013] When there is a business scheduling requirement, determine the communication equipment to be scheduled;
[0014] The communication device to be scheduled is scheduled according to a preset device scheduling strategy.
[0015] In one of the embodiments, scheduling the communication device to be scheduled according to a preset device scheduling strategy includes:
[0016] When there is a demand for business scheduling, determine the scheduling mode and the communication equipment to be scheduled;
[0017] The communication device to be scheduled is scheduled according to a preset device scheduling strategy corresponding to the scheduling mode.
[0018] In one embodiment, the national standard gateway includes an edge node, the edge node is deployed with multiple edge signaling servers, and the scheduling of the communication device to be scheduled according to the scheduling strategy corresponding to the scheduling mode includes:
[0019] When the scheduling mode is the first scheduling mode, determining configuration information of the communication device to be scheduled;
[0020] When receiving a registration request sent by the communication device to be scheduled, the forwarding server determines a target edge signaling server from the multiple edge signaling servers according to the configuration information, so that the communication device to be scheduled completes registration at the target edge signaling server and establishes a communication connection.
[0021] In one embodiment, the national standard gateway includes an edge node, the edge node is deployed with multiple edge signaling servers, and the scheduling of the communication device to be scheduled according to the scheduling strategy corresponding to the scheduling mode includes:
[0022] When the scheduling mode is the second scheduling mode, the registration request is forwarded / redirected to the target edge signaling server corresponding to the signaling service address, so that the communication device to be scheduled completes registration at the target edge signaling server and establishes a communication connection.
[0023] In one embodiment, the method further comprises:
[0024] According to the communication device to be scheduled and the target edge signaling server, the corresponding relationship between the communication device and the signaling server is updated.
[0025] In a second aspect, the present application also provides a device scheduling access system, the system comprising a load balancer, multiple signaling servers and multiple forwarding servers, wherein:
[0026] The load balancer is used to receive a session request sent by a communication device, and distribute the session request to the target forwarding server through a weighted rotation strategy; the target forwarding server is determined from the multiple forwarding servers;
[0027] The target forwarding server is used to determine the device code and the number of signaling service instances carried by the session request; determine the target signaling service instance from all signaling service instances registered on the target forwarding server according to the device code and the number of signaling service instances; and perform consistent hashing on the device code through the target signaling service instance to obtain a hash value;
[0028] According to the correspondence between the hash value and the signaling service identifier, determine the target signaling service identifier corresponding to the hash value; distribute the session request to the target signaling server corresponding to the target signaling service identifier; the target signaling server is determined from the multiple signaling servers.
[0029] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0030] In response to a session request sent by a communication device, the session request is distributed to a target forwarding server through a weighted rotation strategy of an open source load balancer; the target forwarding server is determined from a plurality of forwarding servers;
[0031] Determine the device code and number of signaling service instances carried in the session request;
[0032] Determine a target signaling service instance from all signaling service instances registered on the target forwarding server according to the device code and the number of signaling service instances;
[0033] Perform consistent hashing on the device code through the target signaling service instance to obtain a hash value;
[0034] Determine the target signaling service identifier corresponding to the hash value according to the corresponding relationship between the hash value and the signaling service identifier;
[0035] The session request is distributed to the target signaling server corresponding to the target signaling service identifier.
[0036] In a fourth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0037] In response to a session request sent by a communication device, the session request is distributed to a target forwarding server through a weighted rotation strategy of an open source load balancer; the target forwarding server is determined from a plurality of forwarding servers;
[0038] Determine the device code and number of signaling service instances carried in the session request;
[0039] Determine a target signaling service instance from all signaling service instances registered on the target forwarding server according to the device code and the number of signaling service instances;
[0040] Perform consistent hashing on the device code through the target signaling service instance to obtain a hash value;
[0041] Determine the target signaling service identifier corresponding to the hash value according to the corresponding relationship between the hash value and the signaling service identifier;
[0042] The session request is distributed to the target signaling server corresponding to the target signaling service identifier.
[0043] The above-mentioned device scheduling access method, system, computer-readable storage medium and computer program product respond to the session request sent by the communication device, distribute the session request to the target forwarding server through the weighted rotation strategy of the open source load balancer; the target forwarding server is determined from multiple forwarding servers; the device code and the number of signaling service instances carried by the session request are determined; according to the device code and the number of signaling service instances, the target signaling service instance is determined from all signaling service instances registered on the target forwarding server; the device code is consistently hashed by the target signaling service instance to obtain a hash value; according to the correspondence between the hash value and the signaling service identifier, the target signaling service identifier corresponding to the hash value is determined; the session request is distributed to the target signaling server corresponding to the target signaling service identifier. Compared with the existing distribution based on the public network IP address, this method distributes based on the device code, and can be based on a load strategy with a smaller granularity, ensuring that requests from the same communication device are processed on the same signaling service instance, realizing platform statelessness, and realizing efficient load balancing and session stickiness mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A schematic diagram of the architecture of a Chinese standard gateway according to an embodiment;
[0046] Figure 2 A schematic diagram of a process flow of a device scheduling access method in an embodiment;
[0047] Figure 3 A flowchart of SIP forwarding server interaction in one embodiment;
[0048] Figure 4 A schematic diagram of a scheduling method in one embodiment;
[0049] Figure 5 is a scheduling schematic diagram of a scheduling module in one embodiment;
[0050] Figure 6 It is a scheduling flow chart of a Chinese standard device in an embodiment;
[0051] Figure 7 A structural block diagram of a device scheduling access system in an embodiment. DETAILED DESCRIPTION
[0052] 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.
[0053] GB / T 28181: Technical Requirements for Information Transmission, Exchange and Control of Networked Security Video Surveillance Systems is a national standard proposed by the Science and Technology Information Bureau of the Ministry of Public Security, coordinated by the National Security Alarm System Standardization Technical Committee (SAC / TC100), and jointly drafted by multiple units including the First Institute of the Ministry of Public Security.
[0054] DS: The correspondence between device and SIP signaling server.
[0055] With the continuous development of Internet technology and mobile terminal equipment technology, the widespread application of SIP technology, and the growing number of video surveillance network monitoring and social surveillance image access. In the traditional SIP protocol video networking protocol framework standard, each camera needs to configure the corresponding SIP server information in the background management interface. The SIP server information includes the SIP signaling server IP, port, device code, password, etc., and the SIP signaling server is a single-computer room deployment architecture mode. When the SIP signaling server fails and cannot be restored for a long time, the cameras connected to the SIP server will not be available; if you want to switch to other backup SIP signaling servers, you need to modify the configuration information of each camera, which is a huge workload and low feasibility. When the camera initiates a session request, the existing routing method distributes the route through the public network IP of the device, resulting in a large number of actual devices on a certain node, insufficient carrying capacity, and low signaling node resource utilization.
[0056] To address the technical problem of uneven load, a new forwarding server is added, and session requests are distributed to the target forwarding server through the weighted rotation strategy of the open source load balancer; the target forwarding server is determined from multiple forwarding servers; the device code and the number of signaling service instances carried in the session request are determined; based on the device code and the number of signaling service instances, the target signaling service instance is determined from all signaling service instances registered on the target forwarding server; the device code is consistently hashed through the target signaling service instance to obtain a hash value; based on the correspondence between the hash value and the signaling service identifier, the target signaling service identifier corresponding to the hash value is determined; the session request is distributed to the target signaling server corresponding to the target signaling service identifier, ensuring that requests from the same device are processed on the same SIP signaling service instance, realizing platform statelessness, and distribution based on the device code, ensuring load balancing of the signaling service nodes.
[0057] In an exemplary embodiment, Figure 1 The schematic diagram of the architecture of a national standard gateway is shown, including provincial nodes, central nodes, edge nodes, load balancers and reverse proxy servers. Among them, multiple forwarding servers and multiple SIP signaling servers are deployed on the provincial nodes. The SIP signaling servers are all deployed in multiple single computer rooms. The architecture mode includes computer room 1, computer room 2 and computer room 3. The central node is deployed with a scheduling module and a device access module. The edge node is also deployed with a SIP signaling server, a reverse proxy server and a load balancer. Furthermore, the provincial node can also be called a provincial platform. It can be based on the multi-active disaster recovery capability across computer rooms with a unified entrance. When one of the computer rooms goes down, it automatically switches to the backup computer room through IP drift to achieve seamless switching. The red line represents the HTTP protocol (Hypertext Transfer Protocol) and the blue line represents the SIP protocol.
[0058] SIP signaling server: As a service that directly interacts with national standard terminal devices, it is used to establish, modify and terminate multimedia sessions, including voice, video, instant messaging and file transfer. It mainly consists of 6 types of signaling: INVITE, ACK, BYE, CANCEL, OPTIONS and REGISTER. Before sending a SIP message to a national standard terminal device, it carries its own external SIP service address and port data in the field or parameter of the SIP message to be sent, then encapsulates the SIP message into a new IP packet, sets the source address and port of the IP packet to the address and port of the service provided to the outside, and finally sends the IP packet.
[0059] The load balancer is a load balancer for SIP messages, and is a virtual server implemented through direct routing technology. It has strong load capacity, a complete dual-machine hot standby solution (LVS / DR + Keepalived), and only distributes requests, and the traffic does not go out from it itself, ensuring that the balancer IO performance will not be affected by large traffic. For example, when a national standard camera (client) sends a SIP request to VIP (Virtual IP Address), the LVS server (virtual server cluster system, Linux Virtual Server) selects the corresponding forwarding service (real-server) Pool according to VIP, and selects a forwarding service in the Pool according to the hash algorithm. LVS records the connection in the hash table, that is, the connection between the national standard camera and the forwarding service, and then sends the request packet of the national standard camera to the selected forwarding service. Finally, the selected forwarding service directly transmits the signaling server response packet to the national standard camera; when the national standard camera continues to send packets, LVS sends the request belonging to this connection directly to the forwarding service just selected according to the information in the recorded hash table; when the connection is terminated or timed out, the record in the hash table will be deleted.
[0060] As an Http proxy server, the reverse proxy server implements cache-free reverse proxy acceleration and improves the service running speed. At the same time, it adopts the kernel Poll model, which can support more concurrent connections, occupies very low memory resources, and also provides Http interface capabilities.
[0061] The forwarding server, as the entrance and exit of public / private network requests, forwards SIP requests to the signaling service through the scheduling algorithm, completes the interactive logic of SIP signaling, and realizes stateless service. The scheduling module is responsible for the device scheduling capability, supporting the remote scheduling of devices from the registered node to any other node. At the same time, the device scheduling strategy has flexible support capabilities such as directional scheduling, regional coding scheduling, and load scheduling. The device access module is responsible for the generation and management of national standard device configuration information.
[0062] In an exemplary embodiment, Figure 2 As shown, a device scheduling access method is provided. This embodiment uses the method applied to a national standard gateway as an example. In this embodiment, the method includes the following steps 202 to 212. Among them:
[0063] Step 202: In response to a session request sent by a communication device, the session request is distributed to a target forwarding server through a weighted round-robin strategy of an open source load balancer; the target forwarding server is determined from a plurality of forwarding servers.
[0064] It should be noted that multiple forwarding servers are usually deployed on the national standard gateway. In order to ensure load balancing, the session requests can be distributed to the target forwarding server through the weighted rotation strategy of the open source load balancer.
[0065] Exemplarily, in response to a session request sent by a communication device, a virtual server running on an open source framework platform determines a target forwarding server from multiple forwarding servers based on a weighted rotation strategy and according to a virtual IP address carried in the session request.
[0066] Step 204: Determine the device code and the number of signaling service instances carried in the session request.
[0067] It is understandable that the SIP protocol is a stateful protocol, and the related signaling before and after the same session must be sent to the same SIP signaling service for processing. To ensure that the SIP messages in the same session are sent to the same SIP signaling service instance, a forwarding service is added, and the SIP signaling service instance is registered with the forwarding server.
[0068] After the SIP signaling service instance is started or deployed, it registers its identity and capabilities with the forwarding server. The forwarding server then knows which signaling service instances are available. The forwarding server uses the registration / discovery mechanism to maintain a registry that records all registered SIP signaling service instances. The registration mechanism allows signaling service instances to report their existence to the forwarding server when they are started, while the discovery mechanism may allow signaling service instances or forwarding servers to find other components.
[0069] Before the communication device is connected, it is necessary to configure the communication device to be connected and generate the configuration information of the communication device, which includes the SIP signaling server IP, port, device code, password, etc. The device code can be carried in the session request, and the number of signaling service instances is the number of all SIP signaling service instances registered in the target forwarding service.
[0070] Exemplarily, the forwarding server obtains the device code of the communication device and the number of all registered signaling service instances from the device access module in response to the session request sent by the communication device.
[0071] Step 206: Determine a target signaling service instance from all signaling service instances registered in the target forwarding server according to the device code and the number of signaling service instances.
[0072] Exemplarily, the device code and the number of signaling service instances are hashed to obtain a processing value, and based on the processing value, a relationship table including the corresponding relationship between the processing value and the signaling service instance is queried to determine the target signaling service instance from all signaling service instances registered on the target forwarding server. In this way, the target signaling service instance is determined from all signaling service instances registered on the target forwarding server, and requests can be evenly distributed to different signaling service instances, avoiding the situation where some instances are overloaded while other instances are idle.
[0073] Step 208: Perform consistent hashing on the device code through the target signaling service instance to obtain a hash value.
[0074] It should be noted that this method is applied to the national standard gateway, which includes a provincial node and multiple edge nodes. The provincial node can be understood as a central node. The provincial node can serve as a dispatching center and a service registration center. The edge node can undertake the task of signaling interaction with the device. The two together constitute a signaling cluster to achieve load balancing and disaster recovery scheduling of services.
[0075] A server cluster is deployed on the provincial nodes. The server cluster includes at least one forwarding server and at least one SIP signaling server. The server cluster is built on Kubernetes, which is an open source container orchestration platform for automated deployment, expansion, and management of containerized applications. It provides a framework for running distributed systems and can seamlessly expand and manage container applications across host clusters.
[0076] Among them, the forwarding server serves as the entrance and exit of public network / private network requests, forwards the SIP request to the signaling service through the scheduling algorithm, completes the interaction logic of the SIP signaling, and realizes the stateless service. The scheduling algorithm can be a consistent hashing algorithm. Optionally, the consistent hashing algorithm can be a consistent hashing process on the device code of the communication device to obtain a hash value. The specific hashing method can be implemented in an existing way and will not be elaborated here. The communication device can be understood as all devices that support the SIP protocol, that is, national standard devices. For example, the communication device can be an image acquisition device, an IP phone, a video conferencing system that supports the SIP protocol, etc. The session request can be sent to the target forwarding server through a load balancer.
[0077] Exemplarily, in response to a session request sent by at least one communication device, a target forwarding server corresponding to each communication device is determined, and the device code of the corresponding communication device is subjected to consistent hashing by the target forwarding server to obtain a hash value. The consistent hashing process can be implemented in an existing manner and will not be described in detail here. Among them, the target forwarding server can be determined randomly or based on historical connection records.
[0078] Step 210: Determine the target signaling service identifier corresponding to the hash value according to the corresponding relationship between the hash value and the signaling service identifier.
[0079] Among them, the correspondence between the hash value and the signaling service identifier can be preset or determined according to the actual business scenario requirements, which will not be elaborated here.
[0080] Step 212: Distribute the session request to the target signaling server corresponding to the target signaling service identifier.
[0081] Exemplarily, the session request is distributed to a target SIP signaling server corresponding to the target signaling service identifier. It is understandable that a signaling server may also be called a signaling service node. The target signaling server is a signaling server among multiple signaling servers.
[0082] In an exemplary embodiment, a SIP forwarding server interaction flow chart is provided, which is specifically implemented as follows: Figure 3 As shown, it includes a streaming media server, a signaling server, a forwarding server and a national standard device, wherein the sending of an INVITE request initiates a SIP transaction, which includes the sender sending an INVITE request, the receiver sending a 200 OK response after confirming the session description, and the sender sending an ACK message to confirm the establishment of the session after receiving the 200 OK response.
[0083] Among them, the request process: during the transmission of a request message, the forwarding service will add a Record-Route header field, so that when the message reaches the called party, there will be 0 or more Record-Route header fields. The national standard device will incorporate these Record-Route header fields into its own routing set, and then the national standard device will use the routing set to construct a series of Route header fields when sending a request message to route the message. Among them, the request message and Record-Route belong to the same dialog.
[0084] Response process: A SIP message will be added with a Via header field every time it passes through a forwarding service. When the message reaches the called party, the Via header field records the complete path of the request message. The called party copies these Via header fields as is to the response message. The response message includes the parameters of each Via and the order of each Via, and then sends it to the URI (Uniform Resource Identifier) in the first Via. Before each forwarded response message, the first Via (that is, the Via it added itself) will be deleted, and then the message will be forwarded to the URI in the new first Via until the message reaches the caller.
[0085] In the above-mentioned device scheduling access method, in response to the session request sent by the communication device, the session request is distributed to the target forwarding server through the weighted rotation strategy of the open source load balancer, and the device code and the number of signaling service instances carried in the session request are determined; according to the device code and the number of signaling service instances, the target signaling service instance is determined from all signaling service instances registered on the target forwarding server; the device code is consistently hashed through the target signaling service instance to obtain a hash value; according to the correspondence between the hash value and the signaling service identifier, the target signaling service identifier corresponding to the hash value is determined; the session request is distributed to the target signaling server corresponding to the target signaling service identifier. Compared with the existing distribution based on the public IP address, this method uses the device code, a smaller-granularity load strategy, to ensure that requests from the same communication device are processed on the same signaling service instance, realize platform statelessness, and realize efficient load balancing and session stickiness mechanism.
[0086] It is understandable that when a signaling server fails and cannot be restored for a long time, the communication devices connected to the SIP server will be unusable; if you want to switch to other backup SIP signaling servers, you need to modify the configuration information of each communication device, which is a huge workload and has low feasibility. When the communication devices need to be scheduled according to business needs, if you want to switch to other backup SIP signaling servers, you need to modify the configuration information of each communication device, which is a huge workload and has low feasibility. Therefore, a scheduling method is provided, such as Figure 4 As shown, it includes steps 402 to 404, wherein:
[0087] Step 402: When there is a scheduling requirement, determine the communication device to be scheduled.
[0088] Among them, determining that there is a scheduling demand can be detecting that a signaling server has a fault, and can also be any of load scheduling, directional scheduling, proximity scheduling, and disaster recovery scheduling. Directed scheduling refers to directly assigning tasks or requests to specific resources or service nodes based on specific business rules or user needs. Proximity scheduling aims to assign tasks or requests to the service node that is geographically closest to the user to reduce delays and improve response speed. Load scheduling is to assign tasks or requests based on the load of the current signaling service node, with the aim of balancing the workload of each service node and preventing some nodes from being overloaded while other nodes are idle. Disaster recovery scheduling ensures that in the event of a failure or disaster, tasks or requests can be automatically switched to a backup signaling service node.
[0089] It is understandable that local scheduling can reduce service pressure and network consumption, and can effectively reduce delays caused by network reasons; disaster recovery scheduling can automatically schedule equipment on failed nodes to other backup nodes.
[0090] Step 404: Schedule the communication device to be scheduled according to a preset device scheduling strategy.
[0091] The preset device scheduling strategy may be based on a SIP forwarding / registration redirection function to achieve remote scheduling of the device from the device registration node to any other node.
[0092] It is understandable that if Figure 5 As shown, it is a scheduling diagram of the scheduling module in an embodiment. The national standard gateway is composed of a provincial node and multiple edge nodes. The provincial node plays the role of the scheduling center and the service registration center, and the edge node is responsible for the task of signaling interaction with the device. The two together constitute a signaling cluster to achieve load balancing and disaster recovery scheduling of the service. According to different protocol versions, the scheduling capability of the device is realized. If it is the latest GB / T 28181-2022 specification, the registration redirection function enables the server to distribute the device registration and interaction process to different services according to the scheduling algorithm; otherwise, it is realized by proxy forwarding. When forwarding a SIP message, a Via header field is added to the message. The received and report fields are used in the Via header field to record the IP and port of the SIP request through the forwarding service, so that the response message can be delivered in the direction of the request message.
[0093] The dotted line represents the 302 mechanism of communication. When the upper-layer service scheduling requirement is met and the redirection address is known, the redirection address is sent to the communication device with redirection capability, and the communication device directly sends the request to the edge device, shortening the communication path and improving the communication capability. When the upper-layer service scheduling requirement is met, the registration request initiated by the communication device to be scheduled is forwarded to the edge SIP signaling server in the edge node via the forwarding service in the provincial node, and the registration is completed at the edge SIP signaling server, and the communication between the edge SIP signaling server and the communication device to be scheduled is established.
[0094] In the above embodiment, based on the SIP forwarding / registration redirection function, the device can be remotely dispatched from the device registration node to any other node, so that the device can be flexibly dispatched. Furthermore, for mobile communications, when a certain machine room is down for a long time, it can be automatically switched to the backup machine room through IP drift to achieve seamless switching and avoid the need for maintenance personnel to visit the machine room twice to modify the configuration information.
[0095] Optionally, in an embodiment of an embodiment, the national standard gateway includes an edge node, and the edge node is deployed with multiple edge signaling servers. According to the preset device scheduling strategy corresponding to the scheduling mode, scheduling the communication device to be scheduled includes the following two methods:
[0096] Method 1: When the scheduling mode is the first scheduling mode, determine the configuration information of the communication device to be scheduled; when receiving a registration request sent by the communication device to be scheduled, determine the target edge signaling server from multiple edge signaling servers according to the configuration information through the forwarding server, and forward / redirect the registration request to the target edge signaling server, so that the communication device to be scheduled completes registration on the target edge signaling server and establishes a communication connection.
[0097] The forwarding server may be determined based on a load balancing strategy. For example, the nearest signaling service node (edge node), i.e., the target edge signaling server, may be determined based on the device IP in the configuration information. The method for determining the forwarding service is not limited here. The first scheduling mode may be a scheduling initiated by obtaining device configuration information from the device access module. The configuration information includes the SIP signaling server IP, port, device code, password, etc.
[0098] Exemplarily, when the scheduling mode is the first scheduling mode, the configuration information of the communication device to be scheduled is obtained, the device background management interface is logged in, the configuration information is filled in the corresponding position and saved; the communication device to be scheduled will initiate a registration (REGISTER) request, and the forwarding service will adapt to the nearest edge signaling service node according to the IP of the communication device to be scheduled after receiving the registration request, and at the same time, according to different protocol versions, the registration request will be forwarded / redirected to the edge signaling service node. When the edge signaling service node is successfully registered, the callback device access module is notified to update the DS relationship, and subsequent requests sent by the communication device to be scheduled will be directly sent to the edge signaling service node, that is, the redirection address will be sent to the communication device to be scheduled, and subsequent SIP requests will be sent directly to the target edge signaling server without passing through the forwarding service.
[0099] Mode 2: When the scheduling mode is the second scheduling mode, the registration request is forwarded / redirected to the target edge signaling server corresponding to the signaling service address, so that the communication device to be scheduled completes registration at the target edge signaling server and establishes a communication connection.
[0100] Among them, the second scheduling mode can be a scheduling request actively initiated by the scheduling module. The signaling service address is known, or it can be determined according to the actual demand scenario. The registration request forwarding / redirection in this mode is the same as the implementation method in the first scheduling mode, so it will not be repeated here.
[0101] Exemplarily, when the scheduling mode is the second scheduling mode, the correspondence between the device and the SIP signaling server is updated according to the known signaling service address and the communication device to be scheduled, and the registration request is forwarded / redirected to the target edge signaling server corresponding to the signaling service address. When the registration of the target edge signaling server is successful, the subsequent requests sent by the communication device to be scheduled will be directly sent to the edge signaling service node, that is, the redirection address will be sent to the communication device to be scheduled, and the subsequent SIP requests will be sent directly to the target edge signaling server without going through the forwarding service.
[0102] In an exemplary embodiment, a scheduling flow chart of a national standard device is provided, such as Figure 6 As shown, it includes central nodes, provincial nodes, edge nodes and national standard equipment. The central node includes a scheduling module and an equipment access module, the provincial node includes a forwarding service and a SIP signaling service, and the edge node also includes a SIP signaling service.
[0103] In the first scheduling mode, the configuration information of the national standard device, that is, the device work order information, is obtained from the device access module, and the device background management interface is logged in. The configuration information is filled in the corresponding position and saved; the national standard device will initiate a registration (REGISTER) request. After receiving the registration request, the forwarding service adapts to the nearest signaling service node according to the device IP, and forwards / redirects the registration request to the SIP signaling service of the edge node according to different protocol versions. After the SIP signaling service of the edge node is successfully registered, the callback device access module is notified to update the DS relationship, and subsequent requests are directly sent to the SIP signaling service of the edge node. Among them, for the 2022 version of the device, the forwarding service replies to the 302 registration orientation and carries the new signaling service node information to the national standard device, and the national standard device redirects to initiate registration. For non-2022 version devices, the forwarding service forwards through SIP, assembles the Via header information and gives it to the SIP signaling service of the edge node. After receiving the response of the SIP signaling service of the edge node, it sends a confirmation message to the national standard device.
[0104] In the second scheduling mode, the scheduling module actively initiates the scheduling request. After receiving the scheduling request, the provincial node directly updates the DS relationship. When the target edge signaling server is successfully registered, the subsequent requests sent by the communication device to be scheduled will go directly to the edge signaling service node, that is, the redirection address will be sent to the communication device to be scheduled. Subsequent SIP requests will be sent directly to the target edge signaling server without going through the forwarding service.
[0105] It should be noted that devices accessed based on the Sip protocol can realize remote scheduling capabilities. For example, local scheduling can reduce service pressure and network consumption, and can effectively reduce delays caused by network reasons; disaster recovery scheduling can automatically schedule devices on failed nodes to other backup nodes.
[0106] In the above embodiment, unlike the existing scheduling that only supports national standard devices to generate SIP access information, while supporting not modifying the device configuration information, the remote scheduling capability of the device can be realized according to different national standard protocol versions, that is, based on the SIP forwarding / registration redirection function, the device can be remotely scheduled from the registration node to any other node, and has flexible support capabilities such as directional scheduling, nearby scheduling, load scheduling, and disaster recovery scheduling, which realizes flexible scheduling, reduces the workload of scheduling, and improves the feasibility of scheduling.
[0107] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0108] Based on the same inventive concept, the embodiment of the present application also provides a device scheduling access system for implementing the device scheduling access method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more device scheduling access system embodiments provided below can refer to the limitations on the device scheduling access method above, and will not be repeated here.
[0109] In an exemplary embodiment, Figure 7 As shown, a device scheduling access system is provided, the system includes a load balancer, multiple signaling servers and multiple forwarding servers, wherein:
[0110] A load balancer is used to receive a session request sent by a communication device and distribute the session request to a target forwarding server through a weighted rotation strategy; the target forwarding server is determined from a plurality of forwarding servers;
[0111] The target forwarding server is used to determine the device code and the number of signaling service instances carried in the session request;
[0112] Determine a target signaling service instance from all signaling service instances registered on the target forwarding server according to the device code and the number of signaling service instances;
[0113] The device code is consistently hashed through the target signaling service instance to obtain a hash value; the target signaling service identifier corresponding to the hash value is determined based on the correspondence between the hash value and the signaling service identifier; the session request is distributed to the target signaling server corresponding to the target signaling service identifier; the target signaling server is determined from multiple signaling servers.
[0114] The above-mentioned device scheduling access system responds to the session request sent by the communication device, and distributes the session request to the target forwarding server through the weighted rotation strategy of the open source load balancer; the target forwarding server is determined from multiple forwarding servers; the device code and the number of signaling service instances carried by the session request are determined; according to the device code and the number of signaling service instances, the target signaling service instance is determined from all signaling service instances registered on the target forwarding server; the device code is consistently hashed through the target signaling service instance to obtain a hash value; according to the correspondence between the hash value and the signaling service identifier, the target signaling service identifier corresponding to the hash value is determined; the session request is distributed to the target signaling server corresponding to the target signaling service identifier. Compared with the existing distribution based on the public IP address, this method distributes based on the device code, and can be based on a load strategy with a smaller granularity, ensuring that requests from the same communication device are processed on the same signaling service instance, realizing platform statelessness, and realizing efficient load balancing and session stickiness mechanism.
[0115] In an exemplary embodiment, the device scheduling access system further includes a scheduling module, the scheduling module being used to determine a communication device to be scheduled when there is a service scheduling requirement;
[0116] The communication equipment to be scheduled is scheduled according to the preset equipment scheduling strategy.
[0117] In an exemplary embodiment, the scheduling module is further used to determine the scheduling mode and the communication device to be scheduled when there is a service scheduling demand;
[0118] The communication device to be scheduled is scheduled according to the preset device scheduling strategy corresponding to the scheduling mode.
[0119] In an exemplary embodiment, the signaling server includes an edge signaling server, and the scheduling module is further used to determine the configuration information of the communication device to be scheduled when the scheduling mode is the first scheduling mode;
[0120] When receiving a registration request sent by the communication device to be scheduled, the forwarding server determines a target edge signaling server from multiple edge signaling servers according to the configuration information, so that the communication device to be scheduled completes registration and establishes a communication connection at the target edge signaling server.
[0121] In an exemplary embodiment, the scheduling module is further used to forward / redirect the registration request to the target edge signaling server corresponding to the signaling service address when the scheduling mode is the second scheduling mode, so that the communication device to be scheduled completes registration at the target edge signaling server and establishes a communication connection.
[0122] In an exemplary embodiment, the device scheduling access system further includes an updating module, and the updating module is used to update the corresponding relationship between the communication device and the signaling server according to the communication device to be scheduled and the target edge signaling server.
[0123] Each module in the above-mentioned device scheduling access system can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the form of hardware, or can be stored in the memory in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0124] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0125] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0126] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0127] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0128] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0129] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0130] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A device scheduling access method, characterized in that: Applied in a national standard gateway, the national standard gateway includes multiple forwarding servers and provincial nodes, the provincial nodes are deployed with a target forwarding server and multiple signaling servers, the method includes: In response to a session request sent by a communication device, the session request is distributed to a target forwarding server through a weighted rotation strategy of an open source load balancer; the target forwarding server is determined from the multiple forwarding servers; the session request is a SIP request, and the forwarding server, as an entrance and exit of a public network or a private network request, forwards the SIP request to a signaling service instance through a scheduling algorithm to complete the interaction logic of the SIP signaling; Determine the device code and the number of signaling service instances carried in the session request; Determine a target signaling service instance from all signaling service instances registered on the target forwarding server according to the device code and the number of signaling service instances; Performing consistent hashing on the device code through the target signaling service instance to obtain a hash value; Determine a target signaling service identifier corresponding to the hash value according to a correspondence between the hash value and the signaling service identifier; Distributing the session request to a target signaling server corresponding to the target signaling service identifier; In the case of a business scheduling requirement, determining the communication equipment to be scheduled; the scheduling requirement includes at least any one of load scheduling, directional scheduling, proximity scheduling, and disaster recovery scheduling; The communication device to be scheduled is scheduled according to a preset device scheduling strategy; the preset device scheduling strategy includes a SIP forwarding or registration redirection function to realize remote scheduling of the device from the device registration node to any other node; wherein, the SIP forwarding or registration redirection function is to realize the scheduling capability of the device according to different protocol versions. If it is the latest GB / T 28181-2022 specification, the registration redirection function enables the server to distribute the device registration and interaction process to different services according to the scheduling algorithm; otherwise, it is realized by proxy forwarding. When forwarding a SIP message, a Via header field is added to the message. The received and report fields are used in the Via header field to record the IP and port of the SIP request through the forwarding service, so that the response message can be transmitted in the direction of the request message.
2. The method according to claim 1, characterized in that The step of scheduling the communication device to be scheduled according to a preset device scheduling strategy includes: When there is a demand for business scheduling, determine the scheduling mode and the communication equipment to be scheduled; The communication device to be scheduled is scheduled according to a preset device scheduling strategy corresponding to the scheduling mode.
3. The method according to claim 2, characterized in that The national standard gateway includes an edge node, and the edge node is deployed with multiple edge signaling servers. The scheduling of the communication device to be scheduled according to the scheduling strategy corresponding to the scheduling mode includes: When the scheduling mode is the first scheduling mode, determining configuration information of the communication device to be scheduled; When receiving a registration request sent by the communication device to be scheduled, the forwarding server determines a target edge signaling server from the multiple edge signaling servers according to the configuration information, so that the communication device to be scheduled completes registration at the target edge signaling server and establishes a communication connection.
4. The method according to claim 2, characterized in that: The national standard gateway includes an edge node, and the edge node is deployed with multiple edge signaling servers. The scheduling of the communication device to be scheduled according to the scheduling strategy corresponding to the scheduling mode includes: When the scheduling mode is the second scheduling mode, the registration request is forwarded or redirected to the target edge signaling server corresponding to the signaling service address, so that the communication device to be scheduled completes registration at the target edge signaling server and establishes a communication connection.
5. The method according to any one of claims 3 to 4, characterized in that: The method further comprises: According to the communication device to be scheduled and the target edge signaling server, the corresponding relationship between the communication device and the signaling server is updated.
6. A device scheduling access system, characterized in that: The system includes a load balancer, a plurality of signaling servers and a plurality of forwarding servers, and an edge signaling server, wherein: The load balancer is used to receive a session request sent by a communication device, and distribute the session request to a target forwarding server through a weighted rotation strategy; the target forwarding server is determined from the multiple forwarding servers; the session request is a SIP request, and the forwarding server serves as an entry and exit for public network or private network requests, forwarding the SIP request to a signaling service instance through a scheduling algorithm to complete the interaction logic of the SIP signaling; The target forwarding server is used to determine the device code and the number of signaling service instances carried in the session request; Determine a target signaling service instance from all signaling service instances registered on the target forwarding server according to the device code and the number of signaling service instances; Performing consistent hashing on the device code through the target signaling service instance to obtain a hash value; determining a target signaling service identifier corresponding to the hash value according to a correspondence between the hash value and the signaling service identifier; distributing the session request to a target signaling server corresponding to the target signaling service identifier; the target signaling server is determined from the multiple signaling servers; The edge signaling server is used to determine the communication equipment to be scheduled when there is a business scheduling demand; the scheduling demand includes at least any one of load scheduling, directional scheduling, local scheduling, and disaster recovery scheduling; according to the preset equipment scheduling strategy, a communication connection is established between the communication equipment to be scheduled and the edge signaling server; the preset equipment scheduling strategy includes a SIP forwarding or registration redirection function to realize remote scheduling of the equipment from the equipment registration node to any other node; wherein, the SIP forwarding or registration redirection function is to realize the scheduling capability of the equipment according to different protocol versions. If it is the latest GB / T 28181-2022 specification, the registration redirection function enables the server to allocate the equipment registration and interaction process to different services according to the scheduling algorithm; otherwise, it is realized by proxy forwarding. When forwarding a SIP message, a Via header field is added to the message. The received and report fields are used in the Via header field to record the IP and port of the SIP request through the forwarding service, so that the response message can be transmitted in the direction of the request message.
7. The system according to claim 6, characterized in that The device scheduling access system further includes a scheduling module, and the scheduling module is further used to determine the configuration information of the communication device to be scheduled when the scheduling mode is the first scheduling mode; When receiving a registration request sent by the communication device to be scheduled, the forwarding server determines a target edge signaling server from multiple edge signaling servers according to the configuration information, so that the communication device to be scheduled completes registration and establishes a communication connection at the target edge signaling server.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
