Device scheduling access method and system, readable storage medium, and program product
By deploying forwarding servers and signaling servers in the national standard gateway, and using load balancers and consistent hashing, the problem of uneven load distribution in the SIP protocol video networking protocol framework was solved. This enabled load balancing of signaling service nodes and flexible scheduling of devices, reduced the workload of configuration modifications, and improved system reliability.
Patent Information
- Application Number
- PCT/CN2024/135761
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-16
- Filing Date
- 2024-11-29
- Publication Date
- 2026-02-19
AI Technical Summary
In existing technologies, the SIP protocol video networking protocol framework suffers from uneven load distribution, resulting in insufficient capacity of certain nodes and low utilization of signaling node resources. Furthermore, when the SIP signaling server fails, switching to a backup server requires modifying the configuration of each camera, which is a huge workload and has low feasibility.
By deploying multiple forwarding servers and signaling servers in the national standard gateway, using the weighted round-robin strategy of the open-source load balancer to distribute session requests, and determining the target signaling service instance through consistent hashing, load balancing of device codes and statelessness of the platform are achieved, supporting flexible scheduling of devices.
Load balancing of signaling service nodes is achieved, ensuring that requests from the same communication device are processed on the same signaling service instance, reducing the workload of modifying device configurations and improving the reliability and flexibility of the system.
Smart Images

Figure CN2024135761_19022026_PF_FP_ABST
Abstract
Description
Device scheduling access method and system, readable storage medium and program product TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to a device scheduling access method and system, device, readable storage medium and program product. BACKGROUND
[0002] SIP (Session Initiation Protocal, Session Initiation Protocol) is an application layer signaling control protocol, and its main purpose is to establish, modify and release the application layer protocol of multimedia session in IP network. Its main applications include but are not limited to voice, message, video, call control, etc. With the continuous development of Internet technology and mobile terminal device technology, the wide application of SIP technology, and the continuous expansion of business needs, the number of communication devices supporting SIP access is increasing. For example, the traditional SIP protocol video networking protocol framework standard requires that each camera needs to be configured with corresponding SIP server information in the background management interface, and the SIP signaling server is a single room deployment architecture mode.
[0003] In related technologies, the signaling service node of the communication device is determined based on public IP routing distribution, and there is a problem of uneven load distribution. Therefore, a method is needed to improve the defects in the prior art. SUMMARY
[0004] Therefore, it is necessary to provide a device scheduling access method, system, computer readable storage medium and computer program product capable of solving the problem of uneven load distribution.
[0005] In a first aspect, the present application provides a device scheduling access method applied in a national standard gateway, wherein the national standard gateway comprises a plurality of forwarding servers and a provincial node, the provincial node is deployed with a target forwarding server and a plurality of signaling servers, and the method comprises:
[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 carried by the session request and the number of signaling service instances;
[0008] According to the device code and the number of signaling service instances, determine a target signaling service instance from all signaling service instances registered in the target forwarding server;
[0009] Consistent hash processing is performed on the device code by the target signaling service instance, and a hash value is obtained;
[0010] According to the correspondence between the hash value and the signaling service identifier, a target signaling service identifier corresponding to the hash value is determined.
[0011] The session request is distributed to a target signaling server corresponding to the target signaling service identifier.
[0012] In one of the embodiments, the method further comprises:
[0013] In the case of business scheduling needs, a communication device to be scheduled is determined.
[0014] The communication device to be scheduled is scheduled according to a preset device scheduling policy.
[0015] In one of the embodiments, the scheduling of the communication device to be scheduled according to the preset device scheduling policy comprises:
[0016] In the case of business scheduling needs, a scheduling mode and a communication device to be scheduled are determined.
[0017] The communication device to be scheduled is scheduled according to a preset device scheduling policy corresponding to the scheduling mode.
[0018] In one of the embodiments, the national standard gateway comprises an edge node, and the edge node is deployed with a plurality of edge signaling servers. The scheduling of the communication device to be scheduled according to the scheduling policy corresponding to the scheduling mode comprises:
[0019] In the case of the first scheduling mode, configuration information of the communication device to be scheduled is determined.
[0020] In the case of receiving a registration request sent by the communication device to be scheduled, a target edge signaling server is determined from the plurality of edge signaling servers according to the configuration information by a forwarding server, so that the communication device to be scheduled completes registration and establishes a communication connection in the target edge signaling server.
[0021] In one of the embodiments, the national standard gateway comprises an edge node, and the edge node is deployed with a plurality of edge signaling servers. The scheduling of the communication device to be scheduled according to the scheduling policy corresponding to the scheduling mode comprises:
[0022] In the case of the second scheduling mode, a registration request is forwarded / redirected to a target edge signaling server corresponding to a signaling service address, so that the communication device to be scheduled completes registration and establishes a communication connection in the target edge signaling server.
[0023] In one embodiment, the method further comprises:
[0024] According to the to-be-scheduled communication device and the target edge signaling server, updating the correspondence between the communication device and the signaling server.
[0025] In a second aspect, the application further provides a device scheduling access system, comprising a load balancer, a plurality of signaling servers and a plurality of forwarding servers, wherein:
[0026] The load balancer is configured to receive a session request sent by a communication device, and distribute the session request to the target forwarding server through a weighted round-robin strategy; the target forwarding server is determined from the plurality of forwarding servers.
[0027] The target forwarding server is configured to determine the device code carried by the session request and the number of signaling service instances; determine the target signaling service instance from all the signaling service instances registered in the target forwarding server according to the device code and the number of signaling service instances; perform consistent hash processing on the device code through the target signaling service instance to obtain a hash value; determine the target signaling service identifier corresponding to the hash value according to the correspondence between the hash value and the signaling service identifier; distribute the session request to the target signaling server corresponding to the target signaling service identifier; the target signaling server is determined from the plurality of signaling servers.
[0028] In a third aspect, the application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the following steps:
[0029] In response to a session request sent by a communication device, distributing the session request 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.
[0030] Determining the device code carried by the session request and the number of signaling service instances;
[0031] Determining the target signaling service instance from all the signaling service instances registered in the target forwarding server according to the device code and the number of signaling service instances;
[0032] Performing consistent hash processing on the device code through the target signaling service instance to obtain a hash value;
[0033] Determining the target signaling service identifier corresponding to the hash value according to the correspondence between the hash value and the signaling service identifier;
[0034] The session request is distributed to a target signaling server corresponding to the target signaling service identifier. In a fourth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the following steps:
[0035] The session request is distributed to a target signaling server corresponding to the target signaling service identifier. In a fourth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the following steps:
[0036] The device code carried by the session request and the number of signaling service instances are determined.
[0037] The target signaling service instance is determined from all the signaling service instances registered at the target forwarding server according to the device code and the number of signaling service instances.
[0038] The device code is subjected to consistent hash processing by the target signaling service instance to obtain a hash value.
[0039] The target signaling service identifier corresponding to the hash value is determined according to the correspondence between the hash value and the signaling service identifier.
[0040] The session request is distributed to a target signaling server corresponding to the target signaling service identifier. The above device scheduling access method, system, computer readable storage medium and computer program product, in response to the session request sent by the communication device, distribute the session request to the target forwarding server through the weighted round-robin strategy of the open source load balancer; the target forwarding server is determined from the multiple forwarding servers; the device code carried by the session request and the number of signaling service instances are determined; the target signaling service instance is determined from all the signaling service instances registered at the target forwarding server according to the device code and the number of signaling service instances; the device code is subjected to consistent hash processing by the target signaling service instance to obtain a hash value; the target signaling service identifier corresponding to the hash value is determined according to the correspondence between the hash value and the signaling service identifier; and the session request is distributed to a target signaling server corresponding to the target signaling service identifier. This way, compared with the existing distribution based on public IP addresses and distribution based on device codes, it realizes load balancing and session stickiness mechanism based on smaller granularity, ensures that the requests of the same communication device are processed on the same signaling service instance, realizes platform statelessness, and realizes efficient load balancing and session stickiness mechanism. BRIEF DESCRIPTION OF DRAWINGS
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 is a schematic diagram of the architecture of a national standard gateway in one embodiment;
[0043] Figure 2 is a flowchart illustrating a device scheduling and access method in one embodiment;
[0044] Figure 3 is a flowchart of step 202 in one embodiment;
[0045] Figure 4 is a scheduling diagram in one embodiment;
[0046] Figure 5 is a flowchart of the SIP forwarding server interaction in one embodiment;
[0047] Figure 6 is a scheduling flowchart of a Chinese standard device in an embodiment;
[0048] Figure 7 is a structural block diagram of a device scheduling access system in one embodiment. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] 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, under the jurisdiction of the National Technical Committee on Standardization of Security Alarm Systems (SAC / TC100), and jointly drafted by the First Research Institute of the Ministry of Public Security and other units.
[0051] DS: The correspondence between devices and SIP signaling servers.
[0052] With the continuous development of Internet technology and mobile terminal device technology, the wide application of SIP technology, and the continuous development of video monitoring networking monitoring and the increasing number of social surface monitoring images. In the traditional SIP protocol video networking protocol framework standard, each camera needs to be configured with corresponding SIP server information in the background management interface, including SIP signaling server IP, port, device code, password, etc., and the SIP signaling server is a single room deployment architecture mode. When the SIP signaling server fails and cannot be recovered for a long time, the cameras connected to the SIP server will not be available; if you want to switch to other standby SIP signaling servers, you need to modify the configuration information of each camera, which is a huge workload and has low feasibility. When the camera initiates a session request, the existing routing method routes and distributes through the device public IP, which causes a certain node to cause a large number of actual devices, insufficient load, and low resource utilization of the signaling node.
[0053] In view of the technical problem of uneven load, a forwarding server is added, and the session request is distributed to the target forwarding server through the weighted round-robin strategy of the open source load balancer; the target forwarding server is determined from multiple forwarding servers; the device code carried by the session request and the number of signaling service instances are determined; according to the device code and the number of signaling service instances, the target signaling service instance is determined from all the signaling service instances registered in the target forwarding server; the device code is processed by the target signaling service instance for consistency hashing 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, so that the requests of the same device are processed on the same SIP signaling service instance, the platform is stateless, and the distribution based on the device code ensures the load balancing of the signaling service node.
[0054] In an exemplary embodiment, as shown in Figure 1, a schematic diagram of a national standard gateway architecture is provided, including a provincial node, a center node, an edge node, a load balancer and a reverse proxy server, wherein the provincial node is deployed with multiple forwarding servers and multiple SIP signaling servers, the SIP signaling servers are all multi-single room deployment architecture mode, including room 1, room 2 and room 3, the center node is deployed with a scheduling module and a device access module, and the edge node is also deployed with a SIP signaling server, a reverse proxy server and a load balancer. Further, the provincial node can also be called a provincial platform, which can be based on the cross-room multi-active disaster recovery capability of the unified portal. When one of the rooms is down, it is automatically switched to the standby room through IP drift to realize seamless switching. The red line represents the HTTP protocol (Hypertext Transfer Protocol), and the blue line represents the SIP protocol.
[0055] SIP signaling server: as the service of direct interaction with the national standard terminal equipment, used to establish, modify and terminate multimedia sessions, including voice, video, instant message and file transfer. Mainly composed of 6 kinds of signaling: INVITE, ACK, BYE, CANCEL, OPTIONS and REGISTER. Before sending the SIP message to the national standard terminal equipment, the SIP service address and port data outside itself are carried in the field or parameter of the SIP message to be sent, then the SIP message is encapsulated into a new IP packet, the source address and port of the IP packet are set to the address and port of the service provided outside, and finally the IP packet is sent.
[0056] Load balancer as a load balancer of SIP message, realized by direct routing technology. Strong load capacity, complete dual hot standby solution (LVS / DR+Keepalived), and only distribute requests, traffic does not go out from itself, which ensures that the IO performance of the balancer will not be affected by large traffic. For example, when a national standard camera (client) sends a SIP request to a VIP (Virtual IP Address), the LVS server (virtual server cluster system, Linux Virtual Server) selects the corresponding forwarding service (real-server) pool according to the VIP, selects a forwarding service in the pool according to the hash algorithm, records the connection between the national standard camera and the forwarding service in the hash table, then sends the request packet of the national standard camera to the selected forwarding service, and finally the selected forwarding service transmits the response packet of the signaling server directly to the national standard camera; when the national standard camera continues to send packets, the LVS sends the request belonging to this connection directly to the forwarding service selected according to the information recorded in the hash table; when the connection is terminated or timed out, the record in the hash table will be deleted.
[0057] Reverse proxy server as a proxy server of Http, realizes non-cached reverse proxy acceleration, improves service running speed, and adopts kernel Poll model, which can support more concurrent connections and only occupies very low memory resources, and also provides Http interface capability.
[0058] Forwarding server as the entrance and exit of public network / special network request, forwards SIP request to signaling service through scheduling algorithm, completes the interaction logic of SIP signaling, and realizes service statelessness. The scheduling module is used to be responsible for the device scheduling capability, supports the device to be remotely scheduled from the registration node to other arbitrary node, and the device scheduling strategy has flexible support capabilities such as directional scheduling, regional coding scheduling and load scheduling. The device access module is used to be responsible for the generation and management of the configuration information of the national standard equipment.
[0059] In an exemplary embodiment, as shown in FIG. 2, a device access method is provided, and the embodiment is exemplified by the method applied to a national standard gateway. The method comprises the following steps 202 to 212. Among them:
[0060] Step 202, in response to the session request sent by the communication device, the session request is distributed to the target forwarding server through the weighted round-robin strategy of the open source load balancer; the target forwarding server is determined from the multiple forwarding servers.
[0061] It should be noted that multiple forwarding servers are usually deployed on the national standard gateway, in order to ensure load balancing, the session request can be distributed to the target forwarding server through the weighted round-robin strategy of the open source load balancer.
[0062] Exemplarily, in response to the session request sent by the communication device, based on the weighted round-robin strategy, the target forwarding server is determined from the multiple forwarding servers according to the virtual IP address carried by the session request through the virtual server running on the open source framework platform.
[0063] Step 204, determine the device code carried by the session request and the number of signaling service instances.
[0064] It can be understood that the SIP protocol is a stateful protocol, and the related signaling of the same session must be sent to the same SIP signaling service processing. In order to ensure that all 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 in the forwarding server.
[0065] After the SIP signaling service instance is started or deployed, it registers its identity and capability to the forwarding server. The forwarding server knows which signaling service instances are available. The forwarding server uses a registration / discovery mechanism to maintain a registration table 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 start, and the discovery mechanism may allow signaling service instances or forwarding servers to find other components.
[0066] Before access, the communication device needs to be configured for the communication device to be accessed, and the configuration information of the communication device is generated, which includes the SIP signaling server IP, port, device code, password, etc. The device code can be carried by the session request, and the number of signaling service instances is the number of all registered SIP signaling service instances in the target forwarding service.
[0067] Exemplarily, the forwarding server responds to the session request sent by the communication device, and obtains the device code of the communication device from the device access module and obtains the number of all registered signaling service instances.
[0068] In step 206, the target signaling service instance is determined from all signaling service instances registered in the target forwarding server according to the device code and the number of signaling service instances.
[0069] Exemplarily, the device code and the number of signaling service instances are hashed to obtain a processing value, and the target signaling service instance is determined from all signaling service instances registered in the target forwarding server according to the processing value by querying a relationship table including the processing value and the corresponding relationship of the signaling service instance. This way, the target signaling service instance is determined from all signaling service instances registered in the target forwarding server, which can evenly distribute requests to different signaling service instances and avoid the situation that some instances are overloaded while others are idle.
[0070] In step 208, the device code is consistent hashed by the target signaling service instance to obtain a hash value.
[0071] It should be noted that the method is applied to a national standard gateway, which includes a provincial node and multiple edge nodes. The provincial node can be understood as a central node, and the provincial node can play the role of a dispatch center and a service registration center. The edge nodes can undertake the task of signaling interaction with the device, and the two together constitute a signaling cluster to realize service load balancing and disaster recovery scheduling.
[0072] The provincial node is deployed with a server cluster, which 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 automatically deploying, expanding and managing containerized applications. It provides a framework for running distributed systems and can seamlessly expand and manage container applications across host clusters.
[0073] The forwarding server serves as the entrance and exit of public network / special network requests, and forwards SIP requests to the signaling service through a scheduling algorithm to complete the interaction logic of SIP signaling and realize service statelessness. The scheduling algorithm can be a consistent hashing algorithm. Alternatively, 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 by existing methods, which will not be described here. The communication device can be understood as all devices supporting the SIP protocol, i.e., national standard devices. For example, the communication device can be an image acquisition device, an IP phone, a video conference system supporting the SIP protocol, etc. The session request can be sent to the target forwarding server through a load balancer.
[0074] Exemplarily, in response to the session request sent by the at least one communication device, a target forwarding server corresponding to each communication device is determined, and a device code of the corresponding communication device is subjected to consistent hash processing through the target forwarding server to obtain a hash value. The consistent hash processing can be implemented in an existing manner, and details are not described herein. The target forwarding server can be determined randomly or according to historical connection records.
[0075] In step 210, a target signaling service identifier corresponding to the hash value is determined according to a corresponding relationship between the hash value and the signaling service identifier.
[0076] The corresponding relationship between the hash value and the signaling service identifier can be preset or determined according to actual business scenario requirements, and details are not described herein.
[0077] In step 212, the session request is distributed to a target signaling server corresponding to the target signaling service identifier.
[0078] Exemplarily, the session request is distributed to a target SIP signaling server corresponding to the target signaling service identifier. It can be understood that the signaling server can also be called a signaling service node. The target signaling server is one of the plurality of signaling servers.
[0079] In an exemplary embodiment, a SIP forwarding server interaction flowchart is provided, and a specific implementation is shown in FIG. 3, including a streaming media server, a signaling server, a forwarding server, and a national standard device. An INVITE request is sent to start a SIP transaction, which includes a sender sending an INVITE request, a receiver sending a 200 OK response after confirming a session description, and the sender sending an ACK message to confirm the establishment of a session after receiving the 200 OK response.
[0080] In the request process, the forwarding service adds a Record-Route header field in the transmission process of a request message, so that there are 0 or several Record-Route header fields in the message when it reaches the called party. The national standard device integrates these Record-Route header fields into its own routing set, and then the national standard device uses the routing set to construct a series of Route header fields when sending a request message, so as to route the message. The request message and the Record-Route belong to the same dialog (session).
[0081] Response flow: a SIP message will be added with a Via header field when it passes through a forwarding service, and the Via header field records the complete path of the request message when the message reaches the called party. The called party copies these Via header fields to the response message, including 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. Each forwarding response message will delete the first Via (i.e. the Via added by itself) before forwarding the message to the URI in the new first Via until the message reaches the caller.
[0082] In the above 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 round-robin strategy of the open source load balancer, the device code carried by the session request and the number of signaling service instances are determined; according to the device code and the number of signaling service instances, the target signaling service instance is determined from all the signaling service instances registered in the target forwarding server; the device code is processed by the target signaling service instance for consistency hashing to obtain a hash value; according to the corresponding relationship between the hash value and the signaling service identifier, the target signaling service identifier corresponding to the hash value is determined; and the session request is distributed to the target signaling server corresponding to the target signaling service identifier. This way, compared with the existing distribution according to the public IP address, the load strategy with the smaller granularity of device code ensures that the requests of the same communication device are processed on the same signaling service instance, realizes the stateless platform, and realizes efficient load balancing and session stickiness mechanism.
[0083] It can be understood that when the signaling server fails and cannot be recovered for a long time, the communication devices connected to the SIP server will be unavailable; if you want to switch to other standby SIP signaling server, you need to modify the configuration information of each communication device, which is a huge workload and has low feasibility. According to the business needs of the communication device, if you want to switch to other standby SIP signaling server, 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, as shown in FIG. 4, including steps 402 to 404, wherein:
[0084] Step 402, in the case of scheduling demand, determine the communication device to be scheduled.
[0085] The determination of the scheduling requirement can be detection of a failure of the signaling server, and can also be any one of load scheduling, directional scheduling, nearby scheduling, and disaster recovery scheduling. The directional scheduling refers to direct allocation of a task or request to a specific resource or service node according to specific business rules or user requirements. The nearby scheduling aims to allocate a task or request to a service node closest to a user in geographical position, so as to reduce delay and improve response speed. The load scheduling is allocation of a task or request according to a load condition of a current signaling service node, aiming to balance workloads of various service nodes and prevent some nodes from being overloaded while other nodes are idle. The disaster recovery scheduling is to ensure automatic switching of a task or request to a standby signaling service node in case of a failure or disaster.
[0086] It can be understood that the nearby scheduling can reduce service pressure and network consumption, and can effectively reduce delay caused by network reasons; and the disaster recovery scheduling can automatically schedule a device of a failed node to other standby nodes.
[0087] At step 404, the communication device to be scheduled is scheduled according to a preset device scheduling strategy.
[0088] The preset device scheduling strategy can be based on a SIP forwarding / registration redirection function, to realize remote scheduling of a device from a device registration node to any other node.
[0089] It can be understood that, as shown in FIG. 5, it is a scheduling diagram of a 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 a scheduling center and a service registration center, and the edge nodes undertake the task of signaling interaction with the device, and the two together constitute a signaling cluster, to realize 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 is used to enable the server to allocate the device registration and interaction process to different services according to a scheduling algorithm; otherwise, the proxy forwarding mode is used. When forwarding a SIP message, a Via header field is added to the message, and the recevied and report fields in the Via header field are used to record the IP and port of the SIP request through the forwarding service, so that the response message can be transmitted according to the direction of the request message.
[0090] The dotted line represents the communication mechanism 302. In the case of upper-layer service scheduling requirements and known redirection addresses, the redirection addresses are issued to the communication devices with redirection capabilities, and the communication devices directly request the edge devices, thereby shortening the communication path and improving the communication capability. In the case of upper-layer service scheduling requirements, 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. The edge SIP signaling server completes the registration and establishes communication between the edge SIP signaling server and the communication device to be scheduled.
[0091] In the above embodiment, based on the SIP forwarding / registration redirection function, the device is remotely scheduled from the device registration node to any other node, and flexible scheduling of the device can be realized. Further, for mobile communication, when a machine room is down for a long time, the IP drift can be used to automatically switch to the standby machine room to realize seamless switching and avoid on-site modification of configuration information.
[0092] Optionally, in an embodiment of an embodiment, the national standard gateway includes an edge node, the edge node is deployed with a plurality of edge signaling servers, and the scheduling of the communication device to be scheduled according to the preset device scheduling strategy corresponding to the scheduling mode includes the following two modes:
[0093] Mode one: in the case of the first scheduling mode, the configuration information of the communication device to be scheduled is determined; in the case of receiving the registration request sent by the communication device to be scheduled, the target edge signaling server is determined from the plurality of edge signaling servers according to the configuration information through the forwarding server, and the registration request is forwarded / redirection to the target edge signaling server, so that the communication device to be scheduled completes the registration in the target edge signaling server and establishes a communication connection.
[0094] The forwarding server can be determined based on a load balancing strategy, for example, the device IP in the configuration information can be used to determine the nearest signaling service node (edge node), that is, the target edge signaling server. The determination method of the forwarding service is not limited herein. The first scheduling mode can be the scheduling initiated by the device access module to obtain the device configuration information. The configuration information includes the SIP signaling server IP, port, device code, password, etc.
[0095] Exemplarily, in the case of the dispatch mode being the first dispatch mode, configuration information of the to-be-dispatched communication device is acquired, a device background management interface is logged in, the configuration information is filled in the corresponding position and saved; the to-be-dispatched communication device initiates a REGISTER request, the forwarding service receives the REGISTER request, and according to the IP of the to-be-dispatched communication device, adapts to the nearest edge signaling service node, and according to different protocol versions, forwards / redirects the REGISTER request to the edge signaling service node, in the case of successful registration in the edge signaling service node, the device access module is notified to update the DS relationship, and subsequent requests sent by the to-be-dispatched communication device are directly sent to the edge signaling service node, that is, the redirection address is sent to the to-be-dispatched communication device, and subsequent SIP requests are directly sent to the target edge signaling server, and no longer pass through the forwarding service.
[0096] Mode two: in the case of the dispatch mode being the second dispatch mode, the REGISTER request is forwarded / redirected to the target edge signaling server corresponding to the signaling service address, so that the to-be-dispatched communication device completes registration and establishes a communication connection in the target edge signaling server.
[0097] Among them, the second dispatch mode can be a dispatch request initiated by the dispatch module, and the signaling service address is known, or can be determined according to actual demand scenarios, and the implementation of the registration request forwarding / redirecting in the first dispatch mode is the same in this mode, and will not be repeated here.
[0098] Exemplarily, in the case of the dispatch mode being the second dispatch mode, according to the known signaling service address and the to-be-dispatched communication device, the device (Device) and the SIP signaling server corresponding relationship is updated, the REGISTER request is forwarded / redirected to the target edge signaling server corresponding to the signaling service address, in the case of successful registration in the target edge signaling server, subsequent requests sent by the to-be-dispatched communication device are directly sent to the edge signaling service node, that is, the redirection address is sent to the to-be-dispatched communication device, and subsequent SIP requests are directly sent to the target edge signaling server, and no longer pass through the forwarding service.
[0099] In one exemplary embodiment, a dispatch flowchart of a national standard device is provided, as shown in FIG. 6, including a center node, a provincial node, an edge node and a national standard device, the center node includes a dispatch module and a device access module, the provincial node includes a forwarding service and a SIP signaling service, and the edge node also includes a SIP signaling service.
[0100] In the case of the first scheduling mode, the configuration information of the national standard device, i.e., the device work order information, is obtained from the device access module, the device background management interface is logged in, the configuration information is filled in the corresponding position and saved; the national standard device initiates a REGISTER request, the forwarding service receives the REGISTER request and adapts the nearest signaling service node according to the device IP, and at the same time, according to different protocol versions, the REGISTER request is forwarded / redirection to the SIP signaling service of the edge node, after the SIP signaling service of the edge node is successfully registered, the device access module is notified to update the DS relationship, and the subsequent request is directly sent to the SIP signaling service of the edge node. Among them, for the 2022 version device, the forwarding service replies 302 registration direction and carries the new signaling service node information to the national standard device, and the national standard device initiates redirection and registration. For non-2022 version devices, the forwarding service forwards the SIP and assembles the Via header information to the SIP signaling service of the edge node, and after receiving the response of the SIP signaling service of the edge node, the national standard device is sent to send confirmation information.
[0101] In the case of the second scheduling mode, the scheduling module initiates a scheduling request, the provincial node receives the scheduling request and directly updates the DS relationship, and in the case that the target edge signaling server is successfully registered, the request sent by the to-be-scheduled communication device is directly sent to the edge signaling service node, i.e., the redirection address is sent to the to-be-scheduled communication device, and the subsequent SIP request is directly sent to the target edge signaling server, and no longer passes through the forwarding service.
[0102] It should be noted that the device based on the Sip protocol access realizes the remote scheduling capability, for example, the near scheduling can reduce the service pressure and network consumption, and can effectively reduce the delay caused by the network; the disaster recovery scheduling can automatically schedule the device of the failed node to other standby nodes.
[0103] In the above embodiments, unlike the existing dispatching which only supports the generation of SIP access information of the national standard device, the remote dispatching capability of the device can be realized according to different national standard protocol versions without modifying the configuration information of the device, that is, based on the SIP forwarding / registration redirection function, the device is remotely dispatched from the registration node to other arbitrary node, and has flexible support capabilities such as directional dispatching, nearby dispatching, load dispatching, disaster recovery dispatching, etc., thereby realizing flexible dispatching, reducing the workload of dispatching and improving the feasibility of dispatching. It should be understood that although each step in the flowchart involved in each embodiment described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0104] Based on the same inventive concept, the embodiments of the present application also provide a device dispatching access system for implementing the device dispatching access method described above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme described in the above method, so the specific limitations in one or more device dispatching access system embodiments provided below can refer to the limitations of the device dispatching access method described above, which will not be repeated here.
[0105] In an exemplary embodiment, as shown in FIG. 7, a device dispatching access system is provided, which includes a load balancer, a plurality of signaling servers and a plurality of forwarding servers, wherein:
[0106] The load balancer is configured to receive a session request sent by a communication device, and distribute the session request to a target forwarding server through a weighted round-robin strategy; the target forwarding server is determined from the plurality of forwarding servers;
[0107] The target forwarding server is configured to determine a device code carried by the session request and a number of signaling service instances;
[0108] According to the device code and the number of signaling service instances, a target signaling service instance is determined from all the signaling service instances registered in the target forwarding server;
[0109] The device code is subjected to consistent hash processing by the target signaling service instance to obtain a hash value; a target signaling service identifier corresponding to the hash value is determined according to the correspondence between the hash value and the signaling service identifier; the session request is distributed to a target signaling server corresponding to the target signaling service identifier; and the target signaling server is determined from multiple signaling servers.
[0110] The above device scheduling access system distributes the session request to the target forwarding server through the weighted round-robin strategy of the open source load balancer in response to the session request sent by the communication device; the target forwarding server is determined from multiple forwarding servers; the device code carried by the session request and the number of signaling service instances are determined; the target signaling service instance is determined from all the signaling service instances registered in the target forwarding server according to the device code and the number of signaling service instances; the device code is subjected to consistent hash processing by the target signaling service instance to obtain a hash value; a target signaling service identifier corresponding to the hash value is determined according to the correspondence between the hash value and the signaling service identifier; and the session request is distributed to a target signaling server corresponding to the target signaling service identifier. This way, compared with the existing distribution according to the public IP address and the distribution according to the device code, a smaller granularity-based load strategy can be implemented, the requests of the same communication device can be processed on the same signaling service instance, the platform can be stateless, and efficient load balancing and session stickiness mechanisms can be implemented.
[0111] In an exemplary embodiment, the device scheduling access system further comprises a scheduling module, which is configured to determine a communication device to be scheduled in the case of business scheduling demand.
[0112] The communication device to be scheduled is scheduled according to a preset device scheduling strategy.
[0113] In an exemplary embodiment, the scheduling module is further configured to determine a scheduling mode and the communication device to be scheduled in the case of business scheduling demand.
[0114] The communication device to be scheduled is scheduled according to a preset device scheduling strategy corresponding to the scheduling mode.
[0115] In an exemplary embodiment, the signaling server comprises an edge signaling server, and the scheduling module is further configured to determine configuration information of the communication device to be scheduled in the case of the first scheduling mode.
[0116] In the case of receiving a registration request sent by the communication device to be scheduled, the target edge signaling server is determined from multiple edge signaling servers according to the configuration information by the forwarding server, so that the communication device to be scheduled completes registration and establishes a communication connection in the target edge signaling server.
[0117] In an example embodiment, the scheduling module is further configured to, in the case that the scheduling mode is the second scheduling mode, forward / redirect the registration request to a target edge signaling server corresponding to the signaling service address, so that the to-be-scheduled communication device completes registration and establishes a communication connection at the target edge signaling server.
[0118] In an example embodiment, the device scheduling access system further comprises an updating module configured to update the correspondence between the communication device and the signaling server according to the to-be-scheduled communication device and the target edge signaling server.
[0119] The modules in the device scheduling access system described above can be implemented in whole or in part by software, hardware, and combinations thereof. The modules described above can be embedded in or independent of the processor in the device, or stored in the memory in the device in the form of software, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0120] In an example embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the method embodiments described above when executing the computer program.
[0121] In an example embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the steps in the method embodiments described above.
[0122] In an example embodiment, a computer program product is provided, comprising a computer program, and the computer program is executed by a processor to implement the steps in the method embodiments described above.
[0123] 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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use, and processing of related data need to comply with relevant regulations.
[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to 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. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0125] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0126] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent of the present application. It should be noted that, for those 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 should be subject to the appended claims.
Claims
1. A device scheduling access method, characterized by, The application is applied to a national standard gateway, the national standard gateway comprises a plurality of forwarding servers and provincial nodes, a target forwarding server and a plurality of signaling servers are deployed on the provincial nodes, and the method comprises the following steps: 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; Determine the device code carried by the session request and the number of signaling service instances; According to the device code and the number of signaling service instances, determine the target signaling service instance from all the signaling service instances registered in the target forwarding server; Perform consistent hash processing on the device code through the target signaling service instance to obtain a hash value; 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.
2. The method of claim 1, wherein, The method further comprises: In the case of business scheduling requirement, determine the communication device to be scheduled; According to the preset device scheduling strategy, schedule the communication device to be scheduled.
3. The method of claim 2, wherein, The scheduling of the communication device to be scheduled according to the preset device scheduling strategy comprises: In the case of business scheduling requirement, determine the scheduling mode and the communication device to be scheduled; According to the preset device scheduling strategy corresponding to the scheduling mode, schedule the communication device to be scheduled.
4. The method of claim 3, wherein, The national standard gateway comprises an edge node, the edge node is deployed with a plurality of edge signaling servers, and the scheduling of the communication device to be scheduled according to the scheduling strategy corresponding to the scheduling mode comprises: In the case of the first scheduling mode, determine the configuration information of the communication device to be scheduled; In the case of receiving the registration request sent by the communication device to be scheduled, determine the target edge signaling server from the plurality of edge signaling servers according to the configuration information through the forwarding server, so that the communication device to be scheduled completes registration and establishes a communication connection in the target edge signaling server.
5. The method of claim 3, wherein, The national standard gateway comprises an edge node, the edge node is deployed with a plurality of edge signaling servers, and the scheduling of the communication device to be scheduled according to the scheduling strategy corresponding to the scheduling mode comprises: In the case of the second scheduling mode, forward / redirect the registration request to the target edge signaling server corresponding to the signaling service address, so that the communication device to be scheduled completes registration and establishes a communication connection in the target edge signaling server.
6. The method according to any one of claims 4 to 5, characterized in that, The method further comprises: According to the communication device to be scheduled and the target edge signaling server, update the correspondence between the communication device and the signaling server.
7. A device scheduling access system, characterized by The system comprises a load balancer, a plurality of signaling servers and a plurality of forwarding servers, wherein: The load balancer is configured to receive a session request sent by a communication device, and distribute the session request to a target forwarding server through a weighted round-robin strategy; the target forwarding server is determined from the plurality of forwarding servers; The target forwarding server is configured to determine a device code and a signaling service instance number carried by the session request; According to the device code and the signaling service instance number, a target signaling service instance is determined from all signaling service instances registered in the target forwarding server; The target signaling service instance is used for consistent hash processing of the device code to obtain a hash value, and a target signaling service identifier corresponding to the hash value is determined according to a corresponding relationship between the hash value and the signaling service identifier; and the session request is distributed to a target signaling server corresponding to the target signaling service identifier, wherein the target signaling server is determined from the plurality of signaling servers.
8. The system of claim 7, wherein, The device scheduling access system further comprises an edge signaling server configured to, in a case where there is a service scheduling requirement, determine a communication device to be scheduled, and establish a communication connection between the communication device to be scheduled and the edge signaling server according to a preset device scheduling strategy.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 6.
Citation Information
Patent Citations
National standard signaling message based forwarding method
CN112822271A
Signaling deployment method and device
CN115567535A
Load balancing method and system for SIP (Session Initiation Protocol) signaling service cluster and storage medium
CN117579703A
Equipment scheduling access method and system, readable storage medium and program product
CN118660023A
Sip message distribution method and sip message distribution device
JP2010003273A