Micro-service node cascading method and device and computer readable storage medium

By adding a cascade module (CAS) to the microservice nodes, self-organizing cascades between nodes are achieved, and the complexity and service quality of microservice nodes in the existing technology are solved, and the performance and reliability of audio and video services are improved.

CN119728679APending Publication Date: 2025-03-28ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311294358.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the existing instant messaging service platform, the cascade of microservice nodes is organized and implemented by the central server, which has problems such as technical implementation difficulties and complex signaling interactions, which affect the service quality of audio and video services.

Method used

Adding a cascade module (CAS) to the microservice nodes to realize self-organizing cascade between nodes. Through CAS, self-negotiation of routing and media forwarding will reduce dependence on the central server.

Benefits of technology

This method does not require central node participation, reduces the complexity of signaling interaction and improves the media real-time, quality and service carrying capacity of audio and video services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728679A_ABST
    Figure CN119728679A_ABST
Patent Text Reader

Abstract

The invention provides a micro-service node cascading method and device and a computer readable storage medium, the method can be applied to a source micro-service node providing audio and video services, a media processing module XPU and a first cascading module CAS are arranged in the source micro-service node, and the method comprises the steps that the first CAS receives routing information from the XPU, under the condition of determining that the source micro-service node and the target micro-service node are located in different servers according to the routing information, establishing connection with the target micro-service node according to the routing information; the first CAS selects or creates a first transmission channel, and sends a routing setting request to a second CAS in the target micro-service node; and the first CAS receives a route setting response returned by the second CAS, and determines that the source micro-service node and the target micro-service node are successfully cascaded under the condition that the setting response is successful. Therefore, the central node can be prevented from participating in cascading, and the quality of the audio and video service in the instant messaging service is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of instant messaging, and more specifically to a microservice node cascading method, device, and computer-readable storage medium. Background Art

[0002] With the development of Internet technology, instant messaging (such as video conferencing) has been widely used in people's work and life. Instant messaging applications often require a highly available service platform to provide stable audio and video services. Audio and video services are a type of service that is both computationally intensive and input-output (IO) intensive, and often require multiple nodes to collaborate to provide services.

[0003] like Figure 1 As shown in the figure, current instant messaging service platforms usually use a distributed architecture of a central server and multiple edge servers to build a server cluster. In the cluster, according to the responsibilities and characteristics of audio and video services, the audio and video services are broken down into multiple capability units - media components, and audio and video services with better interactivity and stronger scalability are provided in the form of a single microservice node (a media component is a microservice node). The code streams are then connected in series between multiple microservice nodes using the node cascade method.

[0004] Currently, the cascading of microservice nodes is implemented by the central server. However, due to the different hardware resources of different servers in the cluster and the changing network conditions between nodes, the solution of implementing the cascading of microservice nodes by the central server has problems such as technical implementation difficulties and complex signaling interaction, which affects the service quality of audio and video services in instant messaging services and needs to be improved. Summary of the invention

[0005] The embodiments of this specification provide a microservice node cascading method, device, and computer-readable storage medium to improve the service quality of audio and video services in instant messaging services.

[0006] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0007] In a first aspect, a microservice node cascading method is provided, which is applied to a source microservice node that provides audio and video services, wherein the source microservice node is provided with a media processing module XPU and a first cascading module CAS, and the method comprises:

[0008] The first CAS receives routing information from the XPU;

[0009] When the first CAS determines according to the routing information that the source microservice node and the target microservice node are located on different servers, the first CAS establishes a connection with the target microservice node according to the routing information;

[0010] The first CAS selects or creates a first transmission channel, and sends a routing setting request to a second CAS in the target microservice node, wherein the routing setting request carries the routing information;

[0011] The first CAS receives the routing setting response returned by the second CAS, and determines that the source microservice node is cascaded successfully with the target microservice node if the setting response is successful.

[0012] In a second aspect, a microservice node cascading method is provided, which is applied to a target microservice node that provides audio and video services, wherein a second cascading module CAS is provided in the target microservice node, and the method comprises:

[0013] The second CAS receives a channel pairing request from the first CAS in the source microservice node;

[0014] The second CAS responds to the channel pairing request and establishes a session for the source microservice node;

[0015] The second CAS selects or creates a second transmission channel, and returns a channel pairing response to the first CAS.

[0016] In a third aspect, a microservice node cascade device is provided, which is applied to a source microservice node that provides audio and video services, wherein the source microservice node is provided with a media processing module XPU and a first cascade module CAS, and the device comprises:

[0017] An information receiving module, used for the first CAS to receive routing information from the XPU;

[0018] A connection establishing module, configured for the first CAS to establish a connection with the target microservice node according to the routing information when it is determined that the source microservice node and the target microservice node are located on different servers according to the routing information;

[0019] A routing setting request module is used for the first CAS to select or create a first transmission channel and send a routing setting request to the second CAS in the target microservice node, wherein the routing setting request carries the routing information;

[0020] The response receiving module is used for the first CAS to receive the routing setting response returned by the second CAS, and when the setting response is successful, determine that the source microservice node is cascaded successfully with the target microservice node.

[0021] In a fourth aspect, a microservice node cascade device is provided, which is applied to a target microservice node that provides audio and video services, wherein a second cascade module CAS is provided in the target microservice node, and the device comprises:

[0022] A pairing request receiving module, configured for the second CAS to receive a channel pairing request from a first CAS in a source microservice node;

[0023] A session establishing module, configured for the second CAS to respond to the channel pairing request and establish a session for the source microservice node;

[0024] The pairing response module is used for the second CAS to select or create a second transmission channel and return a channel pairing response to the first CAS.

[0025] In a fifth aspect, an electronic device is provided, including:

[0026] processor;

[0027] a memory for storing instructions executable by the processor;

[0028] The processor is configured to execute the instructions to implement the method as described in the first aspect.

[0029] In a sixth aspect, a computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method as described in any one of the first aspect, the second aspect and the third aspect.

[0030] In the embodiments of the present specification, the source microservice node can realize cascading with the target microservice node by adding a first CAS therein. This is a self-organizing cascading method of the microservice nodes. This cascading method does not require the participation of a central node and does not involve complex signaling interactions. Therefore, it can improve the quality of audio and video services in instant messaging services. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0032] Figure 1 It is a schematic diagram of the architecture of an instant messaging service platform in the related art.

[0033] Figure 2 It is a schematic diagram of the architecture of an instant messaging service platform provided in an embodiment of this specification.

[0034] Figure 3 It is a routing setting and media forwarding model of a cascade module CAS in a microservice node cascade solution provided in an embodiment of this specification.

[0035] Figure 4 It is a schematic diagram of the control and media logic hierarchy of CAS provided in one embodiment of this specification.

[0036] Figure 5 It is a schematic diagram of the mapping relationship between CAS control and media provided in an embodiment of this specification.

[0037] Figure 6 It is a flowchart of a microservice node cascading method provided in an embodiment of this specification.

[0038] Figure 7 yes Figure 6 A detailed flowchart of step 603 in the illustrated embodiment.

[0039] Figure 8 It is a schematic diagram of a transmission channel pairing process between a source microservice node and a target microservice node in a microservice node cascading method provided in an embodiment of the present specification.

[0040] Fig. 9 This is a schematic diagram of a full routing synchronization process between a target microservice node and a source microservice node in a microservice node cascading method provided in an embodiment of this specification.

[0041] Fig.10 This is a schematic diagram of a transmission channel deletion process in a microservice node cascading method provided in an embodiment of this specification.

[0042] Fig.11 A schematic diagram of a routing information update process in a microservice node cascading method provided in an embodiment of the present specification.

[0043] Fig.12 It is a flowchart of a microservice node cascading method provided by another embodiment of this specification.

[0044] Fig.13 It is a schematic diagram of application example 1 of a microservice node cascading method provided in this specification.

