Message sending method, electronic device and communication system
By introducing location and access services into the regional nodes of the instant messaging system, the problems of resource waste and inefficiency caused by indiscriminate broadcasting are solved, and accurate message forwarding and efficient communication are achieved.
Patent Information
- Application Number
- CN202210523710.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-05-13
AI Technical Summary
In instant messaging systems, especially in scenarios with a large number of users, indiscriminate broadcasting of messages leads to a waste of system resources and low efficiency in sending downlink messages.
By introducing location services into the regional nodes of each region, relationship data between clients, channels, and regional nodes is constructed, messages are accurately sent to the specified regional nodes, and the relationship between clients and channels is stored in the memory of the access service, reducing invalid broadcasts and call latency between services.
It achieves accurate message forwarding, reduces system resource consumption and network latency, and improves message delivery rate and communication efficiency.
Smart Images

Figure CN117097785B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communications, and more specifically, to a message sending method, electronic device, and communication system. Background Technology
[0002] In instant messaging (IM) systems (also known as real-time messaging (RTM) systems), to ensure high availability and a convenient user experience, multiple systems are often deployed in different physical regions, forming a distributed, multi-site system. Different users in the same online meeting or live stream channel may be physically located in different regions, but they will receive messages essentially synchronously. Therefore, these distributed, multi-site systems involve cross-regional and cross-cloud message forwarding, with messages being sent to different users through their access points. However, with a large number of users in the system—for example, the number of viewers of a live stream may reach millions—real-time message transmission consumes significant network and system resources. Summary of the Invention
[0003] This application provides a message sending method, electronic device, and communication system to address the problems of wasted system resources and low downlink message sending efficiency caused by indiscriminate message broadcasting in instant messaging systems, especially in applications with a large number of users. In this method, location services are introduced into regional nodes in each region to construct relationship data between each client and the joined channel and distributed regional nodes, enabling messages to be accurately delivered to specified regional nodes containing clients in the same channel. Furthermore, the relationship between clients and channels can be stored in the memory of the access service.
[0004] In a first aspect of this application, a message sending method is provided, applied to a communication system. The communication system includes a first server, a first terminal, a second server, and a second terminal. The first terminal is located in a first region, the first server is a server node in the first region, and the second terminal is located in a second region, with the second server also acting as a server node in the second region. The method includes: the first terminal sending a message to the first server, wherein the first terminal has joined a channel designated as "Channel 1," the second terminal has joined a channel designated as "Channel 2," the second server storing a correspondence between the first channel and the second region, and a correspondence between the first channel and the second terminal. The second server synchronizes the correspondence between the first channel and the second region to the first server. Based on the correspondence between the first channel and the second region, the first server sends a message to the second server. Based on the correspondence between the first channel and the second terminal, the second server sends a message to the second terminal.
[0005] The technical solution of this application can accurately forward messages to designated areas, reduce invalid message broadcasts, improve message forwarding efficiency, reduce system resource consumption, reduce network latency, increase message delivery rate, and save communication resources.
[0006] In conjunction with the first aspect, in some embodiments, the first server stores a correspondence between a first channel and a first region, and a correspondence between a first channel and a first terminal. Based on the correspondence between the first channel and the first region, the first server sends a message to the first terminal. Based on the correspondence between the first channel and the first terminal, the first server sends a message to the first terminal.
[0007] In conjunction with the first aspect, in some embodiments, in response to a first terminal joining a first channel, a first server stores the correspondence between the first channel and the first terminal. In response to a second terminal joining a first channel, a second server stores the correspondence between the first channel and the second terminal.
[0008] In conjunction with the first aspect, in some embodiments, the first server includes a first access service, a first message service, and a first location service, and the second server includes a second access service, a second message service, a second location service, and a synchronization service. Specifically, the first terminal sends a message to the first access service; the second location service stores a mapping between a first channel and a second region; the second access service stores a mapping between the first channel and the second terminal; and the second location service obtains the mapping between the first channel and the second region from the second access service. The synchronization service synchronizes the mapping between the first channel and the second region to the first location service. The first access service sends a message to the first message service. Based on the mapping between the first channel and the second region stored in the first location service, the first message service sends a message to the second message service. The second message service broadcasts a message to the second access service. Based on the mapping between the first channel and the second terminal stored in the second access service, the second access service sends a message to the second terminal.
[0009] In conjunction with the first aspect, in some embodiments, a first location service stores a correspondence between a first channel and a first region, and a first access service stores a correspondence between a first channel and a first terminal. The first location service obtains the correspondence between the first channel and the first region from the first access service. Based on the correspondence between the first channel and the first region stored by the first location service, a first message service broadcasts a message to the first access service. Based on the correspondence between the first channel and the first terminal stored by the first access service, the first access service sends a message to the first terminal.
[0010] In conjunction with the first aspect, in some embodiments, the synchronization service is a second synchronization service, and the first server further includes the first synchronization service. The first synchronization service synchronizes the correspondence between the first channel and the first region to the second location service.
[0011] In conjunction with the first aspect, in some embodiments, the communication system further includes a third terminal and a third server. The third terminal is located in a third region, and the third server is a server node in the third region. The channel joined by the third terminal is the second channel, and the third server stores the correspondence between the second channel and the third region. The third server synchronizes the correspondence between the second channel and the third region to the first server. In response to not finding a correspondence between the first channel and the third region, the first server determines not to send a message to the third server.
[0012] In a second aspect of this application, a message sending method is provided, applied to a first server. The method includes: the first server receiving a message from a first terminal, wherein the first terminal is located in a first region, the first server is a server node in the first region, a second terminal is located in a second region, the second server is a server node in the second region, the first terminal has joined a channel designated as channel one, the second terminal has joined a channel designated as channel two, and the second server stores a correspondence between channel one and channel two. The first server receives the correspondence between channel one and channel two synchronized from the second server. Based on the correspondence between channel one and channel two, the first server sends a message to the second server.
[0013] The technical solution of this application can accurately forward messages to designated areas, reduce invalid message broadcasts, improve message forwarding efficiency, reduce system resource consumption, reduce network latency, increase message delivery rate, and save communication resources.
[0014] In conjunction with the second aspect, in some embodiments, the first server stores a correspondence between a first channel and a first region, and a correspondence between a first channel and a first terminal. Based on the correspondence between the first channel and the first region, the first server sends a message to the first terminal. Based on the correspondence between the first channel and the first terminal, the first server sends a message to the first terminal.
[0015] In conjunction with the second aspect, in some embodiments, in response to the first terminal joining the first channel, the first server saves the correspondence between the first channel and the first terminal.
[0016] In conjunction with the second aspect, in some embodiments, the first server includes a first access service, a first message service, and a first location service, and the second server includes a second access service, a second message service, a second location service, and a synchronization service. The first access service receives messages from the first terminal. The second location service stores a mapping between a first channel and a second region, and obtains this mapping from the second access service. The first location service receives the mapping between the first channel and the second region synchronized by the synchronization service. The first access service sends a message to the first message service. Based on the mapping between the first channel and the second region stored by the first location service, the first message service sends a message to the second message service.
[0017] In conjunction with the second aspect, in some embodiments, the first location service stores a correspondence between a first channel and a first region, and the first access service stores a correspondence between a first channel and a first terminal. The first location service obtains the correspondence between the first channel and the first region from the first access service. Based on the correspondence between the first channel and the first region stored by the first location service, the first message service broadcasts a message to the first access service. Based on the correspondence between the first channel and the first terminal stored by the first access service, the first access service sends a message to the first terminal.
[0018] In conjunction with the second aspect, in some embodiments, the synchronization service is a second synchronization service, and the first server further includes a first synchronization service. The first synchronization service synchronizes the correspondence between the first channel and the first region to the second location service.
[0019] In conjunction with the second aspect, in some embodiments, the first server receives the correspondence between the second channel and the third region synchronized from the third server, wherein the third server is a server node of the third region and stores the correspondence between the second channel and the third region. In response to not finding a correspondence between the first channel and the third region, the first server determines not to send a message to the third server.
[0020] In a third aspect of this application, a server for sending messages is provided. The server includes: an access service for receiving messages from a first terminal, wherein the first terminal is located in a first region, the server is a server node in the first region, a second server is a server node in a second region, the channel joined by the first terminal is a first channel, and the second server stores a mapping between the first channel and the second region. The access service is also used to send messages to a message service. The message service is used to receive messages from the access service. A location service is used to receive the mapping between the first channel and the second region synchronized from the second server. The message service is also used to send messages to the second server according to the mapping between the first channel and the second region stored in the location service.
[0021] The technical solution of this application can accurately forward messages to designated areas, reduce invalid message broadcasts, improve message forwarding efficiency, reduce system resource consumption, reduce network latency, increase message delivery rate, and save communication resources.
[0022] In conjunction with the third aspect, in some embodiments, the location service is further configured to store the correspondence between the first channel and the first region. The access service is further configured to store the correspondence between the first channel and the first terminal. The location service is further configured to obtain the correspondence between the first channel and the first region from the access service. The access service is further configured to send the correspondence between the first channel and the first region to the location service. The messaging service is further configured to broadcast a message to the access service based on the correspondence between the first channel and the first region stored by the location service. The access service is further configured to receive messages from the messaging service. The access service is further configured to send a message to the first terminal based on the correspondence between the first channel and the first terminal stored by the access service.
[0023] In conjunction with the third aspect, some embodiments also include a synchronization service for synchronizing the correspondence between the first channel and the first region to the second server.
[0024] In conjunction with the third aspect, in some embodiments, the location service is further configured to receive a mapping relationship between a second channel and a third region synchronized from a third server, wherein the third server is a server node of the third region and stores the mapping relationship between the second channel and the third region. The message service is further configured to determine not to send a message to the third server in response to the absence of a mapping relationship between the first channel and the third region.
[0025] In a fourth aspect of this application, a server is provided, the server including a memory and a processor coupled to the memory, the memory storing executable instructions, and the processor for invoking the executable instructions to cause the server to perform operations according to the method of the second aspect above or any embodiment thereof.
[0026] In a fifth aspect of this application, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the operation of the method according to the second aspect above or any embodiment thereof.
[0027] In a sixth aspect of this application, a computer program product is provided that includes computer-executable instructions, which, when executed, implement the operation of the method according to the second aspect above or any embodiment thereof.
[0028] In a seventh aspect of this application, a chip or chip system is provided, the chip or chip system including processing circuitry configured to implement the operation of the method according to the second aspect above or any embodiment thereof.
[0029] Implementing the above measures allows for precise message forwarding to designated areas, reducing invalid message broadcasts, improving message forwarding efficiency, and lowering system resource consumption. Furthermore, merging access and query functions into a single service reduces network latency caused by inter-service calls, lowers message transmission time, increases message delivery speed, and saves communication resources. Attached Figure Description
[0030] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0031] Figure 1 A schematic diagram of an application scenario according to an embodiment of this application is shown;
[0032] Figure 2 A schematic diagram of a web conference according to an embodiment of this application is shown;
[0033] Figure 3 A schematic diagram of a message flow according to an embodiment of this application is shown;
[0034] Figure 4A A schematic diagram of the architecture of a communication system according to an embodiment of this application is shown;
[0035] Figure 4B A schematic diagram of the functional modules of a communication system according to an embodiment of this application is shown;
[0036] Figure 5 A schematic diagram of the structure of a terminal device according to an embodiment of this application is shown;
[0037] Figure 6 A schematic diagram of the structure of a server according to an embodiment of this application is shown;
[0038] Figure 7 A schematic diagram of a message flow according to an embodiment of this application is shown;
[0039] Figure 8 A message logic interaction diagram according to an embodiment of this application is shown;
[0040] Figure 9 A message timing flowchart according to an embodiment of this application is shown;
[0041] Figure 10 A flowchart of a message sending method according to an embodiment of this application is shown. Detailed Implementation
[0042] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0043] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0044] In the description of the embodiments of this application, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". It should be understood that expressions such as "first", "second", and "third" are only used to indicate that multiple objects may be different, but do not exclude the possibility that two objects are the same. Expressions such as "first", "second", and "third" should not be construed as any limitation on the embodiments. The terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more. Other explicit and implicit definitions may also be included below.
[0045] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0046] To facilitate message delivery in instant messaging systems (such as online meetings or live streams), multiple systems are typically deployed in different physical regions, forming a distributed, multi-site system. This means that different users within the same instant messaging system may be physically located in different regional sites, but they will receive messages essentially synchronously. This involves cross-regional and cross-cloud message forwarding, where messages are distributed to different users through their respective access points.
[0047] In the various embodiments of this application, "instant messaging system (or real-time messaging system)" can refer to an architecture system in the network that realizes real-time interactive communication. It needs to have real-time interactive and high real-time performance functions. Common application scenarios include, but are not limited to, group chat, live streaming, web conferencing, online teaching, webinars, webinars, webinars and other business areas.
[0048] In embodiments of this application, a "region" (also referred to as a "territory") can refer to a geographical area served by the system, and one or more users within a region (or territory) are served by the same system. A "channel" can refer to a logical group of users.
[0049] In the embodiments of this application, the term "broadcast" refers to a group communication method in a computer network, meaning that the sender sends a message to all receivers in the network, that is, the sender delivers a data packet to every host in the network, regardless of whether these hosts want to receive the data packet. When it is necessary to deliver a common message to all hosts in the network, using broadcast can ensure better utilization of resources and faster message delivery, and can help achieve economies of scale by minimizing communication and processing overhead.
[0050] In the embodiments of this application, "server" refers to a computer that manages computing resources. A server can provide computing or application services to other clients (such as mobile phones, computers, and other terminals) on a network. Compared to ordinary computers, servers have advantages such as higher processing power, long-term reliable operation, higher load capacity, powerful input / output (I / O) external data throughput, and better scalability.
[0051] In the embodiments of this application, a "regional node" is a logical concept used to provide one or more functions and services to clients within its designated region, and also to act as a relay unit for communication with other regions. A communication network may include multiple regional nodes, which are connected by communication lines to achieve network communication between different regions. In the embodiments of this application, a regional node can be implemented as a single server or as a server cluster composed of multiple servers; therefore, it can also be called a server node. Its deployment method can be flexible and diverse, and the embodiments of this application do not impose any limitations on this.
[0052] refer to Figure 1 , Figure 1 An exemplary application scenario 100 of the present application embodiment is shown.
[0053] like Figure 1 As shown, application scenario 100 is an example scenario of the web conferencing 101 communication system. The web conferencing 101 communication system includes multiple user terminals distributed in different areas, forming a distributed instant messaging system. User terminals in each area access the system from the nearest available area and participate in the same web conferencing 101, sending and receiving messages through their respective area's server.
[0054] like Figure 1 As shown, terminal 102 located in region 105 accesses and sends / receives messages through region node 108; terminal 103 located in region 106 accesses and sends / receives messages through region node 109; and terminal 104 located in region 107 accesses and sends / receives messages through region node 110. Any participating terminal sending a message in network conference 101 will forward that message to participating terminals in other regions of network conference 101. In this embodiment, a region node can be implemented as a single server or as a server cluster composed of multiple servers; this application embodiment does not impose any limitations on this.
[0055] Among them, such as Figure 2 As shown, the user roles in the web conference 101 may include a conference host (or initiator) 201 and one or more participants (or attendees) 202. The actions or functions that the conference host 201 can perform include: creating a conference 203, inviting members to join 204 (the conference), sending and receiving messages 205, and disbanding the conference 206. The actions or functions that the participants 202 can perform include: joining the conference in response to the invitation from the conference host 201 208, sending and receiving messages 209, and leaving the conference 210. Messages in the web conference 101 can be forwarded via a server 207, allowing messages in the web conference 101 to be simultaneously transmitted to the conference host 201 and one or more participants 202 in different regions.
[0056] refer to Figure 3 , Figure 3 The diagram illustrates the message flow of an instant messaging system 300 provided in some embodiments of this application.
[0057] In some embodiments, an instant messaging system includes multiple regional nodes. A regional node may correspond to one or more regions, and the regional node may provide functions and services to one or more clients in its corresponding region. In this embodiment, a regional node may be implemented as a single server or as a server cluster consisting of multiple servers; this application embodiment does not impose any limitations on this.
[0058] In this embodiment, a regional node may include channel services, message services, access services, etc. When any user client sends a message in its channel, it can transmit the message to the message service of the same region through the access service of that region. The message service of that region then broadcasts the message to all other regions in the instant messaging system. After receiving the message, each message service in another region queries the member list of that channel through the channel service in that region, and then forwards the message to the client corresponding to the member of that channel.
[0059] Among them, the channel service is used to record, save and update the list of relationships between clients and channels, the message service is used to send and receive messages in the system, and the access service is used to access clients and maintain long-term connections with clients.
[0060] The instant messaging system 300 includes multiple clients distributed across different regions. Within the same channel, any message sent by any client can be simultaneously sent to other clients in other regions on the same channel. For example... Figure 3 As shown, the instant messaging system 300 includes clients 305, 315, and 325, as well as corresponding regional nodes 301, 311, and 321. It is assumed that clients 305, 315, and 325 are members of the same channel. Client 305 joins the instant messaging system 300 by accessing regional node 301, client 315 joins by accessing regional node 311, and client 325 joins by accessing regional node 321. Regional node 301 includes access services 302, message services 303, and channel services 304, etc.; regional node 311 includes access services 312, message services 313, and channel services 314, etc.; and regional node 321 includes access services 322, message services 323, and channel services 324, etc.
[0061] The channel service in each regional node is used to record, save, and update the relationship list between clients and channels in the instant messaging system 300. Whenever a client joins or leaves a channel, the channel service records, saves, and updates the relationship between that client and the channel. For the mapping relationship between one or more clients and channels in the instant messaging system 300, the channel service can generate a client-channel mapping table and synchronize it to the channel service in each region, facilitating the querying of client-channel relationships when distributing messages by each regional node. The message service in each regional node is used to send and receive messages from other regions in the instant messaging system 300. For example, message services 303, 313, and 323 can send and receive messages from each other. The message services in each region are also used to send and receive messages from clients in their respective regions through access services. For example, message service 303 can receive messages from client 305 through access service 302 and broadcast them to other regions. Message service 303 can also forward received messages from other regions to client 305 through access service 302. The access services in each regional node are used to provide access to clients within the region and maintain long-term connections with clients. For example, client 305 accesses regional node 301 through access service 302, client 315 accesses regional node 311 through access service 312, and client 325 accesses regional node 321 through access service 322.
[0062] like Figure 3 As shown, when client 305 sends a message within its channel, client 305 first sends the message to access service 302 (331), access service 302 then sends the message to message service 303 (332), and then message service 303 queries the member list in channel service 304 (334) to determine the channel where client 305 is located. Message service 303 broadcasts a message in instant messaging system 300 (333), sending client 305's message to all areas. This broadcast message carries the identification information of the channel where client 305 is located and the data of the message sent by client 305. Of course, message service 303 can also send a message to access service 302 (335), and access service 302 can then send the message to client 305 (336), allowing client 305 to receive the message it sent in the system.
[0063] When message service 313 of area node 311 receives a broadcast message from message service 303, it first queries the member list in channel service 314 (337) to determine which clients within the area belong to the same channel based on the channel's identifier information. If it determines that client 315 within the area is a member of the same channel, message service 313 will send a message to access service 312 (338), and access service 312 will then send the message to client 315 (339). After this process, client 315 receives the message from client 305. If it determines that client 315 within the area is not a member of the same channel, message service 313 will not send any further messages to client 315.
[0064] Similarly, when message service 323 of area node 321 receives a broadcast message from message service 303, it first queries the member list in channel service 324 (340) to determine which clients within the area belong to the same channel based on the channel's identifier information. If it determines that client 325 within the area is a member of the same channel, message service 323 will send a message to access service 322 (341), and access service 322 will then send the message to client 325 (342). After this process, client 325 receives the message from client 305. If it determines that client 325 within the area is not a member of the same channel, message service 323 will not send any further messages to client 325.
[0065] The instant messaging system 300 can support group chat, live streaming, web conferencing, online teaching, webinars, online press conferences, etc. Combined with... Figure 1 In one example, the instant messaging system 300 can be implemented as the web conference 101 in application scenario 100, the clients 305, 315, and 325 can be implemented as the terminals 102, 103, and 104 (in no particular order) in application scenario 100, and the regional nodes 301, 311, and 321 can be implemented as the regional nodes 108, 109, and 110 (in no particular order) in application scenario 100.
[0066] Figure 3 The instant messaging system 300 shown also has some shortcomings. First, because each message needs to be broadcast to all regions, regardless of whether there are members in that region accessing the same channel, each region's server needs to process the message, leading to a significant waste of system resources. Second, the regional servers need to query the channel member list for each received message, and each query takes time. In scenarios with a large number of users, such as live broadcasts, webinars, and press conferences, this results in high latency and low communication efficiency for instant messaging.
[0067] This application proposes a message sending method, related equipment, and communication system for cross-regional and cross-cloud instant messaging systems. It addresses the problems of wasted system resources caused by indiscriminate message broadcasting and low downlink message sending efficiency in instant messaging systems, especially in scenarios with a large number of users. In this message sending method, location services are introduced into the regional nodes of each region. Based on the regional node accessed by the client and the client's channel joining action, information about the client, corresponding channel, and corresponding regional node is synchronized to the location service, constructing relationship data between each client and the joined channel and distributed regional nodes. This allows any regional node to determine which regions the client's channel is distributed in before sending messages from clients within its region to other regional nodes—that is, which regions contain clients of the same channel—and then accurately send the message to the specified regional nodes containing clients of the same channel, without needing to broadcast to all regional nodes. In addition, the relationship between clients and channels can be stored in the memory of the access service in each regional node. Therefore, it is not necessary to use the channel service to query the channel member list. Instead, the access service directly sends the corresponding channel messages to different clients based on the correspondence between channels and clients. This reduces the network latency caused by calls between services and greatly improves the rate of sending a large number of messages.
[0068] Implementing embodiments of this application allows for precise forwarding of messages to designated areas, reducing invalid message broadcasts, improving message forwarding efficiency, and reducing system resource consumption. Furthermore, it allows the access and query functions to be combined into a single service, reducing network latency caused by inter-service calls, lowering message transmission time, increasing message delivery speed, and saving communication resources.
[0069] First, the communication system 400 provided in the embodiments of this application will be introduced. Figure 4A An embodiment of the present application illustrates a communication system 400. In some embodiments, the communication system 400 may be implemented as an instant messaging system, such as instant messaging system 300, instant messaging system 700, or cloud conferencing system 800, etc.
[0070] The communication system 400 may include multiple smart terminal devices (user equipment, UE). These terminal devices may be distributed in different areas. The terminal devices covered by each area connect to the server (or server node, area node) in the nearest area. The servers in each area connect to the network and communicate with each other through the network connection. Thus, the terminal devices in different areas can communicate with each other through the server.
[0071] Terminal equipment, often simply called a terminal, can be fixed or mobile. It is typically an intelligent electronic device that interacts with users and provides them with business functions; some terminals may also provide a user interface. Terminal equipment may also be referred to as user equipment, access terminal, client, user terminal, user unit, user station, station (STA), mobile device, mobile terminal, mobile station, mobile station, mobile client, mobile unit, remote station, remote terminal, remote unit, wireless unit, communication equipment, user agent, or user device, etc.
[0072] This application does not limit the specific type of terminal. For example, a terminal can be a smartphone, tablet, personal computer (PC), desktop computer, portable computer, laptop computer, handheld computer, netbook, game console, electronic whiteboard, smart screen (smart TV), drone, cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle system, Internet of Things (IoT) device, and terminals in industrial control, smart grid, transportation safety, smart city, smart home, or other types of electronic devices, etc. This application does not impose special limitations on the application scenarios of the terminal.
[0073] Each terminal device in the embodiments of this application can be equipped with system, system, , system, system, The operating system (HarmonyOS, HOS) or other types of operating systems are not limited in this application. The operating systems of the various terminal devices in the communication system 400 can be the same or different, and this application does not limit this. In some embodiments, multiple terminals are all equipped with HarmonyOS, then the system composed of these multiple terminals can be referred to as... Super virtual device (also known as) Super terminals refer to the integration of the capabilities of multiple terminals through distributed technology, storing them in a virtual hardware resource pool. Based on business needs, the terminal capabilities are uniformly managed, scheduled, and integrated to provide services to the outside world, enabling rapid connection, capability mutual assistance, and resource sharing between different terminals.
[0074] like Figure 4A As shown, multiple terminals in the communication system 400 are distributed across different areas, such as areas 410, 420, and 430. Area 410 includes clients such as terminals 500-1 and 500-2, and each client in area 410 can access the network through server 600-1. Area 420 includes clients such as terminals 500-3 and 500-4, and each client in area 420 can access the network through server 600-2. Area 430 includes clients such as terminals 500-5 and 500-6, and each client in area 430 can access the network through server 600-3. Each server in each area can send and receive messages from clients within its area, and each server in each area can communicate with servers in other areas via the network. For example, when terminal 500-1 sends a message to terminal 500-3 in communication system 400, server 600-1 can receive the message from terminal 500-1 within area 410, and then send the message to server 600-2 via the network. Server 600-2 then forwards the message to terminal 500-3 within area 420. It is understood that servers 600-1, 600-2, and 600-3 can be implemented as a single server or as a server cluster consisting of multiple servers; this embodiment does not impose any limitations on this.
[0075] In the communication system 400, communication connections are established between each terminal in each area and the server, and between servers in different areas, to transmit instructions, messages, data, etc. This application embodiment does not limit the type of communication connection; the communication connection can be wireless or wired.
[0076] In some embodiments, the communication connection between the terminal device and the server can be a short-range communication connection. For example, a wired connection, such as a Universal Serial Bus (USB) connection, a High Definition Multimedia Interface (HDMI) connection, or a DisplayPort (DP) connection. Alternatively, a wireless connection, such as a Bluetooth (BT) connection, a Wi-Fi connection, a hotspot connection, Near Field Communication (NFC), or ZigBee, can be used to enable communication between terminals without an account or with different accounts. Wireless connections are not bound by wires, allowing for greater freedom of user movement. This application does not limit the type of communication connection. The terminal device may be configured with a Bluetooth (BT) module and / or a Wireless Local Area Network (WLAN) module. The Bluetooth module can provide solutions for Bluetooth communication, including Bluetooth Classic (Bluetooth 2.1) or Bluetooth Low Energy (BLE). The WLAN module can provide solutions for WLAN communication, including Wi-Fi P2P, Wi-Fi LAN, or Wi-Fi softAP. In some embodiments, Wi-Fi P2P refers to allowing devices in a wireless network to connect to each other in a point-to-point manner without a wireless router. This system is also known as Wireless Fidelity Direct (Wi-Fi Direct). Devices establishing a Wi-Fi P2P connection can exchange data directly via Wi-Fi (must be on the same frequency band) without being connected to a network or hotspot, enabling point-to-point communication such as transferring files, pictures, and videos. Compared to Bluetooth, Wi-Fi P2P has advantages such as faster search and transmission speeds, and longer transmission distances.
[0077] In some embodiments, the communication connection between the terminal device and the server can also be a long-distance communication connection. For example, wired connections such as broadband or fiber optic connections, or wireless connections such as multiple terminals logging into the same account to connect and communicate via the network access server. Multiple terminal devices in the communication system 400 can also log into different accounts, but connect through binding. For example, a mobile phone and a smartwatch can log into different accounts. The mobile phone binds the smartwatch to itself in a device management application, and then connects through the device management application. In some embodiments, when two terminal devices are trusted devices, such as those that have previously paired or connected, when they reconnect, they will automatically establish a communication connection and then exchange data, without requiring the user to manually connect or pair again, saving time and effort. For example, electronic devices that have been paired with Bluetooth, connected to a shared hotspot, or established a Wi-Fi P2P connection can be considered to have established a trusted relationship; this embodiment does not limit this.
[0078] In some embodiments, the communication connection between the terminal device and the server can also be a combination of any of the above methods, and this application embodiment does not limit this.
[0079] In some embodiments, servers in different regions can connect and communicate with each other via the Internet, such as for video conferencing and live streaming. The communication connection can be wired, such as a fiber optic connection, or wireless, or any combination of wired and wireless connections.
[0080] The communication system 400 connects terminal devices to servers, and servers can be connected via a combination of multiple connections to ultimately enable communication between terminals in different areas. For example, terminal 500-2 (e.g., a mobile phone) in area 410 sends a message to terminal 500-4 (e.g., a PC) in area 420. Terminal 500-2 establishes a connection with a router via Wi-Fi to access the network, or establishes a connection with a base station via cellular signal to access the network, enabling communication between the mobile phone and server 600-1 (e.g., a cloud server or cloud host). Server 600-1 then sends the message to server 600-2 via the Internet. Server 600-2 then forwards the message to terminal 500-4 in area 420 via a broadband connection.
[0081] In some embodiments, the server (or server cluster) includes location services, messaging services, access services, etc. The location service records, saves, and updates the relationship between channels and regional nodes for querying by the messaging service; the messaging service sends and receives messages from other regional nodes in the system, as well as messages from access services within the local regional node; the access service accesses clients within the local region and maintains long-term connections with clients, and also records, saves, and updates the relationship between clients and channels. It should be noted that this application does not limit the type, number, or association of location services, messaging services, access services, and clients within a regional node. In some embodiments, a regional node may include one or more access services, one or more messaging services, and one or more location services; a client may access one access service; an access service may serve multiple clients; one or more messaging services may correspond to one or more access services, etc.
[0082] When any client sends a message in its channel, it can transmit the message to the local message service through the local access service. The local message service queries the relationship between the channel and the regional node recorded in the location service, and then forwards the message to the designated regional node in the same channel within the instant messaging system. After receiving the message, the message service of the designated regional node broadcasts the message to all access services in its region. Each access service stores the relationship between its clients and channels, and then, based on the retrieved channel-client relationship, the access service distributes the message to the corresponding client for that channel.
[0083] This application embodiment does not limit the types of communication connections in the communication system 400. Terminals, terminals and servers, servers and servers can connect and communicate through various communication connection types and combinations of the above methods to transmit and interact with data; this application embodiment does not impose any restrictions on this.
[0084] It should be noted that, Figure 4A The communication system 400 shown is only used to assist in describing the technical solutions provided in the embodiments of this application and does not constitute a limitation on the embodiments of this application. In actual business scenarios, the communication system 400 may include more or fewer terminal devices, more or fewer servers, more or fewer areas, etc. The embodiments of this application do not impose any limitations on the number and type of terminals, the number and type of servers, the communication connection method, etc.
[0085] The functional modules (or logic units) of the communication system 400 provided in the embodiments of this application are described below.
[0086] This application embodiment can divide the communication system 400 into functional modules. For example, the various functions of the communication system 400 can be divided into separate functional modules, or two or more functions of the communication system 400 can be integrated into one functional module. This embodiment does not impose any limitations. The integrated module can be implemented in hardware or software, or in a combination of hardware and software.
[0087] For example, Figure 4B A schematic diagram of the functional modules of a communication system 400 provided in an embodiment of this application is shown. For example, as shown... Figure 4B As shown, the communication system 400 may include terminal device 500-1, server 600-1, server 600-2, and terminal device 500-3. In some embodiments, terminal device 500-1 and terminal device 500-3 may be implemented as the terminal devices, users, or clients described in the various embodiments of this application, and server 600-1 and server 600-2 may be implemented as the regional nodes, servers, server groups, cloud servers, etc. described in the various embodiments of this application. For simplicity, further details are omitted here. The functional modules in the communication system 400, terminal device 500-1, server 600-1, server 600-2, and terminal device 500-3 may be implemented by software, hardware, or a combination of both.
[0088] like Figure 4B As shown, the terminal device 500-1 may include a communication unit 401 and a processing unit 402.
[0089] The communication unit 401 can be used to communicate with the server 600-1. The terminal device 500-1 can access the access service 411 of the server 600-1 through the communication unit 401, and send messages to or receive messages from the access service 411 of the server 600-1. The communication unit 401 may include a wired protocol stack and a wireless protocol stack, which are responsible for negotiating and processing the protocols for wired communication and wireless communication, respectively.
[0090] The processing unit 402 is the control center, which can be used to process and control the sending and receiving of messages, task scheduling, etc., including network control plane communication and forwarding plane communication, such as data encapsulation and decapsulation, and querying traffic forwarding information.
[0091] Similarly, such as Figure 4B As shown, the terminal device 500-3 may include a communication unit 403 and a processing unit 404.
[0092] The communication unit 403 can be used to communicate with the server 600-2. The terminal device 500-3 can access the access service 421 of the server 600-2 through the communication unit 403, and send messages to or receive messages from the access service 421 of the server 600-2. The communication unit 403 may include a wired protocol stack and a wireless protocol stack, which are responsible for negotiating and processing the protocols for wired communication and wireless communication, respectively.
[0093] The processing unit 404 is the control center, which can be used to process and control the sending and receiving of messages, task scheduling, etc., including network control plane communication and forwarding plane communication, such as data encapsulation and decapsulation, and querying traffic forwarding information.
[0094] like Figure 4B As shown, server 600-1 may include: access service 411, message service 412, location service 413, etc.
[0095] Access service 411 provides access to one or more clients (such as terminal device 500-1) within the region and maintains long-lived connections with these clients (e.g., terminal device 500-1). For example, server 600-1 communicates with terminal device 500-1 through access service 411. Access service 411 also records, saves, and updates the relationship between clients (e.g., terminal device 500-1) and the channels they have joined. Whenever a client joins or leaves a channel within the region, access service 411 records, saves, and updates the relationship between that client and the channel. For the mapping between one or more clients and channels within the region, access service 411 can generate a mapping table of client-channel relationships within the region and update it in real time, facilitating the querying of client-channel relationships when messages from message service 412 are sent to clients. Access service 411 is also used to send and receive messages with message service 412.
[0096] Message service 412 is responsible for message processing and routing services, that is, for sending and receiving messages from other servers in communication system 400, as well as messages from access service 411 in this area. For example, message service 412 of server 600-1 and message service 422 of server 600-2 can send and receive messages to each other. For example, message service 412 can send and receive messages from terminal device 500-1 in this area through access service 411. Message service 412 can receive messages from terminal device 500-1 through access service 411 and send them to message service 422 of server 600-2. Message service 412 can also forward messages received from message service 422 of server 600-2 to terminal device 500-1 through access service 411.
[0097] The message service 412 is also used to query the location service 413 for the recorded distribution area of the channel where the client is located before sending a message from a client within the region. This allows the message service 412 to send the message to the designated area based on the queried area information, improving communication efficiency and saving system resources. For example, when the message service 412 in server 600-1 receives a message from terminal device 500-1, it queries the location service 413 based on the channel where terminal device 500-1 is located. The query finds that the associated area node of that channel also includes server 600-2. The message service 412 then sends the message to server 600-2. After receiving the message, the message service 422 of server 600-2 broadcasts it to the access service 421 in the region. The access service 421 then forwards the message to terminal device 500-3 based on the channel and client relationship.
[0098] Location service 413 is used to record, save, and update the relationship between channels and regions for querying by message service 412. Location service 413 can obtain information about the channels included in its region from access service 411.
[0099] like Figure 4B As shown, server 600-2 may include: access service 421, message service 422, location service 423, etc.
[0100] Similarly, access service 421 provides access to one or more clients (such as terminal device 500-3) within the region and maintains long-lived links with clients (such as terminal device 500-3). For example, server 600-2 communicates with terminal device 500-3 through access service 421. Access service 421 also records, saves, and updates the relationship between clients (such as terminal device 500-3) and the channels they have joined. Whenever a client joins or leaves a channel within the region, access service 421 records, saves, and updates the relationship between that client and the channel. For the mapping relationship between one or more clients and channels within the region, access service 421 can generate a mapping table of client-channel relationships within the region and update it in real time, facilitating the querying of client-channel relationships when messages from message service 422 are sent to clients. Access service 421 is also used to send and receive messages with message service 422.
[0101] Message service 422 is responsible for message processing and routing services, that is, for sending and receiving messages from other servers in communication system 400, as well as messages from access service 421 in this area. For example, message service 422 of server 600-2 and message service 412 of server 600-1 can send and receive messages to each other. For example, message service 422 can send and receive messages from terminal device 500-3 in this area through access service 421. Message service 422 can receive messages from terminal device 500-3 through access service 421 and send them to message service 412 of server 600-1. Message service 422 can also forward messages received from message service 412 of server 600-1 to terminal device 500-3 through access service 421.
[0102] The message service 422 can also query the location service 423 for the recorded distribution area of the channel where the client is located before sending a message from a client within the region. This allows the message service 422 to send the message to the designated area based on the queried area information, improving communication efficiency and saving system resources. For example, when the message service 422 in server 600-2 receives a message from terminal device 500-3, it queries the location service 423 based on the channel where terminal device 500-3 is located. The query finds that the associated area node of that channel also includes server 600-1. The message service 422 then sends the message to server 600-1. After receiving the message, the message service 412 of server 600-1 broadcasts it to the access service 411 in the region. The access service 411 then forwards the message to terminal device 500-1 based on the channel and client relationship.
[0103] Location service 423 is used to record, save, and update the relationship between channels and regions for querying by message service 422. Location service 423 can obtain information about the channels included in its region from access service 421.
[0104] In addition, the communication system 400 may also include other services such as synchronization service 414 and elastic load balancing (ELB) services 415, 405, and 406. Synchronization service 414 can be used to handle data synchronization between servers, such as synchronizing the updated channel and region relationships between the location service 413 of server 600-1 and the location service 423 of server 600-2. The ELB service can be responsible for distributing traffic according to a specified allocation strategy to improve access efficiency in the system. For example, ELB service 405 coordinates the distribution of traffic between the communication unit 405 of terminal device 500-1 and the access service 411 of server 600-1; ELB service 406 coordinates the distribution of traffic between the communication unit 403 of terminal device 500-3 and the access service 421 of server 600-2; and ELB service 415 coordinates the distribution of traffic between the message service 412 of server 600-1 and the message service 422 of server 600-2.
[0105] In one example, terminal device 500-1 and terminal device 500-3 are members of the same channel. When terminal device 500-1 sends a message within the channel, the message is sent to terminal device 500-3 in the same channel via servers 600-1 and 600-2. Servers in areas other than the same channel will not receive the message. When terminal device 500-1 sends one or more messages within its local channel, processing unit 402 encapsulates the message and sends it to communication unit 401. Communication unit 401 sends a message notification to access service 411 of server 600-1 in its local area. This message notification may include the one or more messages sent by terminal device 500-1 and the message sending request. Access service 411 then sends the message notification to message service 412. Message service 412 then queries location service 413 to determine the area where the channel of terminal device 500-1 is located as the designated area. In this example, the designated area includes the area to which server 600-2 belongs. Message service 412 of server 600-1 sends the message notification to message service 422 of server 600-2 based on the information of the specified area retrieved. Message service 422 of server 600-2 then broadcasts the message notification to access service 421 in the same area. Access service 421 then sends the message notification to terminal device 500-3 according to the stored correspondence between channels and terminal devices 500-3. Through this process, terminal device 500-3 finally receives the message sent by terminal device 500-1 on the same channel. Alternatively, message service 412 of server 600-1 can broadcast the message notification to access service 411 in the same area. Access service 411 sends the message notification to terminal device 500-1 according to the stored correspondence between channels and terminal devices 500-1, and terminal device 500-1 receives the message it sent in the system. In some embodiments, the message notification may carry multiple messages and indicate whether there are any remaining messages. When the terminal device 500-3 finally receives the message notification, the terminal device 500-3 can obtain the message list. If the message notification indicates that there are any remaining messages, the terminal device 500-3 will send a query request to the corresponding message service 422 to request that the remaining messages be retrieved locally.
[0106] It is understood that the specific implementation of each functional unit included in terminal device 500-1, terminal device 500-3, server 600-1, server 600-2, and communication system 400 can be found in the detailed descriptions in other embodiments of this application, and will not be repeated here.
[0107] It should be noted that the communication system 400 in this application embodiment does not limit the type, quantity, and relationship of the client, as well as the location service, message service, access service, synchronization service, and elastic load balancing service in the server. In some embodiments, a server may include one or more access services, one or more message services, and one or more location services. A client may access one access service, and one access service may serve multiple clients. One or more message services may correspond to one or more access services. A communication system may include one or more synchronization services, one or more elastic load balancing services, etc.
[0108] It should be noted that the division of modules or units in this embodiment is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the embodiments can be integrated into one unit, exist as separate physical units, or consist of two or more units integrated into one unit. The integrated units described above can be implemented in hardware, as software functional units, or a combination of hardware and software.
[0109] The structure of the terminal device 500 provided in the embodiments of this application is described below.
[0110] In this embodiment, the terminal device 500 can be movable or fixed in position; this embodiment does not impose any limitation. This embodiment also does not limit the specific type of the terminal device 500. For example, a terminal can be a smartphone, tablet, personal computer (PC), desktop computer, portable computer, laptop computer, handheld computer, netbook, game console, electronic whiteboard, smart screen (smart TV), drone, cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle system, Internet of Things (IoT) device, and terminals in industrial control, self-driving, remote medical, smart grid, transportation safety, smart city, smart home, or other types of electronic devices, etc. Terminal device 500 can be equipped with... system, system, system, system, The system (HarmonyOS, HOS) or other types of operating systems are not limited in this embodiment. In conjunction with the various embodiments herein, the terminal device 500 can be implemented as terminal 102, terminal 103, terminal 104, client 305, client 315, client 325, terminal 500-1, terminal 500-2, terminal 500-3, terminal 500-4, terminal 500-5, terminal 500-6, client 705, client 715, client 725, initiator client 813, participant client 814, participant client 825, participant client 835, first terminal, second terminal, third terminal, etc.
[0111] Figure 5 The structure of the terminal device 500 provided in the embodiment of this application is illustrated by way of example.
[0112] like Figure 5As shown, the terminal device 500 may include: one or more terminal device processors 501, memory 502, communication interface 503, receiver 505, transmitter 506, coupler 507, antenna 508, and terminal device interface 509. These components can be connected via bus 504 or other means; for example, they can be connected via bus 504. Wherein:
[0113] The terminal device processor 501 is the control center of the terminal device 500. It connects to various parts of the terminal device 500 through various interfaces and lines, and can be used to read and execute computer-readable instructions. Specifically, the terminal device processor 501 can call programs or data stored in the memory 502 and execute the instructions contained in the program to implement various functions of the terminal device 500. In some embodiments, the terminal device processor 501 may include one or more processing units. The terminal device processor 501 may also integrate an application processor and a modem processor. The application processor is mainly used to handle the operating system, user interface, and applications; the modem processor is mainly used to handle wireless communication. It is understood that the modem processor may not be integrated into the terminal device processor 501. In some embodiments, the terminal device processor 501 can also be used for wireless channel management, establishing and tearing down call and communication links, and providing cell handover control for users within the control area. Specifically, the terminal device processor 501 may include: an administration / communication module (AM / CM) (for the center of voice and information switching), a basic module (BM) (for call processing, signaling processing, radio resource management, radio link management and circuit maintenance), and a transcoder and submultiplexer (TCSM) (for multiplexing, demultiplexing and code conversion functions), etc.
[0114] Memory 502 is coupled to the terminal device processor 501 and is used to store various software programs and / or multiple sets of instructions. Specifically, memory 502 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 502 may store an operating system, such as an embedded operating system. Memory 502 may also store a network communication program, which can be used to communicate with one or more additional devices, one or more terminal devices, or one or more network devices. Memory 502 may also store a terminal device interface program, which can realistically display the content of the application through a graphical user interface and receive control operations from the terminal device on the application through input controls such as menus, dialog boxes, and buttons. In some embodiments of this application, memory 502 may be used to store the implementation program of the method provided in one or more embodiments of this application on the terminal device 500 side.
[0115] Terminal device 500 may include mobile communication modules and wireless communication modules, etc.
[0116] The mobile communication module can provide solutions for wireless communication applications such as 2G / 3G / 4G / 5G on terminal device 500. The mobile communication module may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module can receive electromagnetic waves via antenna 508, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 508.
[0117] Terminal device 500 may include a subscriber identification module (SIM) card interface for connecting SIM cards. A SIM card is a subscriber identification card for digital cellular mobile devices, used for mobile communication. The SIM card stores user information, encryption keys, and other data of the digital mobile device, allowing the mobile network to authenticate the user and encrypt their information. The SIM card can be inserted into or removed from the terminal device 500. Terminal device 500 may support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interfaces may support Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface simultaneously. These cards can be of the same or different types. The SIM card interface is also compatible with different types of SIM cards and external memory cards. Terminal device 500 interacts with the network through the SIM card to achieve functions such as voice calls and data communication.
[0118] The wireless communication module can provide solutions for wireless communication applications on terminal device 500, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module can be one or more devices integrating at least one communication processing module. The wireless communication module receives electromagnetic waves via antenna 508, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to the processor. The wireless communication module can also receive signals to be transmitted from the processor, perform frequency modulation and amplification, and then convert them into electromagnetic waves for radiation via antenna 508.
[0119] In some embodiments, one or more antennas 508 of the terminal device 500 are coupled to a mobile communication module and a wireless communication module, respectively, enabling the terminal device 500 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).
[0120] In some embodiments, the wireless communication module may include a Wi-Fi module for providing network access to the terminal device 500 in accordance with Wi-Fi related standard protocols. The terminal device 500 can access a wireless access point (AP) via the Wi-Fi module; alternatively, the terminal device 500 including the Wi-Fi module can also act as an AP, providing Wi-Fi network access to other electronic devices. It is understood that Wi-Fi related standard protocols may include IEEE 802.11ac, IEEE 802.11b, IEEE 802.11g / a, and / or IEEE 802.11n, etc. The Wi-Fi module can operate in the 5GHz band or the 2.4GHz band. The 5GHz band Wi-Fi module can provide a higher wireless transmission speed than the 2.4GHz band.
[0121] Communication interface 503 can be used by terminal device 500 to communicate with other communication devices, such as servers. Specifically, communication interface 503 can be a Long Term Evolution (LTE) (4G) communication interface, a 5G communication interface, or a New Radio (NR) communication interface. Not limited to wireless communication interfaces, terminal device 500 can also be configured with a wired communication interface 503, such as a local access network (LAN) interface to support wired communication, such as fiber optic communication. Transmitter 506 can be used to process the signals output by terminal device processor 501. Receiver 505 can be used to process the mobile communication signals received by antenna 508.
[0122] In some embodiments of this application, the transmitter 506 and receiver 505 can be considered as a wireless modem. In the terminal device 500, the number of transmitters 506 and receivers 505 can be one or more. The antenna 508 can be used to convert electromagnetic energy in a transmission line into electromagnetic waves in free space, or to convert electromagnetic waves in free space into electromagnetic energy in a transmission line. The coupler 507 is used to split the mobile communication signal received by the antenna 508 into multiple paths and distribute them to multiple receivers 505. Each antenna in the terminal device 500 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, an antenna used for mobile communication can be multiplexed as a diversity antenna for a wireless local area network. In other embodiments, the antenna 508 can be used in conjunction with a tuning switch.
[0123] The terminal device 500 may also include an input / output module. The input / output module is used to enable interaction between the terminal device 500 and other terminal devices / external environments, and may primarily include an audio input / output module, a button input module, and a display. Specifically, the input / output module may also include a camera, a touchscreen, and sensors, etc. All input / output modules communicate with the terminal device processor 501 through the terminal device interface 509.
[0124] It should be noted that, Figure 5 The terminal device 500 shown is merely one implementation of an embodiment of this application. In practical applications, the terminal device 500 may include more or fewer components, may combine two or more components, or combine some components, or split some components, or have different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware, and are not limited herein.
[0125] The structure of the server 600 provided in the embodiments of this application is described below.
[0126] The specific type of server 600 is not limited in the embodiments of this application. In conjunction with the embodiments herein, server 600 can be implemented as regional node 108, regional node 109, regional node 110, regional node 301, regional node 311, regional node 321, server 600-1, server 600-2, server 600-3, regional node 701, regional node 711, regional node 721, regional node 801, regional node 821, regional node 831, a first server, a second server, etc.
[0127] Figure 6 The structure of the server 600 provided in an embodiment of this application is illustrated by way of example.
[0128] like Figure 6 As shown, server 600 may include: processor 610, communication interface 620, memory 630, and bus 640. Processor 610, communication interface 620, and memory 630 can be interconnected and communicate with each other via bus 640.
[0129] Processor 610 may consist of one or more general-purpose processors, such as a central processing unit (CPU) or a combination of a CPU and hardware chips, a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc. The aforementioned hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The aforementioned PLDs may be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof.
[0130] The communication interface 620 is used for communication with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), core network, WLAN, etc. Specifically, the communication interface 620 can send messages, data, or instructions to the terminal device 500 or other servers, or receive messages, data, or instructions from the terminal device 500 or other servers, etc.
[0131] Memory 630 may include volatile memory, such as random access memory (RAM). Memory 630 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). Memory 630 may also include combinations of the above types.
[0132] The memory 630 stores executable program code, which the processor 630 executes to perform the message sending method and function provided in the embodiments of this application. The memory 630 can also cache data for the processor 610 to call in order to implement the message sending method and function provided in the embodiments of this application.
[0133] Bus 640 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Bus 640 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0134] It should be noted that, Figure 6 The server 600 shown is merely one implementation of an embodiment of this application. In practical applications, the server 600 may include more or fewer components, may combine two or more components, or combine some components, or split some components, or have different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware, and are not limited herein.
[0135] The following is combined with Figure 7This application introduces a message sending method. In this method, a location service is introduced into each regional node. Based on the region (i.e., regional node) accessed by the client and the client's channel joining action, the information of the client, corresponding channel, and corresponding region (i.e., regional node) is synchronized to the location service, constructing relationship data between each client, the joined channel, and the distributed region (i.e., regional node). This allows any regional node to determine which regions contain clients belonging to the same channel before sending messages from clients within its region to other regions. The message is then precisely sent to the specified region containing clients of the same channel, without needing to broadcast to all regions. Furthermore, the relationship between user clients and channels can be stored in the memory of the access service of each regional node. Therefore, it is not necessary to use a channel service to query the channel member list; instead, the access service directly sends messages of the corresponding channel to different clients based on the correspondence between channels and clients. This reduces network latency caused by inter-service calls and significantly improves the rate of sending large numbers of messages.
[0136] refer to Figure 7 , Figure 7 The diagram illustrates the message flow of an instant messaging system 700 provided in some embodiments of this application.
[0137] The instant messaging system 700 can be used for group chat, live streaming, web conferencing, online teaching, webinars, and online press conferences. The instant messaging system 700 can be implemented as a communication system 400, clients 705, 715, and 725 can be implemented as terminal devices 500, and regional nodes 701, 711, and 721 can be implemented as servers 600. Combined with... Figure 1 In one example, the instant messaging system 700 can be implemented as the web conference 101 in application scenario 100, the clients 705, 715, and 725 can be implemented as the terminals 102, 103, and 104 (in no particular order) in application scenario 100, and the regional nodes 701, 711, and 721 can be implemented as the regional nodes 108, 109, and 110 (in no particular order) in application scenario 100.
[0138] In this embodiment, the instant messaging system 700 includes one or more clients (or users) distributed across one or more regions. The instant messaging system 700 includes multiple region nodes, each corresponding to one or more regions. Each region node can provide functions and services to one or more clients within its corresponding region. In this embodiment, a region node can be implemented as a single server or as a server cluster composed of multiple servers; this embodiment does not impose any limitations on this. Within the same channel, any client sending a message can simultaneously send messages to clients in other regions within the same channel. Each region's region node (or server node) can include location services, messaging services, access services, etc. When any user client sends a message in its channel, it can transmit the message to the messaging service of its region through the region's access service. The messaging service of the region queries the relationship between channels and region nodes recorded in the location service and then forwards the message to a designated region node within the same channel in the instant messaging system. Upon receiving the message, the messaging service of the designated region node broadcasts the message to all access services within its region. Each access service stores the relationship between its clients and channels, and then, based on the queried channel-client relationship, distributes the message to the client corresponding to that channel.
[0139] The location service is used to record, save, and update the relationship between channels and regional nodes for querying by the message service; the message service is used to send and receive messages from other regional nodes in the system, as well as messages from access services within the local regional node; the access service is used to access clients within the local region and maintain long-term connections with clients, and also to record, save, and update the relationship between clients and channels. It should be noted that this application does not limit the type, number, or association of location services, message services, access services, and clients within a single regional node. In some embodiments, a regional node may include one or more access services, one or more message services, and one or more location services; a client may access one access service; an access service may serve multiple clients; and one or more message services may correspond to one or more access services, etc.
[0140] like Figure 7 As shown, the instant messaging system 700 includes clients 705, 715, and 725, as well as corresponding area nodes 701, 711, and 721. Assume client 705 is located in area A, client 715 in area B, and client 725 in area C. Areas A, B, and C are different areas. The server node for area A is area node 701, for area B it is area node 711, and for area C it is area node 721.
[0141] Client 705 joins the instant messaging system 700 through access area node 701, client 715 joins the instant messaging system 700 through access area node 711, and client 725 joins the instant messaging system 700 through access area node 721. Area node 701 includes access services 702, messaging services 703, and location services 704, etc.; area node 711 includes access services 712, messaging services 713, and location services 714, etc.; and area node 721 includes access services 722, messaging services 723, and location services 724, etc.
[0142] The location service in each regional node records, saves, and updates the relationship between channels and regional nodes for querying by the message service. Before sending a message from a client, the message service can query the location service to identify the regional nodes distributed by other clients in the same channel as the specified regional nodes. This allows the message service to send the message to the designated regional node based on the queried information, improving communication efficiency and saving system resources. For example, when message service 713 in regional node 711 receives a message from client 715, it queries location service 714 based on channel A (where client 715 is located) and finds that channel A is also associated with regional node 721. Message service 713 then sends the message to regional node 721. Message service 723 in regional node 721 receives the message and broadcasts it to the access service 722 in the same region. Access service 722 then distributes the message to client 725 based on the channel and client relationship.
[0143] In one example, the mapping table structure of the channel-region relationship stored in the location service can be as shown in Table 1 below. Table 1 shows an example of the correspondence between channel identity document (ID) and region ID, such as channel ID 1000000 corresponding to region IDs Region-0001 and Region-0002, and channel ID 1000001 corresponding to region IDs Region-0001 and Region-0003. That is, a channel can be distributed across multiple regions, and multiple channels can exist in a region. This embodiment does not limit the relationship between channels and regions. In some embodiments, each region and its region node have a one-to-one correspondence; therefore, the correspondence between channels and regions is also the correspondence between channels and region nodes.
[0144] Table 1
[0145] Channel ID Region ID 1000000 Region-0001 1000000 Region-0002 1000001 Region-0001 1000001 Region-0003
[0146] The message services in each regional node are responsible for message processing and routing, i.e., sending and receiving messages from other regional nodes in the instant messaging system 700, as well as messages from access services within their own region. For example, message services 703, 713, and 723 can send and receive messages from each other. For instance, message service 713 can send and receive messages from clients in its corresponding region through access service 712. Message service 713 can also receive messages from client 715 through access service 712 and send them to other regional nodes. Message service 713 can also forward messages received from other regions to client 715 through access service 712.
[0147] The access services in each regional node are used to provide access to one or more clients within their respective regions and maintain long-lived connections with those clients. For example, client 705 accesses regional node 701 through access service 702, client 715 accesses regional node 711 through access service 712, and client 725 accesses regional node 721 through access service 722. The access services also record, save, and update the relationships between clients and channels. Whenever a client joins or leaves a channel, the access service records, saves, and updates the relationship between that client and the channel. For the mapping between one or more clients and channels in the instant messaging system 700, the access service in each regional node can generate a client-channel mapping table and update it in real time, facilitating the querying of client-channel mappings when messages from the messaging service are sent to clients.
[0148] In one example, the mapping table structure of the channel-client relationship stored in the access service can be shown in Table 2 below. Table 2 shows an example of the correspondence between channel IDs and client IDs, such as channel ID 1000000 corresponding to client IDs User-0001 and User-0002, and channel ID 1000001 corresponding to client IDs User-0003 and User-0004. That is, each client can join a channel, and a channel can include multiple clients. This embodiment does not limit the relationship between channels and clients.
[0149] Table 2
[0150] Channel ID Client ID 1000000 User-0001 1000000 User-0002 1000001 User-0003 1000001 User-0004
[0151] Based on the channel-region mapping table in the location service and the channel-client mapping table in the access service, multiple client-channel-region correspondences can be obtained.
[0152] In addition to the location service(s), messaging service(s), and access service(s) described above, the instant messaging system 700 may also include other services such as a synchronization service (not shown) and an elastic load balancer (ELB) service (not shown). The synchronization service(s) can be responsible for data synchronization between regions, such as synchronizing the channels and region relationships updated by the location service in each region node. The ELB service(s) can be responsible for distributing traffic according to a specified allocation strategy, improving access efficiency in the system.
[0153] In this embodiment, client 715 and client 725 are members of the same channel, while client 705 and client 715 are not on the same channel. For example, client 715 and client 725 are on channel A, and client 705 is on channel B. When client 715 sends a message in channel A, the message will be transmitted to all clients in channel A, including client 715 and client 725.
[0154] When a client joins a system channel within a region, the request to join the channel is sent to the region's access service. The access service records the correspondence between the client and the joined channel, generating a mapping table between the client and the channel. Simultaneously, the access service can send the channel information currently logged into by the client to the location service of the region's nodes. The location service records, saves, and updates the association between channels and region nodes (i.e., regions). If the relationship data between channels and region nodes is updated, including additions, deletions, or changes, the location service of one region node can promptly synchronize this relationship data with the location services of other region nodes.
[0155] like Figure 7As shown, when client 715 joins channel A, it sends a request to join channel A to the access service 712 in the corresponding area node 711. The access service 712 can record the information of client 715 joining channel A and generate a list of the correspondence between client 715 and channel A. That is, the access service 712 can save the correspondence between client 715 and channel A. Then, the access service 712 can send the information of channel A to the location service 714 of the local area node 711. The location service 714 can record the correspondence between channel A and the local area node 711. Similarly, when client 725 joins channel A, it sends a request to join channel A to the access service 722 in the corresponding area node 721. The access service 722 can record the information of client 725 joining channel A and generate a list of correspondences between client 725 and channel A. That is, the access service 722 can save the correspondence between client 725 and channel A. Then, the access service 722 can send the channel A information to the location service 724 of the local area node 721. The location service 724 can record the correspondence between channel A and the node 721. Furthermore, when client 705 joins channel B, it sends a request to join channel B (737) to the access service 702 in the corresponding regional node 701. Access service 702 records the information about client 705 joining channel B and generates a list of the correspondence between client 705 and channel B. In other words, access service 702 (738) can save the correspondence between client 705 and channel B. Then, access service 702 can send the channel B information to the location service 704 of its local regional node 701. Location service 704 (739) can record the correspondence between channel B and its local regional node 701. When updates to the relationship data between channels and clients, and between channels and regional nodes are detected, including additions, deletions, and changes (e.g., client changing channels, client going offline, client coming online), the access service and location service of the corresponding regional node will promptly update the list of relationships between channels and clients, and between channels and regional nodes.
[0156] The location services 704 of area node 701, 714 of area node 711, and 721 of area node 721 can synchronize location information. This location information refers to the correspondence between one or more channels and area nodes in the instant messaging system 700. In this example, the channel-to-area node relationships that the location services of each area node can know include: channel A corresponds to area nodes 711 and 721, channel B corresponds to area node 701, etc.
[0157] Specific examples of message flow are as follows: Figure 7As shown, when client 715 sends one or more messages within channel A of its local area, client 715 first sends a message notification to access service 712 (741). This message notification includes the one or more messages sent by client 715 and the message sending request. Access service 712 then sends the message notification to message service 713 (742). Message service 713 then queries location service 714 (743) for the area node corresponding to channel A where client 715 resides as the designated area node. This designated area node represents the area nodes distributed across all clients in channel A. In this example, channel A corresponds to area nodes 711 and 721. Based on the retrieved designated area node information (area nodes 711 and 721), message service 713 sends the message notification to the message service of the designated area node. On one hand, the message service 713 of area node 711 can broadcast a message to all access services 712 in the area. Access services 712 then send a message to client 715 based on the stored correspondence between channel A and client 715. Client 715 receives the message it sent in the system. Simultaneously, the message service 713 of area node 711 can forward the message to the message service 722 of area node 721. Message service 722 then broadcasts the message to all access services 722 in the area. Access services 722 then send a message to client 725 based on the stored correspondence between channel A and client 725. Through this process, client 725 finally receives the message sent by client 715 in the same channel. Since there is no corresponding association between channel A and area node 701, the message service 713 of area node 711 will not send messages from client 715 to the message service 703 of area node 701. In some embodiments, the message notification may carry multiple messages and indicate whether there are any remaining messages. When the client finally receives the message notification, the client can obtain the message list. If the message notification indicates that there are any remaining messages, the client will send a query request to the corresponding message service to request that the remaining messages be retrieved to the local client.
[0158] It should be noted that, Figure 7 The illustrated embodiment is one implementation provided by this application, and is only for the purpose of more clearly illustrating the technical solution of this application, and does not constitute a limitation on other embodiments of this application. Other embodiments may include more or fewer clients and regional nodes, and more or fewer service functions, which are not limited here. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solution provided by this application is also applicable to solving similar technical problems.
[0159] The following describes the message logic interaction diagram of the cloud conferencing system 800 provided in the embodiments of this application.
[0160] This embodiment uses a cloud conferencing system 800 as an example to describe its message logic interaction. (Reference) Figure 8 As shown, the cloud conferencing system 800 includes regional nodes 801, 821, and 831, as well as initiator client 813, participant client 814, participant client 825, and participant client 835. Initiator client 813 and participant client 814 connect to regional node 801 through unified gateway 812, participant client 825 connects to regional node 821 through unified gateway 824, and participant client 835 connects to regional node 831 through unified gateway 834. The unified gateway acts as a bridge for communication between each client and its corresponding regional node. Regional nodes 801, 821, and 831 are responsible for message processing and forwarding in their respective regions.
[0161] Regional node 801 includes a conference system 802 and a messaging system 805. Conference system 802 includes a conference management system 803 and a conference control system 804. Messaging system 805 includes location service 806, channel service 807, message service 808, synchronization service 809, configuration service 810, and access service 811. The conference management system 803 manages the cloud conference system and coordinates task scheduling, such as creating conference message channels, inviting conference members, and allowing / disallowing members from joining. The conference control system 804 controls the cloud conference system, such as creating and disbanding the cloud conference system.
[0162] Location service 806 records, saves, and updates the relationship between channels and regions, which is then queried by message service 808 before sending a message to determine the region where the message needs to be sent. Location service 806 can obtain information about the channels included in its region from access service 811. Channel service 807 manages message channels. Message service 808 is responsible for message processing and routing services, i.e., sending and receiving messages from other regional nodes in cloud conferencing system 800, as well as messages from access service 811 in its own regional node 801. Message service 808 also queries location service 806 before sending a message from a client within its region to determine the region where the client's channel is located, using this information as the designated region. This allows message service 808 to send the message to the designated region based on the queried region information, improving communication efficiency and saving system resources. Synchronization service 809 is responsible for data synchronization between regional nodes, such as synchronizing the channel and region relationships updated in location service 806. Configuration service 810 is used to configure various parameters in message system 805. Access service 811 provides access to one or more clients (such as initiator client 813 and participant client 814) within the region and maintains long-lived connections with these clients. Access service 811 also records, saves, and updates the relationship between clients (such as initiator client 813 and participant client 814) and the channels they have joined. Whenever a client joins or leaves a channel within the region, access service 811 records, saves, and updates the relationship between that client and the channel. For the mapping relationship between one or more clients and channels within the region, access service 811 can generate a mapping table of client-channel relationships within the region and update it in real time, facilitating the querying of client-channel relationships when messages from message service 808 are sent to clients. Access service 811 is also used to send and receive messages with message service 808. Further functional descriptions can be found in the descriptions in the foregoing embodiments and will not be repeated here.
[0163] Similarly, regional node 821 includes conference system 822 and messaging system 823, and regional node 831 includes conference system 832 and messaging system 833. Conference system 822 and conference system 832 also include conference management system and conference control system, respectively. Messaging system 823 and messaging system 833 also include location service, channel service, message service, synchronization service, configuration service, access service, etc. Their functions are similar to those described for regional node 801 and will not be repeated here.
[0164] In one example, initiator client 813 and participant client 814 connect to area node 801. After initiating a meeting at 841, in response to receiving notification of the meeting initiation from initiator client 813, meeting system 802 creates a meeting channel at 842 and notifies message system 805. After creating the channel, initiator client 813 reports the channel to message system 805 at 844. Message system 805 can record initiator client 813 and the channels it has joined, and synchronization service 809 can synchronize the channel-area relationship data list 848 stored in location service 806 to the location services of other area nodes. Through area node 801, initiator client 813 sends an invitation to participant client 814 at 843 to join the meeting. In response, after inviting participant client 814 to join the channel, it reports the channel to message system 805 at 845. Message system 805 can record participant client 814 and the channels it has joined. Subsequently, when a client sends a message, all clients in the same channel will receive the message. Initiator client 813 sends and receives messages via area node 801 and unified gateway 812 to 846, while participant client 814 sends and receives messages via area node 801 and unified gateway 812 to 847. When message service 808 in area node 801 receives a message from initiator client 813, message service 808 queries location service 806 to see which other associated area nodes are in the channel where initiator client 813 is located. Then, message service 808 can forward the message to these associated area nodes 848. After receiving the message, message services of other area nodes broadcast the message to the access service of their own area node. Then, the access service distributes the message to the clients in the area according to the correspondence between the channel and the client.
[0165] Figure 8 The illustrated embodiment is one implementation provided by this application, and is only for the purpose of more clearly illustrating the technical solution of this application, and does not constitute a limitation on other embodiments of this application.
[0166] Combination Figure 8 The following describes the message timing flow 900 of the cloud conferencing system provided by the embodiments of this application. Figure 9 This is a schematic diagram of message sequence flow 900.
[0167] refer to Figure 9 The message sequence flow 900 of the cloud conferencing system may include the following process steps, but is not limited to: Figure 9 The process steps shown, message timing process 900 may include fewer or more process steps, and in this embodiment there is no limitation on the implementation order of the included process steps.
[0168] The cloud conferencing system supports multiple users sending and receiving chat messages simultaneously during video communication. In this embodiment, the cloud conferencing system includes an initiator client, one or more participant clients, and one or more regional nodes. Each regional node includes a meeting management system and a messaging system. The messaging system includes access services, messaging services, channel services, and location services. The meeting management system manages the cloud conferencing system and coordinates task scheduling, such as creating meeting message channels, inviting meeting members, and allowing / disallowing member participation. The access service provides access to one or more clients (such as the initiator client and participant clients) within the region and maintains long-lived connections with these clients. The access service also records, saves, and updates the relationship between clients (such as the initiator client and participant clients) and the channels they have joined. Whenever a client joins or leaves a channel within the region, the access service records, saves, and updates the relationship between that client and the channel. For the mapping between one or more clients and channels within the region, the access service can generate a mapping table of client-channel relationships within the region and update it in real time, facilitating the querying of client-channel relationships when messages from the messaging service are sent to clients. The access service also sends and receives messages with the messaging service. The messaging service is responsible for message processing and routing, specifically sending and receiving messages from other regional nodes in the cloud conferencing system, as well as messages from access services within the local node. Before sending a message from a client within the local area, the messaging service queries the location service to determine the regions where the client's channel is located, thus specifying the region. This allows the messaging service to send the message to the designated region based on the retrieved region information, improving communication efficiency and saving system resources. The channel service manages message channels. The location service records, saves, and updates the relationship between channels and regions, allowing the messaging service to query this relationship before sending messages to determine the regions where messages need to be sent. The location service can obtain information about the channels included in the local region from the access service. Further functional descriptions can be found in the foregoing embodiments and will not be repeated here.
[0169] 901, the initiating client sends a request to the meeting management system to create a meeting.
[0170] In response to the request from the initiating client to create a meeting, the meeting management system creates the meeting.
[0171] 902, The meeting management system creates a meeting message channel.
[0172] The management system creates message channels by calling the channel service interface of the message system.
[0173] 903, the meeting management system adds meeting members.
[0174] Based on the data of the participants retrieved by the initiator's client, the meeting management system adds these meeting participants to the message channel, and the channel service manages multiple message channels.
[0175] 904 indicates that the meeting management system has sent a meeting notification to the participants' client applications.
[0176] The membership management system will send invitations to each member's terminal.
[0177] 905, attendee client joins meeting.
[0178] Upon receiving the invitation, the participant's client joins the meeting.
[0179] 906, the participant's client reports the meeting message channel they have joined to the access service.
[0180] Upon joining a meeting, the client reports the meeting information it has joined to the messaging system.
[0181] 907, Access Service records the relationship between the client and the channel.
[0182] The messaging system's access server establishes the mapping data between conference message channels and clients.
[0183] 908, the access service reports the relationship between the channel and the region logged in by the client to the location service.
[0184] The access service sends the channel information and location information that the client has joined to the location service.
[0185] 909, Location Service synchronizes the regional information of the channel distribution.
[0186] The location service synchronizes the relationship data between conference channels and regions to other regions via a synchronization service. Once synchronization is complete, the regional distribution data of the conference channels is established.
[0187] 910, Participant clients send messages during the meeting.
[0188] The message first reaches the message system's access service.
[0189] 911, the access service sends a message to the message service.
[0190] 912, the messaging service broadcasts messages within the region.
[0191] 913, The message service broadcasts messages to the access service within this region.
[0192] The messaging service broadcasts this message to all access services in this region.
[0193] 914, Access Service queries the list of clients for the current conference channel.
[0194] The access service sends messages to the client based on the relationship data between the channel and the client.
[0195] 915, the access service sends a message notification to the participant's client, carrying N messages.
[0196] 916. The participant's client determines whether there are any remaining messages based on the identifier in the message notification.
[0197] When the client receives a message notification, it retrieves the message list and checks if there are any remaining messages as indicated in the notification. If so, it sends a query request to the message server to retrieve the remaining messages to its local machine.
[0198] 917. If it is determined that there are remaining messages, then the participant's client will pull the remaining messages from the message service.
[0199] 918, in response to the request to retrieve the remaining messages, the message service returns the remaining messages to the participant clients.
[0200] 919, the message service queries the location service for the regions where the meeting members are distributed.
[0201] 920, The location service returns the query results of the distribution area of the meeting members to the message service.
[0202] While the messaging service broadcasts messages to the access services in this region, it also obtains the regions where the conference channel is distributed from the location service and forwards the messages to these regions.
[0203] 921, a message service that forwards messages to other specified areas.
[0204] Based on the query results, the messaging service uses the region corresponding to the sender's channel as the designated region.
[0205] 922, the messaging service in each designated area broadcasts messages to the participating clients within that area.
[0206] Refer to 913-918. The message server in each region broadcasts the message to all access servers in the region. The access servers, based on the member list information of this channel they have stored, send the message notification to these clients belonging to this channel. The notification carries N messages and indicates whether there are any remaining messages. If so, they send a query request to the message server to retrieve the remaining messages to their local machine.
[0207] The above embodiments are merely for illustrating the technical solutions of this application more clearly and do not constitute a limitation on this application. Other embodiments may include more or fewer processes or steps, or the embodiments may be combined or separated to obtain more implementation methods, and the embodiments of this application do not limit this.
[0208] The following is a flowchart 1000 of the message sending method provided by the embodiments of this application.
[0209] This application proposes a message sending method for cross-regional and cross-cloud instant messaging systems. This method addresses the problems of wasted system resources caused by indiscriminate message broadcasting, especially in scenarios with a large number of users, and the low efficiency of downlink message sending. In this method, location services are introduced into the regional nodes of each region. Based on the regional nodes accessed by the client and the client's joining of a channel, information about the client, its corresponding channel, and its corresponding regional nodes is synchronized to the location services, constructing relationship data between each client and the joined channel and distributed regional nodes. This allows any regional node to determine which regions the client's channel is distributed in before sending messages from clients within its region to other regional nodes—that is, which regions contain clients of the same channel—and then accurately send the message to the specified regional nodes containing clients of the same channel, without broadcasting to all regional nodes. Furthermore, the client-channel relationship can be stored in the memory of the access service of each regional node. Therefore, instead of using a channel service to query the channel member list, the access service directly sends messages of the corresponding channel to different clients based on the correspondence between channels and clients. This reduces network latency caused by inter-service calls and significantly improves the rate of sending large numbers of messages.
[0210] The method flowchart 1000 for sending messages may include the following processes, and the implementation order of the following processes is not limited in this embodiment.
[0211] 1001, The first terminal reports to the first server that it has joined the first channel.
[0212] Among them, the first terminal, the first server, the second terminal, and the second server belong to the same communication system. The first terminal is located in the first area, the first server is a server node in the first area, the second terminal is located in the second area, and the second server is a server node in the second area.
[0213] More specifically, the first server includes a first access service, a first message service, a first location service, and a first synchronization service, and the second server includes a second access service, a second message service, a second location service, and a second synchronization service.
[0214] 1002, The first server stores the correspondence between the first terminal and the first channel.
[0215] In response to the first terminal joining the first channel, the first access service saves the correspondence between the first channel and the first terminal.
[0216] 1003, The first server stores the correspondence between the first channel and the first region.
[0217] The first location service stores the mapping between the first channel and the first region. The first location service obtains the mapping between the first channel and the first region from the first access service.
[0218] 1004, the second terminal reports to the second server that it has joined the first channel.
[0219] 1005, The second server stores the correspondence between the second terminal and the first channel.
[0220] In response to the second terminal joining the first channel, the second access service saves the correspondence between the first channel and the second terminal.
[0221] 1006, The second server stores the correspondence between the first channel and the second region.
[0222] The second location service stores the mapping between the first channel and the second area. The second location service obtains the mapping between the first channel and the second area from the second access service.
[0223] 1007, Synchronize the corresponding channel and region information between the first server and the second server.
[0224] When server nodes in each region detect a change in the correspondence between channels and regions, they promptly synchronize this information with the location services in other regions. Specifically, the first synchronization service synchronizes the correspondence between the first channel and the first region to the second location service. The second synchronization service then synchronizes the correspondence between the first channel and the second region to the first location service.
[0225] 1008, the first terminal sends a message to the first server.
[0226] The first terminal sends a message to the first access service. The first access service sends a message to the first messaging service.
[0227] 1009, The first server queries the correspondence information between the channel and the region, and determines that there is a correspondence between the first channel and the second region.
[0228] The First Message Service queries the First Location Service for the corresponding information of channels and regions.
[0229] 1010, the first server sends this message to the second server.
[0230] Based on the correspondence between the first channel and the second region stored in the first location service, the first message service sends a message to the second message service.
[0231] 1011, the second server broadcasts a message within this area.
[0232] The second message service broadcasts a message to the second access service.
[0233] 1012, the second server sends the message to the second terminal according to the correspondence between the second terminal and the first channel.
[0234] Based on the correspondence between the first channel and the second terminal stored in the second access service, the second access service sends a message to the second terminal.
[0235] 1013, the first server broadcasts a message within this region.
[0236] While the first server sends a message to the second server, the first message service broadcasts a message to the first access service based on the correspondence between the first channel and the first region stored in the first location service.
[0237] 1014, the first server sends the message to the first terminal according to the correspondence between the first terminal and the first channel.
[0238] Based on the correspondence between the first channel and the first terminal stored in the first access service, the first access service sends a message to the first terminal.
[0239] In some embodiments, the communication system further includes a third terminal and a third server. The third terminal is located in a third region, and the third server is a server node in the third region. The channel joined by the third terminal is the second channel, and the third server stores the correspondence between the second channel and the third region. The third server synchronizes the correspondence between the second channel and the third region to the first server. In response to not finding a correspondence between the first channel and the third region, the first server determines not to send a message to the third server.
[0240] The first terminal, second terminal, and third terminal described above can be implemented as terminal devices, clients, etc. in the foregoing embodiments. The first server and second server can be implemented as regional nodes, servers, etc. in the foregoing embodiments. More detailed functional implementation descriptions can be found in the foregoing embodiments, and will not be repeated here.
[0241] The above embodiments are merely for illustrating the technical solutions of this application more clearly and do not constitute a limitation on this application. Other embodiments may include more or fewer processes or steps, or the embodiments may be combined or separated to obtain more implementation methods, and the embodiments of this application do not limit this.
[0242] As can be seen from the foregoing embodiments, the embodiments of this application can introduce location services into the regional nodes of each region. Based on the regional node accessed by the client and the client's joining of a channel, the information of the client, the corresponding channel, and the corresponding regional node is synchronized to the location service, constructing relationship data between each client and the joined channel and distributed regional nodes. This allows any regional node to determine which regions the client's channel is distributed in, i.e., which regions contain clients of the same channel, before sending messages or instructions from clients in its region to other regional nodes. Then, the message is precisely sent to the designated regional node containing clients of the same channel, without needing to broadcast to all regional nodes. This reduces invalid inter-regional message forwarding and lowers bandwidth and server resource consumption.
[0243] Furthermore, the relationship between clients and channels can be stored in the memory of the access service in each regional node. Therefore, instead of using a channel service to query the channel member list, the access service directly sends messages for the corresponding channel to different clients based on the correspondence between channels and clients. This reduces network latency caused by inter-service calls and significantly improves the rate of sending large numbers of messages. This is particularly useful for addressing the problem of high system resource consumption caused by indiscriminate message broadcasting in application scenarios with a large number of users, as well as the problem of low downlink message sending efficiency. In this embodiment, by storing the client-channel relationship data in the access service, messages can be broadcast quickly with high efficiency, low latency, and low resource consumption. Moreover, the message delivery uses a push-pull combination method, resulting in good message sending efficiency in both low-frequency and high-volume message sending scenarios.
[0244] It is understood that by implementing the message sending methods provided in the various embodiments of this application and in conjunction with them, messages can be accurately forwarded to designated areas, reducing invalid message broadcasts, improving message forwarding efficiency, and reducing system resource consumption. Furthermore, access and query functions can be merged into a single service, reducing network latency caused by inter-service calls, lowering message transmission time, increasing message delivery rate, and saving communication resources.
[0245] Embodiments of this application also provide a chip, which may include an input interface, an output interface, and a processing circuit. In the embodiments of this disclosure, the input interface and output interface can be used to complete the interaction of signaling or data, and the processing circuit can be used to generate and process the signaling or data information.
[0246] Embodiments of this application also provide a chip system including a processor for supporting a computing device to implement the functions involved in any of the above embodiments. In one possible design, the chip system may further include a memory for storing necessary program instructions and data, which, when executed by the processor, cause the device on which the chip system is installed to implement the methods involved in any of the above embodiments. Exemplarily, the chip system may consist of one or more chips, or may include chips and other discrete devices.
[0247] Embodiments of this application also provide a processor for coupling with a memory storing instructions that, when executed by the processor, cause the processor to perform the methods and functions involved in any of the above embodiments.
[0248] Embodiments of this application also provide a computer-readable storage medium having computer instructions or program code stored thereon, which, when executed by a processor, cause the processor to perform the methods and functions involved in any of the above embodiments. A computer-readable medium can be any tangible medium that contains or stores a program for or relating to an instruction execution system, apparatus, or device. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. More detailed examples of computer-readable storage media include electrical connections with one or more wires, magnetic media (e.g., disks, floppy disks, hard disks, magnetic tapes, magnetic storage devices), optical media (e.g., optical storage devices, DVDs), semiconductor media (e.g., solid-state drives), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), or any suitable combination thereof.
[0249] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. Embodiments of this application also provide at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. This computer program product includes one or more computer-executable instructions, such as instructions included in a program module, which execute in a device on a target's real or virtual processor to perform the processes, methods, and functions involved in any of the above embodiments. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0250] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the processes, methods, and functions described in the above embodiments. Typically, a program module includes routines, programs, libraries, objects, classes, components, data structures, etc., that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of program modules can be combined or divided as needed. The machine-executable instructions for the program module can be executed locally or in a distributed device. In a distributed device, the program module can reside in both local and remote storage media.
[0251] Computer program code used to implement the methods of this disclosure may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that when executed by the computer or other programmable data processing apparatus, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be performed. The program code may be executed entirely on a computer, partially on a computer, as a stand-alone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server. In the context of this disclosure, the computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, etc. Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0252] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software, which can be executed by a controller, microprocessor, or other computing device. Although various aspects of the embodiments of this disclosure are shown and described as block diagrams, flowcharts, or represented using some other illustration, it should be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as, as non-limiting examples, in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0253] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to well explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
[0254] The above detailed embodiments further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
[0255] It should be noted that although embodiments of this application have been described above with reference to the accompanying drawings, these embodiments are not independent of each other, and they can be combined to obtain other embodiments. The methods, situations, categories, and classifications of embodiments in this application are only for the convenience of description and should not constitute a special limitation. Various methods, categories, situations, and features in embodiments can be combined with each other if logically consistent. The various embodiments of this application can be arbitrarily combined to achieve different technical effects. The embodiments of this application will not list various combinations.
[0256] Furthermore, although the operation of the methods of this disclosure is described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps. It should also be noted that the features and functions of two or more devices according to this disclosure may be embodied in one device. Conversely, the features and functions of one device described above may be further divided and embodied by multiple devices.
[0257] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
Claims
1. A message sending method characterized by, The application is applied to a communication system, which comprises a first server, a first terminal, a second server and a second terminal. The first terminal is located in a first area, the first server is a server node of the first area, the second terminal is located in a second area, and the second server is a server node of the second area. The method comprises the following steps: The first terminal sends a message to the first server. The first terminal joins a first channel, the second terminal joins the first channel, the second server stores a corresponding relationship between the first channel and the second area, and the second server stores a corresponding relationship between the first channel and the second terminal. The second server synchronizes the corresponding relationship between the first channel and the second area to the first server. According to the corresponding relationship between the first channel and the second area, the first server sends the message to the second server. According to the corresponding relationship between the first channel and the second terminal, the second server sends the message to the second terminal.
2. The method of claim 1, wherein, The first server stores a corresponding relationship between the first channel and the first area, and the first server stores a corresponding relationship between the first channel and the first terminal. The method further comprises the following steps: According to the corresponding relationship between the first channel and the first area, the first server sends the message to the first server. According to the corresponding relationship between the first channel and the first terminal, the first server sends the message to the first terminal.
3. The method of claim 2, wherein, The method further comprises the following steps: In response to the first terminal joining the first channel, the first server stores the corresponding relationship between the first channel and the first terminal. In response to the second terminal joining the first channel, the second server stores the corresponding relationship between the first channel and the second terminal.
4. The method according to any one of claims 1 to 3, characterized in that, The first server comprises a first access service, a first message service and a first location service, the second server comprises a second access service, a second message service, a second location service and a synchronization service, and the method comprises the following steps: The first terminal sends the message to the first access service. The second location service stores the corresponding relationship between the first channel and the second area, the second access service stores the corresponding relationship between the first channel and the second terminal, and the second location service obtains the corresponding relationship between the first channel and the second area from the second access service. The synchronization service synchronizes the corresponding relationship between the first channel and the second area to the first location service. The first access service sends the message to the first message service. According to the corresponding relationship between the first channel and the second area stored by the first location service, the first message service sends the message to the second message service. The second message service broadcasts the message to the second access service. According to the corresponding relationship between the first channel and the second terminal stored by the second access service, the second access service sends the message to the second terminal.
5. The method of claim 4, wherein, The first location service stores the correspondence between the first channel and the first region, the first access service stores the correspondence between the first channel and the first terminal, the first location service acquires the correspondence between the first channel and the first region from the first access service, and the method further comprises: According to the correspondence between the first channel and the first region stored by the first location service, the first message service broadcasts the message to the first access service; According to the correspondence between the first channel and the first terminal stored by the first access service, the first access service sends the message to the first terminal.
6. The method of claim 5, wherein, The synchronization service is a second synchronization service, and the first server further comprises a first synchronization service, and the method further comprises: The first synchronization service synchronizes the correspondence between the first channel and the first region to the second location service.
7. The method according to any one of claims 1 to 6, characterized in that, The communication system further comprises a third terminal and a third server, the third terminal is located in a third region, the third server is a server node of the third region, a channel joined by the third terminal is a second channel, and the third server stores the correspondence between the second channel and the third region, and the method further comprises: The third server synchronizes the correspondence between the second channel and the third region to the first server; In response to not querying the correspondence between the first channel and the third region, the first server determines not to send the message to the third server.
8. A message sending method characterized by, Applied to a first server, the method comprises: The first server receives a message of a first terminal, wherein the first terminal is located in a first region, the first server is a server node of the first region, a second terminal is located in a second region, a second server is a server node of the second region, a channel joined by the first terminal is a first channel, a channel joined by the second terminal is the first channel, and the second server stores the correspondence between the first channel and the second region; The first server receives the correspondence between the first channel and the second region synchronized by the second server; According to the correspondence between the first channel and the second region, the first server sends the message to the second server.
9. The method of claim 8, wherein, The first server stores the correspondence between the first channel and the first region, and the first server stores the correspondence between the first channel and the first terminal, and the method further comprises: According to the correspondence between the first channel and the first region, the first server sends the message to the first server; According to the correspondence between the first channel and the first terminal, the first server sends the message to the first terminal.
10. The method of claim 9, wherein, Further comprising: In response to the first terminal joining the first channel, the first server stores the correspondence between the first channel and the first terminal. Further comprising: In response to the first terminal joining the first channel, the first server stores the correspondence between the first channel and the first terminal.
11. The method according to any one of claims 8-10, characterized in that, The first server comprises a first access service, a first message service and a first location service, the second server comprises a second access service, a second message service, a second location service and a synchronization service, and the method comprises: The first access service receives the message of the first terminal, and the second location service stores the correspondence between the first channel and the second region. The first location service receives the correspondence between the first channel and the second region synchronized by the synchronization service. The first access service sends the message to the first message service. The first message service sends the message to the second message service according to the correspondence between the first channel and the second region stored by the first location service.
12. The method of claim 11, wherein, The first location service stores the correspondence between the first channel and the first region, and the first access service stores the correspondence between the first channel and the first terminal. The first message service broadcasts the message to the first access service according to the correspondence between the first channel and the first region stored by the first location service. The first access service sends the message to the first terminal according to the correspondence between the first channel and the first terminal stored by the first access service.
13. The method of claim 12, wherein, The synchronization service is a second synchronization service, and the first server further comprises a first synchronization service. The first synchronization service synchronizes the correspondence between the first channel and the first region to the second location service.
14. The method according to any one of claims 8-13, characterized in that, The method further comprises: The first server receives the correspondence between a second channel and a third region synchronized by a third server, wherein the third server is a server node of the third region, and the third server stores the correspondence between the second channel and the third region. In response to the fact that no correspondence between the first channel and the third region is found, the first server determines not to send the message to the third server.
15. A server for messaging, the server comprising: The method comprises: An access service is configured to receive a message of a first terminal, wherein the first terminal is located in a first region, the server is a server node of the first region, a second server is a server node of a second region, a channel joined by the first terminal is a first channel, and the second server stores a correspondence between the first channel and the second region. The access service is further configured to send the message to a message service. The message service is configured to receive the message of the access service. A location service is configured to receive the correspondence between the first channel and the second region synchronized by the second server. The message service is further configured to send the message to the second server according to the correspondence between the first channel and the second region stored by the location service.
16. The server of claim 15, wherein the location service is further configured to store the correspondence between the first channel and the first region. the access service is further configured to store the correspondence between the first channel and the first terminal. the location service is further configured to obtain the correspondence between the first channel and the first region from the access service. the access service is further configured to send the correspondence between the first channel and the first region to the location service. the message service is further configured to broadcast the message to the access service according to the correspondence between the first channel and the first region stored by the location service. the access service is further configured to receive the message from the message service. the access service is further configured to send the message to the first terminal according to the correspondence between the first channel and the first terminal stored by the access service. Further comprising:
17. The server of claim 16, wherein, a synchronization service configured to synchronize the correspondence between the first channel and the first region to a second server.
18. The server of any one of claims 15-17, wherein the location service is further configured to receive a correspondence between a second channel and a third region synchronized by a third server, wherein the third server is a server node for the third region, and the third server stores the correspondence between the second channel and the third region. the message service is further configured to determine not to send the message to the third server in response to not finding the correspondence between the first channel and the third region. The server includes a memory and a processor coupled to the memory, the memory stores executable instructions, and the processor is configured to invoke the executable instructions to cause the server to perform the method of any one of claims 8-14. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the method of any one of claims 8-14.
19. A server, characterized by 21. A computer program product, the computer program product having computer-executable instructions embodied thereon that, when executed, implement the method of any one of claims 8-14.
20. A computer-readable storage medium, characterized in that, 22. A chip, comprising a processing circuit configured to perform the method of any one of claims 8-14.
Citation Information
Patent Citations
Method and system for reducing broadcasting delay in P2P (Peer-to-Peer) live broadcasting system
CN102055808A
Method and system employing edge service node for accelerating streaming application
CN104394221A