A service cascade expansion method and execution unit of an intercom service cluster
Through the collaborative work of the cluster system and the service gateway, flexible allocation and collaborative work of service instances in the server cluster is achieved, and the problem of difficult to achieve memory allocation for separate services in the existing technology is solved, and the service cascading expansion capabilities of the intercom service cluster are improved.
Patent Information
- Application Number
- CN202110960217.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-09-29
- Filing Date
- 2021-08-20
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-08-20
AI Technical Summary
The prior art is difficult to implement memory allocation for separate services in server clusters, resulting in limited service cascading expansion capabilities of modular integrated applications.
The cluster system accepts service instance registration and allocates information flow, and uses service gateway and scheduling services to realize the allocation of terminal data interaction requests, ensuring that existing service instances and new service instances can effectively cooperate, and provide basic and extended functional services.
It realizes flexible allocation and collaborative work of service instances in the server cluster, improves the service cascading expansion capabilities of the intercom service cluster, avoids resource waste and improves the overall business processing speed.
Smart Images

Figure CN113905044B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server identification and interconnection, and in particular to a service cascading expansion method of an intercom service cluster and an execution unit thereof. Background Art
[0002] The server is a communication hub that carries data transfer and communication and provides network services. During the communication interaction process of the server, the server is responsible for a large amount of calculation, logic allocation and other tasks for the running software. Now with the gradual popularization of public network intercoms, intercoms are no longer restricted by distance. Intercoms also need a large amount of data transmission during work. Therefore, servers are built to adapt to a large amount of data transmission. Some customers have a strong concern for the security of their own products and the privacy of calls, such as military officers' units, enterprises, institutions, and R&D centers and large research institutes of certain units. The privacy of their calls at work is given top priority, and it is necessary to independently deploy servers for such scenarios. After the server is deployed, its settings It is placed in a local company to improve its security. Professional maintenance personnel are set up to maintain the server in a targeted manner. Maintenance reports are formed regularly, which can clearly show the operating status of the server and solve some common problems. When providing services for small-sized enterprises, only small-sized servers are needed for lightweight services, such as cluster intercoms for 40-60 people. It can be used for public safety, fire protection, security, ports, docks, airports, transportation and logistics, supermarkets and properties, etc. Intercoms in different fields often have different interaction concepts and different functional presets due to different application scenarios, such as voice intercoms and command and dispatch applications between front-line operators and rear managers. Intercom system software is usually installed and deployed through cloud servers or IDC hardware servers as carriers. Intercom system software usually contains many functions, such as intercom, recording, location services, multimedia messages, etc. When installing and deploying the system software, a full range of functional software is installed. It is necessary to hide the corresponding functions according to customer needs and configure the corresponding server hardware and network bandwidth resources for the full functions. For future functional expansion, the implementation solution of the existing technology is to open the originally hidden system functions.
[0003] For this type of walkie-talkie, the preset functions are often different;
[0004] The modular service cases provided are:
[0005] For example, a miniaturized server dedicated to POC services only needs to be independently deployed for the intercoms that provide POC services.
[0006] A miniaturized server dedicated to the video service and the POC service only needs to independently deploy the server for the video service and the intercom of the POC intercom service.
[0007] From the above two situations, we can understand that modular independent deployment is a small server provided specifically for a certain module during the deployment process. This small server is generally small in size and is specifically used to implement a certain functional service. However, with the expansion of application scenarios and the continuous progress and development of the company, the server's ability to carry business or the module matching selection of the server at the beginning of deployment, how to modularize the miniaturized servers and identify each other to achieve cascade expansion of business content based on basic business capabilities.
[0008] For example, when deploying for customers, the full series of functions has 4 functions, but the customer actually only needs 2 functions, so only 2 functions are enabled. If the remaining 2 functions are needed later, the corresponding system functions will be enabled. This results in that, in the existing solution, the deployed server itself does not reserve enough computing power and memory requirements for the subsequent 2 functions, and the remaining read and write access speed cannot meet the needs of subsequent functions. In the existing solution, even if the full series of functions are not used, they will occupy server hardware resources, such as CPU resources with higher configuration, memory and hard disk resources with higher configuration, resulting in a waste of cloud server or hardware server resources and slowing down the overall business processing speed. Summary of the invention
[0009] The embodiment of the present invention provides a service cascade expansion method of an intercom service cluster and an execution unit thereof, so as to at least solve the technical problem that a separate memory allocation for a separate service in the server cluster cannot be implemented to realize modular integrated application.
[0010] A method for cascading business expansion of an intercom service cluster is provided, comprising:
[0011] A cluster system for accepting service instance registrations and allocating information flows to the service instances;
[0012] There are existing service instances registered in the cluster system that are used to provide basic functional services;
[0013] The new service instance is registered to the cluster system, and the cluster system notifies all terminals that the new service instance is online;
[0014] The data interaction request initiated by the terminal is assigned by the cluster system to an existing service instance and / or a newly added service instance to implement the corresponding functional service
[0015] The existing service instance communicates with the terminal via a persistent link, and the information sent and received by the newly added service instance is transmitted via the persistent link.
[0016] Furthermore, the existing service instance and the newly added service instance have the same service type, including: one or more of: poc intercom cluster service, recording service, positioning service, terminal configuration service, SOS service, multimedia service basic service, video service, multimedia offline service, recording service offline service, multimedia session version, and regional group service;
[0017] or
[0018] The existing service instance and the newly added service instance have different service types.
[0019] The service types of the existing service instances include one or more of the following: poc intercom cluster service, recording service positioning service, terminal configuration service, SOS service, and multimedia service basic service.
[0020] The service types of the newly added service instance include one or more groups of video service, multimedia offline service, recording service offline service, multimedia session version, and regional group service.
[0021] Furthermore, the newly added service instance is registered to the cluster system including:
[0022] The cluster system includes a service gateway. A newly added service instance initiates a registration request to the service gateway. The registration request includes the service address of the newly added service instance.
[0023] The service gateway accepts the service address of the newly added service instance and updates the service address to the database. The new service instance is added to the function list of the service gateway.
[0024] Furthermore, the terminal initiates a data interaction request which is allocated by the cluster system to an existing service instance and / or a newly added service instance to implement corresponding functional services, including
[0025] The cluster system is equipped with a scheduling service. The data interaction request initiated by the terminal has priority access to the scheduling service. When the service types of the existing service instance and the newly added service instance are different,
[0026] The scheduling service allocates the data interaction request to the corresponding new service instance or existing service instance according to the service type of the data interaction request. The communication address of the allocated service instance is sent by the scheduling service to the terminal, and the terminal communicates with the corresponding service instance according to the communication address.
[0027] Furthermore, the terminal initiates a data interaction request which is allocated by the cluster system to an existing service instance and / or a newly added service instance to implement corresponding functional services, including
[0028] The cluster system is equipped with a scheduling service. The data interaction request initiated by the terminal has priority access to the scheduling service. When the existing service instance and the newly added service instance have the same service type,
[0029] The scheduling service allocates the data interaction request to the service instance with the smallest load based on the load of the newly added service instance or the existing service instance. The communication address of the allocated service instance is sent to the terminal by the scheduling service, and the terminal communicates with the corresponding service instance based on the communication address.
[0030] Furthermore, the cluster system is equipped with a redirection service and a monitoring service for reallocating service instances to terminals.
[0031] The monitoring service periodically communicates and interacts with the existing service instances and the newly added service instances. If the interaction time exceeds the preset time, the redirection service is notified to reallocate the service instance to the corresponding terminal.
[0032] The redirection service queries and sends the login address of the health service instance library to the corresponding terminal, and the corresponding terminal re-logins to the healthy service instance according to the address of the health service instance.
[0033] Furthermore, the cluster system is equipped with a database service.
[0034] The login terminal information of the existing service instance is uploaded to the database service, and all terminal information stored in the database service is synchronized to the shared cache. The newly added service instance obtains the required data from the shared cache, and the newly added data of the newly added service instance is synchronized to the shared cache.
[0035] Furthermore, the cluster system has registered existing service instances for providing basic functional services, including
[0036] The existing service instance at least provides a voice intercom service, which acquires voice data collected by a terminal and sends the voice data via a UDP channel established by a target terminal.
[0037] Furthermore, the existing service instance communicates with the terminal via a persistent link, and the information sent and received by the newly added service instance is transmitted via the persistent link, including:
[0038] Each terminal initiates a unique corresponding link establishment request to an existing service instance;
[0039] The existing service instance responds to the corresponding terminal according to the received link establishment request;
[0040] The existing service instances respectively establish separate corresponding communication connections with corresponding terminals;
[0041] The communication connection is maintained in a state of continuous activation or activation for a preset time period.
[0042] All the newly added service instances search for each communication connection and establish a branch link with each communication connection. The newly added service instance searches for the communication connection through the branch link and maintains communication with a corresponding terminal.
[0043] Provided is an execution unit of a service cascade expansion system integrated with an intercom service cluster, comprising:
[0044] A processor, adapted to implement the above-mentioned service cascade expansion method integrated with an intercom service cluster; and
[0045] The storage unit is suitable for storing the service cascade expansion method for implementing the above-mentioned intercom service cluster, and the service cascade expansion method for implementing the above-mentioned intercom service cluster integrated is loaded and executed by the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0047] Figure 1 This is a network cluster distribution diagram in the present invention.
[0048] Figure 2 It is a schematic diagram of the service cluster structure and signal flow of the redirection service, database service and shared cache in the present invention.
[0049] Figure 3 This is a business scheduling flow chart of the present invention.
[0050] Figure 4 This is a data sharing flow chart of the present invention.
[0051] Figure 5 This is a flow chart of business instance registration of the present invention.
[0052] Figure 6 This is a flow chart of the redirection service of the present invention. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0054] It should be noted that the terms in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects. If the first, second, etc. sequence nouns are involved, the technical solutions disclosed in detail by the present invention are not executed in sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0055] A service cascade expansion method for an intercom service cluster includes a capacity expansion cascade method and a new service instance expansion cascade method.
[0056] Embodiment 1
[0057] The following describes a server expansion new service instance cascading method
[0058] According to an embodiment of the present invention, a service cascade expansion method of an intercom service cluster is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a networking system of intelligent devices such as a group of executable instructions of a systematic module, such as a POC terminal 300 and a server, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0059] The following steps are involved:
[0060] like Figure 1 As shown, this method relies on hardware equipment, with existing service instances 101 and newly added service instances 201. The existing service instances 101 and newly added service instances 201 can be service clusters with service instances deployed, or the existing service instances 101 and newly added service instances 201 are hardware servers with single services and single devices, or cloud server instances open to the outside world executed in the cloud. It is equipped with basic Poc services, database services 102, and service gateways. The database service 102 inspires and executes functions such as response storage, call, establishment of linked lists, and data tables. The basic Poc service implements voice services such as voice framing, voice recording, voice call, and voice storage. The service gateway is responsible for handshake recognition, server notification, service strength allocation, and data content forwarding.
[0061] Combined with the above, the operating modules on its server are disclosed in the following content:
[0062] including, a cluster system for accepting service instance registrations and allocating information flows to the service instances;
[0063] The cluster system includes a service gateway, which is the core unit for realizing information flow of the cluster system. The service gateway is used to receive service instances to go back online, including scheduling services. The scheduling services are used to provide and redirect services when the terminal 300 initiates a service request. The redirection service is used to allocate a new service instance to the terminal 300 that has established a continuous link with the service instance when it is detected that the service instance is paralyzed.
[0064] An existing service instance 101 for providing basic functional services is registered in the cluster system.
[0065] like Figure 1 As shown, expand the explanation:
[0066] Setting the existing service instance 101 to an online state and communicating and interacting with multiple terminals 300 to implement one or more basic functions;
[0067] During the implementation process, the existing service instance 101 has been incorporated into the overall cluster system. The existing service instance 101 uses wireless transmission technology to communicate and interconnect with the corresponding multiple terminals 300 through the Internet. The interconnection process is that the existing service instance 101 pre-registers the login information of the terminal 300: mac address, account, password, IP number and its GSM card number, and records the above information of each terminal 300 in the database of the cluster system. A MYSQL database with a relational model is constructed in the database to store each terminal 300 information. The database has preset functional services such as analysis, optimization, caching, transaction management, and file management. The first terminal 300 searches for the IP of the existing service instance 101 through the DNS address preset in its own database and then logs in to the existing service instance 101.
[0068] During information transmission and reception, the terminal 300 enters the response content, and the input part of the terminal 300 modulates the input content into a data packet with a predetermined format and predetermined coding. The data packet is sent with another terminal 300 as the address. The existing service instance 101 receives the data packet, parses it, and forwards it to the terminal 300 according to the address of another terminal 300. The terminal 300 and another terminal 300 that realizes transmission and reception form a group. The group information is discovered by the database service 102 and entered into a preset storage range. The existing service instance 101 can provide basic functional services corresponding to each basic functional module according to the type of the data packet. The basic functional services include basic Poc services.
[0069] Added service instance 201;
[0070] Expanded explanation: the newly added service instance 201 is offline, the newly added service instance 201 carries one or more extended function services different from the basic functions or the newly added service instance 201 is offline;
[0071] New service instance 201 is registered to the cluster system
[0072] Expand explanation:
[0073] During the implementation process, the server goes online in the following ways:
[0074] ① The newly added service instance 201 is not online, and the existing service instance 101 communicates with the newly added service instance 201 through the switch. The existing service instance 101 and the newly added service instance 201 are hardware connected through the switch. The existing service instance 101 will call and open the corresponding firewall port. The newly added service instance 201 accesses the firewall port of the existing service instance 101 and allows access to the configuration information of the existing service instance 101. The newly added service instance 201 presets the IP and gateway of the same network channel in the intranet. The IP information of the existing service instance 101 is preset in the newly added service instance 201. The existing service instance 101 is found through the IP information of the existing service instance 101, and the configuration file is obtained, and the self-configuration list is updated according to the configuration file.
[0075] ② The newly added service instance 201 is not online. The wireless module of the newly added service instance 201 and the wireless module of the existing service instance 101 recognize each other. After the recognition is completed, the transmission is carried out using a short-distance transmission method such as a LAN wifi transmission protocol or a UWB transmission protocol, a zigbee transmission protocol, or a Bluetooth transmission protocol. After passing through the wireless module, wireless interconnection can be achieved without passing through a switch. During the interaction process, the existing service instance 101 will call and open the corresponding firewall port. The newly added service instance 201 accesses the firewall port of the existing service instance 101 and allows access to the configuration information of the existing service instance 101. The newly added service instance 201 presets the IP and gateway of the same network channel in the intranet. The IP information of the existing service instance 101 is preset in the newly added service instance 201. The existing service instance 101 is found through the IP information of the existing service instance 101, and the configuration file is obtained, and the self-configuration list is generated and updated according to the configuration file.
[0076] ③ Access the cluster system and register to the service gateway to go online.
[0077] The cluster system notifies all terminals 300 that the new service instance 201 is online
[0078] Specifically expanded as follows:
[0079] like Figure 5As shown, during the implementation process, the network online request sent by the newly added service instance 201 to the cluster system includes the login address of the newly added service instance 201. The newly added service instance 201 also communicates and interconnects with the existing service instance 101. The newly added service instance 201 configures its own environment according to the configuration list to send and receive data wirelessly in the frequency band specified by the protocol or logs in to the Internet in wired form and registers in the service gateway. The service gateway enables the corresponding functional port of the corresponding terminal 300 according to the service type provided by the newly added service instance 201.
[0080] The existing service instance 101 can also accept the network online request and forward the network online request to the service gateway for registration. The newly added service instance 201 sends its own login address, which includes the IP number, DNS address, and service type, to the existing service instance 101 in the form of an encapsulated data packet. The existing service instance 101 receives the encapsulated data packet and forwards it to the cluster system, retrieves the terminal 300 directory of the extended service type obtained from the database of the cluster system, summarizes it, and issues an online notification. After the notification is issued, the terminal 300 receives the encapsulated data packet and reads it in a pre-set reading format and updates its own login module. After the registration is completed, the newly added service instance 201 is updated to the online state. The existing service instance 101 updates the address of the newly added service instance 201 to the login address of the terminal 300 corresponding to the basic service.
[0081] The data interaction request initiated by the terminal 300 is assigned by the cluster system to the existing service instance 101 and / or the newly added service instance 201 to implement the corresponding functional service
[0082] Specifically expanded as follows:
[0083] During the implementation process, the terminal 300 searches for the newly added service instance 201 through the login address of the newly added service instance 201 and establishes a communication connection with the newly added service instance 201 to realize the data transmission and reception of extended function services and basic functions. When logging in, the terminal 300 will use the DNS address of the newly added service instance 201 as the login address and log in to the newly added service instance 201. The newly added service instance 201 authenticates the terminal 300. There are two methods to implement the authentication process of the newly added service instance 201.
[0084] ① The newly added service instance 201 searches the shared cache 202 shared by the database of the cluster system to find the login information of the terminal 300. If the login information is authenticated successfully, the terminal 300 is logged in to the newly added service instance 201.
[0085] ② When the newly added service instance 201 receives the authentication application, the database of the newly added service instance 201 performs authentication. At the same time, when the terminal 300 of the extended service type updates the configuration list according to the configuration file, the terminal 300 also sends its own login information to the existing service instance 101, and the existing service instance 101 queries the cluster system database service 102, and forwards the query result back to the newly added service instance 201.
[0086] After authentication, after scheduling, reading, creating a new group, establishing a channel, setting up the monitoring terminal 300 and the broadcasting terminal 300, opening the corresponding port module according to the functions of the newly added service instance 201 and implementing the signal reception and transmission of the corresponding function.
[0087] The database described above is a cluster system equipped with a database service 102.
[0088] The login terminal 300 information of the existing service instance 101 is uploaded to the database service 102, and all the terminal 300 information stored in the database service 102 is synchronized to the shared cache 202. The newly added service instance 201 obtains the required data from the shared cache 202, and the newly added data of the newly added service instance 201 is synchronized to the shared cache 202. The data in the shared cache 202 is exchanged with the database at all times.
[0089] The data interaction request initiated by the terminal is distributed by the cluster system to an existing service instance and / or a newly added service instance to implement corresponding functional services.
[0090] In implementation, after logging in, the terminal 300 sends data according to its service type. For example, for POC service, the dispatch service dispatches the existing service instance 101 corresponding to the POC service module, and for video service, the dispatch service dispatches the video service module corresponding to the newly added service instance 201. First, the dispatch service determines whether it belongs to the basic service provided by the existing service instance 101 or the newly added service instance 201.
[0091] The corresponding extended service forwards the information to the corresponding service instance, so that the existing service instance 101 and the newly added service instance 201 are scheduled by the scheduling service to respectively implement different service types. When the corresponding type of the data interaction request is a basic function, the scheduling service assigns the data interaction request to the existing service instance 101, and the basic function service instance of the existing service instance 101 identifies and parses the data content contained in the data interaction request.
[0092] The control signaling sent and received by the TCP channel between the terminal 300 and the server, the control signaling sent by the newly added service instance 201 is forwarded to the corresponding terminal 300 via the existing service instance 101, or the control signaling sent by the newly added service instance 201 is directly sent to the corresponding terminal 300;
[0093] The terminal 300 establishes a UDP channel with the existing service instance 101 for transmitting messages corresponding to basic functions, and establishes a UDP channel with the newly added service instance 201 for transmitting messages corresponding to extended functions.
[0094] The sending range is to first search for all terminals 300 that have established a group with the database service 102 and the terminal 300 corresponding to the data interaction request, and the existing service instance 101 or the newly added service instance 201 broadcasts the data content included in the data interaction request to all terminals 300 that have established the group;
[0095] The existing service instance communicates with the terminal via a persistent link, and information sent and received by the newly added service instance is transmitted via the persistent link.
[0096] Optionally, the above newly added service instance 201 is registered to the cluster system including:
[0097] The cluster system includes a service gateway, and the newly added service instance 201 initiates a registration request to the service gateway, and the registration request includes the service address of the newly added service instance 201;
[0098] The service gateway receives the service address of the newly added service instance 201 and updates the service address to the database. The newly added service instance 201 is put online in the function list of the service gateway.
[0099] During implementation,
[0100] The newly added service instance 201 connects to the Internet and initiates a registration request to the service gateway. The registration request includes the service address of the newly added service instance 201. The service gateway accepts the service address of the newly added service instance 201 and registers the service address in the database of the cluster system. The existing service instance 101 obtains the online notification of the newly added service instance 201, and the newly added service instance 201 is updated to the online status. The service gateway updates the service instance to the function list.
[0101] like Figure 5 and Figure 6 As shown, the existing service instance 101 has been registered in the cluster system. The cluster system includes a message bus, a basic Poc service provided by the existing service instance 101, a scheduling service, a service gateway, a database service 102, and a service gateway. The database service 102 performs functions such as response, storage, call, establishment of linked lists, and data tables. The basic Poc service implements voice services such as voice framing, voice recording, voice call, and voice storage. The service gateway is responsible for handshake recognition, server notification, service strength allocation, and data forwarding. The scheduling service is responsible for identifying the request type required by the terminal 300 and allocating the service to the corresponding server.
[0102] The basic Poc service, scheduling service, service gateway, database service 102 and service gateway provided by the cluster system are all registered on the message bus. The newly added service instance 201 can be directly connected to the Internet and go online. After the online service is completed, the service gateway is queried to initiate a registration request with the service gateway. The service gateway decodes the registration request, obtains the IP number and DNS address, and service type contained therein, updates and enables the corresponding functional port of the newly added service instance 201 according to the service type, updates the login address of the newly added service instance 201 according to the IP number and DNS address to accept the registration request of the newly added service instance 201, and the newly added service instance 201 realizes network communication with the service gateway. The service gateway has a monitoring service. The monitoring service communicates with the functional modules of the existing service instance 101 and the newly added service instance 201 at a predetermined period and identifies the service status of the functional modules. If the service status is abnormal and the network is disconnected, the network fluctuation time limit exceeds the preset time limit, and the sound is frequently lost, the terminal 300 to which the corresponding server belongs is notified and the terminal 300 is redirected by the redirection service to other servers with good service status of functional modules.
[0103] Or register to the service gateway through the existing service instance 101,
[0104] The cluster system includes a monitoring service that polls and detects the basic functions, extended functions and other functional modules, and performs two-point direct notification via a message bus, and provides data caching with a distributed data caching service. Its information access portal sets up a scheduling service, a server gateway and a redirection service. After the account login service keeps the account logged in, the scheduling service decides to call the corresponding functional module to provide functional services.
[0105] The newly added service instance 201 sends a network online request to the existing service instance 101. The newly added service instance 201 generates a network online request packet in a preset language structure to request to join the cluster system. The network online request includes configuration information of the newly added service instance 201. The existing service instance 101 is used to carry basic services and runs in the cluster system. The existing service instance 101 registers and identifies the newly added service instance 201 according to the configuration information of the newly added service instance 201. The existing service instance 101 updates its own configuration list according to the configuration information and updates its own configuration list to the database of the cluster system. The database of the cluster system can be a public database, or a third server can be set up as a public cache to meet the public database requirements.
[0106] A newly added service instance 201 is registered with the cluster system to provide extended function services. The newly added service instance 201 configures its own environment according to the configuration list to send and receive data wirelessly in the frequency band specified by the protocol or log in to the Internet in wired form. The existing service instance 101 and the newly added service instance 201 both have a parent process to listen for connection requests. The existing service instance 101 then sends the configuration information to all terminals 300, and the terminal 300 updates its own login configuration information. The terminal 300 logs in with the newly added service instance 201. After receiving the connection request, it parses the format field of the connection request. If the parsing is successful, it calls the corresponding module of the child process or notifies another server to enable the corresponding module.
[0107] The public server and the newly added service instance 201 are deployed using a distributed database, and the databases of the existing service instance 101 and the newly added service instance 201 share data access.
[0108] Optional,
[0109] The terminal 300 initiates a data interaction request which is assigned by the cluster system to the existing service instance 101 and / or the newly added service instance 201 to implement the corresponding functional services, including
[0110] The cluster system is equipped with a scheduling service. The data interaction request initiated by the terminal 300 has priority access to the scheduling service. When the service types of the existing service instance 101 and the newly added service instance 201 are different,
[0111] The scheduling service allocates the data interaction request to the corresponding new service instance 201 or existing service instance 101 according to the service type of the data interaction request. The communication address of the allocated service instance is sent by the scheduling service to the terminal 300, and the terminal 300 communicates with the corresponding service instance according to the communication address.
[0112] In implementation, the terminal 300 selects to search for the newly added service instance 201 through the login address of the newly added service instance 201 and establishes a communication connection with the newly added service instance 201.
[0113] The terminal 300 corresponding to the extended function service accesses the login service of the newly added service instance 201, and the newly added service instance 201 authenticates the logged-in terminal 300. The comparison database of the authentication comparison operation comes from the public database shared by the cluster system. After the corresponding terminal 300 successfully logs in, the newly added service instance 201 adds a record of the information of the corresponding terminal 300 to the shared cache 202. The shared cache 202 is used to write and store the terminal 300 identity information, terminal 300 grouping information, and data cache corresponding to the extended function corresponding to the extended function; the public database is used to record the terminal 300 identity information, terminal 300 grouping information, and data cache corresponding to the basic function. The public database is the cluster system database service 102. The information in the public database is shared to the shared cache 202. The public database communicates with the existing service instance 101, and the shared cache 202 communicates with the newly added service instance 201.
[0114] To further explain the above files, after the server deployment is completed, the information sending and receiving process is as follows:
[0115] The newly added service instance 201 is used to assume the extended function. After the newly added service instance 201 is registered in the cluster system, the corresponding terminal 300 logs in with the newly added service instance 201. During the login process, the corresponding terminal 300 and the newly added service instance 201 establish a UDP channel for transmitting voice messages, and the corresponding terminal 300 and the existing service instance 101 establish a TCP channel for transmitting signaling messages, or the corresponding terminal 300 and the newly added service instance 201 establish a TCP channel for transmitting signaling messages.
[0116] The corresponding terminal 300 maintains communication with both the existing service instance 101 and the newly added service instance 201 at the same time.
[0117] After logging in, the terminal 300 sends data according to its service type. For example, for POC service, the dispatch service dispatches the existing service instance 101 corresponding to the POC service module, and for video service, the dispatch service dispatches the video service module corresponding to the newly added service instance 201. First, the dispatch service determines whether it belongs to the basic service provided by the existing service instance 101 or the newly added service instance 201.
[0118] The corresponding extended service forwards the information to the corresponding service instance, so that the existing service instance 101 and the newly added service instance 201 are scheduled by the scheduling service to respectively implement different service types. When the corresponding type of the data interaction request is a basic function, the scheduling service assigns the data interaction request to the existing service instance 101, and the basic function service instance of the existing service instance 101 identifies and parses the data content contained in the data interaction request.
[0119] The control signaling sent and received by the TCP channel between the terminal 300 and the server, the control signaling sent by the newly added service instance 201 is forwarded to the corresponding terminal 300 via the existing service instance 101, or the control signaling sent by the newly added service instance 201 is directly sent to the corresponding terminal 300;
[0120] The terminal 300 establishes a UDP channel with the existing service instance 101 for transmitting messages corresponding to basic functions, and establishes a UDP channel with the newly added service instance 201 for transmitting messages corresponding to extended functions.
[0121] The sending range is to first search for all terminals 300 that have established a group with the database service 102 and the terminal 300 corresponding to the data interaction request, and the existing service instance 101 or the newly added service instance 201 broadcasts the data content included in the data interaction request to all terminals 300 that have established the group;
[0122] like Figure 3 As shown,
[0123] When the data interaction request corresponds to a basic function of the type, the scheduling service receives the interaction request, the scheduling service queries the service gateway, the service gateway queries the survival status of the existing service instance 101, and returns the service address of the healthy and surviving existing service instance 101 to the scheduling service, the scheduling service forwards the corresponding service address back to the intercom terminal 300, the terminal 300 requests a service connection from the existing service instance 101, and the existing service instance 101 returns the service link to complete the establishment of a persistent link.
[0124] When the corresponding type of the data interaction request is an extended function, the scheduling service receives the interaction request, the scheduling service queries the service gateway, the service gateway queries the survival status of the newly added service instance 201, and returns the service address of the healthy and surviving newly added service instance 201 to the scheduling service, and the scheduling service forwards the corresponding service address back to the intercom terminal 300, and the terminal 300 requests a service connection from the newly added service instance 201. The existing service instance 101 returns the service link to complete the establishment of a continuous link or the newly added service instance 201 establishes a branch link with the existing service instance 101, and the return information is transmitted to the said continuous link through the branch link and received by the corresponding terminal 300.
[0125] Optionally, the existing service instance 101 and the newly added service instance 201 have different service types.
[0126] The service types of the existing service instance 101 include one or more groups of poc intercom cluster service, recording service positioning service, terminal 300 configuration service, SOS service, and multimedia service basic service.
[0127] The service type of the newly added service instance 201 includes one or more of video service, multimedia offline service, recording service offline service, multimedia session version, and regional group service.
[0128] See also Figure 2 As shown, optionally, the existing service instance 101 and / or the newly added service instance 201 are equipped with a redirection service. When the terminal 300 initiates a service request to the existing service instance 101 and / or the newly added service instance 201, the redirection service is accessed. The redirection service compares the load of the existing service instance 101 and / or the newly added service instance 201, and allocates the server with the lowest load and the corresponding service instance to the terminal 300.
[0129] Optionally, the cluster system is equipped with a redirection service and a monitoring service for reallocating service instances to the terminal 300.
[0130] The monitoring service periodically communicates and interacts with the existing service instance 101 and the newly added service instance 201. If the interaction time exceeds the preset time, the redirection service is notified to reallocate the service instance to the corresponding terminal 300.
[0131] The redirection service queries and sends the login address of the health service instance 501 library to the corresponding terminal 300, and the corresponding terminal 300 re-logins to the healthy service instance according to the address of the health service instance 501.
[0132] like Figure 3 , Figure 5 and Figure 6 As shown, in implementation, the redirection service node monitors the survival status and current load of the service instances of each server providing services to the outside. The new access terminal 300 initiates a function service request, and the function service request preferentially accesses the gateway. The gateway allocates the redirection service. The gateway verifies the server corresponding to the access function service request, checks the load of the server, selects the corresponding server and returns the node access address to the terminal 300.
[0133] Monitoring service: The monitoring service detects the data flow of basic functions and / or functional services. If the data flow fails, the monitoring service notifies the scheduling service to allocate the terminal 300 corresponding to the data flow failure to the service instance of the server with normal data flow.
[0134] The monitoring service is integrated in the gateway. When the server detects that a large area of nodes are down, the gateway discovers the terminal 300 corresponding to the downed server and notifies the redirection service to search the node network, screen the servers with less than 70% load, and evenly distribute the corresponding terminals 300 to the selected server nodes. The selected server nodes are uniformly registered to the gateway to realize information forwarding.
[0135] See also Figure 2 As shown, optionally, the existing service instance 101 communicates with the terminal 300 via a persistent link, and the information sent and received by the newly added service instance 201 is transmitted via the persistent link, including:
[0136] Each terminal 300 initiates a unique corresponding link establishment request to an existing service instance 101;
[0137] The existing service instance 101 responds to the corresponding terminal 300 according to the received link establishment request;
[0138] The existing service instances 101 establish separate corresponding communication connections with corresponding terminals 300 respectively;
[0139] The communication connection is maintained in a state of continuous activation or activation for a preset time period.
[0140] All the newly added service instances 201 search for each communication connection and establish a branch link with each communication connection. The newly added service instance 201 searches for the communication connection through the branch link and maintains communication with a corresponding terminal 300.
[0141] In actual work, the sending process:
[0142] Each terminal 300 is assigned a unique random number array before sending a link request, and the random number array is the corresponding number of the link request. The service gateway forwards the link request to the corresponding service instance;
[0143] Return process:
[0144] The service instance receives each link request and queries the database service 102 to authenticate the terminal 300. After authentication, the service instance determines a unique random number corresponding to each random array, and returns a predetermined type of long-lived or indefinite-lived response link carrying a random number to the terminal 300 corresponding to each random array.
[0145] The above sending process and returning process are repeated N times, where N is a positive integer, to determine the link establishment relationship. The service instance establishes a separate corresponding communication connection with each terminal 300, and realizes the corresponding relationship that multiple terminals 300 correspond to one communication connection and one service instance. After the terminal 300 establishes a communication connection with the service instance, it notifies the newly added service instance 201 of the establishment of the link. The information is forwarded via the database and read by the shared cache 202. The communication port of the terminal 300 and the service instance is stimulated to a continuous waiting / sending state:
[0146] The service instance cyclically self-checks a data packet in a predefined format carrying the random number array, and the terminal 300 cyclically self-checks a data packet in a predefined format carrying the random number array.
[0147] At the same time, the newly added service instance 201 assigns a unique random code before sending a link request to the existing service instance 101, and the existing service instance 101 returns the random array, and the newly added service instance 201 and the existing service instance 101 establish a branch link;
[0148] The random numbers and random array corresponding table values are uploaded to the database service 102, and the database service 102 shares the information to the shared cache 202. The newly added service instance 201 establishes a key-value table of random numbers, random arrays and random codes.
[0149] When the terminal 300 requests an extended function service, it is sent and received via the link corresponding to the scheduler. The scheduler queries the newly added service instance 201 that survives in the service gateway. The newly added service instance 201 obtains the random array corresponding to the terminal 300 and forwards the extended function service request to the newly added service instance 201. The newly added service instance 201 returns a request response to the service gateway, and the service gateway returns the request response directly to the corresponding terminal 300.
[0150] at the same time
[0151] The newly added service instance 201 searches for the random code corresponding to the random array, determines the target existing service instance 101, and returns data to the target existing service instance 101 through the branch link corresponding to the random code. The data end of the branch link is the receiving address information of the corresponding target existing service instance 101. The data end of the branch link is changed from the receiving address information of the existing service instance 101 to the receiving address information of the terminal 300 corresponding to the corresponding random number.
[0152] ① The returned data is sent to the target terminal 300 corresponding to the random array through the target existing service instance 101 via a persistent link.
[0153] or
[0154] ② The target sending address is changed from the receiving address information of the existing service instance 101 to the receiving address information of the terminal 300 corresponding to the corresponding random number. It jumps directly to the target terminal 300 without passing through the target existing service instance 101, and is sent to the target terminal 300 corresponding to the random array via a continuous link.
[0155] In the event of a downtime, refer to Figure 2 , Figure 3 and Figure 6
[0156] The monitoring service always detects the data flow of the existing service instance 101 and the newly added service instance 201, determines whether the service instance is down based on the judgment rule, and records the time value when the downtime occurs:
[0157] Judgment rules: Find the survival status of the local service instance to determine the local network; continue to Pin the service instance to check the survival of the service instance; query the downtime of the corresponding service instance in the region; query the health status of all service instances under the cluster system itself;
[0158] If the service instance of the cluster system itself is healthy, it is determined to be a problem with the local service instance;
[0159] If other service instances in the local service instance area are healthy, it is considered a service instance problem;
[0160] Determine the service instance downtime problem or service instance network fluctuation problem by determining the local network fluctuation and the fluctuation health status with the upper-level node.
[0161] If the problem is due to network fluctuations in the service instance, wait for the network to recover;
[0162] If the service instance downtime monitoring service notifies the redirection service to start redirection allocation,
[0163] The cache database shared by the database service 102 stores a key-value table of random numbers, random arrays, and random characters. If the corresponding service instance is down, the cache database determines the voice flow data of the group and one-to-one intercom under the service instance within 10min-15min according to the key-value table of the downtime service instance. The voice flow is sorted by the upload time sequence, and the voice flow data is grouped with the key-value table. The voice flow data is overwritten in a 10min-15min cycle;
[0164] The terminal 300 gives priority to accessing the gateway service during the process of sending the cached voice frame chain packet. When arriving at the service instance, the gateway service sends the cached voice frame chain packet to the service instance and to the cache database respectively. While retrieving the above-mentioned voice flow data, the cached voice frame chain packet cached in the cache database that cannot be sent due to the service instance crash will also be retrieved. If there is a cached voice frame chain packet, the upload order of the cached voice frame chain packet will be added to the voice flow data in sequence from the earlier upload order to the later upload order, and the added cached voice frame chain packet will be marked.
[0165] The redirection service reads all the online terminals 300 where the downed service instance is located in the database service 102 center, and notifies the gateway service that the service instance is down, prohibits sharing with new requesting terminals 300, and reallocates the login address of a healthy service instance of the same type as the downed service instance to all the terminals 300, and sends it to the terminal 300. The terminal 300 reapplies for login with the login address of the healthy service instance and establishes a continuous link. After the login is successful, the database service 102 notifies the cache database to prepare to synchronize the voice flow data to the corresponding terminal 300 according to the key value table, and at the same time notifies the key value table of the newly added service instance 201 assigned to the random code corresponding to the terminal 300, and relinks to the healthy service instance 501. The voice flow data includes a voice frame chain packet, and the voice information corresponding to the voice frame chain packet is displayed in red after being reassembled at the terminal 300.
[0166] As described above, the information collected by the behavior feature file is summarized as the behavior feature file, and the monitoring service can collect data according to the monitoring method based on the collected information.
[0167] Example 2
[0168] Provided is an execution unit of a service cascade expansion system integrated with an intercom service cluster, comprising:
[0169] A processor, adapted to implement the service cascade expansion method integrated with an intercom service cluster as described in the claims; and
[0170] The storage unit is suitable for storing the service cascade expansion method of the intercom service cluster according to the claim, and the service cascade expansion method integrated with the intercom service cluster according to the claim is loaded and executed by the processor.
[0171] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0172] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0173] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0174] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0176] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A cascade expansion method for an intercom service cluster, characterized in that: include A cluster system for accepting service instance registrations and allocating information flows to the service instances; There are existing service instances registered in the cluster system that are used to provide basic functional services; The new service instance is registered to the cluster system, and the cluster system notifies all terminals that the new service instance is online; The data interaction request initiated by the terminal is allocated by the cluster system to the existing service instance and / or the newly added service instance to implement the corresponding functional service. The existing service instance communicates with the terminal via a persistent link, and the information sent and received by the newly added service instance is transmitted via the persistent link. The existing service instance and the newly added service instance have different service types. The service types of the existing service instances include one or more groups of POC intercom cluster service, recording service positioning service, terminal configuration service, SOS service, and multimedia service basic service. The service types of the newly added service instances include one or more groups of video service, multimedia offline service, recording service offline service, multimedia session version, and regional group service. The newly added service instance is registered to the cluster system including: The cluster system includes a service gateway. A newly added service instance initiates a registration request to the service gateway. The registration request includes the service address of the newly added service instance. The service gateway accepts the service address of the newly added service instance and updates the service address to the database. The new service instance is added to the function list of the service gateway.
2. The cascade expansion method of an intercom service cluster according to claim 1, characterized in that: The terminal initiates a data interaction request which is allocated by the cluster system to an existing service instance and / or a newly added service instance to implement the corresponding functional service, including that the cluster system is equipped with a scheduling service, and the data interaction request initiated by the terminal has priority access to the scheduling service. When the existing service instance and the newly added service instance have different service types, the scheduling service allocates the data interaction request to the corresponding newly added service instance or existing service instance according to the service type of the data interaction request, and the communication address of the allocated service instance is sent by the scheduling service to the terminal, and the terminal communicates with the corresponding service instance according to the communication address.
3. The cascade expansion method of an intercom service cluster according to claim 1, characterized in that: The cluster system is equipped with a redirection service and a monitoring service for reallocating service instances to terminals. The monitoring service periodically communicates and interacts with the existing service instances and the newly added service instances. If the interaction time exceeds the preset time, the redirection service is notified to reallocate the service instance to the corresponding terminal. The redirection service queries and sends the login address of the health service instance library to the corresponding terminal, and the corresponding terminal re-logins to the healthy service instance according to the address of the health service instance.
4. The cascade expansion method of an intercom service cluster according to claim 3, characterized in that: The cluster system is equipped with a database service. The login terminal information of the existing service instance is uploaded to the database service, and all terminal information stored in the database service is synchronized to the shared cache. The newly added service instance obtains the required data from the shared cache, and the newly added data of the newly added service instance is synchronized to the shared cache.
5. The cascade expansion method of an intercom service cluster according to claim 1, characterized in that: The cluster system has existing service instances registered for providing basic functional services, including The existing service instance at least provides a voice intercom service, which acquires voice data collected by a terminal and sends the voice data via a UDP channel established by a target terminal.
6. The cascade expansion method of an intercom service cluster according to claim 1, characterized in that: The existing service instance communicates with the terminal via a persistent link, and the information sent and received by the newly added service instance is transmitted via the persistent link, including: Each terminal initiates a unique corresponding link establishment request to an existing service instance; The existing service instance responds to the corresponding terminal according to the received link establishment request; The existing service instances respectively establish separate corresponding communication links with corresponding terminals; The communication link is kept in a state of continuous activation or activation for a preset time. All the newly added service instances search for each communication link and establish a branch link with each communication connection. The newly added service instance searches for the communication link through the branch link and maintains communication with a corresponding terminal.
7. A cascade expansion system for an intercom service cluster, characterized in that: It comprises a processor and a storage unit, wherein the processor is suitable for implementing the cascade expansion method of the intercom service cluster as described in any one of claims 1-6.
Citation Information
Patent Citations
Conversation-based service instance management method and equipment under micro service framework
CN108206852A
Registration method and device of micro-service instance, computer equipment and storage medium
CN110224855A
Capacity cascade expansion method of intercom service cluster and execution unit thereof
CN112235365A