[0045] Fig.14 This is a schematic diagram of application example 2 of a microservice node cascading method provided in this specification.

[0046] Fig.15 This is a schematic diagram of application example 3 of a microservice node cascading method provided in this specification.

[0047] Fig.16 It is a structural diagram of a microservice node cascading device provided in an embodiment of this specification.

[0048] Fig.17 yes Fig.16 A detailed structural diagram of the routing setting request module 1603.

[0049] Fig.18 It is a structural schematic diagram of a microservice node cascading device provided in another embodiment of the present specification.

[0050] Fig.19 It is a structural diagram of an electronic device provided in one embodiment of this specification. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0052] The terms "first", "second", etc. in this specification and claims are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of this specification can be implemented in an order other than those illustrated or described herein. In addition, "and / or" in this specification and claims means at least one of the connected objects, and the character " / " generally means that the objects associated with each other are in an "or" relationship.

[0053] At present, the cascading of microservice nodes is implemented by the central server. However, due to the different hardware resources of different servers in the cluster and the changeable network conditions between nodes, the solution of implementing the cascading of microservice nodes by the central server has problems such as technical implementation difficulties and complex signaling interaction, which affects the service quality of audio and video services in instant messaging services. For example, it affects the media real-time performance, media quality and service carrying capacity of the entire audio and video service, mainly including:

[0054] 1) Real-time performance of media data: In order to negotiate the ports, protocols and other information on different microservice nodes, the central server needs to send signaling in a certain sequence. Such a media operation behavior will cause a large number of complex interoperations on different nodes, especially signaling transmitted across the public network, which affects the real-time performance of media data.

[0055] 2) Service carrying capacity: To avoid the problem of uneven node load, the central server usually distributes tasks according to the load balancing algorithm, which will cause waste of media service resources. The expansion of new nodes will increase the burden on the central server.

[0056] 3) Media quality: In high-load scenarios, it is difficult for the central server to consider the performance bottleneck of each node when dispatching media tasks, resulting in jitter or even packet loss of node media, affecting user experience.

[0057] In order to solve at least one of the above problems, this specification proposes a microservice node cascade method, which is applied to the microservice node itself. Specifically, a cascade module (Cascade, CAS) is added to each microservice node, and the cascade between different microservice nodes is realized through the self-organization of the CAS. The CAS is a lightweight, independent microservice node cascade proxy system, which provides control plane and media plane interfaces, and has the capabilities of self-organization negotiation, routing retransmission, media resistance to weak networks, load balancing, etc., and has the advantages of strong scalability and self-adaptation.

[0058] In this specification, a microservice node can be any microservice node that provides microservices in a distributed architecture. Exemplarily, a microservice node cascading method proposed in this specification is applicable to audio and video media interaction between microservice nodes (such as media components) in a distributed cloud scenario. Among them, the media processing node (media component) is microserviced and deployed in an independent container, relying on the central server for service registration and service discovery mechanism to integrate the complete service. The service completes the control signaling through the business component, and the media is forwarded between the microservice nodes in the same network segment.

[0059] Specifically, the microservice node can be a media component distributed on the central server or each edge server, such as Figure 2 The media component 211 in the edge server 21 and the media component 221 in the edge server 22.

[0060] like Figure 2 As shown, one or more microservice nodes (such as media component 211 and media component 212) can be deployed in an edge server, and a microservice node can be provided with a media processing module (X Process Unit, XPU), a cascade module (CAS) and a content switch bus (Content Switch Bus, CSB). It can be understood that there can be multiple media processing services, so a microservice node can contain multiple core modules, such as a network processing unit, an audio processing unit, etc. Figure 2 As shown, this article uses XPU to refer to various processing modules.

[0061] After adding CAS to the microservice node, for the central server, the microservice node cascading process provided in this specification is parallel to other signaling of the central server, and the cascading process of the microservice node will not affect the signaling of the central server, which reduces the switching delay between microservice nodes and simplifies the signaling process. The central server no longer pays attention to the interaction process between different microservice nodes. The communication protocols, ports, preset resources and other information between different microservice nodes are self-organized and negotiated by CAS, thereby reducing the complexity of central server control.

[0062] For the inside of the microservice node (media component), the CAS added in this manual can hide the details of resource allocation, provide interfaces for routing settings and media data forwarding, encapsulate relative to each media microservice, and support different modules to send media data that follows the Real-time Transport Protocol (RTP) / Real-time Transport Control Protocol (RTCP), so it can support different microservice nodes for point-to-point communication. The internal modules of the microservice node do not need to pay attention to the configuration differences between nodes, ignore the details of media data forwarding across nodes, and reduce the difficulty of expansion between microservice nodes. It can support a large number of expansions of microservices in the audio and video platform, and support interconnection between different types of microservices. Among them, the media data includes but is not limited to at least one of audio data and video data.

[0063] Figure 3 The routing setting and media forwarding model of the cascade module CAS in a microservice node cascade solution provided in this specification are shown.

[0064] CAS provides routing setting related interfaces on the control plane and media forwarding interfaces on the media plane. Figure 3 As shown, on the control plane, when the XPU sets the internal route, CAS will directly pass it to CSB, and the XPU's specified media data will be forwarded directly to the destination XPU through CSB. For the external route set by the XPU, CAS modifies the route destination to itself, and the XPU's specified media data is directly forwarded to CAS through CSB, and CAS then transmits it to the remote end - that is, the microservice node located on another server. The XPU does not need to care whether the destination of the media data is the local XPU or the remote XPU. On the media plane, the source XPU sends the specified RTP / RTCP media packet to CSB, CSB distributes the media packet to CAS according to the route, and CAS sends it to the specified remote XPU according to the routing information.

[0065] Figure 4 1 is a schematic diagram of the control and media logic hierarchy of CAS provided in an embodiment of this specification. Figure 4As shown in the figure, from the hierarchical structure, in addition to the system kernel, CAS is divided into the following three layers: interface layer, business control layer and network access layer, and contains the following modules in total:

[0066] 1) Interfaces, including: external routing setting interface and media data forwarding interface.

[0067] 2) Sessions are used to manage different connection information, assign tasks to specified transmission channels, and set basic information for media data forwarding for transmission channels. In addition, sessions also contain routing information caches for temporary storage of routing messages.

[0068] 3) The transmission channel is the smallest media resource management unit, which uses RTP / RTCP to forward media data and count media transmission and reception. The transmission channel contains a media engine, which is used to handle weak network based on retransmission and error correction algorithms.

[0069] 4) Link, used to exchange messages with the remote end in a connection-based manner and monitor the remote end's connection.

[0070] Figure 5 1 is a schematic diagram of the mapping relationship between CAS control and media provided in an embodiment of this specification. Figure 5 As shown in the figure, the session plays a management role in the microservice, and the same session is used to manage nodes with the same IP. The session manages multiple transmission channels on the media plane, and the number of transmission channels is determined by the load between the two microservice nodes. According to the different physical configurations of the microservice nodes (including preset resource configuration), the number of work units on each microservice node is different. Due to the different single-core capabilities of the system and the size of the packet receiving and sending buffers, each work unit can only carry a limited number of tasks. The session assigns tasks to different transmission channels based on the current load conditions of both parties. The transmission channels are located on different work units, carrying media data forwarding tasks, and receiving or sending RTP / RTCP streams through designated audio and video ports.

[0071] The above describes the basic knowledge for understanding a microservice node cascading method provided in this specification. The following describes a microservice node cascading method provided in this specification.

[0072] like Figure 6 As shown, a microservice node cascading method provided by an embodiment of the present specification can be applied to a source microservice node (it should be noted that the source microservice node here is relative to the target microservice node mentioned below, the source microservice node can be any microservice node in the cluster, and the target microservice node can be another microservice node in the cluster), wherein the source microservice node is provided with a media processing module XPU and a first cascading module CAS, and the method may include the following steps:

[0073] Step 601: The first CAS receives routing information from the XPU.

[0074] The routing information includes: the address of the source microservice node (such as an IP address), the media data, and the address of the target microservice node.

[0075] Step 602: When the first CAS determines according to the routing information that the source microservice node and the target microservice node are located in different servers, the first CAS establishes a connection with the target microservice node according to the routing information.

[0076] Generally speaking, when the address (such as IP address) of the source microservice node in the routing information is consistent with the address of the target microservice node, it can be determined that the routing information is internal routing information, that is, the source microservice node and the target microservice node are located on the same server; otherwise, it can be determined that the routing information is external routing information, that is, the source microservice node and the target microservice node are located on different servers.

[0077] For internal routing information, that is, in the case where the source microservice node and the target microservice node are located on the same server, the media data carried in the routing information can be directly transparently transmitted through the CSB.

[0078] For external routing information, that is, for the case where the source microservice node and the target microservice node are located on different servers, it is necessary to cascade the source microservice node and the target microservice node. Specifically, when the first CAS is in the initial state, a connection can be established with the target microservice node according to the routing information. Then, step 603 is executed.

[0079] More specifically, when the first CAS is in the initial state, the process of establishing the cascade can be triggered by the routing interface of the control plane of the first CAS, and the routing setting is first performed (i.e., executing step 603). Optionally, the routing setting process satisfies idempotence, that is, the effect of processing the same routing information multiple times should be equivalent to the effect of processing it once.

[0080] Step 603: The first CAS selects or creates a first transmission channel, and sends a routing setting request to the second CAS in the target microservice node, wherein the routing setting request carries the routing information.

[0081] Optionally, before the first CAS selects or creates the first transmission channel, Figure 6The method shown may also include: the first CAS establishes a session for the target microservice node. As described above, the session can be used to manage different connection information, assign tasks to specified transmission channels, set basic information for media data forwarding for the transmission channel, etc. Of course, the creation of the session is not necessary, and the connection and transmission channel can also be managed in other ways.

[0082] Optionally, after creating the session, the first CAS may also determine whether the second CAS in the target microservice node matches the version of the first CAS. If not, the first CAS that is compatible with the version of the second CAS is selected for routing settings.

[0083] Optionally, the source microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein the preset resources may include but are not limited to computing (such as CPU) resources, image processing (such as GPU) resources, and network resources.

[0084] On this basis, the first CAS selects or creates the first transmission channel, which may include but is not limited to the following four implementations:

[0085] 1) When no transmission channel is established under the session, the first CAS selects a working unit whose remaining preset resources meet current needs to create a first transmission channel.

[0086] 2) When multiple transmission channels have been established under the session, the first CAS selects a transmission channel among the multiple transmission channels that has been successfully paired with the target microservice node as the first transmission channel.

[0087] 3) When multiple transmission channels have been established under the session and the remaining preset resources of the working units where the multiple channels are located do not meet the current needs, the first CAS selects another working unit whose remaining preset resources meet the current needs to create the first transmission channel.

[0088] 4) When multiple transmission channels have been established under the session and the remaining preset resources of all work units do not meet current needs, the first CAS waits for a work unit with idle preset resources to appear, and creates under the work unit with idle preset resources.

[0089] Further, after the first CAS successfully selects or creates the first transmission channel, there are the following situations according to the state of the first transmission channel:

[0090] 1) If the first transmission channel has been successfully paired with the second transmission channel in the target microservice node, the first CAS is directly triggered to send a routing setting request to the second CAS in the target microservice node.

[0091] 2) If the first transmission channel has been successfully paired with the second transmission channel in the target microservice node, but the routing information sent to the target microservice node is duplicated, the routing information is directly sent or discarded.

[0092] 3) If the first transmission channel has not been successfully paired with the second transmission channel in the target microservice node, a channel pairing request is sent to the second CAS, wherein the channel pairing request is used to request the second CAS to select or create a second transmission channel to pair with the first transmission channel. For the specific process, see Figure 7 .

[0093] like Figure 7 As shown, after the first CAS successfully selects or creates the first transmission channel (after executing step 6031), before sending a routing setting request to the second CAS in the target microservice node (before executing step 6039), step 603 may also include:

[0094] Step 6032: The first CAS sends a channel pairing request to the second CAS, wherein the channel pairing request is used to request the second CAS to select or create a second transmission channel to pair with the first transmission channel.

[0095] For the process of the second CAS creating the second transmission channel, please refer to the following Fig.12 The description of the process shown is not repeated here.

[0096] Step 6033: The first CAS receives a channel pairing response returned by the second CAS.

[0097] For detailed information about channel pairing, please refer to Figure 8 .

[0098] like Figure 8 As shown, as an example, the first CAS 81 may include a working unit 811, a control unit 812 and a network adapter unit 81; the second CAS 82 may include a working unit 821, a control unit 822 and a network adapter unit 823. On this basis, the channel pairing process may include:

[0099] ① After receiving the routing information from the XPU, the control unit 812 establishes a session between the source microservice node and the target microservice node.

[0100] ② The control unit 812 caches the routing information.

[0101] ③ The control unit 812 selects or creates a first transmission channel. After successfully selecting or creating the first transmission channel, the process proceeds to ④.

[0102] ④ The control unit 812 sends a channel pairing request to the control unit 822 via the network adaptation unit 813 and the network adaptation unit 823.

[0103] ⑤ The control unit 822 establishes a session between the target microservice node and the source microservice node.

[0104] ⑥ The control unit 822 selects or creates a second transmission channel.

[0105] ⑦ The control unit 822 creates a working channel corresponding to the second transmission channel in the working unit 821.

[0106] ⑧The working unit 821 creates a media engine for the working channel.

[0107] ⑨ The control unit 822 sends a channel pairing response to the control unit 812 via the network adaptation unit 823 and the network adaptation unit 813.

[0108] ⑩ The control unit 812 creates a working channel corresponding to the first transmission channel in the working unit 811.

[0109] The working unit 811 creates a media engine for the working channel.

[0110] Other processes, as well as working unit 811 and working unit 821 transmit media data to each other according to RTP / RTCP.

[0111] Optionally, step 603 may further include:

[0112] In step 6034, the first CAS determines whether the channel pairing is successful based on the channel pairing response; if yes, execute step 6035; otherwise, return to execute step 6031 to reselect or create the first transmission channel. It can be understood that the reselected or created first transmission channel is different from the first transmission channel selected or created last time.

[0113] Step 6035: The first CAS determines whether the receiving route of the source microservice node and the sending route of the target microservice node are consistent based on the verification code in the channel pairing response and the verification code of the source microservice node; if they are consistent, execute step 6039; otherwise, execute step 6036.

[0114] Step 6036: The first CAS sends a full routing synchronization request to the second CAS, wherein the full routing synchronization request is used to request the second CAS to send the first data packet and the second data packet to the source microservice node, wherein the first data packet is the routing information of the sending direction of the target microservice node, and the second data packet is an end packet containing a check code.

[0115] Step 6037: The first CAS receives the first data packet and the second data packet, and updates the check code in the source microservice node after receiving the second data packet.

[0116] Step 6038: The first CAS synchronizes the routing information in the first data packet to the source microservice node.

[0117] For detailed information about the full routing synchronization process, please refer to Fig. 9 .

[0118] like Fig. 9 As shown, Figure 8 As an example, the first CAS 81 may include a working unit 811, a control unit 812, and a network adapter unit 81; the second CAS 82 may include a working unit 821, a control unit 822, and a network adapter unit 823. On this basis, the channel pairing process may include:

[0119] ① The control unit 812 receives the channel pairing response returned by the control unit 822.

[0120] ② The control unit 812 determines whether the receiving route of the source microservice node and the sending route of the target microservice node are consistent based on the verification code in the channel pairing response and the verification code of the source microservice node. If they are consistent, a route setting request is sent to the control unit 822; if they are inconsistent, execute ③.

