CN115442416A - Cross-network communication method, device and communication network - Google Patents
Cross-network communication method, device and communication network Download PDFInfo
- Publication number
- CN115442416A CN115442416A CN202211061079.XA CN202211061079A CN115442416A CN 115442416 A CN115442416 A CN 115442416A CN 202211061079 A CN202211061079 A CN 202211061079A CN 115442416 A CN115442416 A CN 115442416A
- Authority
- CN
- China
- Prior art keywords
- network
- cross
- communication service
- service
- session
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0435—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及即时通讯技术领域,尤其涉及一种跨网络通讯方法、装置及通讯网络。The invention relates to the technical field of instant messaging, in particular to a cross-network communication method, device and communication network.
背景技术Background technique
在政府和企业员工的办公场景,一般通过即时通讯工具建立连接,以即时通讯工具作为信息和数据的承裁来完成相互之间的工作协作。为确保信息安全和数据安全,往往是通过私有化部署来做内部通讯网络和外部互联网网络的隔离。但当需要在两个或多个私有化部署的网络之间进行沟通和协作时,数据安全和信息安全就成了双方所要考虑的首要问题。因此,如何在确保数据安全和信息安全的前提下,进行跨网络通讯,成了一个亟待解决的问题。In the office scenarios of government and corporate employees, connections are generally established through instant messaging tools, and instant messaging tools are used as information and data receivers to complete mutual work collaboration. In order to ensure information security and data security, privatization deployment is often used to isolate the internal communication network from the external Internet network. However, when it is necessary to communicate and collaborate between two or more privately deployed networks, data security and information security have become the primary issues to be considered by both parties. Therefore, how to carry out cross-network communication under the premise of ensuring data security and information security has become an urgent problem to be solved.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solution of the present invention, and does not mean that the above content is admitted as prior art.
发明内容Contents of the invention
本发明的主要目的在于提供了一种跨网络通讯方法、装置及通讯网络,旨在确保数据安全和信息安全的前提下,进行跨网络通讯。The main purpose of the present invention is to provide a cross-network communication method, device and communication network, aiming to perform cross-network communication under the premise of ensuring data security and information security.
为实现上述目的,本发明提供了一种跨网络通讯方法,所述方法包括以下步骤:To achieve the above object, the present invention provides a method for cross-network communication, said method comprising the following steps:
在本地跨网络组件中存在跨网通讯业务时,获取所述跨网通讯业务对应的业务类型;When there is a cross-network communication service in the local cross-network component, obtain the service type corresponding to the cross-network communication service;
在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;When the business type is an internal and external cross-network communication service, it is judged whether a cross-network connection has been established with the target external network;
若是,则通过所述跨网连接将所述跨网通讯业务推送至所述目标外部网络,以使所述目标外部网络通过自身跨网络组件对所述跨网通讯业务进行处理。If so, push the cross-network communication service to the target external network through the cross-network connection, so that the target external network processes the cross-network communication service through its own cross-network component.
可选地,所述在本地跨网络组件中存在跨网通讯业务时,获取所述跨网通讯业务对应的业务类型之前,还包括:Optionally, before obtaining the service type corresponding to the cross-network communication service when there is a cross-network communication service in the local cross-network component, the method further includes:
获取本地跨网络组件中待处理通讯业务所属会话的会话信息;Obtain the session information of the session to which the communication service to be processed in the local cross-network component belongs;
根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务。It is judged according to the session information whether the communication service to be processed belongs to an inter-network communication service.
可选地,所述根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务,包括:Optionally, the judging whether the communication service to be processed belongs to a cross-network communication service according to the session information includes:
根据所述会话信息确定各会话参与方所属的网络的网络标识;determining the network identifier of the network to which each session participant belongs according to the session information;
根据所述网络标识判断所述待处理通讯业务是否属于跨网通讯业务。It is judged according to the network identifier whether the communication service to be processed belongs to the cross-network communication service.
可选地,所述根据所述网络标识判断所述待处理通讯业务是否属于跨网通讯业务,包括:Optionally, the judging whether the communication service to be processed belongs to a cross-network communication service according to the network identifier includes:
判断所述网络标识中是否存在不相同的网络标识;judging whether there are different network identifiers among the network identifiers;
若存在,则判定所述待处理通讯业务属于跨网通讯业务;If it exists, it is determined that the communication service to be processed belongs to the cross-network communication service;
若不存在,则判定所述待处理通讯业务不属于跨网通讯业务。If not, it is determined that the communication service to be processed does not belong to the cross-network communication service.
可选地,所述根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务,还包括:Optionally, the judging whether the communication service to be processed belongs to a cross-network communication service according to the session information further includes:
根据所述会话信息确定所述会话的会话类型;determining a session type of the session according to the session information;
在所述会话类型为多人会话时,获取所述会话的创建入口信息;When the session type is a multi-person session, obtaining entry information for creating the session;
根据所述创建入口信息判断所述待处理通讯业务是否属于跨网通讯业务。It is judged according to the creation entry information whether the communication service to be processed belongs to the cross-network communication service.
可选地,所述在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接之前,包括:Optionally, when the service type is an internal and external cross-network communication service, before judging whether a cross-network connection has been established with the target external network, it includes:
获取所述跨网通讯业务中携带的网络识别标识;Obtaining the network identification identifier carried in the cross-network communication service;
根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络。The target external network corresponding to the cross-network communication service is determined according to the network identifier.
可选地,所述根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务之后,包括:Optionally, after determining whether the communication service to be processed belongs to a cross-network communication service according to the session information, the method includes:
在所述待处理通讯业务不属于跨网通讯业务时,判定所述待处理通讯业务属于内网通讯业务;When the communication service to be processed does not belong to the cross-network communication service, it is determined that the communication service to be processed belongs to the intranet communication service;
获取所述待处理通讯业务的业务属性,根据所述业务属性将所述待处理通讯业务路由至对应的内网服务进行处理。Obtain the service attribute of the communication service to be processed, and route the communication service to be processed to a corresponding intranet service according to the service attribute.
可选地,所述在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接之后,包括:Optionally, when the business type is an internal and external cross-network communication service, after judging whether a cross-network connection has been established with the target external network, it includes:
若否,则获取所述目标外部网络对应的网络访问标识和通讯加密标识;If not, obtain the network access identifier and communication encryption identifier corresponding to the target external network;
根据所述网络访问标识生成连接请求,并通过所述通讯加密标识对所述连接请求进行加密,获得加密连接请求;generating a connection request according to the network access identifier, and encrypting the connection request through the communication encryption identifier to obtain an encrypted connection request;
将所述加密连接请求发送至所述目标外部网络,以使所述目标外部网络对所述加密连接请求验证通过后,建立跨网连接。Sending the encrypted connection request to the target external network, so that the target external network establishes an inter-network connection after the encrypted connection request is verified and passed.
可选地,所述根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络之后,还包括:Optionally, after determining the target external network corresponding to the cross-network communication service according to the network identification, the method further includes:
在接收到所述目标外部网络发起的跨网连接请求时,获取所述跨网连接请求对应的通讯解密标识;When receiving the cross-network connection request initiated by the target external network, obtain the communication decryption identifier corresponding to the cross-network connection request;
通过所述通讯解密标识对所述跨网连接请求进行验证;Verifying the cross-network connection request through the communication decryption identifier;
在验证通过时,在预设交互界面上展示建立跨网连接的选择提示;When the verification is passed, a selection prompt for establishing a cross-network connection is displayed on the preset interactive interface;
在检测到基于所述选择提示输入的确认指令时,与所述外部网络建立跨网连接。When a confirmation instruction prompted for input based on the selection is detected, a cross-network connection is established with the external network.
可选地,所述网络访问标识包括:IP地址和端口号,所述通讯加密标识包括非对称加密算法的公钥。Optionally, the network access identifier includes: an IP address and a port number, and the communication encryption identifier includes a public key of an asymmetric encryption algorithm.
可选地,所述本地跨网络组件为消息队列,所述方法还包括:Optionally, the local cross-network component is a message queue, and the method further includes:
在接收到客户端发起的跨网会话创建请求时,根据所述跨网会话创建请求生成跨网会话创建事件;When receiving the cross-network session creation request initiated by the client, generating a cross-network session creation event according to the cross-network session creation request;
将所述跨网会话创建事件投递至所述消息队列进行消费;posting the cross-network session creation event to the message queue for consumption;
在消费所述跨网会话创建事件时,通过已建立的跨网连接将所述跨网会话创建事件推送至所述目标外部网络,以使所述目标外部网络对所述跨网会话创建事件进行处理,完成跨网会话的创建。When consuming the cross-network session creation event, push the cross-network session creation event to the target external network through the established cross-network connection, so that the target external network performs the cross-network session creation event Processing to complete the creation of the cross-network session.
可选地,所述在消费所述跨网会话创建事件时,通过已建立的跨网连接将所述跨网会话创建事件推送至所述目标外部网络,以使所述目标外部网络对所述跨网会话创建事件进行处理,完成跨网会话的创建之后,还包括:Optionally, when the cross-network session creation event is consumed, the cross-network session creation event is pushed to the target external network through the established cross-network connection, so that the target external network is aware of the The cross-network session creation event is processed. After the creation of the cross-network session is completed, it also includes:
将所述目标外部网络发送的会话消息投递至所述消息队列进行消费,以将所述会话消息推送至对应的会话客户端。Posting the session message sent by the target external network to the message queue for consumption, so as to push the session message to a corresponding session client.
此外,为实现上述目的,本发明还提出一种通讯网络,所述通讯网络中部署有跨网络组件、内部代理和外部代理;In addition, in order to achieve the above object, the present invention also proposes a communication network, in which a cross-network component, an internal agent and an external agent are deployed;
所述内部代理,用于在接收到跨网通讯业务时,获取所述跨网通讯业务对应的业务类型;The internal agent is used to obtain the service type corresponding to the cross-network communication service when receiving the cross-network communication service;
所述内部代理,还用于在所述业务类型为内外跨网通讯业务时,将所述跨网通讯业务投递至所述跨网络组件;The internal agent is also used to deliver the cross-network communication service to the cross-network component when the service type is an internal and external cross-network communication service;
所述跨网络组件,用于将所述跨网通讯业务发送至所述外部代理;The cross-network component is configured to send the cross-network communication service to the external agent;
所述外部代理,用于判断是否已与所述跨网通讯业务对应的目标外部网络建立跨网连接;The external agent is used to determine whether a cross-network connection has been established with the target external network corresponding to the cross-network communication service;
所述外部代理,还用于若是,则通过所述跨网连接将所述跨网通讯业务推送至所述目标外部网络,以使所述目标外部网络通过自身跨网络组件对所述跨网通讯业务进行处理。The external agent is also used to push the cross-network communication service to the target external network through the cross-network connection, so that the target external network can communicate with the cross-network through its own cross-network components. Business is processed.
可选地,所述内部代理,还用于在所述业务类型为外内跨网通讯业务时,将所述跨网通讯业务路由至对应的内网服务进行处理。Optionally, the internal agent is further configured to route the cross-network communication service to a corresponding intranet service for processing when the service type is an external-internal cross-network communication service.
可选地,所述外部代理,还用于获取本地跨网络组件中待处理通讯业务所属会话的会话信息;根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务。Optionally, the external agent is further configured to obtain session information of the session to which the communication service to be processed in the local cross-network component belongs; and judge whether the communication service to be processed belongs to the cross-network communication service according to the session information.
可选地,所述外部代理,还用于获取所述跨网通讯业务中携带的网络识别标识,根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络。Optionally, the external agent is further configured to obtain a network identification carried in the cross-network communication service, and determine a target external network corresponding to the cross-network communication service according to the network identification.
可选地,所述外部代理,还用于获取所述目标外部网络对应的网络访问标识和通讯加密标识;Optionally, the external agent is further configured to obtain a network access identifier and a communication encryption identifier corresponding to the target external network;
所述外部代理,还用于根据所述网络访问标识生成连接请求,并通过所述通讯加密标识对所述连接请求进行加密,获得加密连接请求;The external agent is further configured to generate a connection request according to the network access identifier, and encrypt the connection request through the communication encryption identifier to obtain an encrypted connection request;
所述外部代理,还用于将所述加密连接请求发送至所述目标外部网络,以使所述目标外部网络对所述加密连接请求验证通过后,建立跨网连接。The external agent is further configured to send the encrypted connection request to the target external network, so that the target external network establishes an inter-network connection after the encrypted connection request is verified and passed.
可选地,所述外部代理,还用于在接收到所述目标外部网络发起的跨网连接请求时,获取所述跨网连接请求对应的通讯解密标识;通过所述通讯解密标识对所述跨网连接请求进行验证;在验证通过时,在预设交互界面上展示建立跨网连接的选择提示;在检测到基于所述选择提示输入的确认指令时,与所述外部网络建立跨网连接。Optionally, the external agent is further configured to obtain a communication decryption identifier corresponding to the cross-network connection request when receiving the cross-network connection request initiated by the target external network; The cross-network connection request is verified; when the verification is passed, a selection prompt for establishing a cross-network connection is displayed on the preset interactive interface; when a confirmation instruction based on the selection prompt input is detected, a cross-network connection is established with the external network .
可选地,所述通讯网络还包括服务云;Optionally, the communication network further includes a service cloud;
所述服务云,用于在接收到客户端发起的跨网会话创建请求时,根据所述跨网会话创建请求生成跨网会话创建事件,并将所述跨网会话创建事件推送至所述内部代理;The service cloud is configured to generate a cross-network session creation event according to the cross-network session creation request when receiving a cross-network session creation request initiated by a client, and push the cross-network session creation event to the internal acting;
所述内部代理,还用于将所述跨网会话创建事件投递至所述跨网络组件进行消费;The internal agent is further configured to deliver the cross-network session creation event to the cross-network component for consumption;
所述跨网络组件,还用于将所述跨网会话创建事件传递至所述外部代理;The cross-network component is further configured to transmit the cross-network session creation event to the external agent;
所述外部代理,还用于通过已建立的跨网连接将所述跨网会话创建事件推送至所述目标外部网络,以使所述目标外部网络对所述跨网会话创建事件进行处理,完成跨网会话的创建。The external agent is further configured to push the cross-network session creation event to the target external network through the established cross-network connection, so that the target external network processes the cross-network session creation event, and completes Creation of cross-network sessions.
此外,为实现上述目的,本发明还提出一种跨网络通讯装置,所述跨网络通讯装置包括:In addition, in order to achieve the above purpose, the present invention also proposes a cross-network communication device, the cross-network communication device includes:
业务处理模块,用于在本地跨网络组件中存在跨网通讯业务时,获取所述跨网通讯业务对应的业务类型;A service processing module, configured to obtain the service type corresponding to the cross-network communication service when there is a cross-network communication service in the local cross-network component;
连接建立模块,用于在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;A connection establishment module, used to determine whether a cross-network connection has been established with the target external network when the service type is an internal and external cross-network communication service;
业务推送模块,用于若是,则通过所述跨网连接将所述跨网通讯业务推送至所述目标外部网络,以使所述目标外部网络通过自身跨网络组件对所述跨网通讯业务进行处理。The service push module is configured to push the cross-network communication service to the target external network through the cross-network connection, so that the target external network can perform the cross-network communication service through its own cross-network component deal with.
本发明通过在本地跨网络组件中存在跨网通讯业务时,获取跨网通讯业务对应的业务类型;在业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;若是,则通过跨网连接将跨网通讯业务推送至目标外部网络,以使目标外部网络通过自身跨网络组件对跨网通讯业务进行处理。由于本发明本地网络和外地网络中均部署有用于处理跨网络业务的跨网络组件,从而能将跨网通讯业务与本地通讯业务在逻辑上隔离,保证数据安全和信息安全,另外,本实施例通过跨网络组件和跨网连接进行通讯业务的传输和处理,为私有化部署的网络之间的交互提供了安全有效的途径。The present invention obtains the service type corresponding to the cross-network communication service when there is a cross-network communication service in the local cross-network component; when the service type is an internal and external cross-network communication service, it is judged whether a cross-network connection has been established with the target external network; if , the cross-network communication service is pushed to the target external network through the cross-network connection, so that the target external network processes the cross-network communication service through its own cross-network component. Since cross-network components for processing cross-network services are deployed in both the local network and the foreign network of the present invention, the cross-network communication service can be logically isolated from the local communication service to ensure data security and information security. In addition, this embodiment The transmission and processing of communication services through cross-network components and cross-network connections provides a safe and effective way for the interaction between privatized deployed networks.
附图说明Description of drawings
图1为本发明跨网络通讯方法第一实施例的流程示意图;FIG. 1 is a schematic flow diagram of the first embodiment of the cross-network communication method of the present invention;
图2为本发明跨网络通讯方法第二实施例的流程示意图;2 is a schematic flow diagram of a second embodiment of the cross-network communication method of the present invention;
图3为本发明跨网络通讯方法第三实施例的流程示意图;3 is a schematic flowchart of a third embodiment of the cross-network communication method of the present invention;
图4为本发明通讯网络第一实施例的结构框图;Fig. 4 is a structural block diagram of the first embodiment of the communication network of the present invention;
图5为本发明通讯网络第一实施例中通讯网络的系统架构示意图;5 is a schematic diagram of the system architecture of the communication network in the first embodiment of the communication network of the present invention;
图6为本发明通讯网络第二实施中跨网连接的构建流程图;Fig. 6 is the construction flowchart of cross-network connection in the second implementation of the communication network of the present invention;
图7为本发明通讯网络第二实施中跨网络会话的创建流程图;7 is a flow chart of creating a cross-network session in the second implementation of the communication network of the present invention;
图8为本发明跨网络通讯装置第一实施例的结构框图。FIG. 8 is a structural block diagram of the first embodiment of the cross-network communication device of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明实施例提供了一种跨网络通讯方法,参照图1,图1为本发明跨网络通讯方法第一实施例的流程示意图。An embodiment of the present invention provides a cross-network communication method. Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a first embodiment of the cross-network communication method of the present invention.
本实施例中,所述跨网络通讯方法包括以下步骤:In this embodiment, the cross-network communication method includes the following steps:
步骤S10:在本地跨网络组件中存在跨网通讯业务时,获取所述跨网通讯业务对应的业务类型;Step S10: when there is a cross-network communication service in the local cross-network component, obtain the service type corresponding to the cross-network communication service;
需要说明的是,本实施例提供的跨网络通讯方法的执行主体可以是一种私有化部署的网络(以下简称本地网络),该网络通过本实施例提供的跨网络通讯方法与其他一个或多个网络(即外部网络)进行通讯和交互。在执行本实施例之前,需要在参与交互的本地网络和外部网络中预先部署上述跨网络组件,该组件可以是一种接收跨网络通讯业务的特定组件或服务(如消息队列MQ),又或是其它能够实现相同或相似功能的组件或服务。It should be noted that the execution subject of the cross-network communication method provided in this embodiment may be a privatized deployed network (hereinafter referred to as the local network), and the network communicates with other one or more A network (that is, an external network) for communication and interaction. Before executing this embodiment, it is necessary to pre-deploy the above-mentioned cross-network component in the local network and external network participating in the interaction. This component can be a specific component or service (such as message queue MQ) that receives cross-network communication services, or are other components or services that perform the same or similar functions.
应理解的是,上述跨网通讯业务可以为需要在本地网络和外部网络之间进行传递和协同处理的通讯业务。本实施例中该跨网通讯业务的业务类型包括内外跨网通讯业务和外内跨网通讯业务。其中,内外跨网通讯业务可以是从本地网络传递至外部网络,由外部网络进行处理的通讯业务,外内跨网通讯业务则可以是从外部网络传递至本地网络,由本地网络进行处理的通讯业务。It should be understood that the above cross-network communication service may be a communication service that needs to be transferred and coordinated between the local network and the external network. In this embodiment, the service types of the cross-network communication service include internal and external cross-network communication services and external and internal cross-network communication services. Among them, the internal and external cross-network communication services can be transmitted from the local network to the external network and processed by the external network, and the external and internal cross-network communication services can be transmitted from the external network to the local network and processed by the local network business.
步骤S20:在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;Step S20: When the service type is an internal and external cross-network communication service, determine whether a cross-network connection has been established with the target external network;
需要说明的是,所述跨网连接是预先在本地网络和外部网络之间建立的跨网络通信连接。实际应用中,该连接可基于TCP协议建立。所述目标外部网络可以是当前需要处理的跨网通讯业务所指向的外部网络。对于本地网络而言,外部网络可以有一个或者多个,本实施例对此不加以限制。It should be noted that the cross-network connection is a cross-network communication connection established in advance between the local network and the external network. In practical applications, the connection can be established based on the TCP protocol. The target external network may be the external network pointed to by the current cross-network communication service to be processed. For the local network, there may be one or more external networks, which is not limited in this embodiment.
应理解的是,若跨网连接已经建立,表明本地网络和外部网络之前已基于自定义的握手协议建立了通讯连接;反之,则表明需要先建立跨网连接。It should be understood that if the cross-network connection has been established, it means that the local network and the external network have previously established a communication connection based on a custom handshake protocol; otherwise, it means that the cross-network connection needs to be established first.
作为目标外部网络的一种确定方式,可预先在跨网通讯业务中增加网络识别标识,该网络识别标识可表征网络唯一性,用以确定该跨网通讯业务所指向的外部网络。具体的,本地网络在接收到跨网通讯业务时,可先获取所述跨网通讯业务中携带的网络识别标识;然后再根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络。As a way to determine the target external network, a network identification mark can be added to the cross-network communication service in advance. The network identification mark can represent the uniqueness of the network and is used to determine the external network to which the cross-network communication service is directed. Specifically, when the local network receives the cross-network communication service, it may first obtain the network identification carried in the cross-network communication service; and then determine the target external network corresponding to the cross-network communication service according to the network identification .
具体实现中,当本地网络在根据业务类型确定当前的跨网通讯业务为内外跨网通讯业务,且根据网络识别标识确定了目标外部网络时,可进一步判断与目标外部网络是否已建立了上述跨网连接。In specific implementation, when the local network determines that the current inter-network communication service is an internal and external inter-network communication service according to the service type, and determines the target external network according to the network identification, it can further judge whether the above-mentioned inter-network communication service has been established with the target external network. network connection.
步骤S30:若是,则通过所述跨网连接将所述跨网通讯业务推送至所述目标外部网络,以使所述目标外部网络通过自身跨网络组件对所述跨网通讯业务进行处理。Step S30: If yes, push the cross-network communication service to the target external network through the cross-network connection, so that the target external network processes the cross-network communication service through its own cross-network component.
应理解的是,在本地网络与目标外部网络已经建立了跨网连接的情况下,本地网络可以通过该跨网连接将跨网通讯业务推送至目标外部网络,而同样的,由于外部网络和本地网络一样,都预先部署了上述跨网络组件,因此本地网络通过上述跨网连接将上述内外跨网通讯业务推送至目标外部网络,目标外部网络中的(自身)跨网络组件对该跨网通讯业务进行处理,从而实现跨网络之间的通讯。It should be understood that, in the case that the local network and the target external network have established a cross-network connection, the local network can push the cross-network communication service to the target external network through the cross-network connection, and similarly, because the external network and the local The network is the same, the above cross-network components are pre-deployed, so the local network pushes the above-mentioned internal and external cross-network communication services to the target external network through the above-mentioned cross-network connection, and the (self) cross-network components in the target external network respond to the cross-network communication services Processing, so as to achieve communication between cross-network.
本实施例通过在本地跨网络组件中存在跨网通讯业务时,获取跨网通讯业务对应的业务类型;在业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;若是,则通过跨网连接将跨网通讯业务推送至目标外部网络,以使目标外部网络通过自身跨网络组件对跨网通讯业务进行处理。由于本实施例中本地网络和外地网络中均部署有用于处理跨网络业务的跨网络组件,从而能将跨网通讯业务与本地通讯业务在逻辑上隔离,保证数据安全和信息安全。另外,本实施例通过跨网络组件和跨网连接进行通讯业务的传输和处理,为私有化部署的网络之间的交互提供了安全有效的途径。In this embodiment, when there is a cross-network communication service in the local cross-network component, the service type corresponding to the cross-network communication service is obtained; when the service type is an internal and external cross-network communication service, it is judged whether a cross-network connection has been established with the target external network; If so, push the cross-network communication service to the target external network through the cross-network connection, so that the target external network processes the cross-network communication service through its own cross-network component. Since cross-network components for processing cross-network services are deployed in both the local network and the foreign network in this embodiment, cross-network communication services can be logically isolated from local communication services to ensure data security and information security. In addition, this embodiment transmits and processes communication services through cross-network components and cross-network connections, providing a safe and effective way for the interaction between privatized deployed networks.
参考图2,图2为本发明跨网络通讯方法第二实施例的流程示意图。Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a second embodiment of the cross-network communication method of the present invention.
基于上述第一实施例,在本实施例中,所述步骤S10之前,还包括:Based on the first embodiment above, in this embodiment, before the step S10, it also includes:
步骤S01:获取本地跨网络组件中待处理通讯业务所属会话的会话信息;Step S01: Obtain the session information of the session to which the communication service to be processed in the local cross-network component belongs;
需要说明的是,本实施例中所述待处理通讯业务可包括跨网通讯业务和内网通讯业务。所谓跨网通讯业务,即不同网络间的通讯业务,包括内外跨网通讯业务和外内跨网通讯业务。所谓内网通讯业务,即本地网络内部的通讯业务,这些通讯业务不需要借助外部网络进行协同处理,整个通讯业务的处理都在本地网络内部进行。It should be noted that the communication services to be processed in this embodiment may include cross-network communication services and intranet communication services. The so-called cross-network communication service refers to the communication service between different networks, including the internal and external cross-network communication service and the external and internal cross-network communication service. The so-called intranet communication service refers to the communication service within the local network. These communication services do not need to be coordinated with the external network, and the entire communication service is processed within the local network.
应理解的是,在即时通讯领域,聊天类的通讯业务大多以会话(Session)的形式呈现,本实施例中上述会话信息可以包含会话参与方的名称、所属的网络以及会话类型等。其中,会话类型可以包括本地单人会话(单聊)、本地多人会话(群聊)、跨网单聊、跨网群聊等,不同类型的会话类型可以作为判断待处理通讯业务是属于内网通讯业务还是跨网通讯业务的依据之一。It should be understood that in the field of instant messaging, chat communication services are mostly presented in the form of sessions. In this embodiment, the above session information may include names of session participants, networks they belong to, and session types. Among them, the session type can include local single-person session (single chat), local multi-person session (group chat), cross-network single chat, cross-network group chat, etc. Different types of conversation types can be used to determine whether the communication service to be processed belongs to the internal Network communication business is also one of the basis of cross-network communication business.
步骤S02:根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务。Step S02: Determine whether the communication service to be processed belongs to an inter-network communication service according to the session information.
具体实现中,当获知待处理通讯业务所属会话(包括单人会话或多人会话)的会话信息后,即可根据该会话信息判断该业务是否属于跨网通讯业务。In specific implementation, after knowing the session information of the session (including single-person session or multi-person session) to which the communication service to be processed belongs, it can be judged according to the session information whether the service belongs to the cross-network communication service.
具体的,为提高判断效率和准确度,本实施例中本地网络可先根据所述会话信息确定各会话参与方所属的网络的网络标识,然后根据所述网络标识判断所述待处理通讯业务是否属于跨网通讯业务。Specifically, in order to improve the judgment efficiency and accuracy, in this embodiment, the local network may first determine the network identifier of the network to which each session participant belongs according to the session information, and then judge whether the communication service to be processed is It belongs to cross-network communication business.
作为一种实现方式,本地网络可判断所述网络标识中是否存在不相同的网络标识;若存在,则判定所述待处理通讯业务属于跨网通讯业务;若不存在,则判定所述待处理通讯业务不属于跨网通讯业务。As an implementation, the local network can determine whether there are different network identifiers among the network identifiers; if it exists, it is determined that the communication service to be processed belongs to a cross-network communication service; if it does not exist, it is determined that the communication service to be processed The communication service does not belong to the cross-network communication service.
应理解的是,单人会话包括内网单人会话和跨网单人会话,它们之间的区分方式可以是通过确定参与会话的双方所使用的网络的网络标识来确定。通常情况下,内网单人会话,参与会话的双方所使用的网络是同一个,其对应的网络标识也是相同的,此时可判定待处理通讯业务不属于跨网通讯业务而属于内网通讯业务;反之,网络标识不同,表明参与会话的双方所使用的网络并非同一个,此时即可判定待处理通讯业务属于跨网通讯业务。其中,网络标识可以是表征网络唯一性的标记信息。It should be understood that a single-person session includes an intranet single-person session and an inter-network single-person session, and a manner of distinguishing them may be determined by determining network identifiers of networks used by both parties participating in the session. Usually, in a single-person session on the intranet, the two parties participating in the session use the same network, and their corresponding network identifiers are also the same. At this time, it can be determined that the communication service to be processed does not belong to the cross-network communication service but belongs to the intranet communication. On the contrary, if the network identifiers are different, it indicates that the two parties participating in the session are not using the same network. At this time, it can be determined that the communication service to be processed belongs to the cross-network communication service. Wherein, the network identifier may be tag information representing the uniqueness of the network.
而对于多人会话,本实施例在会话类型为多人会话时,可采用获取所述多人会话的创建入口信息,然后根据所述创建入口信息判断所述待处理通讯业务是否属于跨网通讯业务的方式。具体的,可根据所述会话信息确定所述会话的会话类型,在所述会话类型为多人会话时,获取所述会话的创建入口信息,根据所述创建入口信息判断所述待处理通讯业务是否属于跨网通讯业务。For a multi-person session, in this embodiment, when the session type is a multi-person session, the creation entry information of the multi-person session can be acquired, and then judge whether the pending communication service belongs to cross-network communication according to the creation entry information. way of business. Specifically, the session type of the session may be determined according to the session information, and when the session type is a multi-person session, the creation entry information of the session is obtained, and the communication service to be processed is judged according to the creation entry information Whether it belongs to cross-network communication business.
应理解的是,内网多人会话并不涉及外部人员,而跨网多人会话则会涉及外部人员,本实施例本地网络对应的客户端在创建内网多人会话和跨网多人会话时,其会话创建入口是不同的,也即用户在客户端界面上点击创建内网群聊和跨网群聊的页面控件或按钮是不同的。因此本实施例通过获取多人会话的创建入口信息,然后根据创建入口信息即可区分客户端分发起的待处理通讯业务是属于跨网通讯业务还是内网通讯业务。It should be understood that the intranet multi-person session does not involve external personnel, while the cross-network multi-person session will involve external personnel. In this embodiment, the client corresponding to the local network is creating the intranet multi-person session and the cross-network multi-person session , the session creation entrances are different, that is, the page controls or buttons that the user clicks on the client interface to create intranet group chats and cross-network group chats are different. Therefore, in this embodiment, by obtaining the creation entry information of the multi-person session, and then according to the creation entry information, it is possible to distinguish whether the pending communication service initiated by the client belongs to the cross-network communication service or the intranet communication service.
当然,在多人会话场景,也可以先根据多人会话的会话信息确定多人会话的各会话参与方所属的网络的网络标识,然后再根据这些网络标识是否一致来判断所述待处理通讯业务是否属于跨网通讯业务;若网络标识均相同,此时可判定待处理通讯业务不属于跨网通讯业务(即属于内网多人会话);反之,这些网络标识中若存在不相同的网络标识,表明会话参与方所使用的网络并非同一个,此时即可判定待处理通讯业务属于跨网通讯业务(即属于跨网多人会话)。Of course, in a multi-person conversation scenario, it is also possible to first determine the network identifiers of the networks to which the participants of the multi-person conversation belong according to the session information of the multi-person conversation, and then judge the communication service to be processed according to whether these network identifiers are consistent. Whether it belongs to the cross-network communication service; if the network identifiers are the same, it can be determined that the pending communication service does not belong to the cross-network communication service (that is, belongs to the intranet multi-person session); otherwise, if there are different network identifiers among these network identifiers , indicating that the networks used by the session participants are not the same, and at this point it can be determined that the communication service to be processed belongs to a cross-network communication service (that is, belongs to a cross-network multi-person session).
进一步地,本地网络在所述待处理通讯业务不属于跨网通讯业务时,判定所述待处理通讯业务属于内网通讯业务;然后获取所述待处理通讯业务的业务属性,根据所述业务属性将所述待处理通讯业务路由至对应的内网服务进行处理。Further, when the communication service to be processed does not belong to the cross-network communication service, the local network determines that the communication service to be processed belongs to the intranet communication service; then obtains the service attribute of the communication service to be processed, and according to the service attribute The communication service to be processed is routed to a corresponding intranet service for processing.
其中,上述内网服务为部署在本地网络中的服务,上述业务属性可以是指某种电信业务的规定特性,多用于通讯领域。Wherein, the above-mentioned intranet service is a service deployed in a local network, and the above-mentioned service attribute may refer to a specified characteristic of a certain telecommunication service, which is mostly used in the communication field.
应理解的是,内网通讯业务即与本地网络内部相关的通讯业务,当接收到的通讯业务为内网通讯业务时,本地网络可根据其对应的业务属性将该待处理通讯业务路由至对应的内网服务进行处理。It should be understood that the intranet communication service is the communication service related to the inside of the local network. When the received communication service is an intranet communication service, the local network can route the pending communication service to the corresponding Intranet services for processing.
本实施例通过获取待处理通讯业务所属会话的会话信息的方式能够准确地区分待处理的通讯业务的业务类型,进而针对性的进行处理,提高了通讯业务的处理效率。In this embodiment, by acquiring the session information of the session to which the communication service to be processed belongs, the service type of the communication service to be processed can be accurately distinguished, and then processed in a targeted manner, thereby improving the processing efficiency of the communication service.
参考图3,图3为本发明跨网络通讯方法第三实施例的流程示意图。Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a third embodiment of a cross-network communication method according to the present invention.
基于上述各实施例,在本实施例中,所述步骤S20之后,所述方法还包括在未与目标外部网络建立连接时的跨网连接的过程,具体包括:Based on the above-mentioned embodiments, in this embodiment, after the step S20, the method further includes a process of cross-network connection when no connection is established with the target external network, specifically including:
步骤S40:若否,则获取所述目标外部网络对应的网络访问标识和通讯加密标识;Step S40: If not, obtain the network access identifier and communication encryption identifier corresponding to the target external network;
应理解的是,若本地网络和目标外部网络之间尚未建立跨网连接,则本地网络可通过目标外部网络的管理员事先共享给本地网络的管理员的网络访问标识和通讯加密标识来建立跨网连接。It should be understood that if a cross-network connection has not been established between the local network and the target external network, the local network can establish a cross-network connection through the network access identifier and communication encryption identifier shared by the administrator of the target external network with the administrator of the local network in advance. network connection.
需要说明的是,所述网络访问标识可包括:IP地址和端口号,所述通讯加密标识包括非对称加密算法的公钥,比如RSA公钥等。It should be noted that the network access identifier may include: an IP address and a port number, and the communication encryption identifier includes a public key of an asymmetric encryption algorithm, such as an RSA public key.
步骤S50:根据所述网络访问标识生成连接请求,并通过所述通讯加密标识对所述连接请求进行加密,获得加密连接请求;Step S50: Generate a connection request according to the network access identifier, and encrypt the connection request through the communication encryption identifier to obtain an encrypted connection request;
具体实现中,本地网络可通过上述网络访问标识向目标外部网络发起连接请求,然后通过目标外部网络提供的通讯加密标识对该请求进行加密,获得加密连接请求,再将加密连接请求发送到目标外部网络。In specific implementation, the local network can initiate a connection request to the target external network through the above-mentioned network access identifier, and then encrypt the request through the communication encryption identifier provided by the target external network to obtain an encrypted connection request, and then send the encrypted connection request to the target external network network.
步骤S60:将所述加密连接请求发送至所述目标外部网络,以使所述目标外部网络对所述加密连接请求验证通过后,建立跨网连接。Step S60: Send the encrypted connection request to the target external network, so that the target external network establishes an inter-network connection after the encrypted connection request is verified successfully.
需要说明的是,对于外部网络而言,当接收到加密连接请求时,可通过通讯解密标识对请求进行解密,如果解密通过,则表明验证成功,则可进行后续的建立跨网连接操作。It should be noted that for the external network, when an encrypted connection request is received, the request can be decrypted through the communication decryption identifier. If the decryption is passed, it indicates that the verification is successful, and the subsequent operation of establishing a cross-network connection can be performed.
当然,实际应用中,本地网络既可以作为跨网连接请求的发起方,也可以作为跨网连接请求的接收方,因此本实施例提供的跨网络通讯方法还包括:Of course, in practical applications, the local network can serve as both the initiator of the cross-network connection request and the receiver of the cross-network connection request, so the cross-network communication method provided in this embodiment also includes:
步骤S1:在接收到所述目标外部网络发起的跨网连接请求时,获取所述跨网连接请求对应的通讯解密标识;Step S1: Obtain the communication decryption identifier corresponding to the cross-network connection request when receiving the cross-network connection request initiated by the target external network;
步骤S2:通过所述通讯解密标识对所述跨网连接请求进行验证;Step S2: Verifying the cross-network connection request through the communication decryption identifier;
应理解的是,上述通讯解密标识可以是通讯加密标识对应的私钥,比如RSA私钥。通过该通讯解密标识,本地网络在接收到外部网络发送过来的跨网连接请求时,将通过预先共享给外部网络的通讯加密标识所对应的通讯解密标识来对跨网连接请求进行验证。It should be understood that the above-mentioned communication decryption identifier may be a private key corresponding to the communication encryption identifier, such as an RSA private key. Through the communication decryption identifier, when the local network receives the cross-network connection request from the external network, it will verify the cross-network connection request through the communication decryption identifier corresponding to the communication encryption identifier previously shared with the external network.
步骤S3:在验证通过时,在预设交互界面上展示建立跨网连接的选择提示;Step S3: When the verification is passed, a selection prompt for establishing a cross-network connection is displayed on the preset interactive interface;
具体实现中,本地网络通过通讯解密标识对跨网连接请求进行解密,如果解密通过,则在预设交互界面上展示建立跨网连接的选择提示,例如在本地网络的管理员所使用的网络管理客户端页面上弹出窗口,提示管理员选择“同意”或者“拒绝”由目标外部网络发起的跨网连接请求。In the specific implementation, the local network decrypts the cross-network connection request through the communication decryption identifier. If the decryption is passed, a selection prompt for establishing a cross-network connection will be displayed on the preset interactive interface, such as the network management used by the administrator of the local network. A window pops up on the client page, prompting the administrator to choose "Agree" or "Reject" the cross-network connection request initiated by the target external network.
步骤S4:在检测到基于所述选择提示输入的确认指令时,与所述外部网络建立跨网连接。Step S4: Establishing a cross-network connection with the external network when a confirmation instruction prompted for input based on the selection is detected.
具体实现中,当管理员选择同意时,即本地网络检测到基于所述选择提示输入的确认指令时,与外部网络建立跨网连接。反之,当管理员选择拒绝时,即本地网络检测到基于所述选择提示输入的拒绝指令时,则停止与外部网络建立跨网连接。In a specific implementation, when the administrator chooses to agree, that is, when the local network detects a confirmation instruction based on the prompt input based on the selection, a cross-network connection is established with the external network. On the contrary, when the administrator chooses to refuse, that is, when the local network detects the rejection instruction input based on the selection prompt, the establishment of the cross-network connection with the external network is stopped.
进一步地,如果本地网络对跨网连接请求的验证未通过,则说明跨网连接请求的来源不可识别,此时就需要将跨网连接请求舍弃,也无需在交互界面上作出任何交互响应。Furthermore, if the verification of the cross-network connection request by the local network fails, it means that the source of the cross-network connection request cannot be identified. At this time, the cross-network connection request needs to be discarded, and no interactive response needs to be made on the interactive interface.
另外,需要强调的是,当本地网络共享的通讯加密标识已经被相应的外部网络使用过之后,如果有新的外部网络需要与本地网络创建全新的跨网连接时,就需要本地网络的网络管理员提供网络访问标识和新的通讯加密标识给新的外部网络,然后按照以上握手的安全机制(即上述步骤S1-S4)再次创建新的跨网络连接。In addition, it should be emphasized that after the communication encryption identifier shared by the local network has been used by the corresponding external network, if there is a new external network that needs to create a new cross-network connection with the local network, the network management of the local network is required. The member provides the network access identification and the new communication encryption identification to the new external network, and then creates a new cross-network connection again according to the security mechanism of the above handshake (that is, the above steps S1-S4).
基于上述各实施例,提出本发明跨网络通讯方法第四实施例。Based on the above-mentioned embodiments, a fourth embodiment of the cross-network communication method of the present invention is proposed.
在本实施例中,所述本地跨网组件为消息队列MQ,相应地,所述跨网络通讯方法还包括以下步骤:In this embodiment, the local cross-network component is a message queue MQ, and correspondingly, the cross-network communication method further includes the following steps:
步骤S1':在接收到客户端发起的跨网会话创建请求时,根据所述跨网会话创建请求生成跨网会话创建事件;Step S1': When receiving a request for creating a cross-network session initiated by a client, generate a cross-network session creation event according to the request for creating a cross-network session;
需要说明的是,所述跨网会话创建请求,即创建跨网单聊或跨网群聊的通讯业务请求。本地网络在接收到该请求时,先由内部服务云处理跨网建群逻辑,处理完成之后,生成跨网会话创建事件并向上述客户端发送建群成功的消息。It should be noted that the request for creating a cross-network session is a communication service request for creating a cross-network single chat or a cross-network group chat. When the local network receives the request, the internal service cloud first processes the cross-network group building logic. After the processing is completed, a cross-network session creation event is generated and a group building success message is sent to the above-mentioned client.
步骤S2':将所述跨网会话创建事件投递至所述消息队列进行消费;Step S2': posting the cross-network session creation event to the message queue for consumption;
具体实现中,本地网络将生成的跨网会话创建事件投递至消息队列MQ进行消费。In a specific implementation, the local network delivers the generated cross-network session creation event to the message queue MQ for consumption.
步骤S3':在消费所述跨网会话创建事件时,通过已建立的跨网连接将所述跨网会话创建事件推送至所述目标外部网络,以使所述目标外部网络对所述跨网会话创建事件进行处理,完成跨网会话的创建。Step S3': when consuming the cross-network session creation event, push the cross-network session creation event to the target external network through the established cross-network connection, so that the target external network The session creation event is processed to complete the creation of the cross-network session.
应理解的是,当本地网络中部署的消息队列MQ在消费上述跨网会话创建事件时,由于本地网络和目标外部网络之间已经建立了跨网连接,此时本地网络即可直接通过该跨网连接将跨网会话创建事件推送至目标外部网络。目标外部网络中部署的外部代理将该事件投递到自身跨网组件(即自身消息队列)中进行消费。消费过程中,目标外部网络中的内部代理会调用业务服务,由目标外部网络中的服务云处理跨云建群逻辑,并推送会话创建的消息到目标外部网络中的客户端,完成跨网会话的创建。It should be understood that when the message queue MQ deployed in the local network consumes the above-mentioned cross-network session creation event, since a cross-network connection has been established between the local network and the target external network, the local network can directly pass through the cross-network session at this time. The network connection pushes the cross-network session creation event to the target external network. The external agent deployed in the target external network delivers the event to its own cross-network component (ie, its own message queue) for consumption. During the consumption process, the internal agent in the target external network will call the business service, and the service cloud in the target external network will process the cross-cloud group building logic, and push the session creation message to the client in the target external network to complete the cross-network session of the creation.
进一步地,在完成跨网会话的创建后,网络间的用户即可通过它们进行聊天。本实施例中,本地网络可将所述目标外部网络发送的会话消息投递至所述消息队列进行消费,从而将所述会话消息推送至对应的会话客户端。Further, after the creation of the inter-network session is completed, users in the inter-network can chat through them. In this embodiment, the local network may post the session message sent by the target external network to the message queue for consumption, so as to push the session message to the corresponding session client.
作为一种实现方式,目标外部网络中的客户端发送跨云群消息(会话消息)时,目标外部网络中的服务云将处理本云群聊逻辑,并投递群消息事件到目标外部网络中的内部代理中,内部代理处理群消息的投递逻辑,将群消息事件投递至自身消息队列(MQ)进行业务消息消费,并传递至目标外部网络中的外部代理,该外部代理将跨云群消息通过跨网连接发送至本地网络。As an implementation method, when a client in the target external network sends a cross-cloud group message (session message), the service cloud in the target external network will process the group chat logic of this cloud and deliver the group message event to the client in the target external network In the internal agent, the internal agent processes the delivery logic of the group message, delivers the group message event to its own message queue (MQ) for business message consumption, and passes it to the external agent in the target external network, and the external agent passes the cross-cloud group message through Cross-network connections are sent to the local network.
本地网络中的外部代理将目标外部网络中的跨云群消息(会话消息)投递至本地消息队列(MQ)进行消费,本地网络中的内部代理处理调用逻辑,并发送群聊消息到本地网络中的服务云,由服务云向本地网络中的客户端推送会话消息通知,进而完成跨网络的通讯。The external agent in the local network delivers the cross-cloud group message (session message) in the target external network to the local message queue (MQ) for consumption, and the internal agent in the local network processes the call logic and sends the group chat message to the local network The service cloud, which pushes session message notifications to clients in the local network, and then completes cross-network communication.
参照图4,图4为本发明通讯网络第一实施例的结构框图。Referring to FIG. 4, FIG. 4 is a structural block diagram of the first embodiment of the communication network of the present invention.
如图4所示,本发明实施例提出一种通讯网络10,所述通讯网络10中部署有内部代理101、跨网络组件102和外部代理103;As shown in FIG. 4 , the embodiment of the present invention proposes a communication network 10, in which an
所述内部代理101,用于在接收到跨网通讯业务时,获取所述跨网通讯业务对应的业务类型;The
所述内部代理101,还用于在所述业务类型为内外跨网通讯业务时,将所述跨网通讯业务投递至所述跨网络组件;The
所述跨网络组件102,用于将所述跨网通讯业务发送至所述外部代理;The
所述外部代理103,用于判断是否已与所述跨网通讯业务对应的目标外部网络建立跨网连接;The
所述外部代理103,还用于若是,则通过所述跨网连接将所述跨网通讯业务推送至所述目标外部网络,以使所述目标外部网络通过自身跨网络组件对所述跨网通讯业务进行处理。The
需要说明的是,本实施例提供的通讯网络10可以是一种私有化部署的网络或者私有云,该网络中设置有内部代理101、跨网络组件102和外部代理103。如图5所示,图5为本发明通讯网络第一实施例中通讯网络的系统架构示意图。图5中,第一网络、第二网络和更多网络其系统架构都与本实施例提供的通讯网络10的架构相同,包含内部代理101、跨网络组件102和外部代理103。同时还包含若干个接入网关和不同类型的数据库(MySQL、MongoDB、Redis、ES和OSS)。将第一网络作为本地网络时,第二网络和更多网络就属于外部网络。当本地网络与外部网络进行跨网络通讯时,内部代理101、跨网络组件102和外部代理103相互协同,完成对通讯业务的处理。It should be noted that the communication network 10 provided in this embodiment may be a privatized deployment network or a private cloud, and the network is provided with an
其中,内部代理101用于对接网络内部的通讯业务,如内部的单聊、群聊、人员管理业务等。内部代理101在接收到与本云内部相关的业务时,将业务投递到内部处理,同时负责处理来自于外部的通讯业务。跨网络组件102可以是一种接收跨云/跨网络通讯业务的特定组件或服务(如消息队列MQ),又或是其它能够实现相同或相似功能的组件或服务。外部代理103用于将私有云内部的通讯业务中涉及到跨云/跨网络的通讯业务,通过对方网络中的外部代理,投递到对方网络中的跨网络组件中,同时将对方网络通过对方外部代理推送过来的跨云通讯业务,投递本云内部的跨网络组件中,并且在消费后,通过内部代理101根据业务属性路由至不同的服务。Among them, the
应理解的是,上述跨网通讯业务可以为需要在本地网络和外部网络之间进行传递和协同处理的通讯业务。本实施例中该跨网通讯业务的业务类型包括内外跨网通讯业务和外内跨网通讯业务。其中,内外跨网通讯业务可以是从本地网络传递至外部网络,由外部网络进行处理的通讯业务,外内跨网通讯业务则可以是从外部网络传递至本地网络,由本地网络进行处理的通讯业务。It should be understood that the above cross-network communication service may be a communication service that needs to be transferred and coordinated between the local network and the external network. In this embodiment, the service types of the cross-network communication service include internal and external cross-network communication services and external and internal cross-network communication services. Among them, the internal and external cross-network communication services can be transmitted from the local network to the external network and processed by the external network, and the external and internal cross-network communication services can be transmitted from the external network to the local network and processed by the local network business.
需要说明的是,上述跨网连接是预先在本地网络和外部网络之间建立的跨网络通信连接。实际应用中,该连接可基于TCP协议建立。所述目标外部网络可以是当前需要处理的跨网通讯业务所指向的外部网络。对于本地网络而言,外部网络可以有一个或者多个,本实施例对此不加以限制。It should be noted that the above cross-network connection is a cross-network communication connection established in advance between the local network and the external network. In practical applications, the connection can be established based on the TCP protocol. The target external network may be the external network pointed to by the current cross-network communication service to be processed. For the local network, there may be one or more external networks, which is not limited in this embodiment.
具体实现中,若跨网连接已经建立,表明本地网络和外部网络之前已基于自定义的握手协议建立了通讯连接;反之,则表明需要先建立跨网连接。In the specific implementation, if the cross-network connection has been established, it means that the local network and the external network have established a communication connection based on the custom handshake protocol; otherwise, it means that the cross-network connection needs to be established first.
作为目标外部网络的一种确定方式,可预先在跨网通讯业务中增加网络识别标识,该网络识别标识可表征网络唯一性,用以确定该跨网通讯业务所指向的外部网络。具体的,本地网络在接收到跨网通讯业务时,可先获取所述跨网通讯业务中携带的网络识别标识;然后再根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络。As a way to determine the target external network, a network identification mark can be added to the cross-network communication service in advance. The network identification mark can represent the uniqueness of the network and is used to determine the external network to which the cross-network communication service is directed. Specifically, when the local network receives the cross-network communication service, it may first obtain the network identification carried in the cross-network communication service; and then determine the target external network corresponding to the cross-network communication service according to the network identification .
应理解的是,在本地网络与目标外部网络已经建立了跨网连接的情况下,本地网络可以通过该跨网连接将跨网通讯业务推送至目标外部网络,而同样的,由于外部网络和本地网络一样,都预先部署了上述跨网络组件,因此本地网络通过上述跨网连接将上述内外跨网通讯业务推送至目标外部网络,目标外部网络中的(自身)跨网络组件对该跨网通讯业务进行处理,从而实现跨网络之间的通讯。It should be understood that, in the case that the local network and the target external network have established a cross-network connection, the local network can push the cross-network communication service to the target external network through the cross-network connection, and similarly, because the external network and the local The network is the same, the above cross-network components are pre-deployed, so the local network pushes the above-mentioned internal and external cross-network communication services to the target external network through the above-mentioned cross-network connection, and the (self) cross-network components in the target external network respond to the cross-network communication services Processing, so as to achieve communication between cross-network.
本实施例提供的通讯网络中的内部代理在接收到跨网通讯业务时,获取跨网通讯业务对应的业务类型,在业务类型为内外跨网通讯业务时,将跨网通讯业务投递至跨网络组件;跨网络组件将所述跨网通讯业务发送至外部代理;外部代理判断是否已与所述跨网通讯业务对应的目标外部网络建立跨网连接;若是,则通过跨网连接将跨网通讯业务推送至目标外部网络,以使目标外部网络通过自身跨网络组件对跨网通讯业务进行处理。由于本实施例通讯网络中部署有用于处理跨网络业务的跨网络组件,从而能将跨网通讯业务与本地通讯业务在逻辑上隔离,保证数据安全和信息安全。另外,本实施例通过跨网络组件和跨网连接进行通讯业务的传输和处理,为私有化部署的网络之间的交互提供了安全有效的途径。The internal agent in the communication network provided by this embodiment obtains the service type corresponding to the cross-network communication service when receiving the cross-network communication service, and delivers the cross-network communication service to the cross-network when the service type is an internal and external cross-network communication service component; the cross-network component sends the cross-network communication service to an external agent; the external agent judges whether a cross-network connection has been established with the target external network corresponding to the cross-network communication service; if so, the cross-network communication The service is pushed to the target external network, so that the target external network processes the cross-network communication service through its own cross-network component. Since cross-network components for processing cross-network services are deployed in the communication network of this embodiment, cross-network communication services can be logically isolated from local communication services to ensure data security and information security. In addition, this embodiment transmits and processes communication services through cross-network components and cross-network connections, providing a safe and effective way for the interaction between privatized deployed networks.
基于本发明上述通讯网络第一实施例,提出本发明通讯网络的第二实施例。Based on the above first embodiment of the communication network of the present invention, a second embodiment of the communication network of the present invention is proposed.
在本实施例中,所述内部代理101,还用于在所述业务类型为外内跨网通讯业务时,将所述跨网通讯业务路由至对应的内网服务进行处理。In this embodiment, the
可选地,所述外部代理103,还用于获取本地跨网络组件中待处理通讯业务所属会话的会话信息;根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务。Optionally, the
可选地,所述外部代理103,还用于获取所述跨网通讯业务中携带的网络识别标识,根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络。Optionally, the
可选地,所述外部代理103,还用于根据所述会话信息确定各会话参与方所属的网络的网络标识;根据所述网络标识判断所述待处理通讯业务是否属于跨网通讯业务。Optionally, the
可选地,所述外部代理103,还用于判断所述网络标识中是否存在不相同的网络标识;若存在,则判定所述待处理通讯业务属于跨网通讯业务;若不存在,则判定所述待处理通讯业务不属于跨网通讯业务。Optionally, the
可选地,所述外部代理103,还用于根据所述会话信息确定所述会话的会话类型;在所述会话类型为多人会话时,获取所述会话的创建入口信息;根据所述创建入口信息判断所述待处理通讯业务是否属于跨网通讯业务。Optionally, the
可选地,所述内部代理101,还用于在所述待处理通讯业务不属于跨网通讯业务时,判定所述待处理通讯业务属于内网通讯业务;获取所述待处理通讯业务的业务属性,根据所述业务属性将所述待处理通讯业务路由至对应的内网服务进行处理。Optionally, the
可选地,所述外部代理103,还用于获取所述目标外部网络对应的网络访问标识和通讯加密标识;Optionally, the
所述外部代理103,还用于根据所述网络访问标识生成连接请求,并通过所述通讯加密标识对所述连接请求进行加密,获得加密连接请求;The
所述外部代理103,还用于将所述加密连接请求发送至所述目标外部网络,以使所述目标外部网络对所述加密连接请求验证通过后,建立跨网连接。The
可选地,所述外部代理103,还用于在接收到所述目标外部网络发起的跨网连接请求时,获取所述跨网连接请求对应的通讯解密标识;通过所述通讯解密标识对所述跨网连接请求进行验证;在验证通过时,在预设交互界面上展示建立跨网连接的选择提示;在检测到基于所述选择提示输入的确认指令时,与所述外部网络建立跨网连接。Optionally, the
可选地,所述通讯网络还包括服务云;Optionally, the communication network further includes a service cloud;
所述服务云,用于在接收到客户端发起的跨网会话创建请求时,根据所述跨网会话创建请求生成跨网会话创建事件,并将所述跨网会话创建事件推送至所述内部代理;The service cloud is configured to generate a cross-network session creation event according to the cross-network session creation request when receiving a cross-network session creation request initiated by a client, and push the cross-network session creation event to the internal acting;
所述内部代理101,还用于将所述跨网会话创建事件投递至所述跨网络组件进行消费;The
所述跨网络组件102,还用于将所述跨网会话创建事件传递至所述外部代理;The
所述外部代理103,还用于通过已建立的跨网连接将所述跨网会话创建事件推送至所述目标外部网络,以使所述目标外部网络对所述跨网会话创建事件进行处理,完成跨网会话的创建。The
可选地,所述外部代理103,还用于在接收到所述目标外部网络发起的跨网连接请求时,获取所述跨网连接请求对应的通讯解密标识;Optionally, the
所述外部代理103,还用于通过所述通讯解密标识对所述跨网连接请求进行验证;The
所述外部代理103,还用于在验证通过时,在预设交互界面上展示建立跨网连接的选择提示;The
所述外部代理103,还用于在检测到基于所述选择提示输入的确认指令时,与所述外部网络建立跨网连接。The
可选地,所述外部代理103,还用于将所述目标外部网络发送的会话消息投递至所述消息队列进行消费,以将所述会话消息推送至对应的会话客户端。Optionally, the
此处结合图6和图7对本实施例中跨网连接的构建流程和跨网络会话的创建流程进行说明。The process of establishing the cross-network connection and the creation process of the cross-network session in this embodiment are described here with reference to FIG. 6 and FIG. 7 .
参照图6,图6为本发明通讯网络第二实施中跨网连接的构建流程图。如图6所示,步骤201:由第二网络(即目标外部网络)提供可供外网访问的IP地址和端口号,以及RSA公钥,并共享给第一网络;步骤202:由第一网络(即通讯网络10)根据第二网络共享的IP地址和端口号,发起对第二网络的跨云连接请求,连接请求通过第二网络的RSA公钥进行加密;步骤203:第二网络对连接请求通过RSA私钥进行解密;如果解密后校验通过,则显示【同意】和【拒绝】按钮,如果解密后校验不通过,则将连接请求舍弃;步骤204:如果解密后校验通过,由第二网络的云管理员【同意】第一网络发起的跨云连接请求,创建第一网络和第二网络的跨云连接实例。Referring to FIG. 6 , FIG. 6 is a flow chart of building cross-network connections in the second implementation of the communication network of the present invention. As shown in Figure 6, step 201: the IP address and port number available for external network access and the RSA public key are provided by the second network (ie, the target external network), and shared with the first network; step 202: the first network The network (i.e. the communication network 10) initiates a cross-cloud connection request to the second network according to the IP address and port number shared by the second network, and the connection request is encrypted by the RSA public key of the second network; Step 203: the second network pairs The connection request is decrypted with the RSA private key; if the verification is passed after decryption, [Agree] and [Reject] buttons will be displayed; if the verification fails after decryption, the connection request will be discarded; Step 204: If the verification is passed after decryption , the cloud administrator of the second network [agrees] to the cross-cloud connection request initiated by the first network, and creates a cross-cloud connection instance between the first network and the second network.
参照图7,图7为本发明通讯网络第二实施中跨网络会话的创建流程图。如图7所示,跨网络会话的创建流程包括以下步骤:Referring to FIG. 7, FIG. 7 is a flow chart of creating a cross-network session in the second implementation of the communication network of the present invention. As shown in Figure 7, the process of creating a cross-network session includes the following steps:
步骤301:由第一网络(通讯网络10)中的客户端发起创建跨云群聊的业务请求;由第一网络中的服务云处理跨云建群逻辑;处理完成后向第一网络中的内部代理推送跨云建群事件,并向第一网络中的客户端发送建群成功的通知。Step 301: A client in the first network (communication network 10) initiates a business request for creating a cross-cloud group chat; the service cloud in the first network processes the cross-cloud group building logic; The internal agent pushes the cross-cloud group building event, and sends a notification of successful group building to the client in the first network.
步骤302:第一网络中的内部代理在收到跨云建群事件后,处理跨云投递逻辑,并向第一网络中的消息队列(MQ)服务中投递跨云建群事件。Step 302: After receiving the cross-cloud group building event, the internal agent in the first network processes the cross-cloud delivery logic, and delivers the cross-cloud group building event to the message queue (MQ) service in the first network.
步骤303:由第一网络中的消息队列(MQ)服务消费跨云业务消息,并传递至第一网络中的外部代理。Step 303: The message queue (MQ) service in the first network consumes the cross-cloud service message, and delivers it to the external agent in the first network.
步骤304:第一网络中的外部代理和第二网络(外部网络)的外部代理之间进行跨云互联(即通过跨网连接进行交互)。Step 304: The external agent in the first network and the external agent in the second network (external network) perform cross-cloud interconnection (ie, interact through a cross-network connection).
步骤305:第二网络中的外部代理将第一网络中的业务消息(跨云建群事件)投递至第二网络中的消息队列(MQ)。Step 305: the external agent in the second network delivers the service message (cross-cloud group building event) in the first network to the message queue (MQ) in the second network.
步骤306:由第二网络中的消息队列(MQ)消费业务消息(跨云建群)。Step 306: The message queue (MQ) in the second network consumes the service message (cross-cloud grouping).
步骤307:由第二网络中的内部代理调用业务服务,由第二网络中的服务云处理跨云建群逻辑,并推送建群消息到第二网络中的客户端。Step 307: The internal agent in the second network calls the business service, the service cloud in the second network processes the cross-cloud group building logic, and pushes a group building message to the client in the second network.
步骤308:由第二网络中的客户端发送跨云群消息;第二网络中的服务云处理本云群聊逻辑,并投递群消息事件到第二网络中的内部代理中。Step 308: The client in the second network sends a cross-cloud group message; the service cloud in the second network processes the group chat logic of this cloud, and delivers the group message event to the internal agent in the second network.
步骤309:由第二网络中的内部代理处理群消息的投递逻辑,将群消息事件投递至第二网络中的消息队列(MQ)。Step 309: The internal agent in the second network processes the delivery logic of the group message, and delivers the group message event to the message queue (MQ) in the second network.
步骤310:由第二网络中的消息队列(MQ)消费业务消息,并传递至第二网络中的外部代理。Step 310: The service message is consumed by the message queue (MQ) in the second network, and delivered to the external agent in the second network.
步骤311:第二网络中的外部代理和第一网络的外部代理之间进行跨云互联。Step 311: Cross-cloud interconnection is performed between the external agent in the second network and the external agent in the first network.
步骤312:第一网络中的外部代理将第二网络中的业务消息(群聊消息)投递至第一网络中的消息队列(MQ)。Step 312: the external agent in the first network delivers the service message (group chat message) in the second network to the message queue (MQ) in the first network.
步骤313:第一网络中的消息队列(MQ)消费业务消息(群聊消息),第一网络中的内部代理处理调用逻辑,并发送群聊消息到第一网络中的服务云。Step 313: the message queue (MQ) in the first network consumes service messages (group chat messages), the internal agent in the first network processes the calling logic, and sends the group chat messages to the service cloud in the first network.
步骤314:由第一网络中的内部代理接收来自于第一网络中的消息队列(MQ)中的业务(群聊消息),处理群聊逻辑。Step 314: The internal agent in the first network receives the service (group chat message) from the message queue (MQ) in the first network, and processes the group chat logic.
步骤315:由第一网络中的服务云向第一网络中的客户端推送群消息通知。Step 315: The service cloud in the first network pushes the group message notification to the client in the first network.
本发明通讯网络的各实施例或具体实现方式可参照上述各方法实施例,此处不再赘述。For various embodiments or specific implementation manners of the communication network of the present invention, reference may be made to the foregoing method embodiments, and details are not repeated here.
此外,本发明实施例还提出一种跨网络通讯装置。In addition, the embodiment of the present invention also proposes a cross-network communication device.
参照图8,图8为本发明跨网络通讯装置第一实施例的结构框图。如图7所示,所述跨网络通讯装置包括:Referring to FIG. 8 , FIG. 8 is a structural block diagram of a first embodiment of a cross-network communication device according to the present invention. As shown in Figure 7, the cross-network communication device includes:
业务处理模块801,用于在本地跨网络组件中存在跨网通讯业务时,获取所述跨网通讯业务对应的业务类型;The
连接建立模块802,用于在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;A
业务推送模块803,用于若是,则通过所述跨网连接将所述跨网通讯业务推送至所述目标外部网络,以使所述目标外部网络通过自身跨网络组件对所述跨网通讯业务进行处理。The
本实施例通过在本地跨网络组件中存在跨网通讯业务时,获取跨网通讯业务对应的业务类型;在业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;若是,则通过跨网连接将跨网通讯业务推送至目标外部网络,以使目标外部网络通过自身跨网络组件对跨网通讯业务进行处理。由于本实施例中本地网络和外地网络中均部署有用于处理跨网络业务的跨网络组件,从而能将跨网通讯业务与本地通讯业务在逻辑上隔离,保证数据安全和信息安全。另外,本实施例通过跨网络组件和跨网连接进行通讯业务的传输和处理,为私有化部署的网络之间的交互提供了安全有效的途径。In this embodiment, when there is a cross-network communication service in the local cross-network component, the service type corresponding to the cross-network communication service is obtained; when the service type is an internal and external cross-network communication service, it is judged whether a cross-network connection has been established with the target external network; If so, push the cross-network communication service to the target external network through the cross-network connection, so that the target external network processes the cross-network communication service through its own cross-network component. Since cross-network components for processing cross-network services are deployed in both the local network and the foreign network in this embodiment, cross-network communication services can be logically isolated from local communication services to ensure data security and information security. In addition, this embodiment transmits and processes communication services through cross-network components and cross-network connections, providing a safe and effective way for the interaction between privatized deployed networks.
本发明跨网络通讯装置的各实施例或具体实现方式可参照上述各方法实施例,此处不再赘述。For the various embodiments or specific implementations of the cross-network communication device of the present invention, reference may be made to the above-mentioned method embodiments, which will not be repeated here.
本发明提供A1一种跨网络通讯方法,所述跨网络通讯方法包括:The present invention provides A1 a kind of cross-network communication method, described cross-network communication method comprises:
在本地跨网络组件中存在跨网通讯业务时,获取所述跨网通讯业务对应的业务类型;When there is a cross-network communication service in the local cross-network component, obtain the service type corresponding to the cross-network communication service;
在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接;When the business type is an internal and external cross-network communication service, it is judged whether a cross-network connection has been established with the target external network;
若是,则通过所述跨网连接将所述跨网通讯业务推送至所述目标外部网络,以使所述目标外部网络通过自身跨网络组件对所述跨网通讯业务进行处理。If so, push the cross-network communication service to the target external network through the cross-network connection, so that the target external network processes the cross-network communication service through its own cross-network component.
A2、如A1所述的跨网络通讯方法,所述在本地跨网络组件中存在跨网通讯业务时,获取所述跨网通讯业务对应的业务类型之前,还包括:A2. The cross-network communication method as described in A1, when there is a cross-network communication service in the local cross-network component, before obtaining the service type corresponding to the cross-network communication service, it also includes:
获取本地跨网络组件中待处理通讯业务所属会话的会话信息;Obtain the session information of the session to which the communication service to be processed in the local cross-network component belongs;
根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务。It is judged according to the session information whether the communication service to be processed belongs to an inter-network communication service.
A3、如A2所述的跨网络通讯方法,所述根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务,包括:A3. The cross-network communication method as described in A2, wherein the judging whether the communication service to be processed belongs to a cross-network communication service according to the session information includes:
根据所述会话信息确定各会话参与方所属的网络的网络标识;determining the network identifier of the network to which each session participant belongs according to the session information;
根据所述网络标识判断所述待处理通讯业务是否属于跨网通讯业务。It is judged according to the network identifier whether the communication service to be processed belongs to the cross-network communication service.
A4、如A2所述的跨网络通讯方法,所述根据所述网络标识判断所述待处理通讯业务是否属于跨网通讯业务,包括:A4. The cross-network communication method as described in A2, wherein the judging whether the communication service to be processed belongs to a cross-network communication service according to the network identifier includes:
判断所述网络标识中是否存在不相同的网络标识;judging whether there are different network identifiers among the network identifiers;
若存在,则判定所述待处理通讯业务属于跨网通讯业务;If it exists, it is determined that the communication service to be processed belongs to the cross-network communication service;
若不存在,则判定所述待处理通讯业务不属于跨网通讯业务。If not, it is determined that the communication service to be processed does not belong to the cross-network communication service.
A5、如A2所述的跨网络通讯方法,所述根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务,还包括:A5. The cross-network communication method as described in A2, wherein the judging whether the communication service to be processed belongs to a cross-network communication service according to the session information also includes:
根据所述会话信息确定所述会话的会话类型;determining a session type of the session according to the session information;
在所述会话类型为多人会话时,获取所述会话的创建入口信息;When the session type is a multi-person session, obtaining entry information for creating the session;
根据所述创建入口信息判断所述待处理通讯业务是否属于跨网通讯业务。It is judged according to the creation entry information whether the communication service to be processed belongs to the cross-network communication service.
A6、如A1所述的跨网络通讯方法,所述在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接之前,包括:A6. The cross-network communication method as described in A1, when the business type is an internal and external cross-network communication service, before judging whether a cross-network connection has been established with the target external network, including:
获取所述跨网通讯业务中携带的网络识别标识;Obtaining the network identification identifier carried in the cross-network communication service;
根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络。The target external network corresponding to the cross-network communication service is determined according to the network identifier.
A7、如A2所述的跨网络通讯方法,所述根据所述会话信息判断所述待处理通讯业务是否属于跨网通讯业务之后,包括:A7. The cross-network communication method as described in A2, after determining whether the pending communication service belongs to the cross-network communication service according to the session information, including:
在所述待处理通讯业务不属于跨网通讯业务时,判定所述待处理通讯业务属于内网通讯业务;When the communication service to be processed does not belong to the cross-network communication service, it is determined that the communication service to be processed belongs to the intranet communication service;
获取所述待处理通讯业务的业务属性,根据所述业务属性将所述待处理通讯业务路由至对应的内网服务进行处理。Obtain the service attribute of the communication service to be processed, and route the communication service to be processed to a corresponding intranet service according to the service attribute.
A8、如A1所述的跨网络通讯方法,所述在所述业务类型为内外跨网通讯业务时,判断与目标外部网络是否已建立跨网连接之后,包括:A8. The cross-network communication method as described in A1, when the business type is an internal and external cross-network communication service, after judging whether a cross-network connection has been established with the target external network, including:
若否,则获取所述目标外部网络对应的网络访问标识和通讯加密标识;If not, obtain the network access identifier and communication encryption identifier corresponding to the target external network;
根据所述网络访问标识生成连接请求,并通过所述通讯加密标识对所述连接请求进行加密,获得加密连接请求;generating a connection request according to the network access identifier, and encrypting the connection request through the communication encryption identifier to obtain an encrypted connection request;
将所述加密连接请求发送至所述目标外部网络,以使所述目标外部网络对所述加密连接请求验证通过后,建立跨网连接。Sending the encrypted connection request to the target external network, so that the target external network establishes an inter-network connection after the encrypted connection request is verified and passed.
A9、如A6所述的跨网络通讯方法,所述根据所述网络识别标识确定所述跨网通讯业务对应的目标外部网络之后,还包括:A9. The cross-network communication method as described in A6, after determining the target external network corresponding to the cross-network communication service according to the network identification, it also includes:
在接收到所述目标外部网络发起的跨网连接请求时,获取所述跨网连接请求对应的通讯解密标识;When receiving the cross-network connection request initiated by the target external network, obtain the communication decryption identifier corresponding to the cross-network connection request;
通过所述通讯解密标识对所述跨网连接请求进行验证;Verifying the cross-network connection request through the communication decryption identifier;
在验证通过时,在预设交互界面上展示建立跨网连接的选择提示;When the verification is passed, a selection prompt for establishing a cross-network connection is displayed on the preset interactive interface;
在检测到基于所述选择提示输入的确认指令时,与所述外部网络建立跨网连接。When a confirmation instruction prompted for input based on the selection is detected, a cross-network connection is established with the external network.
A10、如A8或A9所述的跨网络通讯方法,所述网络访问标识包括:IP地址和端口号,所述通讯加密标识包括非对称加密算法的公钥。A10. The cross-network communication method described in A8 or A9, wherein the network access identifier includes: an IP address and a port number, and the communication encryption identifier includes a public key of an asymmetric encryption algorithm.
A11、如A1至A9任一项所述的跨网络通讯方法,所述本地跨网络组件为消息队列,所述方法还包括:A11. The cross-network communication method described in any one of A1 to A9, the local cross-network component is a message queue, and the method also includes:
在接收到客户端发起的跨网会话创建请求时,根据所述跨网会话创建请求生成跨网会话创建事件;When receiving the cross-network session creation request initiated by the client, generating a cross-network session creation event according to the cross-network session creation request;
将所述跨网会话创建事件投递至所述消息队列进行消费;posting the cross-network session creation event to the message queue for consumption;
在消费所述跨网会话创建事件时,通过已建立的跨网连接将所述跨网会话创建事件推送至所述目标外部网络,以使所述目标外部网络对所述跨网会话创建事件进行处理,完成跨网会话的创建。When consuming the cross-network session creation event, push the cross-network session creation event to the target external network through the established cross-network connection, so that the target external network performs the cross-network session creation event Processing to complete the creation of the cross-network session.
A12、如A11所述的跨网络通讯方法,所述在消费所述跨网会话创建事件时,通过已建立的跨网连接将所述跨网会话创建事件推送至所述目标外部网络,以使所述目标外部网络对所述跨网会话创建事件进行处理,完成跨网会话的创建之后,还包括:A12. The cross-network communication method described in A11, when the cross-network session creation event is consumed, the cross-network session creation event is pushed to the target external network through the established cross-network connection, so that The target external network processes the cross-network session creation event, and after completing the creation of the cross-network session, it also includes:
将所述目标外部网络发送的会话消息投递至所述消息队列进行消费,以将所述会话消息推送至对应的会话客户端。Posting the session message sent by the target external network to the message queue for consumption, so as to push the session message to a corresponding session client.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器/随机存取存储器、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as read-only memory/random access memory, magnetic disk, optical disk), including several instructions to make a terminal device (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) execute the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211061079.XA CN115442416B (en) | 2022-08-31 | 2022-08-31 | Cross-network communication method, device and communication network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211061079.XA CN115442416B (en) | 2022-08-31 | 2022-08-31 | Cross-network communication method, device and communication network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115442416A true CN115442416A (en) | 2022-12-06 |
CN115442416B CN115442416B (en) | 2025-03-25 |
Family
ID=84244517
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211061079.XA Active CN115442416B (en) | 2022-08-31 | 2022-08-31 | Cross-network communication method, device and communication network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115442416B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116233267A (en) * | 2022-12-29 | 2023-06-06 | 中国人民解放军军事科学院系统工程研究院 | A Cross-Network Message Collaborative Service System Model |
CN116633993A (en) * | 2023-07-25 | 2023-08-22 | 中邮消费金融有限公司 | Cross-network micro-service calling method, device, equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170070508A1 (en) * | 2011-06-29 | 2017-03-09 | Amazon Technologies, Inc. | Providing access to remote networks via external endpoints |
CN106685956A (en) * | 2016-12-27 | 2017-05-17 | 上海斐讯数据通信技术有限公司 | Method and system for router VPN network connection |
CN107018154A (en) * | 2017-05-31 | 2017-08-04 | 南京燚麒智能科技有限公司 | A kind of router and method for routing for being used to connect Intranet and outer net based on application layer |
WO2017167185A1 (en) * | 2016-04-01 | 2017-10-05 | 中兴通讯股份有限公司 | Architecture, method and apparatus for realizing network function communication |
CN111131172A (en) * | 2016-10-20 | 2020-05-08 | 杭州孚嘉科技有限公司 | Method for actively calling service by intranet |
CN112492053A (en) * | 2019-08-20 | 2021-03-12 | 厦门本能管家科技有限公司 | Cross-network penetration method and system for P2P network |
CN112887192A (en) * | 2021-01-12 | 2021-06-01 | 讯飞智元信息科技有限公司 | Cross-network communication method, electronic device thereof, and computer-readable storage medium |
CN114629678A (en) * | 2021-12-31 | 2022-06-14 | 绿盟科技集团股份有限公司 | TLS-based intranet penetration method and device |
-
2022
- 2022-08-31 CN CN202211061079.XA patent/CN115442416B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170070508A1 (en) * | 2011-06-29 | 2017-03-09 | Amazon Technologies, Inc. | Providing access to remote networks via external endpoints |
WO2017167185A1 (en) * | 2016-04-01 | 2017-10-05 | 中兴通讯股份有限公司 | Architecture, method and apparatus for realizing network function communication |
CN111131172A (en) * | 2016-10-20 | 2020-05-08 | 杭州孚嘉科技有限公司 | Method for actively calling service by intranet |
CN106685956A (en) * | 2016-12-27 | 2017-05-17 | 上海斐讯数据通信技术有限公司 | Method and system for router VPN network connection |
CN107018154A (en) * | 2017-05-31 | 2017-08-04 | 南京燚麒智能科技有限公司 | A kind of router and method for routing for being used to connect Intranet and outer net based on application layer |
CN112492053A (en) * | 2019-08-20 | 2021-03-12 | 厦门本能管家科技有限公司 | Cross-network penetration method and system for P2P network |
CN112887192A (en) * | 2021-01-12 | 2021-06-01 | 讯飞智元信息科技有限公司 | Cross-network communication method, electronic device thereof, and computer-readable storage medium |
CN114629678A (en) * | 2021-12-31 | 2022-06-14 | 绿盟科技集团股份有限公司 | TLS-based intranet penetration method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116233267A (en) * | 2022-12-29 | 2023-06-06 | 中国人民解放军军事科学院系统工程研究院 | A Cross-Network Message Collaborative Service System Model |
CN116633993A (en) * | 2023-07-25 | 2023-08-22 | 中邮消费金融有限公司 | Cross-network micro-service calling method, device, equipment and storage medium |
CN116633993B (en) * | 2023-07-25 | 2023-10-10 | 中邮消费金融有限公司 | Cross-network micro-service calling method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115442416B (en) | 2025-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8990569B2 (en) | Secure communication session setup | |
US9294467B2 (en) | System and method to associate a private user identity with a public user identity | |
CA2436061C (en) | System and method for facilitating communication using presence and communication system | |
KR101202671B1 (en) | Remote access system and method for enabling a user to remotely access a terminal equipment from a subscriber terminal | |
EP3609152A1 (en) | Internet-of-things authentication system and internet-of-things authentication method | |
EP3162104B1 (en) | A method to authenticate calls in a telecommunication system | |
KR20060132026A (en) | Deployment and Protocols of Wireless Portable Devices | |
US8625787B2 (en) | Hierarchical key management for secure communications in multimedia communication system | |
CN115442416B (en) | Cross-network communication method, device and communication network | |
US7055170B1 (en) | Security mechanism and architecture for collaborative software systems using tuple space | |
US20070277236A1 (en) | Secured communication channel between IT administrators using network management software as the basis to manage networks | |
MX2007010921A (en) | Method for communication between an application and a client. | |
US20060047606A1 (en) | Split channel authenticity queries in multi-party dialog | |
KR20220050863A (en) | Secure instant messaging method and attaratus thereof | |
CN106209835B (en) | Peer-to-peer network communication system and method | |
CN110971506B (en) | Decentralized real-time cluster communication method, device, equipment and system | |
CN105743766B (en) | A kind of group communication method and device | |
US20090113063A1 (en) | Authentication method and apparatus for integrating ticket-granting service into session initiation protocol | |
US20060168553A1 (en) | Software development kit for real-time communication applications and system | |
EP4521732A1 (en) | Meeting data transmission method and apparatus, and device | |
EP2418913A1 (en) | Method and system for joining group session with pre-defined joining | |
JP2019016923A (en) | IP-PBX system, IP-PBX setting automation method and IP-PBX setting automation program | |
LU100700B1 (en) | Method and devices for keyless secure data communication | |
CA2515873C (en) | Split channel authenticity queries in multi-party dialog | |
TWI754561B (en) | Instant messaging system and method thereof and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |