Method, device, equipment and storage medium for transmitting remote messages
By working together with the replication and distribution servers, a cross-regional invisible channel is formed, which solves the problems of latency and network resource consumption in remote message transmission and realizes fast and low-consumption remote message transmission.
Patent Information
- Application Number
- CN202310451065.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-04-24
AI Technical Summary
In existing technologies, there are problems of latency and network resource consumption when transmitting messages across different locations. This is especially true when transmitting messages across regions and networks, where the second device needs to access the message cluster in the region where the first device is located, resulting in increased latency and excessive network resource consumption.
By using a replication server and a distribution server as a bridge, the replication server receives remote transmission configuration information in the source area and encapsulates the target remote message. The target message is decapsulated by the distribution server and transmitted to the second device in the target message cluster in the destination area, forming an invisible channel across regions, reducing network resource consumption and latency.
It enables rapid transmission of messages to remote locations, reduces cross-regional transmission latency and network resource consumption, and improves transmission efficiency by obtaining remote messages through local access.
Smart Images

Figure CN116527685B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mobile Internet technology, and in particular to a method, apparatus, device and storage medium for transmitting messages across different locations. Background Technology
[0002] With the development of social communication technology and the increase in business volume, the speed of message transmission between users has greatly affected the efficiency of user communication and user experience. In today's daily life, users are often located in different areas, and realizing the transmission of messages across different locations has become a focus and breakthrough point for researchers.
[0003] In the existing technology, users are located in different regions, and each region has a message cluster that serves its own purpose. When the first device sends a target remote message to the second device, it will transmit the target remote message to the message cluster in the region where the first device is located. Then, the message cluster will send the target remote message across regions to the second device, so that the second device can obtain the target remote message.
[0004] Therefore, it is evident that for the second device to obtain the target remote message, it needs to cross regions and networks, which will cause delays in the process. At the same time, since the transmission of the target remote message is achieved across networks, and each time the first device and the second device transmit the target remote message, cross-network transmission is required, the second device must access the message cluster in the region where the first device is located across networks, which will increase the consumption of network resources. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for transmitting messages across different locations, in order to solve problems such as delay and network resource consumption when transmitting messages to a target location.
[0006] In a first aspect, this application provides a method for transmitting messages across different locations. The method is applied to a replication server deployed in a source region, the replication server being communicatively connected to a distribution server deployed in a destination region, and the method comprising:
[0007] Receive remote transmission configuration information sent by the operating equipment; the remote transmission configuration information includes source area message middleware information and destination area message middleware information; the source area message middleware information includes target message cluster information of the source area; the destination area message middleware information includes target message cluster information of the destination area;
[0008] According to the target message cluster information of the source region, the target remote message sent by the target message cluster of the source region is received, and the target remote message and the remote transmission configuration information are encapsulated to obtain the target message; the target remote message sent by the target message cluster of the source region is generated by the first device and sent to the target message cluster of the source region; the first device is deployed in the source region;
[0009] The target message is sent to the distribution server so that the distribution server can deseal the target message, obtain the target remote message and the remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, which is deployed in the destination area.
[0010] Secondly, this application provides a method for transmitting messages across different locations. The method is applied to a distribution server deployed in a destination region, the distribution server being communicatively connected to a replication server deployed in a source region, and the method comprising:
[0011] The replication server receives a target message sent by the replication end server. The target message is formed by the replication end server encapsulating a target remote message and remote transmission configuration information. The target remote message is generated by a first device and sent to a target message cluster in the source region. The first device is deployed in the source region. The remote transmission configuration information is sent to the replication end server by the operating equipment. The remote transmission configuration information includes source region message middleware information and destination region message middleware information. The source region message middleware information includes target message cluster information of the source region. The destination region message middleware information includes target message cluster information of the destination region. The target remote message is received by the replication end server from the target message cluster in the source region based on the target message cluster information of the source region.
[0012] Deseal the target message to obtain the target remote message and the remote transmission configuration information;
[0013] The target remote message is sent to the target message cluster in the target area according to the target message cluster information of the target area. The target remote message is used to instruct the target message cluster in the target area to send the target remote message to a second device, which is deployed in the target area.
[0014] Thirdly, this application provides a device for transmitting remote messages. The device is located on a replication server, which is deployed in a source region. The replication server is communicatively connected to a distribution server, which is deployed in a destination region. The device includes:
[0015] The first receiving module is used to receive remote transmission configuration information sent by the operating equipment; the remote transmission configuration information includes source area message middleware information and destination area message middleware information; the source area message middleware information includes target message cluster information of the source area; the destination area message middleware information includes target message cluster information of the destination area.
[0016] The second receiving module is used to receive the target remote message sent by the target message cluster of the source region according to the target message cluster information of the source region. The encapsulation module is used to encapsulate the target remote message and the remote transmission configuration information to obtain the target message. The target remote message sent by the target message cluster of the source region is generated by the first device and sent to the target message cluster of the source region. The first device is deployed in the source region.
[0017] The first sending module is used to send the target message to the distribution server, so that the distribution server can deseal the target message, obtain the target remote message and the remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, which is deployed in the destination area.
[0018] Fourthly, this application provides a device for transmitting remote messages. The device is located at a distribution server, which is deployed in a destination area. The distribution server is communicatively connected to a replication server, which is deployed in a source area. The device includes:
[0019] The third receiving module is used to receive the target message sent by the replication server. The target message is encapsulated by the replication server into a target remote message and remote transmission configuration information. The target remote message is generated by the first device and sent to the target message cluster in the source region. The first device is deployed in the source region. The remote transmission configuration information is sent to the replication server by the operating equipment. The remote transmission configuration information includes source region message middleware information and destination region message middleware information. The source region message middleware information includes target message cluster information of the source region. The destination region message middleware information includes target message cluster information of the destination region. The target remote message is received by the replication server from the target message cluster in the source region based on the target message cluster information of the source region.
[0020] The deblocking module is used to deblock the target message to obtain the target remote message and the remote transmission configuration information;
[0021] The second sending module is used to send the target remote message to the target message cluster in the target area according to the target message cluster information of the target area. The target remote message is used to instruct the target message cluster in the target area to send the target remote message to the second device, which is deployed in the target area.
[0022] Fifthly, this application provides a replication server, including: a processor, and a memory transceiver communicatively connected to the processor;
[0023] The memory stores computer-executed instructions; the transceiver is used for sending and receiving data.
[0024] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect or any alternative described above.
[0025] Sixthly, this application provides a distribution server, including: a processor, and a memory transceiver communicatively connected to the processor;
[0026] The memory stores computer-executed instructions; the transceiver is used for sending and receiving data.
[0027] The processor executes computer execution instructions stored in the memory to implement the method as described in the second aspect above or any alternative method.
[0028] In a seventh aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect, the second aspect, or any alternative method described above.
[0029] Eighthly, this application provides a computer program product including a computer program that, when executed by a processor, implements the methods described in the first aspect, the second aspect, or any alternative described above.
[0030] This application provides a method, apparatus, device, and storage medium for transmitting remote messages. The method is applied to a replication server deployed in a source region, which is communicatively connected to a distribution server deployed in a destination region. The method includes: receiving remote transmission configuration information sent by an operating device; the remote transmission configuration information includes source region message middleware information and destination region message middleware information; the source region message middleware information includes target message cluster information for the source region; the destination region message middleware information includes target message cluster information for the destination region; and receiving target remote messages sent by the target message cluster in the source region according to the target message cluster information of the source region. The message encapsulates the target remote message and remote transmission configuration information to obtain the target message; the target remote message sent by the target message cluster in the source area is generated and sent to the target message cluster in the source area by the first device; the first device is deployed in the source area; the target message is sent to the distribution server so that the distribution server can decapsulate the target message, obtain the target remote message and remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, and the second device is deployed in the destination area.In this application, the method is applied to a replication server, which is communicatively connected to a distribution server. The replication server is deployed in the source region, and the distribution server is deployed in the destination region. First, the replication server receives remote transmission configuration information sent by the operating equipment. Since the remote transmission configuration information includes target message cluster information from the source region, the replication server receives target remote messages sent by the target message cluster in the source region based on the target message cluster information. The target remote messages are generated and sent to the target message cluster in the source region by a first device deployed in the source region. Then, the replication server will process the target remote messages... The message and remote transmission configuration information are encapsulated to obtain the target message. Encapsulation ensures higher security for the target message during cross-regional and cross-network transmission and guarantees faster delivery to the distribution server within the destination area. The target message can instruct the distribution server to decapsulate and re-obtain the target remote message and remote transmission configuration information. The remote transmission configuration information also includes target message cluster information for the destination area. Furthermore, it can instruct the distribution server to send the target remote message to the target message cluster in the destination area based on the target message cluster information. The target remote message also instructs the target message cluster in the destination area to send the target message to the target message cluster in the destination area. The remote message is sent to a second device, which is deployed in the destination area. Therefore, the solution of this application can quickly transmit the target remote message sent by the first device across regions and networks to the second device. In this solution, the replication server and the distribution server serve as interfaces for the source and destination areas, respectively. Since the replication server and the distribution server are connected, the target message can be successfully sent from the replication server to the distribution server, thus achieving cross-regional transmission. Furthermore, since this solution uses the distribution server to send the target remote message to the target message cluster in the destination area, it instructs the target message cluster in the destination area to send the target remote message to... Since both the second device and the target message cluster in the target area are deployed in the target area, the second device obtains the target remote message in its local area, thus achieving local access and accelerating the transmission of the target remote message to the second device. Therefore, this application can reduce latency. In addition, in this application, the transmission between the first device and the second device is equivalent to forming a channel with the replication server and the distribution server acting as bridges. This reduces the consumption of network resources, and in subsequent transmissions, there is no need to re-establish the connection. The target remote message can be transmitted directly using this channel, further reducing the consumption of network resources. Attached Figure Description
[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0032] Figure 1 An application scenario diagram for a remote message transmission method provided in this application;
[0033] Figure 2 A schematic diagram of the relationship between a first device and a second device provided in this application;
[0034] Figure 3 This is a flowchart illustrating a method for transmitting messages across different locations, as provided in Embodiment 1 of this application.
[0035] Figure 4 This is a flowchart illustrating a method for transmitting messages across different locations, as provided in Embodiment 2 of this application.
[0036] Figure 5 This is a flowchart illustrating a method for transmitting messages across different locations, as provided in Embodiment 4 of this application.
[0037] Figure 6 This is a flowchart illustrating a method for transmitting messages across different locations, as provided in Embodiment 5 of this application.
[0038] Figure 7 This is a flowchart illustrating a method for transmitting remote messages according to Embodiment Six of this application;
[0039] Figure 8 This is a flowchart illustrating a method for transmitting remote messages according to Embodiment 8 of this application.
[0040] Figure 9 This is a diagram illustrating the transmission and interaction of remote messages as provided in Embodiment 9 of this application.
[0041] Figure 10 This is a schematic diagram of a remote message transmission device provided in Embodiment 10 of this application;
[0042] Figure 11 This is a schematic diagram of a remote message transmission device provided in Embodiment Eleven of this application;
[0043] Figure 12 This is a schematic diagram of the structure of a replication server provided in Embodiment Twelve of this application;
[0044] Figure 13 This is a schematic diagram of the structure of a distribution server provided in Embodiment Thirteen of this application.
[0045] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0046] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0047] In the existing technology, users are located in different regions, and each region has a message cluster serving its own purpose. The first device is deployed in the source region, and the second device is deployed in the destination region. When the first device generates a target remote message and sends it to the second device, it determines the target message cluster in the region where the first device is located, which is the target message cluster in the source region. The first device transmits the target remote message to the target message cluster in the source region. Then, the target message cluster in the source region sends the target remote message across regions and networks to the second device, so that the second device obtains the target remote message.
[0048] Therefore, it is evident that for the second device to obtain the target remote message, it needs to cross regions and networks, which will generate latency in the process. At the same time, since the transmission of the target remote message is achieved across networks, and each time the first device and the second device transmit the target remote message, cross-network transmission is required, the second device must access the message cluster in the region where the first device is located across networks. Furthermore, the second device consumes network resources each time it obtains the target remote message, thus increasing network resource consumption.
[0049] To address the shortcomings of existing technologies, the inventors of this solution have creatively designed a new approach. This solution provides a method for transmitting remote messages. To solve problems such as delays during the transmission of target remote messages, this method applies to a replication server. The replication server is deployed in the source region and is communicatively connected to a distribution server, which is deployed in the destination region. Thus, the replication server and distribution server act as a bridge between the source and destination regions. Because the replication server and distribution server are communicatively connected, the replication server can send the target remote message to the distribution server. Since the distribution server is deployed in the destination region, the target remote message is quickly transmitted within the destination region. The specific solution is as follows: The replication server receives remote transmission configuration information, which includes target message cluster information for both the source and destination regions. Therefore, the replication server retrieves the target remote message from the target message cluster in the source region based on the target message cluster in the source region, encapsulates the target remote message and remote transmission configuration information to obtain the target packet, and then sends the target packet to the distribution server. Since the replication server is deployed in the source region and the distribution server is deployed in the destination region, the target packet containing the target remote message is successfully sent from the source region to the destination region, thus achieving cross-regional transmission. Next, the target packet causes the distribution server to decapsulate the target packet, thus obtaining the target remote message and remote transmission configuration information. The distribution server then uses the remote transmission configuration information... The target message cluster information in the destination region is used to send the target remote message to the target message cluster in the destination region. Furthermore, the target remote message is sent to the second device using the target message cluster in the destination region. Therefore, the target remote message generated by the first device is sent to the second device. This solution uses a replication server and a distribution server for transmission, which reduces the latency caused by the target remote message crossing regions. Simultaneously, since both the second device and the target message cluster in the destination region are deployed in the destination region, the second device obtains the target remote message locally, thus achieving local access and further reducing latency. To solve the latency problem during target remote message transmission, this solution, through the above method, essentially establishes a channel between the first and second devices. During transmission, it is not necessary to re-establish the channel for each transmission, thus reducing network resource consumption.
[0050] The following describes the application scenarios of the method, apparatus, device, and storage medium for transmitting messages across different locations provided in this application.
[0051] Figure 1This diagram illustrates an application scenario for a remote message transmission method provided in this application. For example... Figure 1 As shown, the application scenario diagram includes a first device 101, a target message cluster 102 in the source area, a replication server 103, a distribution server 104, a target message cluster 105 in the destination area, a second device 106, and an operation device 107.
[0052] The first device 101 can be any mobile network device, such as a mobile phone or computer.
[0053] The second device 106 can be any mobile network device, such as a mobile phone or computer.
[0054] The target message cluster 102 in the source region can be a collection of message middleware servers. The target message cluster 102 in the source region includes at least one resource server. The target message cluster 102 in the source region and the target message cluster 105 in the destination region serve as a relay station for all remote messages. The target message cluster 105 in the destination region includes at least one resource server. It should be noted that the target message cluster 102 in the source region and the target message cluster 105 in the destination region can be pre-built and deployed in the source region and destination region respectively, each handling the transmission of all messages within its local area.
[0055] The replication server 103 is a server deployed in the source region for processing remote message transmission. It should be noted that the replication server 103 can receive target remote messages from the target message cluster 102 in the source region. Furthermore, the replication server 103 has encapsulation capabilities to obtain the target message.
[0056] The distribution server 104 is a server deployed in the destination area for processing cross-regional message transmission. It should be noted that the distribution server 104 can receive target messages from the replication server 103, and also has the function of unpacking target messages.
[0057] Among them, the operating equipment 107 is controlled by the operators and can be a mobile phone or computer, etc. There are no restrictions here.
[0058] Specifically, when the first device 101 is used, the target remote message generation button is triggered, so that the first device 101 generates the target remote message and sends the target remote message to the target message cluster 102 in the source area. The target remote message is relayed in the target message cluster 102 in the source area, and then the replication server 103 obtains the target remote message from the target message cluster 102 in the source area.
[0059] In addition, the replication server 103 can also receive remote transmission configuration information sent by the operating equipment 107.
[0060] Furthermore, the replication server 103 encapsulates the target remote message and remote transmission configuration information to obtain the target message. Then, the replication server 103 sends the target message to the distribution server 104.
[0061] Furthermore, the distribution server 104 will deseal the target message to obtain the target remote message and remote transmission configuration information. Then, the distribution server 104 will send the target remote message to the target message cluster 105 in the destination area.
[0062] Furthermore, the target message cluster 105 in the target area will send the target remote message to the second device 106, thereby the second device 106 obtains the target remote message.
[0063] It should be noted that an invisible channel is formed between the first device 101 and the second device 106 through the target message cluster 102 in the source area, the replication server 103, the distribution server 104, and the target message cluster 105 in the destination area, which can be used for the transmission of target messages in different locations.
[0064] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0065] It should be noted that the remote message transmission method, apparatus, device and storage medium provided in this application can be applied to the field of mobile Internet technology, or to any field other than mobile Internet. The application fields of the remote message transmission method, apparatus, device and storage medium in this application are not limited.
[0066] Figure 2 This is a schematic diagram illustrating the relationship between a first device and a second device provided in this application. Figure 2 As shown, it specifically includes: a first device, a target message cluster in the source region, a replication server, a distribution server, a target message cluster in the destination region, and a second device.
[0067] In this context, the target message cluster of the first device and the source region is deployed in the source region. The source region refers to the location where the first user uses the first device to send a target message from a different location to the second device. For example... Figure 2As shown, the current location of the first device is location A, so location A is the source region. Here, the first user refers to the owner of the first device.
[0068] The distribution server, the target message cluster in the destination region, and the second device are deployed in the destination region. The destination region refers to the location where the second user is located when using the second device to receive a target message from the first device sent from a different location. Figure 2 As shown, the current location of the second device is location B, so location B is the destination area. Here, "second user" refers to the owner of the second device.
[0069] It should be noted that location A and location B can be at the provincial level, for example, location A is the first province and location B is the second province; alternatively, location A and location B can be at the city level, for example, location A is the first city of the first province and location B is the second city of the second province; alternatively, location A and location B can be at the county level, for example, location A is the first county of the first city of the first province and location B is the second county of the second city of the second province. Alternatively, location A and location B can be at other levels, without restriction. It is understood that location A, location B, the first province, the first city, the first county, the second province, the second city, and the second county are used here for illustrative purposes only and do not represent actual locations.
[0070] It should be noted that the connection between location A and location B is between the replication server and the distribution server, so that the target remote message can be transmitted from location A to location B through the replication server.
[0071] It should be noted that there can be multiple replication servers in location A, and multiple distribution servers in location B.
[0072] It should be noted that there can be multiple message clusters in location A, one of which serves as the target message cluster for the source region. Similarly, there can be multiple message clusters in location B, one of which serves as the target message cluster for the destination region.
[0073] This application provides a method for transmitting messages across different locations, aiming to solve the above-mentioned technical problems in the prior art.
[0074] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0075] Example 1
[0076] The execution entity of Embodiments 1 to 4 of this application is a replication server, which carries a remote message transmission device. In this embodiment, the method is applied to the replication server, which is deployed in the source region and is communicatively connected to the distribution server, which is deployed in the destination region.
[0077] like Figure 2 As shown, the location and connection relationship between the replication server and the distribution server can be determined.
[0078] Figure 3 This is a flowchart illustrating a method for transmitting messages across different locations, as provided in Embodiment 1 of this application. Figure 3 As shown, the specific steps are as follows.
[0079] S301, Receive remote transmission configuration information sent by the operating equipment; the remote transmission configuration information includes source area message middleware information and destination area message middleware information; the source area message middleware information includes the target message cluster information of the source area; the destination area message middleware information includes the target message cluster information of the destination area.
[0080] Here, "operational equipment" refers to the equipment used by the relevant operational personnel. For example, operational equipment can be a mobile phone or a computer, etc., with no restrictions here. "Operational personnel" refers to professionals specifically responsible for replicating the server or for remote message transmission.
[0081] Among them, the remote transmission configuration information refers to the relevant configuration of the entire transmission process when the first device and the second device transmit target remote messages.
[0082] The source region message middleware information refers to the middleware cluster information corresponding to the target remote message in the source region. For example, the source region message middleware information indicates which source region's target message cluster will be sent to when the first device sends the target remote message. The destination region message middleware information is the middleware cluster information corresponding to the target remote message in the destination region. For example, the destination region message middleware information indicates which destination region's target message cluster will be received when the second device receives the target remote message.
[0083] It should be noted that, in addition to the source area message middleware information and the destination area message middleware information, the cross-regional transmission configuration information may also include other information, which is not restricted here.
[0084] Among them, the target message cluster information of the source region refers to the information containing the target message cluster of the source region.
[0085] Among them, the target message cluster information of the destination region refers to the information containing the target message cluster of the destination region.
[0086] It should be noted that the replication server can determine from the remote transmission configuration information which source region's first device should send the target remote message, and which destination region's second device should send the target remote message to. For example, the remote transmission configuration information may include target message cluster information for the source region, which is the first target message cluster in region A. Thus, the replication server determines that the source region is region A, and the corresponding target message cluster is the first target message cluster in region A. Similarly, if the remote transmission configuration information includes target message cluster information for the destination region, which is the first target message cluster in region B, the replication server determines that the destination region is region B, and the corresponding target message cluster is the first target message cluster in region B. The replication server will then monitor the dynamics of the first target message cluster in region A, encapsulate the target remote message and the remote transmission configuration information to obtain the target message, and then send it to the distribution server to instruct the distribution server to send the target remote message in the target message to the first target message cluster in region B.
[0087] Specifically, the operator triggers the operating equipment to generate remote transmission configuration information, which is then sent to the replication server, and the replication server receives the remote transmission configuration information.
[0088] S302, receive the target remote message sent by the target message cluster of the source region according to the target message cluster information of the source region, and encapsulate the target remote message and remote transmission configuration information to obtain the target message; the target remote message sent by the target message cluster of the source region is generated by the first device and sent to the target message cluster of the source region; the first device is deployed in the source region.
[0089] Here, the target remote message refers to the actual data generated by the first device that needs to be transmitted, such as the first device sending a message like "Have you eaten?" to the second device. The first user triggers the first device to generate the target remote message, and after generation, the first device sends it to the target message cluster in the source region. According to the description in S301 above, assuming the first device is deployed in location A and corresponds to the first target message cluster in location A, the first device sends the target remote message to the first target message cluster in location A.
[0090] In this configuration, the first device is deployed in the source region, where it acts as the sending device.
[0091] It should be noted that there is a correspondence between the first device and the target message cluster in the source region. The target message sent by the first device can only be sent to the target message cluster in the corresponding source region.
[0092] The target message is a data unit transmitted in the network, that is, a data block that a station sends at one time. In this embodiment, the target message contains target remote transmission information and remote transmission configuration information.
[0093] Specifically, the replication server determines the corresponding target message cluster in the source region based on the target message cluster information of the source region. The first device generates a target remote message and sends it to the corresponding target message cluster in the source region. Then, the replication server receives the target remote message sent by the target message cluster in the source region. The target remote message is generated by the first device and sent to the target message cluster in the source region.
[0094] Furthermore, the replication server can encapsulate the data using methods such as Tape Carrier Packaging (TCP) and User Datagram Protocol (UDP). In this embodiment, the encapsulation method is not limited.
[0095] S303, the target message is sent to the distribution server so that the distribution server can deseal the target message, obtain the target remote message and remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, which is deployed in the destination area.
[0096] In this case, the second device is deployed in the target area, where it acts as the receiving device.
[0097] Specifically, the replication server sends the target message to the distribution server, which will cause the distribution server to deseal the target message and obtain the target remote message and remote transmission configuration information. The distribution server then sends the target remote message to the target message cluster in the destination area based on the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device.
[0098] This embodiment provides a method for transmitting remote messages. The method is applied to a replication server, which is deployed in a source region and communicates with a distribution server, which is deployed in a destination region. The method includes: receiving remote transmission configuration information sent by an operating device; the remote transmission configuration information includes source region message middleware information and destination region message middleware information; the source region message middleware information includes target message cluster information of the source region; the destination region message middleware information includes target message cluster information of the destination region; receiving a target remote message sent by the target message cluster of the source region according to the target message cluster information of the source region, and then... The target remote message and remote transmission configuration information are encapsulated to obtain the target message; the target remote message sent by the target message cluster in the source area is generated and sent to the target message cluster in the source area by the first device; the first device is deployed in the source area; the target message is sent to the distribution server so that the distribution server can decapsulate the target message, obtain the target remote message and remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, and the second device is deployed in the destination area.In this embodiment, the method is applied to a replication server, which is communicatively connected to a distribution server. The replication server is deployed in the source region, and the distribution server is deployed in the destination region. First, the replication server receives remote transmission configuration information sent by the operating equipment. Since the remote transmission configuration information includes target message cluster information from the source region, the replication server will receive target remote messages sent by the target message cluster in the source region based on the target message cluster information. These target remote messages are generated and sent to the target message cluster in the source region by a first device deployed in the source region. Then, the replication server will process the target remote messages... The target message is obtained by encapsulating the target message and remote transmission configuration information. Encapsulation ensures higher security for the target message during cross-regional and cross-network transmission and guarantees faster transmission to the distribution server within the destination area. The target message can instruct the distribution server to decapsulate and retrieve the target remote message and remote transmission configuration information. The remote transmission configuration information also includes target message cluster information for the destination area. Furthermore, the distribution server can be instructed to send the target remote message to the target message cluster in the destination area based on the target message cluster information. The target remote message also instructs the target message cluster in the destination area to send the target remote message to the target message cluster in the destination area. The message is sent to the second device, which is deployed in the destination area. Therefore, the solution in this embodiment can quickly transmit the target message sent by the first device across regions and networks to the second device. In this embodiment, the replication server and the distribution server serve as interfaces to the source and destination areas, respectively. Since the replication server and the distribution server are connected, the target message can be successfully sent from the replication server to the distribution server, thus achieving cross-regional transmission. Furthermore, since this embodiment uses the distribution server to send the target message to the target message cluster in the destination area, it instructs the target message cluster in the destination area to send the target message to the second device. Since both the second device and the target message cluster in the target area are deployed in the target area, in this embodiment, the second device obtains the target remote message in its local area, thus achieving local access and accelerating the transmission of the target remote message to the second device. Therefore, this embodiment can reduce latency. In addition, in this embodiment, the transmission between the first device and the second device is equivalent to forming a channel with the replication server and the distribution server acting as bridges. This reduces the consumption of network resources, and in subsequent transmissions, there is no need to re-establish the connection. The target remote message can be transmitted directly using this channel, thus further reducing the consumption of network resources.
[0099] Example 2
[0100] This embodiment is a further refinement of the first embodiment described above. In this embodiment, the target message cluster information of the source region includes the target message cluster identifier of the source region and the source target resource server identifier.
[0101] Figure 4 This is a flowchart illustrating a method for transmitting remote messages according to Embodiment 2 of this application. This embodiment is an optional method for receiving target remote messages sent by a target message cluster in the source region based on target message cluster information in the source region, such as... Figure 4 As shown, the specific steps are as follows.
[0102] S401, determine the target message cluster of the corresponding source region based on the target message cluster identifier of the source region, and determine the source target resource server in the target message cluster of the source region based on the source target resource server identifier.
[0103] The target message cluster information of the source region includes the target message cluster identifier of the source region and the source target resource server identifier.
[0104] The source target resource server belongs to the target message cluster of the source region. For example, the target message cluster of the source region is the first target message cluster of the source region, which includes multiple resource servers, one of which can serve as the source target resource server corresponding to the first device, used to receive target remote messages sent by the first device.
[0105] It should be noted that the target message generated by the first device is sent to a resource server in the target message cluster of the source region. Based on the above example, assuming the target message cluster of the source region corresponding to the first device is the first target message cluster of the source region, and the source target resource server is identified as the first resource server, then the first resource server is determined to be the source target resource server.
[0106] Specifically, the replication server determines the target message cluster of the source region based on the target message cluster identifier of the source region contained in the target message cluster information of the source region, and then determines the source target resource server in the target message cluster of the source region based on the source target resource server identifier.
[0107] S402, monitoring source target resource server.
[0108] Specifically, once the replication server identifies the target resource server, it will monitor that source target resource server.
[0109] S403, in response to monitoring that the source target resource server receives a target remote message sent by the first device, retrieve the target remote message sent by the source target resource server from the source target resource server.
[0110] Specifically, the replication server monitors the source target resource server receiving the target remote message sent by the first device, and the replication server obtains the target remote message from the source target resource server.
[0111] This embodiment provides a method for transmitting remote messages. In this embodiment, the target message cluster information of the source region includes a target message cluster identifier and a source target resource server identifier. When receiving a target remote message sent by the target message cluster of the source region according to the target message cluster information of the source region, the method specifically includes: determining the target message cluster of the corresponding source region according to the target message cluster identifier of the source region, and determining the source target resource server in the target message cluster of the source region according to the source target resource server identifier; monitoring the source target resource server; and in response to monitoring that the source target resource server receives the target remote message sent by the first device, obtaining the target remote message sent by the source target resource server from the source target resource server. In this embodiment, the target message cluster in the source region includes a target message cluster identifier and a source target resource server identifier. The replication server determines the corresponding target message cluster in the source region based on the target message cluster identifier, and further determines a more targeted source target resource server based on the source target resource server identifier. Since the source target resource server belongs to the target message cluster in the source region, this embodiment further determines the source target resource server that receives the target remote message. Therefore, the replication server will obtain the target remote message sent by the source target resource server. In this embodiment, a more targeted source target resource server can be accurately determined.
[0112] Example 3
[0113] This embodiment is a further refinement of any of the above embodiments. This embodiment is an optional method for encapsulating target remote messages and remote transmission configuration information to obtain target packets. The specific content is as follows.
[0114] The target remote message and remote transmission configuration information are encapsulated according to the load encapsulation method to obtain the target message. The target remote message is placed in the inner layer of the target message, and the remote transmission configuration information is encapsulated in the outer layer.
[0115] Specifically, the replication server encapsulates the target remote message and remote transmission configuration information using a payload encapsulation method to obtain the target packet. The inner layer of the target packet contains the target remote message, and the outer layer contains the remote transmission configuration information.
[0116] This embodiment provides a method for transmitting remote messages. Specifically, when encapsulating the target remote message and remote transmission configuration information to obtain a target packet, the method includes: encapsulating the target remote message and remote transmission configuration information using a load-based encapsulation method to obtain the target packet. In the target packet, the target remote message is placed in the inner layer, and the remote transmission configuration information is encapsulated in the outer layer. This embodiment uses a load-based encapsulation method to encapsulate the target remote message and remote transmission configuration information, placing the target remote message in the inner layer and the remote transmission configuration information in the outer layer, ultimately obtaining the target packet. Using the target packet for transmission from the source area to the destination area ensures data security, reliability, and transmission efficiency.
[0117] Example 4
[0118] This embodiment is a further refinement of any of the above embodiments. Figure 5 This is a flowchart illustrating a method for transmitting remote messages according to Embodiment 4 of this application. This embodiment represents an optional approach after the target message is sent to the distribution server, such as... Figure 5 As shown, the following steps are also included.
[0119] S501 stores the target message in the local database of the replicating end.
[0120] The local database on the replication end is a database on the replication end server specifically used to store target packets.
[0121] Specifically, the replication server stores the target message in the local database of the replication end.
[0122] S502, receive the target message response information sent by the distribution server.
[0123] The target message response information is generated by the distribution server and indicates whether the distribution server has successfully received the target message. It should be noted that the target message response information includes either success or failure. Success means the distribution server successfully received the target message, while failure means the distribution server did not successfully receive the target message. The reasons for failure can include insufficient network resources or a connection failure between the replication server and the distribution server, etc., which are not limited here.
[0124] Furthermore, the replication server receives the target message response information from the distribution server.
[0125] S503 determines whether to resend the target message to the distribution server based on the target message response information.
[0126] Furthermore, the replication server will determine whether the target message needs to be sent to the distribution server again based on whether the target message response is successful or failed.
[0127] This embodiment provides a method for transmitting messages across different locations. After sending the target message to the distribution server, the method further includes: storing the target message in a local database on the replication end; receiving target message response information sent by the distribution server; and determining whether to send the target message to the distribution server again based on the target message response information. In this embodiment, the replication server stores the target message in its local database and receives the target message response information to determine whether to send the target message to the distribution server again. Storing the target message in this embodiment ensures data integrity. Furthermore, this embodiment also determines whether to send the target message again based on the target message response information, thus ensuring that the distribution server can receive the target message and guaranteeing its normal transmission.
[0128] In one optional method, this method determines whether to resend the target message to the distribution server based on the target message response information, as detailed below.
[0129] If the target message response is successful, the target message is deleted from the local database of the replication end and no longer sent to the distribution end server; if the target message response is unsuccessful, the target message is retrieved from the local database of the replication end and sent to the distribution end server again, until a target message response is received that is successful or the number of unsuccessful attempts reaches the preset number of times on the replication end, at which point the sending of target messages to the distribution end server stops.
[0130] The preset number of replication attempts can be set in advance, indicating the maximum number of times the target message response can fail.
[0131] Specifically, if the replication server determines that the target packet response is successful, it will delete the target packet from its local database to avoid consuming database storage space and will no longer send the target packet to the distribution server. If the target packet response is unsuccessful, the replication server will retrieve the target packet from its local database and then resend it to the distribution server to ensure that the distribution server receives the target packet. After each time the replication server sends a target packet, it will receive the target packet response from the distribution server and determine whether to resend the target packet to the distribution server based on the response. This process continues until the replication server receives a successful response or the number of unsuccessful responses reaches a preset number, at which point the replication server will stop sending target packets to the distribution server.
[0132] It should be noted that when the replication server sends a target message to the distribution server, if the sending time exceeds the preset time of the replication server, the replication server may also stop sending the target message to the distribution server.
[0133] This embodiment provides a method for transmitting messages across different locations. When determining whether to resend the target message to the distribution server based on the target message response information, the method specifically includes: if the target message response information is successful, deleting the target message from the local database of the replicating end and no longer sending the target message to the distribution server; if the target message response information is unsuccessful, retrieving the target message from the local database of the replicating end and resending the target message to the distribution server, until a target message response information received is successful or the number of unsuccessful attempts reaches a preset number on the replicating end, at which point sending the target message to the distribution server is stopped. In this embodiment, when determining whether to resend the target packet to the distribution server based on the target packet response information, if successful, the replication server deletes the target packet from its local database, thus ceasing to send the target packet to the distribution server. Therefore, deleting the target packet in this embodiment frees up storage space, preventing successfully sent target packets from occupying space in the local database. If it fails, the replication server will resend the target packet to the distribution server until the received target packet response information is successful or the number of failures reaches a preset number. At this point, the replication server will stop sending the target packet to the distribution server. Therefore, in this embodiment, to ensure that the target packet can be sent to the distribution server in the event of failure, it will resend the packet. When the number of failures reaches the preset number, it will not send the packet, possibly due to a system error causing the failure. Thus, when the replication server stops sending the packet, it avoids wasting its efforts.
[0134] Example 5
[0135] The execution entity of Embodiments 5 to 8 of this application is a distribution server, which carries a remote message transmission device. In this embodiment, the method is applied to the distribution server, which is deployed in the destination region. The distribution server is communicatively connected to the replication server, which is deployed in the source region.
[0136] like Figure 2 As shown, the location and connection relationship between the replication server and the distribution server can be determined.
[0137] Figure 6 This is a flowchart illustrating a method for transmitting remote messages according to Embodiment 5 of this application. Figure 6 As shown, the specific steps are as follows.
[0138] S601, Receive the target message sent by the replication server; the target message is encapsulated by the replication server into a target remote message and remote transmission configuration information; the target remote message is generated by the first device and sent to the target message cluster in the source area; the first device is deployed in the source area; the remote transmission configuration information is sent to the replication server by the operating equipment; the remote transmission configuration information includes source area message middleware information and destination area message middleware information; the source area message middleware information includes the target message cluster information of the source area; the destination area message middleware information includes the target message cluster information of the destination area; the target remote message is received by the replication server from the target message cluster of the source area based on the target message cluster information of the source area.
[0139] Specifically, the first device generates a target remote message and sends it to the target message cluster in the source area. The target message cluster in the source area then sends the target remote message to the replication server. The replication server receives the remote transmission configuration information sent by the operating device, encapsulates the target remote message and the remote transmission configuration information to obtain the target message, and sends the target message to the distribution server. The distribution server receives the target message sent by the replication server.
[0140] S602 decrypts the target message to obtain the target remote message and remote transmission configuration information.
[0141] Furthermore, the distribution server decapsulates the target packet. The decapsulation method can be the same as the decapsulation method corresponding to the encapsulation method, such as load decapsulation and User Datagram Protocol (UDP) decapsulation method. There are no restrictions on the decapsulation method here.
[0142] S603, based on the target message cluster information of the target area, the target remote message is sent to the target message cluster of the target area. The target remote message is used to instruct the target message cluster of the target area to send the target remote message to the second device, which is deployed in the target area.
[0143] Specifically, the distribution server determines the target message cluster of the target area based on the target message cluster information of the target area. The distribution server sends the target remote message to the target message cluster of the target area, thereby instructing the target message cluster of the target area to send the target remote message to the second device. Since the second device is deployed in the target area, the target remote message is transmitted from the source area to the target area.
[0144] This embodiment provides a method for transmitting remote messages. The method is applied to a distribution server, which is deployed in a destination area. The distribution server is communicatively connected to a replication server, which is deployed in a source area. Specifically, the method includes: receiving a target message sent by the replication server; the target message is encapsulated by the replication server into a target remote message and remote transmission configuration information; the target remote message is generated by a first device and sent to a target message cluster in the source area; the first device is deployed in the source area; the remote transmission configuration information is sent by the operating device to the replication server; the remote transmission configuration information includes source area message middleware information and destination area information. The information includes: regional message middleware information; source regional message middleware information includes source region target message cluster information; destination regional message middleware information includes destination region target message cluster information; the target remote message is received by the replication server from the source region's target message cluster based on the source region's target message cluster information; the target message is decapsulated to obtain the target remote message and remote transmission configuration information; the target remote message is sent to the destination region's target message cluster based on the destination region's target message cluster information, and the target remote message is used to instruct the destination region's target message cluster to send the target remote message to the second device, which is deployed in the destination region.In this embodiment, the method is applied to a distribution server, and a replication server is communicatively connected to the distribution server. The replication server is deployed in the source region, and the distribution server is deployed in the destination region. First, the replication server receives remote transmission configuration information sent by the operating device. Since the remote transmission configuration information includes target message cluster information from the source region, the replication server will receive target remote messages sent by the target message cluster in the source region according to the target message cluster information. The target remote messages are generated and sent to the target message cluster in the source region by a first device deployed in the source region. Then, the replication server will process the target remote messages... The message and remote transmission configuration information are encapsulated to obtain the target message. Encapsulation ensures higher security for the target message during cross-regional and cross-network transmission and guarantees faster delivery to the distribution server within the destination area. The distribution server then decapsulates the target message to re-obtain the target remote message and remote transmission configuration information. The remote transmission configuration information also includes target message cluster information for the destination area. Furthermore, the distribution server sends the target remote message to the target message cluster in the destination area based on the target message cluster information. The target remote message instructs the target message cluster in the destination area to send the target remote message. The message is sent to the second device, which is deployed in the destination area. Therefore, the solution in this embodiment can quickly transmit the target remote message sent by the first device across regions and networks to the second device. In this embodiment, the replication server and the distribution server serve as interfaces to the source and destination areas, respectively. Since the replication server and the distribution server are connected, the target message can be successfully sent from the replication server to the distribution server, thus achieving cross-regional transmission. Simultaneously, because the distribution server sends the target remote message to the target message cluster in the destination area, it instructs the target message cluster in the destination area to send the target remote message to the second device. Since both the second device and the target message cluster in the target area are deployed in the target area, the second device obtains the target remote message in its local area, thus achieving local access and accelerating the transmission of the target remote message to the second device. Therefore, this embodiment can reduce latency. In addition, in this embodiment, the transmission between the first device and the second device is equivalent to forming a channel with the replication server and the distribution server acting as bridges. This reduces the consumption of network resources, and in subsequent transmissions, there is no need to re-establish the connection. The target remote message can be transmitted directly using this channel, further reducing network resource consumption.
[0145] Example 6
[0146] This embodiment is a further refinement of the above embodiment five. In this embodiment, the target message cluster information of the destination area includes the target message cluster identifier of the destination area and the target resource server identifier.
[0147] Figure 7 This is a flowchart illustrating a method for transmitting remote messages according to Embodiment Six of this application. This embodiment is an optional method for sending a target remote message to a target message cluster in the destination region based on target message cluster information in the destination region, such as... Figure 7 As shown, the specific steps are as follows.
[0148] S701, determine the target message cluster of the corresponding target area based on the target message cluster identifier of the target area, and determine the target resource server in the target message cluster of the target area based on the target resource server identifier.
[0149] Specifically, the distribution end determines the target message cluster information of the destination region in the remote transmission configuration information, determines the target message cluster identifier of the destination region based on the target message cluster information of the destination region, and then the distribution end server determines the target message cluster of the destination region based on the target message cluster identifier of the destination region.
[0150] Furthermore, the distribution server determines the destination resource server in the target message cluster of the destination region based on the destination resource server identifier.
[0151] The destination resource server belongs to the destination region's target message cluster. An exemplary destination region's target message cluster is the first target message cluster of the destination region, which includes multiple resource servers, one of which can serve as the destination resource server corresponding to the second device, used to send target remote messages to the second device.
[0152] It should be noted that the distribution server sends the target message from a different location to a resource server in the target message cluster of the destination region. Based on the above example, assuming the target message cluster of the destination region corresponding to the second device is the first target message cluster of the source region, and the destination target resource server is identified as the second resource server, then the second resource server is determined to be the destination target resource server.
[0153] S702 sends the target remote message to the target resource server.
[0154] Furthermore, the distribution server sends the target remote message to the target resource server.
[0155] This embodiment provides a method for transmitting remote messages. The target message cluster information of the destination region includes a target message cluster identifier and a target resource server identifier. When sending a target remote message to the target message cluster in the destination region based on the target message cluster information, the method specifically includes: determining the corresponding target message cluster in the destination region based on the target message cluster identifier, and determining the target resource server within the target message cluster based on the target resource server identifier; and then sending the target remote message to the target resource server. In this embodiment, the target message cluster information of the destination region includes both the target message cluster identifier and the target resource server identifier. Therefore, the distribution server sequentially determines the target message cluster in the destination region and the target resource server within that target message cluster, thereby sending the target remote message to the target resource server. This embodiment further determines the target resource server receiving the target remote message, thus enabling more accurate determination of a more targeted source target resource server.
[0156] Example 7
[0157] This embodiment is a further refinement of the above embodiments five and six. This embodiment is an optional method for decrypting the target message to obtain the target remote message and remote transmission configuration information. The specific content is as follows.
[0158] The target message is decapsulated using the load decapsulation method to obtain the target remote message and remote transmission configuration information; the target remote message is placed in the inner layer of the target message, and the remote transmission configuration information is encapsulated in the outer layer.
[0159] Specifically, the distribution server will decrypt the target remote message from the inner layer and decrypt the remote transmission configuration information from the outer layer according to the load-based decryption method.
[0160] This embodiment provides a method for transmitting remote messages. Specifically, when decapsulating a target message to obtain the target remote message and remote transmission configuration information, the method includes: decapsulating the target message using a load-based decapsulation method to obtain the target remote message and remote transmission configuration information; placing the target remote message in the inner layer of the target message and encapsulating the remote transmission configuration information in the outer layer. In this embodiment, the distribution server decapsulates the target remote message and remote transmission configuration information using a load-based decapsulation method, and then sends the target remote message to the subsequent destination resource server based on the remote transmission configuration information. This decapsulation method ensures the reliability and integrity of the target remote message.
[0161] Example 8
[0162] This embodiment is a further refinement of any one of the embodiments five to seven described above. Figure 8 This is a flowchart illustrating a method for transmitting remote messages according to Embodiment 8 of this application. This embodiment represents an optional approach after receiving a target message sent by a replication server, such as... Figure 8 As shown, the specific steps are as follows.
[0163] S801 stores the target message in the local database of the distribution end.
[0164] Among them, the local database at the distribution end is a database in the distribution end server specifically used to store target packets.
[0165] S802 receives the target remote message response information sent by the target resource server.
[0166] The target remote message response information is generated by the target resource server and indicates whether the target resource server has successfully received the target remote message. It should be noted that the target remote message response information includes either success or failure. Success means the target resource server has successfully received the target remote message, while failure means the target resource server has not successfully received the target remote message. The reasons for failure can include insufficient network resources or a connection failure between the distribution server and the target resource server, etc., which are not limited here.
[0167] S803 determines whether to resend the target remote message to the target resource server based on the target remote message response information.
[0168] Specifically, the distribution server will determine whether the target remote message needs to be sent to the target resource server again based on whether the response information is successful or failed.
[0169] This embodiment provides a method for transmitting remote messages. After receiving a target message sent by a replication server, the method further includes: storing the target message in a local database at the distribution end; receiving a remote message response from a destination resource server; and determining whether to resend the remote message to the destination resource server based on the remote message response. In this embodiment, the distribution server stores the target message in its local database, receives the remote message response from the destination resource server, and determines whether to resend the remote message to the destination resource server. Storing the target message ensures that the remote message can be successfully sent to the destination resource server, thus ensuring data integrity. Furthermore, this embodiment determines whether to resend the remote message based on the remote message response, ensuring that the destination resource server receives the remote message and that the remote message is transmitted normally.
[0170] In one approach, this method is an optional approach to determine whether to resend the target remote message to the target resource server based on the target remote message response information, as detailed below.
[0171] If the target remote message response is successful, the target packet is deleted from the local database of the distribution end, and the target packet is no longer sent to the target resource server. If the target remote message response is unsuccessful, the target packet is retrieved from the local database of the distribution end, and the target packet is decrypted again to obtain the target remote message. The target remote message is then sent to the target resource server again. This process continues until the number of successful or unsuccessful responses for a given target remote message reaches the preset number of times the distribution end can send the target remote message to the target resource server.
[0172] The preset number of times the distribution end can be set in advance indicates the maximum number of times the target remote message response information can fail.
[0173] Specifically, if the distribution server determines that the target remote message response is successful, it will delete the target packet from its local database to avoid consuming database storage space and will no longer send the target remote message to the distribution server. If the target remote message response is unsuccessful, the distribution server will retrieve the target packet from its local database, deseal it to obtain the target remote message and remote transmission configuration, and then resend the target remote message to the destination resource server to ensure that the destination resource server can receive the target remote message. After each time the distribution server sends a target remote message, it will receive the target remote message response from the destination resource server and determine whether to resend the target remote message to the destination resource server based on the response. This process continues until the distribution server receives a successful response or the number of unsuccessful responses reaches a preset number, at which point the distribution server will no longer send the target remote message to the destination resource server.
[0174] It should be noted that when the distribution server sends a target message from a different location to the target resource server, if the sending time exceeds the preset time of the distribution server, the distribution server may also stop sending the target message from a different location to the target resource server.
[0175] This embodiment provides a method for transmitting remote messages, which determines whether to resend the target remote message to the destination resource server based on the target remote message response information. The method includes: if the target remote message response information is successful, deleting the target message from the local database of the distribution end and no longer sending the target message to the destination resource server; if the target remote message response information is unsuccessful, retrieving the target message from the local database of the distribution end, decrypting the target message again to obtain the target remote message, and resending the target remote message to the destination resource server, until the number of successful or unsuccessful responses of a certain target remote message reaches a preset number by the distribution end, at which point the sending of the target remote message to the destination resource server is stopped. In this embodiment, the distribution server determines whether to resend the target remote message to the destination resource server based on the target remote message response information. If the target remote message response information is successful, the target message is deleted from the distribution server's local database, thereby freeing up storage space and preventing the target remote message that has already been sent by the public function from occupying space in the distribution server's local database. If it fails, the distribution server will resend the target remote message to the destination resource server until the received target remote message response information is successful or the number of failures reaches the distribution server's preset number. Then, the distribution server will stop sending the target remote message to the destination resource server. Therefore, in this embodiment, in order to ensure that the target remote message can be sent to the destination resource server in the case of failure, it will resend. When the number of failures reaches the distribution server's preset number, it will stop sending. This may be due to a system error causing the unsuccessful sending, so the distribution server will stop sending, thus avoiding the distribution server doing useless work.
[0176] Example 9
[0177] Figure 9 This is a diagram illustrating the transmission interaction of remote messages according to Embodiment Nine of this application. The executing entity in this embodiment is the remote message transmission system, and this embodiment describes the entire process of remote message transmission, as follows: Figure 9 As shown, the specific steps are as follows.
[0178] S901, the first device sends a target remote location message to the source target resource server.
[0179] S902, the operating equipment sends remote transmission configuration information to the replication server.
[0180] S903, the replication server monitors the source and target resource servers based on the configuration information transmitted remotely.
[0181] S904, the source / target resource server sends a target remote location message to the replication server.
[0182] S905, the replication server encapsulates the target remote message and remote transmission configuration information to obtain the target message.
[0183] S906, the replication server will send the target message to the distribution server.
[0184] S907, the distribution server deseals the target message to obtain the target remote message and remote transmission configuration information.
[0185] S908, the distribution server determines the target resource server based on the remote transmission configuration information.
[0186] S909, the distribution server will send the target remote message to the target resource server.
[0187] S910, the target resource server sends a target remote message to the second device.
[0188] It should be noted that the above describes the steps for the first device to send a target remote message to the second device. When the target remote message is transmitted from the first device to the second device, the first device is the sender and the second device is the receiver. In practice, the first device can also be the receiver, and the second device can also be the sender.
[0189] It should be noted that the roles of the first device, the second device, the source region, the destination region, the target message cluster in the source region, and the target message cluster in the destination region can be transformed for different scenarios. For example, if the second device wants to respond to a target remote message sent by the first device, the second user triggers the response component, and the second device generates a target response message. This target response message can also be a new target remote message. In this case, the region where the second device is located is the source region, and the region where the first device is located is the destination region. At the same time, the role relationship of the target message cluster in the destination region will also be transformed, becoming the target message cluster in the source region (denoted as cluster A). Similarly, the target message cluster in the source region is transformed into the target message cluster in the destination region (denoted as cluster B). The source region where the second device is located also includes a replication server, and the destination region where the first device is located also includes a distribution server. The replication server in the source region where the second device is located can receive remote transmission configuration information sent by the operating device. The second device then sends the target response message to cluster A, which is then transmitted by cluster A to the replication server in the source region. The replication server in the source region encapsulates the target response message and the remote transmission configuration information to obtain the target response packet, and sends the target response packet to the distribution server. The distribution server decapsulates the target response packet to obtain the target response message, and then sends the target response message to cluster B, which in turn sends it to the first device. This process enables the target response message to be sent from the second device to the first device.
[0190] Example 10
[0191] The following are embodiments of the apparatus provided in this application. Figure 10 This is a schematic diagram of a remote message transmission device according to Embodiment 10 of this application. The device 100 is located on a replication server, which is deployed in the source region. The replication server is communicatively connected to a distribution server, which is deployed in the destination region. The device 100 includes the following modules:
[0192] The first receiving module 1001 is used to receive remote transmission configuration information sent by the operating equipment; the remote transmission configuration information includes source area message middleware information and destination area message middleware information; the source area message middleware information includes target message cluster information of the source area; the destination area message middleware information includes target message cluster information of the destination area.
[0193] The second receiving module 1002 is used to receive the target remote message sent by the target message cluster of the source area according to the target message cluster information of the source area. The encapsulation module 1003 is used to encapsulate the target remote message and the remote transmission configuration information to obtain the target message. The target remote message sent by the target message cluster of the source area is generated by the first device and sent to the target message cluster of the source area. The first device is deployed in the source area.
[0194] The first sending module 1004 is used to send the target message to the distribution server so that the distribution server can deseal the target message, obtain the target remote message and remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, which is deployed in the destination area.
[0195] Optionally, the target message cluster information of the source region includes the target message cluster identifier of the source region and the source target resource server identifier. The first receiving module 1001, when receiving a target remote message sent by the target message cluster of the source region according to the target message cluster information of the source region, is used for:
[0196] The target message cluster of the corresponding source region is determined based on the target message cluster identifier of the source region, and the source target resource server in the target message cluster of the source region is determined based on the source target resource server identifier; the source target resource server is monitored; in response to the monitoring that the source target resource server receives the target remote message sent by the first device, the target remote message sent by the source target resource server is obtained from the source target resource server.
[0197] Optionally, the encapsulation module 1003, when encapsulating the target remote message and remote transmission configuration information to obtain the target packet, is used for:
[0198] The target remote message and remote transmission configuration information are encapsulated according to the load encapsulation method to obtain the target message. The target remote message is placed in the inner layer of the target message, and the remote transmission configuration information is encapsulated in the outer layer.
[0199] Optionally, after sending the target message to the distribution server, the apparatus further includes: a first determining module, configured to:
[0200] Store the target message in the local database of the replication end; receive the target message response information sent by the distribution end server; determine whether to send the target message to the distribution end server again based on the target message response information.
[0201] Optionally, when determining whether to resend the target message to the distribution server based on the target message response information, the first determining module is used to:
[0202] If the target message response is successful, the target message is deleted from the local database of the replication end and no longer sent to the distribution end server; if the target message response is unsuccessful, the target message is retrieved from the local database of the replication end and sent to the distribution end server again, until a target message response is received that is successful or the number of unsuccessful attempts reaches the preset number of times on the replication end, at which point the sending of target messages to the distribution end server stops.
[0203] Example 11
[0204] The following are embodiments of the apparatus provided in this application. Figure 11 This is a schematic diagram of a remote message transmission device according to Embodiment Eleven of this application. The device 110 is located at a distribution server, which is deployed in the destination area. The distribution server is communicatively connected to a replication server, which is deployed in the source area. The device 110 includes the following modules:
[0205] The third receiving module 1101 is used to receive the target message sent by the replication server. The target message is encapsulated by the replication server into a target remote message and remote transmission configuration information. The target remote message is generated by the first device and sent to the target message cluster in the source area. The first device is deployed in the source area. The remote transmission configuration information is sent to the replication server by the operating equipment. The remote transmission configuration information includes source area message middleware information and destination area message middleware information. The source area message middleware information includes target message cluster information of the source area. The destination area message middleware information includes target message cluster information of the destination area. The target remote message is received by the replication server from the target message cluster of the source area based on the target message cluster information of the source area.
[0206] The desealing module 1102 is used to deseal the target message to obtain the target remote message and remote transmission configuration information;
[0207] The second sending module 1103 is used to send the target remote message to the target message cluster in the target area according to the target message cluster information of the target area. The target remote message is used to instruct the target message cluster in the target area to send the target remote message to the second device, which is deployed in the target area.
[0208] Optionally, the target message cluster information of the destination area includes the target message cluster identifier of the destination area and the target resource server identifier. The second sending module 1103, when sending the target remote message to the target message cluster of the destination area based on the target message cluster information of the destination area, is used for:
[0209] The target message cluster in the target area is determined based on the target message cluster identifier of the target area, and the target resource server in the target message cluster in the target area is determined based on the target resource server identifier; the target remote message is sent to the target resource server.
[0210] Optionally, the desealing module 1102, when desealing the target message to obtain the target remote message and remote transmission configuration information, is used for:
[0211] The target message is decapsulated using the load decapsulation method to obtain the target remote message and remote transmission configuration information; the target remote message is placed in the inner layer of the target message, and the remote transmission configuration information is encapsulated in the outer layer.
[0212] Optionally, after receiving the target message sent by the replication server, the apparatus further includes: a second determining module, used for:
[0213] Store the target message in the local database of the distribution end; receive the target remote message response information sent by the target resource server; determine whether to resend the target remote message to the target resource server based on the target remote message response information.
[0214] Optionally, the second determining module, when determining whether to resend the target remote message to the target resource server based on the target remote message response information, is used for:
[0215] If the target remote message response is successful, the target packet is deleted from the local database of the distribution end, and the target packet is no longer sent to the target resource server. If the target remote message response is unsuccessful, the target packet is retrieved from the local database of the distribution end, and the target packet is decrypted again to obtain the target remote message. The target remote message is then sent to the target resource server again. This process continues until the number of successful or unsuccessful responses for a given target remote message reaches the preset number of times the distribution end can send the target remote message to the target resource server.
[0216] Example 12
[0217] Figure 12 This is a schematic diagram of the structure of a replication server provided in Embodiment Twelve of this application. Figure 12 As shown, the replication server 120 may include a processor 1201, a memory 1202 and a transceiver 1203 communicatively connected to the processor 1201. The memory 1202 stores computer-executable instructions; the transceiver 1203 is used for sending and receiving data; the processor 1201 executes the computer-executable instructions stored in the memory 1202 to implement any of the method embodiments in Embodiments 1 to 4 and Embodiment 9 described above. The specific implementation methods and technical effects are similar and will not be repeated here.
[0218] In this embodiment, the memory 1202 and the processor 1201 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0219] Example 13
[0220] Figure 13 This is a schematic diagram of the structure of a distribution server provided in Embodiment Thirteen of this application. Figure 13 As shown, the distribution server 130 may include: a processor 1301, and a memory 1302 and a transceiver 1303 communicatively connected to the processor 1301. The memory 1302 stores computer-executable instructions; the transceiver is used for sending and receiving data; the processor 1301 executes the computer-executable instructions stored in the memory 1302 to implement any of the method embodiments in embodiments five to nine above. The specific implementation methods and technical effects are similar and will not be repeated here.
[0221] In this embodiment, the memory 1302 and the processor 1301 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0222] Example 14
[0223] This application provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement any one of the method embodiments 1 to 9 described above. The specific implementation methods and technical effects are similar and will not be repeated here.
[0224] Example 15
[0225] This application provides a computer program product, including a computer program that, when executed by a processor, implements any one of the method embodiments described in Embodiments 1 to 9 above. The specific implementation methods and technical effects are similar and will not be repeated here.
[0226] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0227] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0228] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in the form of hardware plus software functional modules.
[0229] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable interrupt handling device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0230] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0231] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0232] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0233] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for transmitting messages across different locations, characterized in that, The method is applied to a replication server, which is deployed in the source region. The replication server is communicatively connected to a distribution server, which is deployed in the destination region. The method includes: Receive remote transmission configuration information sent by the operating equipment; the remote transmission configuration information includes source area message middleware information and destination area message middleware information; the source area message middleware information includes target message cluster information of the source area; the destination area message middleware information includes target message cluster information of the destination area; According to the target message cluster information of the source region, the target remote message sent by the target message cluster of the source region is received, and the target remote message and the remote transmission configuration information are encapsulated to obtain the target message; the target remote message sent by the target message cluster of the source region is generated by the first device and sent to the target message cluster of the source region; the first device is deployed in the source region; The target message is sent to the distribution server so that the distribution server can deseal the target message, obtain the target remote message and the remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, which is deployed in the destination area.
2. The method according to claim 1, characterized in that, The target message cluster information of the source region includes the target message cluster identifier of the source region and the source target resource server identifier; The step of receiving the target message from the target message cluster in the source region based on the target message cluster information of the source region includes: The target message cluster of the corresponding source region is determined based on the target message cluster identifier of the source region, and the source target resource server in the target message cluster of the source region is determined based on the source target resource server identifier. Monitor the source and target resource servers; In response to monitoring that the source target resource server receives a target remote message sent by the first device, the target remote message sent by the source target resource server is retrieved from the source target resource server.
3. The method according to claim 1, characterized in that, The step of encapsulating the target remote message and the remote transmission configuration information to obtain the target message includes: The target remote message and the remote transmission configuration information are encapsulated using a payload encapsulation method to obtain a target message. In the target message, the target remote message is placed in the inner layer, and the remote transmission configuration information is encapsulated in the outer layer.
4. The method according to any one of claims 1-3, characterized in that, After sending the target message to the distribution server, the method further includes: Store the target message in the local database on the replica end; Receive the target message response information sent by the distribution server; Based on the target message response information, determine whether to send the target message to the distribution server again.
5. The method according to claim 4, characterized in that, The step of determining whether to send the target message to the distribution server again based on the target message response information includes: If the target message response is successful, the target message is deleted from the local database of the copying end, and the target message is no longer sent to the distribution end server. If the target message response information is a failure, the target message is retrieved from the local database of the replication end and sent to the distribution end server again. This process continues until the number of successful or failed target message responses received reaches a preset number by the replication end, at which point the sending of the target message to the distribution end server is stopped.
6. A method for transmitting messages across different locations, characterized in that, The method is applied to a distribution server, which is deployed in a destination region. The distribution server is communicatively connected to a replication server, which is deployed in a source region. The method includes: The replication server receives a target message sent by the replication end server. The target message is formed by the replication end server encapsulating a target remote message and remote transmission configuration information. The target remote message is generated by a first device and sent to a target message cluster in the source region. The first device is deployed in the source region. The remote transmission configuration information is sent to the replication end server by the operating equipment. The remote transmission configuration information includes source region message middleware information and destination region message middleware information. The source region message middleware information includes target message cluster information of the source region. The destination region message middleware information includes target message cluster information of the destination region. The target remote message is received by the replication end server from the target message cluster in the source region based on the target message cluster information of the source region. Deseal the target message to obtain the target remote message and the remote transmission configuration information; The target remote message is sent to the target message cluster in the target area according to the target message cluster information of the target area. The target remote message is used to instruct the target message cluster in the target area to send the target remote message to a second device, which is deployed in the target area.
7. The method according to claim 6, characterized in that, The target message cluster information of the destination region includes the target message cluster identifier of the destination region and the target resource server identifier; The step of sending the target remote message to the target message cluster in the target area according to the target message cluster information of the target area includes: The target message cluster of the target region is determined according to the target message cluster identifier of the target region, and the target resource server in the target message cluster of the target region is determined according to the target resource server identifier. The target remote message is sent to the target resource server.
8. The method according to claim 6, characterized in that, Decapsulate the target message to obtain the target remote message and the remote transmission configuration information, including: The target message is decapsulated using a load-based decapsulation method to obtain the target remote message and the remote transmission configuration information; the target remote message is placed in the inner layer of the target message, and the remote transmission configuration information is encapsulated in the outer layer.
9. The method according to claim 6 or 7, characterized in that, After receiving the target message sent by the replication server, the method further includes: The target message is stored in the local database of the distribution end; Receive target remote message response information sent by the target resource server; Based on the target remote message response information, determine whether to resend the target remote message to the target resource server.
10. The method according to claim 9, characterized in that, The step of determining whether to resend the target remote message to the target resource server based on the target remote message response information includes: If the target remote message response information is successful, the target message is deleted from the local database of the distribution terminal and the target message is no longer sent to the target resource server; If the target remote message response information fails, the target message is retrieved from the local database of the distribution end, and the target message is decrypted again to obtain the target remote message. The target remote message is then sent to the target resource server again until the number of successful or failed responses to a certain target remote message reaches a preset number by the distribution end, at which point the sending of the target remote message to the target resource server is stopped.
11. A device for transmitting messages across different locations, characterized in that, The device is located on a replication server, which is deployed in the source region. The replication server is communicatively connected to a distribution server, which is deployed in the destination region. The device includes: The first receiving module is used to receive remote transmission configuration information sent by the operating equipment; the remote transmission configuration information includes source area message middleware information and destination area message middleware information; the source area message middleware information includes target message cluster information of the source area; the destination area message middleware information includes target message cluster information of the destination area. The second receiving module is used to receive the target remote message sent by the target message cluster of the source region according to the target message cluster information of the source region. The encapsulation module is used to encapsulate the target remote message and the remote transmission configuration information to obtain the target message. The target remote message sent by the target message cluster of the source region is generated by the first device and sent to the target message cluster of the source region. The first device is deployed in the source region. The first sending module is used to send the target message to the distribution server, so that the distribution server can deseal the target message, obtain the target remote message and the remote transmission configuration information, and send the target remote message to the target message cluster in the destination area according to the target message cluster information in the destination area. The target remote message is used to instruct the target message cluster in the destination area to send the target remote message to the second device, which is deployed in the destination area.
12. A device for transmitting remote messages, characterized in that, The device is located on a distribution server, which is deployed in the destination region. The distribution server is communicatively connected to a replication server, which is deployed in the source region. The device includes: The third receiving module is used to receive the target message sent by the replication server. The target message is encapsulated by the replication server into a target remote message and remote transmission configuration information. The target remote message is generated by the first device and sent to the target message cluster in the source region. The first device is deployed in the source region. The remote transmission configuration information is sent to the replication server by the operating equipment. The remote transmission configuration information includes source region message middleware information and destination region message middleware information. The source region message middleware information includes target message cluster information of the source region. The destination region message middleware information includes target message cluster information of the destination region. The target remote message is received by the replication server from the target message cluster in the source region based on the target message cluster information of the source region. The deblocking module is used to deblock the target message to obtain the target remote message and the remote transmission configuration information; The second sending module is used to send the target remote message to the target message cluster in the target area according to the target message cluster information of the target area. The target remote message is used to instruct the target message cluster in the target area to send the target remote message to the second device, which is deployed in the target area.
13. A replication server, comprising: A processor, and a memory and a transceiver communicatively connected to the processor; The memory stores computer-executed instructions; the transceiver is used for sending and receiving data. The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-5.
14. A distribution server, comprising: A processor, and a memory and a transceiver communicatively connected to the processor; The memory stores computer-executed instructions; the transceiver is used for sending and receiving data. The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 6-10.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as claimed in any one of claims 1-5 or any one of claims 6-10.
Citation Information
Patent Citations
Message processing method and device
CN105430161A
Cluster implementation method based on message queue
CN115550361A