[0121] ③ The control unit 812 sends a full routing synchronization request to the control unit 822 via the network adaptation unit 813 and the network adaptation unit 823.

[0122] ④ The control unit 822 finds the previously established session and the previously created second transmission channel.

[0123] ⑤ The control unit 822 sets a retransmission timer.

[0124] ⑥ The control unit 822 sends a full routing synchronization response to the control unit 812 via the network adaptation unit 823 and the network adaptation unit 813.

[0125] ⑦ The control unit 812 finds the previously established session and the previously created first transmission channel.

[0126] ⑧ The control unit 812 sets the routing information in the receiving table of the first transmission channel (the routing information table in the receiving direction) to an invalid state to avoid routing according to an erroneous routing information table during synchronization.

[0127] ⑨ The control unit 822 packages and sends the sending table corresponding to the second transmission channel (the routing information table in the sending direction), which specifically corresponds to the first data packet mentioned above.

[0128] ⑩~ The control unit 822 sends a synchronization start packet to a synchronization end packet (a second data packet) to the control unit 812 in sequence.

[0129] The control unit 812 clears the expired routing information.

[0130] When checking that the verification codes are consistent, the control unit 812 updates the timestamp of the routing information table.

[0131] The control unit 812 sets the routing information of the working transmission channel in the working unit 811 .

[0132] The working unit 811 updates the working routing table.

[0133] The control unit 812 sends a synchronization end response to the control unit 823 .

[0134] The control unit 823 clears the retransmission timer that was set previously.

[0135] Optionally, before sending a routing setting request to the second CAS in the target microservice node (before executing step 6039), Figure 6 The method shown may also include: the first CAS pre-occupies the preset resources corresponding to the first transmission channel, so that after subsequent pairing is successful, the first transmission channel is used to transmit media data, thereby improving the transmission success rate.

[0136] Further, Figure 6 The method shown may also include: when the channel pairing response fails, the first CAS sets the priority of the first transmission channel to a low priority, releases the preset resources corresponding to the pre-occupied first transmission channel, and triggers the first CAS to reselect or create the first transmission channel. It can be understood that when the pairing fails, releasing the preset resources corresponding to the pre-occupied first transmission channel can avoid resource waste.

[0137] It can be understood that when a single work unit in CAS is at a performance bottleneck, additional channel creation and resource allocation are involved so that the load of the work unit can be balanced. When CAS sends a single routing information, both sides need to negotiate whether the resources are met (corresponding to the channel pairing process). First, the local session (source microservice node) selects a first transmission channel according to the preset number of resources in the work unit, and pre-occupies the current preset resources; then the other end (target microservice node) confirms that the preset resources in the work unit are sufficient, then creates a second transmission channel, returns a pairing response, and ends the process; otherwise, returns the amount of available resources for each channel; this end sets the priority of the current first transmission channel to a low priority and releases the pre-occupied resources. Furthermore, this end excludes work units that do not meet resource requirements, reselects new channels, pre-occupies current preset resources, and re-pairs with the transmission channel of the other end until the process ends.

[0138] Further, Figure 6 The method shown may also include:

[0139] The first CAS periodically checks whether the first transmission channel is in an idle state;

[0140] When the first transmission channel is in an idle state and the idle time exceeds a preset threshold, the first CAS sends a channel deletion request for the second transmission channel to the second CAS, and sets the state of the first transmission channel to be unavailable.

[0141] It can be understood that regularly checking and deleting idle pairing channels can avoid wasting resources, thereby avoiding waste of resources.

[0142] Further, Figure 6 The method shown may also include:

[0143] The first CAS receives a channel deletion response returned by the second CAS;

[0144] When the channel deletion response indicates that the deletion is successful, the first CAS deletes the first transmission channel;

[0145] In a case where the channel deletion response indicates deletion failure, the first CAS updates the status of the first transmission channel to available.

[0146] For details on how to delete the second transmission channel that has been paired successfully, please refer to Fig.10 .

[0147] like Fig.10 As shown, Figure 8As an example, the first CAS 81 may include a working unit 811, a control unit 812, and a network adapter unit 81; the second CAS 82 may include a working unit 821, a control unit 822, and a network adapter unit 823. On this basis, the channel deletion process may include:

[0148] ① The control unit 812 is triggered by the timer expiration detection to detect whether the idle time of the first transmission channel has timed out; if yes, execute ②; otherwise, continue to wait for the triggering of the timer expiration detection.

[0149] ② The control unit 812 sets the status of the first transmission channel to unavailable.

[0150] ③ The control unit 812 sends a second transmission channel deletion request to the control unit 822 via the network adaptation unit 813 and the network adaptation unit 823.

[0151] ④ The control unit 822 finds the second transmission channel.

[0152] ⑤ The control unit 822 determines whether there is routing information currently on the second transmission channel; if yes, no processing is performed, or a response of deletion failure is returned, otherwise, execution ⑥ is executed.

[0153] ⑥ The control unit 822 sends a second transmission channel release request to the working unit 821.

[0154] ⑦ Working unit 821 releases the media engine.

[0155] ⑧The control unit 822 releases the second transmission channel.

[0156] ⑨ The control unit 822 sends a channel deletion response to the control unit 812 via the network adaptation unit 823 and the network adaptation unit 813.

[0157] ⑩ The control unit 812 requests the working unit 811 to release the first transmission channel.

[0158] The working unit 811 releases the first transmission channel.

[0159] The control unit 812 releases the first transmission channel.

[0160] That is, if the other end (target microservice node) successfully deletes the second transmission channel, the first transmission channel of the local end (source microservice node) is deleted.

[0161] When the control unit 812 confirms that there is no transmission channel under the current session, the session is released.

[0162] Step 604: The first CAS receives a routing setting response returned by the second CAS, and determines that the source microservice node is cascaded successfully with the target microservice node when the setting response is successful.

[0163] Optionally, after the source microservice node is successfully cascaded with the target microservice node, the first CAS sends the media data carried in the routing information to the target microservice node through the first transmission channel.

[0164] Figure 6 The illustrated embodiment provides a microservice node cascading method, in which a source microservice node can be cascaded with a target microservice node by adding a first CAS therein. This is a self-organizing cascading method of microservice nodes. This cascading method does not require the participation of a central node and does not involve complex signaling interactions. Therefore, it can improve the quality of audio and video services in instant messaging services.

[0165] Optional, Figure 6 The method shown may also include:

[0166] The first CAS adds the operation for the routing information to a cache queue, wherein the operation includes a adding operation and a deleting operation, and the operations are sorted according to time size.

[0167] Further, Figure 6 The method shown may also include:

[0168] The first CAS receives and responds to an edit to the cache queue, wherein the edit includes at least one of a deduplication operation and a reverse operation.

[0169] Optionally, after the first transmission channel is successfully paired with the second transmission channel, when the trigger condition is difficult to meet, Fig.11 The triggering condition may include but is not limited to at least one of the following:

[0170] 1) The XPU in the first CAS sends a routing setting request;

[0171] 2) The timer expires and routing information is cached in the session;

[0172] 3) Receive a channel pairing response from the peer end (second CAS).

[0173] like Fig.11 As shown, Figure 8As an example, the first CAS 81 may include a working unit 811, a control unit 812, and a network adapter unit 81; the second CAS 82 may include a working unit 821, a control unit 822, and a network adapter unit 823. On this basis, the routing information update process may include:

[0174] ① When the trigger condition is met, the control unit 812 reads the head node from the cache queue.

[0175] ② The control unit 812 selects the first transmission channel for updating the routing information.

[0176] ③ The control unit 812 sends a routing information update request to the control unit 822 via the network adaptation unit 813 and the network adaptation unit 823.

[0177] ④ The control unit 822 finds the session and the corresponding second transmission channel.

[0178] ⑤ The control unit 822 determines whether the preset resources corresponding to the second transmission channel meet the needs; if yes, execute ⑥, otherwise do not update or ignore.

[0179] ⑥ The control unit 822 updates the routing information to the routing information table of the receiving direction of the second transmission channel.

[0180] ⑦ The control unit 822 sends a working transmission channel routing setting request to the working unit 821.

[0181] ⑧ The working unit 821 updates the routing table of the working transmission channel.

[0182] Optionally, it may also include:

[0183] ⑨ The control unit 822 sends a routing information update request to the control unit 812 via the network adaptation unit 823 and the network adaptation unit 813.

[0184] ⑩ The control unit 812 updates the routing information to the routing information table of the sending direction.

[0185] The control unit 812 sends a working transmission channel routing setting request to the working unit 811 .

[0186] The working unit 811 updates the routing table of the working transmission channel.

[0187] The control unit 812 removes the head node in the cache queue.

[0188] The control unit 812 processes the next cache node in the cache queue.

[0189] It should be noted that, in the above, for the source microservice node, if the first transmission channel is used to transmit media data, the working transmission channel is the first transmission channel; for the target microservice node, if the second transmission channel is used to transmit media data, the working transmission channel is the second transmission channel.

[0190] Optional, Figure 6 The method shown may also include: in the case of an abnormality in the sending network of the first CAS (including but not limited to at least one of a single node abnormality and a network interruption), triggering the first CAS to reselect or create a first transmission channel, thereby recreating the transmission channel and performing full routing synchronization. This is the anti-weak network mechanism and the recovery mechanism after a single node abnormality proposed in this specification, which can further improve the service quality.

[0191] like Fig.12 As shown, another embodiment of the present specification provides a microservice node cascading method, which can be applied to a target microservice node, wherein a second cascading module CAS is provided in the target microservice node, and the method may include:

[0192] Step 1201: The second CAS receives a channel pairing request from the first CAS in the source microservice node.

[0193] Step 1202: The second CAS responds to the channel pairing request and establishes a session for the source microservice node.

[0194] Step 1203: The second CAS selects or creates a second transmission channel, and returns a channel pairing response to the first CAS.

[0195] Optionally, the target microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein the second CAS selects or creates the second transmission channel, which may include but is not limited to the following four methods:

[0196] 1) When no transmission channel is established under the session, the second CAS selects a work unit whose remaining preset resources meet current needs to create a second transmission channel.

[0197] 2) When multiple transmission channels have been established under the session, the second CAS selects a transmission channel among the multiple transmission channels that has been successfully paired with the source microservice node as the second transmission channel.

[0198] 3) When multiple transmission channels have been established under the session and the remaining preset resources of the working units where the multiple channels are located do not meet the current needs, the second CAS selects another working unit whose remaining preset resources meet the current needs to create a second transmission channel.

[0199] 4) When multiple transmission channels have been established under the session and the remaining preset resources of all work units do not meet current needs, the second CAS waits for the appearance of a work unit with idle preset resources and creates under the work unit with idle preset resources.

[0200] Optional, Fig.12 The method shown may also include:

[0201] The second CAS determines whether the sending route of the source microservice node and the receiving route of the target microservice node are consistent according to the verification code in the channel pairing request and the verification code of the target microservice node;

[0202] When the sending route of the source microservice node and the receiving route of the target microservice node are inconsistent, the second CAS sends a full routing synchronization request to the first CAS, wherein the full routing synchronization request carries a first data packet and a second data packet, wherein the first data packet is the routing information of the sending direction of the target microservice node, and the second data packet is an end packet including a check code, and the full routing synchronization request is used to request the first CAS to update the check code in the source microservice node.

[0203] Further, Fig.12 The method shown may further include: when the second CAS fails to select and / or create the second transmission channel, outputting an error log and returning a pairing failure response to the first CAS.

[0204] for Fig.12 The microservice node cascading method shown can achieve cascading with the source microservice node by adding a second CAS therein. This is a self-organizing cascading method of microservice nodes. This cascading method does not require the participation of a central node and does not involve complex signaling interactions. Therefore, it can improve the quality of audio and video services in instant messaging services.

[0205] The following three examples illustrate the implementation effect of a microservice node cascading method provided in this specification.

[0206] Example 1

[0207] The service components of an audio and video conferencing platform are deployed in location A (corresponding to Fig.13 Microservice 1) and B (corresponding to Fig.13Microservice 2) in the initial state is not cascaded. A meeting is held in A. Multiple users are located in A and B respectively. They access the adjacent server nearby. The meeting generates cross-domain cascade media forwarding. The specific steps are as follows:

[0208] Step 1: On microservice 1 at location A, XPU sends routing information to CAS, and CAS establishes a session based on the peer IP information.

[0209] Step 2: CAS caches the routing information of XPU and establishes a link to connect to the service at location B.

[0210] Step 3: The CAS in microservice 1 at location A selects the work unit with the most remaining resources to create a new first transmission channel, and sends a channel pairing request message to the other end through the link.

[0211] Step 4: The CAS in microservice 2 selects the work unit with the most remaining resources (60%) to create a second transmission channel and replies with a channel pairing response.

[0212] Step 5: The channel pairing between microservice 1 and microservice 2 is completed, the routing information is successfully sent, the cached routing information is cleared, and the working unit in microservice 1 receives the media data and sends it to microservice 2.

[0213] The final cascade effect is as follows Fig.13 shown.

[0214] Example 2

[0215] The service components of an audio and video conference platform are deployed in locations A and B, and a cascade is established in the initial state. At this time, a meeting needs to be held in location A, which involves cascade communication between locations A and B. However, the capacity of a single work unit is insufficient, so CAS allocates additional work units for media forwarding. The specific steps are as follows:

[0216] Step 1: On microservice 1 at location A, XPU sends routing information to CAS, and selects the first transmission channel currently in use to send routing information to microservice 2 at location B.

[0217] Step 2: The current resources of the second transmission channel created by CAS in microservice 2 at location B are insufficient, and a routing delivery failure response is returned, and the number of resources currently available for all transmission channels is returned.

[0218] Step 3: The CAS of microservice 1 in location A cannot use the paired first transmission channel, so it creates a new first transmission channel and sends a channel pairing request to microservice 2 in location B.

[0219] Step 4: The CAS in microservice 2 at location B selects the work unit with the most remaining resources to create a second transmission channel and responds to the channel pairing.

[0220] Step 5: The channel pairing at both ends is completed, the routing information is sent successfully, the CAS of microservice 1 in location A clears the cached route, and the working unit in microservice 1 receives the media data and sends it to microservice 2.

[0221] The final cascade effect is as follows Fig.14 shown.

[0222] Example 3

[0223] The service components of a certain audio and video conference platform are deployed in locations A and B respectively. Multiple meetings are held in location A, and the multi-capability service in location A reaches a bottleneck. To meet the service call, location A uses the multi-capability service components of locations A and B at the same time, which will result in a cascade of multiple media processing nodes. The specific establishment process is similar to that of Example 1. The final cascade effect is as follows: Fig.15 shown.

[0224] In summary, the microservice node cascading method provided in this specification is parallel to the signaling process of the central server compared to the microservice node cascading method managed by the central server commonly used in the industry, and supports its own routing and media recovery in network abnormality scenarios, reducing the scheduling pressure of the center and the switching delay between nodes. In addition, the microservice uses a unified cascading proxy method to perform cross-node media interaction, shielding the forwarding details and reducing the complexity of internal calls of the microservice.

[0225] A microservice node cascading method provided in an embodiment of the present specification is introduced above. A microservice node cascading device provided in an embodiment of the present specification is described below.

[0226] Fig.16 FIG. 1 shows a schematic diagram of a microservice node cascade device provided in an embodiment of the present specification, which can be applied to a source microservice node. Fig.16 As shown, the device may include: an information receiving module 1601, a connection establishing module 1602, a routing setting request module 1603 and a response receiving module 1604.

[0227] The information receiving module 1601 is used for the first CAS to receive routing information from the XPU.

[0228] The routing information includes: the address of the source microservice node (such as an IP address), the media data, and the address of the target microservice node.

[0229] The connection establishing module 1602 is configured for the first CAS to establish a connection with the target microservice node according to the routing information when it is determined according to the routing information that the source microservice node and the target microservice node are located in different servers.

[0230] Generally speaking, when the address (such as IP address) of the source microservice node in the routing information is consistent with the address of the target microservice node, it can be determined that the routing information is internal routing information, that is, the source microservice node and the target microservice node are located on the same server; otherwise, it can be determined that the routing information is external routing information, that is, the source microservice node and the target microservice node are located on different servers.

[0231] For internal routing information, that is, in the case where the source microservice node and the target microservice node are located on the same server, the media data carried in the routing information can be directly transparently transmitted through the CSB.

[0232] For external routing information, that is, for the case where the source microservice node and the target microservice node are located on different servers, it is necessary to cascade the source microservice node and the target microservice node. Specifically, when the first CAS is in the initial state, a connection can be established with the target microservice node according to the routing information. Then the request sending submodule 1709 in the routing setting request module 1603 is triggered.

[0233] More specifically, when the first CAS is in the initial state, the process of establishing the cascade can be triggered by the routing interface of the control plane of the first CAS, and the routing setting is first performed (i.e., triggering the request sending submodule 1709 in the routing setting request module 1603). Optionally, the routing setting process satisfies idempotence, that is, the effect of processing the same routing information multiple times should be equivalent to the effect of processing it once.

[0234] The routing setting request module 1603 is used for the first CAS to select or create a first transmission channel, and send a routing setting request to the second CAS in the target microservice node, wherein the routing setting request carries the routing information.

[0235] Optionally, before the first CAS selects or creates the first transmission channel, Fig.16 The device shown may also include: a session establishment module, which is used for the first CAS to establish a session for the target microservice node. As described above, the session can be used to manage different connection information, assign tasks to specified transmission channels, set basic information for media data forwarding for the transmission channel, etc. Of course, the creation of the session is not necessary, and the connection and transmission channel can also be managed in other ways.

[0236] Optionally, after creating the session, the first CAS may also determine whether the second CAS in the target microservice node matches the version of the first CAS. If not, the first CAS that is compatible with the version of the second CAS is selected for routing settings.

[0237] Optionally, the source microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein the preset resources may include but are not limited to computing (such as CPU) resources, image processing (such as GPU) resources, and network resources.

[0238] On this basis, the first CAS selects or creates the first transmission channel, which may include but is not limited to the following four implementations:

[0239] 1) When no transmission channel is established under the session, the first CAS selects a working unit whose remaining preset resources meet current needs to create a first transmission channel.

[0240] 2) When multiple transmission channels have been established under the session, the first CAS selects a transmission channel among the multiple transmission channels that has been successfully paired with the target microservice node as the first transmission channel.

[0241] 3) When multiple transmission channels have been established under the session and the remaining preset resources of the working units where the multiple channels are located do not meet the current needs, the first CAS selects another working unit whose remaining preset resources meet the current needs to create the first transmission channel.

[0242] 4) When multiple transmission channels have been established under the session and the remaining preset resources of all work units do not meet current needs, the first CAS waits for a work unit with idle preset resources to appear, and creates under the work unit with idle preset resources.

[0243] Further, after the first CAS successfully selects or creates the first transmission channel, there are the following situations according to the state of the first transmission channel:

[0244] 1) If the first transmission channel has been successfully paired with the second transmission channel in the target microservice node, the first CAS is directly triggered to send a routing setting request to the second CAS in the target microservice node.

[0245] 2) If the first transmission channel has been successfully paired with the second transmission channel in the target microservice node, but the routing information sent to the target microservice node is duplicated, the routing information is directly sent or discarded.

[0246] 3) If the first transmission channel has not been successfully paired with the second transmission channel in the target microservice node, a channel pairing request is sent to the second CAS, wherein the channel pairing request is used to request the second CAS to select or create a second transmission channel to pair with the first transmission channel. For specific structure, see Fig.17 .

[0247] like Fig.17 As shown, after the first CAS successfully selects or creates the first transmission channel (after triggering the channel creation submodule 1701 in the routing setting request module 1603), before sending the routing setting request to the second CAS in the target microservice node (before triggering the request sending submodule 17099 in the routing setting request module 1603), the routing setting request module 1603 is triggered:

[0248] The pairing request submodule 1702 is configured for the first CAS to send a channel pairing request to the second CAS, wherein the channel pairing request is used to request the second CAS to select or create a second transmission channel to pair with the first transmission channel.

[0249] The response receiving submodule 1703 is configured for the first CAS to receive a channel pairing response returned by the second CAS.

[0250] The first judgment submodule 1704 is used to determine whether the channel pairing is successful according to the channel pairing response by the first CAS; if yes, trigger the second judgment submodule 1705 in the routing setting request module 1603; otherwise, return to trigger the channel creation submodule 1701 in the routing setting request module 1603 to reselect or create the first transmission channel. It can be understood that the reselected or created first transmission channel is different from the first transmission channel selected or created last time.

[0251] The second judgment submodule 1705 is used by the first CAS to determine whether the receiving route of the source microservice node and the sending route of the target microservice node are consistent according to the verification code in the channel pairing response and the verification code of the source microservice node; if they are consistent, triggering the request sending submodule 1709 in the route setting request module 1603, otherwise, triggering the synchronization request submodule 1706 in the route setting request module 1603.

[0252] The synchronization request submodule 1706 is used for the first CAS to send a full routing synchronization request to the second CAS, wherein the full routing synchronization request is used to request the second CAS to send a first data packet and a second data packet to the source microservice node, wherein the first data packet is the routing information of the sending direction of the target microservice node, and the second data packet is an end packet containing a check code.

[0253] The data packet receiving submodule 1707 is used for the first CAS to receive the first data packet and the second data packet, and to update the check code in the source microservice node after receiving the second data packet.

[0254] The synchronization submodule 1708 is used for the first CAS to synchronize the routing information in the first data packet to the source microservice node.

[0255] Optionally, before sending a routing setting request to the second CAS in the target microservice node (before triggering the request sending submodule 1709 in the routing setting request module 1603), Fig.16 The device shown may also include: a resource pre-occupancy module, which is used for the first CAS to pre-occupy the preset resources corresponding to the first transmission channel, so that after subsequent pairing is successful, the first transmission channel can be used to transmit media data, thereby improving the transmission success rate.

[0256] Further, Fig.16 The device shown may also include: a resource release module, which is used to, when the channel pairing response fails, set the priority of the first transmission channel to a low priority by the first CAS, release the preset resources corresponding to the pre-occupied first transmission channel, and trigger the first CAS to reselect or create the first transmission channel. It can be understood that when the pairing fails, releasing the preset resources corresponding to the pre-occupied first transmission channel can avoid resource waste.

[0257] It can be understood that when a single work unit in CAS is at a performance bottleneck, additional channel creation and resource allocation are involved so that the load of the work unit can be balanced. When CAS sends a single routing information, both sides need to negotiate whether the resources are met (corresponding to the channel pairing process). First, the local session (source microservice node) selects a first transmission channel according to the preset number of resources in the work unit, and pre-occupies the current preset resources; then the other end (target microservice node) confirms that the preset resources in the work unit are sufficient, then creates a second transmission channel, returns a pairing response, and ends the process; otherwise, returns the amount of available resources for each channel; this end sets the priority of the current first transmission channel to a low priority and releases the pre-occupied resources. Furthermore, this end excludes work units that do not meet resource requirements, reselects new channels, pre-occupies current preset resources, and re-pairs with the transmission channel of the other end until the process ends.

[0258] Further, Fig.16 The device shown may also include:

[0259] A timing checking module, configured for the first CAS to periodically check whether the first transmission channel is in an idle state;

[0260] The deletion request module is used to send a channel deletion request for the second transmission channel to the second CAS when the first transmission channel is in an idle state and the idle time exceeds a preset threshold, and set the state of the first transmission channel to be unavailable.

[0261] It can be understood that regularly checking and deleting idle pairing channels can avoid wasting resources, thereby avoiding waste of resources.

[0262] Further, Fig.16 The device shown may also include:

[0263] A deletion response receiving module, configured for the first CAS to receive a channel deletion response returned by the second CAS;

[0264] a channel deletion module, configured to, when the channel deletion response is a deletion success, cause the first CAS to delete the first transmission channel;

[0265] The status updating module is configured to update the status of the first transmission channel to available by the first CAS when the channel deletion response indicates deletion failure.

[0266] The response receiving module 1604 is configured to cause the first CAS to receive the routing setting response returned by the second CAS, and to determine that the source microservice node is cascaded successfully with the target microservice node when the setting response is successful.

[0267] Optionally, after the source microservice node is successfully cascaded with the target microservice node, the first CAS sends the media data carried in the routing information to the target microservice node through the first transmission channel.

[0268] Fig.16 The illustrated embodiment provides a microservice node cascading device, in which a source microservice node can be cascaded with a target microservice node by adding a first CAS therein. This is a self-organizing cascading method of microservice nodes. This cascading method does not require the participation of a central node and does not involve complex signaling interactions. Therefore, it can improve the quality of audio and video services in instant messaging services.

[0269] Optional, Fig.16 The device shown may also include:

[0270] The operation cache module is used for the first CAS to add the operation for the routing information into a cache queue, wherein the operation includes a new operation and a delete operation, and the operations are sorted according to the time size.

[0271] Further, Fig.16 The device shown may also include:

[0272] The editing response module is used for the first CAS to receive and respond to the editing of the cache queue, wherein the editing includes at least one of a deleting duplicate operation and a reverse operation.

[0273] Optionally, after the first transmission channel is successfully paired with the second transmission channel, when the trigger condition is difficult to meet, Fig.11 The triggering condition may include but is not limited to at least one of the following:

[0274] 1) The XPU in the first CAS sends a routing setting request;

[0275] 2) The timer expires and routing information is cached in the session;

[0276] 3) Receive a channel pairing response from the peer end (second CAS).

[0277] Optional, Fig.16 The device shown may also include: an abnormality recovery module, which is used to trigger the first CAS to reselect or create the first transmission channel when an abnormality occurs in the transmission network of the first CAS (including but not limited to at least one of a single node abnormality and a network interruption), thereby recreating the transmission channel and performing full routing synchronization. This is the anti-weak network mechanism and the recovery mechanism after a single node abnormality proposed in this specification, which can further improve the service quality.

[0278] Above Fig.16 The device shown can be used to implement the above Figure 6 For the various embodiments of the microservice node cascading method shown, please refer to the above method embodiments for related details.

[0279] like Fig.18 As shown, another embodiment of the present specification provides a microservice node cascading device 1800, which can be applied to a target microservice node. The target microservice node is provided with a second cascading module CAS. The device may include: a pairing request receiving module 1801, a session establishment module 1802 and a pairing response module 1803.

[0280] The pairing request receiving module 1801 is configured for the second CAS to receive a channel pairing request from the first CAS in the source microservice node.

[0281] The session establishing module 1802 is configured for the second CAS to respond to the channel pairing request and establish a session for the source microservice node.

[0282] The pairing response module 1803 is configured for the second CAS to select or create a second transmission channel and return a channel pairing response to the first CAS.

[0283] Optionally, the target microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein the second CAS selects or creates the second transmission channel, which may include but is not limited to the following four methods:

[0284] 1) When no transmission channel is established under the session, the second CAS selects a work unit whose remaining preset resources meet current needs to create a second transmission channel.

[0285] 2) When multiple transmission channels have been established under the session, the second CAS selects a transmission channel among the multiple transmission channels that has been successfully paired with the source microservice node as the second transmission channel.

[0286] 3) When multiple transmission channels have been established under the session and the remaining preset resources of the working units where the multiple channels are located do not meet the current needs, the second CAS selects another working unit whose remaining preset resources meet the current needs to create a second transmission channel.

[0287] 4) When multiple transmission channels have been established under the session and the remaining preset resources of all work units do not meet current needs, the second CAS waits for the appearance of a work unit with idle preset resources and creates under the work unit with idle preset resources.

[0288] Optional, Fig.18 The device shown may also include:

[0289] A judgment module, configured for the second CAS to determine whether a sending route of the source microservice node and a receiving route of the target microservice node are consistent according to a verification code in the channel pairing request and a verification code of the target microservice node;

[0290] A routing synchronization request module is used for, when the sending route of the source microservice node and the receiving route of the target microservice node are inconsistent, the second CAS sends a full routing synchronization request to the first CAS, wherein the full routing synchronization request carries a first data packet and a second data packet, wherein the first data packet is the routing information of the sending direction of the target microservice node, and the second data packet is an end packet containing a check code, and the full routing synchronization request is used to request the first CAS to update the check code in the source microservice node.

[0291] Further, Fig.18 The device shown may also include: a failure response module, which is used for the second CAS to output an error log and return a pairing failure response to the first CAS when the second CAS fails to select and / or create the second transmission channel.

[0292] for Fig.18 The microservice node cascading device shown can achieve cascading with the source microservice node by adding a second CAS therein. This is a self-organizing cascading method of microservice nodes. This cascading method does not require the participation of a central node and does not involve complex signaling interactions. Therefore, it can improve the quality of audio and video services in instant messaging services.

[0293] Above Fig.18 The device shown can be used to implement the above Fig.12 For the various embodiments of the microservice node cascading method shown, please refer to the above method embodiments for related details.

[0294] Fig.19 This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Fig.19 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0295] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.19 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0296] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0297] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a microservice node cascade device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0298] receiving routing information from the XPU;

[0299] When it is determined according to the routing information that the source microservice node and the target microservice node are located on different servers, establishing a connection with the target microservice node according to the routing information;

[0300] Select or create a first transmission channel, and send a routing setting request to a second CAS in the target microservice node, wherein the routing setting request carries the routing information;

[0301] A routing setting response returned by the second CAS is received, and if the setting response is successful, it is determined that the source microservice node is cascaded successfully with the target microservice node.

[0302] Alternatively, the processor executes the program stored in the memory and is specifically configured to perform the following operations:

[0303] Receive a channel pairing request from a first CAS in a source microservice node;

[0304] In response to the channel pairing request, establish a session for the source microservice node;

[0305] Select or create a second transmission channel, and return a channel pairing response to the first CAS.

[0306] The above is as in this manual Fig.19The method performed by the microservice node cascade device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in software form. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of this specification can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of this specification can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0307] The electronic device may also perform Figure 6 or Fig.12 The method shown in the figure implements the microservice node cascade device in Figure 6 or Fig.12 The functions in the illustrated embodiments will not be described in detail in this specification.

[0308] It is understood that the embodiments described in the embodiments of this specification can be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in at least one application specific integrated circuit (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this specification or a combination thereof.

[0309] For software implementation, the technology described in the embodiments of this specification can be implemented by a module (such as a process, function, etc.) that performs the functions described in the embodiments of this specification. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0310] Of course, in addition to software implementation, the electronic device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0311] The embodiments of this specification also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned microservice node cascading method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0312] The embodiment of this specification also provides a computer program product including instructions, when a computer runs the instructions of the computer program product, the computer executes the above-mentioned microservice node cascading method. Specifically, the computer program product can be run on the above-mentioned network device.

[0313] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.

[0314] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0315] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0316] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0317] In addition, each functional unit in each embodiment of the present specification 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.

[0318] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several 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 this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0319] The above is only a specific implementation of this specification, but the protection scope of this specification is not limited to this. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of this specification should be based on the protection scope of the claims.

Claims

1. A microservice node cascading method, applied to a source microservice node providing audio and video services, wherein the source microservice node is provided with a media processing module XPU and a first cascading module CAS, the method comprising: The first CAS receives routing information from the XPU; When the first CAS determines according to the routing information that the source microservice node and the target microservice node are located on different servers, the first CAS establishes a connection with the target microservice node according to the routing information; The first CAS selects or creates a first transmission channel, and sends a routing setting request to a second CAS in the target microservice node, wherein the routing setting request carries the routing information; The first CAS receives the routing setting response returned by the second CAS, and determines that the source microservice node is cascaded successfully with the target microservice node if the setting response is successful.

2. The method according to claim 1, further comprising: The first CAS sends the media data carried in the routing information to the target microservice node through the first transmission channel.

3. The method according to claim 2, before the first CAS selects or creates the first transmission channel, the method further comprises: The first CAS establishes a session for the target microservice node.

4. According to the method of claim 3, the source microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein: The first CAS selects or creates a first transmission channel, including: In the case that no transmission channel is established under the session, the first CAS selects a working unit whose remaining preset resources meet current needs to create a first transmission channel.

5. The method according to claim 3, wherein: The first CAS selects or creates a first transmission channel, including: In the case where multiple transmission channels have been established under the session, the first CAS selects a transmission channel among the multiple transmission channels that has been successfully paired with the target microservice node as the first transmission channel.

6. According to the method of claim 3, the source microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein: The first CAS selects or creates a first transmission channel, including: When multiple transmission channels have been established under the session and the remaining preset resources of the working units where the multiple channels are located do not meet current needs, the first CAS selects another working unit whose remaining preset resources meet current needs to create a first transmission channel.

7. According to the method of claim 3, the source microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein: The first CAS selects or creates a first transmission channel, including: When multiple transmission channels have been established under the session and the remaining preset resources of all work units do not meet current needs, the first CAS waits for a work unit with idle preset resources to appear, and creates under the work unit with idle preset resources.

8. According to the method according to any one of claims 1 to 7, before the first CAS sends a routing setting request to the second CAS in the target microservice node, the method further comprises: After selecting or creating the first transmission channel, the first CAS sends a channel pairing request to the second CAS, wherein the channel pairing request is used to request the second CAS to select or create a second transmission channel to pair with the first transmission channel; The first CAS receives a channel pairing response returned by the second CAS.

9. The method according to claim 8, before the first CAS sends a routing setting request to the second CAS in the target microservice node, the method further comprises: If the channel pairing response is successful, the first CAS determines whether the receiving route of the source microservice node is consistent with the sending route of the target microservice node according to the verification code in the channel pairing response and the verification code of the source microservice node; When the receiving route of the source microservice node is consistent with the sending route of the target microservice node, the first CAS is triggered to send a route setting request to the second CAS.

10. The method according to claim 9, further comprising: In the case that the receiving route of the source microservice node and the sending route of the target microservice node are inconsistent, the first CAS sends a full route synchronization request to the second CAS, wherein the full route synchronization request is used to request the second CAS to send the first data packet and the second data packet to the source microservice node, wherein the first data packet is the routing information of the sending direction of the target microservice node, and the second data packet is an end packet including a check code; The first CAS receives the first data packet and the second data packet, and updates the check code in the source microservice node after receiving the second data packet.

11. The method according to claim 10, further comprising: The first CAS synchronizes the routing information in the first data packet to the source microservice node.

12. The method according to claim 8, before sending the channel pairing request to the target microservice node, the method further comprises: The first CAS pre-occupies the preset resource corresponding to the first transmission channel.

13. The method according to claim 12, further comprising: In the case where the channel pairing response fails, the first CAS sets the priority of the first transmission channel to a low priority, releases the preset resources corresponding to the pre-occupied first transmission channel, and triggers the first CAS to reselect or create a first transmission channel.

14. The method according to claim 10 or 11, further comprising: The first CAS periodically checks whether the first transmission channel is in an idle state; When the first transmission channel is in an idle state and the idle time exceeds a preset threshold, the first CAS sends a channel deletion request for the second transmission channel to the second CAS, and sets the state of the first transmission channel to be unavailable.

15. The method according to claim 14, further comprising: The first CAS receives a channel deletion response returned by the second CAS; When the channel deletion response indicates that the deletion is successful, the first CAS deletes the first transmission channel; In a case where the channel deletion response indicates deletion failure, the first CAS updates the status of the first transmission channel to available.

16. The method according to any one of claims 1-7, 9-13, 15, further comprising: The first CAS adds the operation for the routing information to a cache queue, wherein the operation includes a adding operation and a deleting operation, and the operations are sorted according to time size.

17. The method according to claim 16, further comprising: The first CAS receives and responds to an edit to the cache queue, wherein the edit includes at least one of a deduplication operation and a reverse operation.

18. The method according to any one of claims 1-7, 9-13, 15, wherein: The source microservice node is also provided with a content switching bus CSB, and the method further includes: When determining that the source microservice node and the target microservice node are located on the same server, the first CAS transparently transmits the media data carried in the routing information through the CSB.

19. The method according to any one of claims 1-7, 9-13, 15, further comprising: When an abnormality occurs in the transmission network of the first CAS, the first CAS is triggered to reselect or create a first transmission channel.

20. A microservice node cascading method, applied to a target microservice node providing audio and video services, wherein a second cascading module CAS is provided in the target microservice node, and the method comprises: The second CAS receives a channel pairing request from the first CAS in the source microservice node; The second CAS responds to the channel pairing request and establishes a session for the source microservice node; The second CAS selects or creates a second transmission channel, and returns a channel pairing response to the first CAS.

21. The method according to claim 20, wherein the target microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein: The second CAS selects or creates a second transmission channel, including: In the case that no transmission channel is established under the session, the second CAS selects a work unit whose remaining preset resources meet current needs to create a second transmission channel.

22. The method according to claim 20, wherein: The second CAS selects or creates a second transmission channel, including: In the case where multiple transmission channels have been established under the session, the second CAS selects a transmission channel among the multiple transmission channels that has been successfully paired with the source microservice node as the second transmission channel.

23. The method according to claim 20, wherein the target microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein: The second CAS selects or creates a second transmission channel, including: When multiple transmission channels have been established under the session and the remaining preset resources of the working units where the multiple channels are located do not meet current needs, the second CAS selects another working unit whose remaining preset resources meet current needs to create a second transmission channel.

24. The method according to claim 20, wherein the target microservice node is provided with a plurality of working units, and the working units are allocated with preset resources for establishing a transmission channel, wherein: The second CAS selects or creates a second transmission channel, including: When multiple transmission channels have been established under the session and the remaining preset resources of all work units do not meet current needs, the second CAS waits for the appearance of a work unit with idle preset resources and is created under the work unit with idle preset resources.

25. The method according to any one of claims 20 to 24, further comprising: The second CAS determines whether the sending route of the source microservice node and the receiving route of the target microservice node are consistent according to the verification code in the channel pairing request and the verification code of the target microservice node; When the sending route of the source microservice node and the receiving route of the target microservice node are inconsistent, the second CAS sends a full routing synchronization request to the first CAS, wherein the full routing synchronization request carries a first data packet and a second data packet, wherein the first data packet is the routing information of the sending direction of the target microservice node, and the second data packet is an end packet including a check code, and the full routing synchronization request is used to request the first CAS to update the check code in the source microservice node.

26. The method according to any one of claims 20 to 24, further comprising: When the second CAS fails to select and / or create the second transmission channel, the second CAS outputs an error log and returns a pairing failure response to the first CAS.

27. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method as claimed in any one of claims 1 to 21.

28. A computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 21.