Message service processing method and device, terminal, server and storage medium
By using a first terminal to proxy multiple clients to send batch requests to the server, the problems of high terminal resource consumption and low interaction efficiency are solved, and efficient configuration information acquisition and business registration are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2026-03-20
AI Technical Summary
In the 3GPP 5G IoT messaging standard, the instant IoT messaging application or IoT messaging client on the terminal needs to obtain configuration information and register services from the server before using the IoT messaging function, resulting in high resource consumption and low interaction efficiency.
By sending a batch request carrying multiple client requests to the first server through the first terminal, and receiving and forwarding the server response, configuration information acquisition and service registration of multiple clients can be achieved, reducing the number of independent requests from each client.
It saves terminal resources, reduces the data processing burden on the server, and improves message interaction efficiency.
Smart Images

Figure CN114885019B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet of Things, and particularly relates to a message service processing method and device, a terminal, a server and a storage medium. BACKGROUND
[0002] In the 5G Internet of Things message standard TS23.554 defined by the 3rd Generation Partnership Project (3GPP), each instant Internet of Things message application or Internet of Things message client on a terminal needs to respectively acquire configuration information from a server and perform service registration before using the Internet of Things message function, which is resource-consuming and inefficient for the terminal. SUMMARY
[0003] To solve the problems in the related art, the present application provides a message service processing method and device, a terminal, a server and a storage medium.
[0004] The technical scheme of the present application is implemented as follows:
[0005] The present application provides a message service processing method, applied to a first terminal, and the method comprises the following steps:
[0006] sending a first request to a first server; wherein the first request carries a second request of each client in at least two clients; the second request is used to request to acquire configuration information of a message service or to request to register a message service;
[0007] receiving a first response returned by the first server; the first response carries a second response corresponding to each client in the at least two clients; the second response represents a response of the first server to the corresponding second request;
[0008] downloading the corresponding second response to each client in the at least two clients.
[0009] In the above scheme, before the first request is sent to the first server, the method further comprises the following steps:
[0010] generating the first request based on the second request sent by each client in the at least two clients.
[0011] In the above scheme, before the first request is generated, the method further comprises the following steps:
[0012] receiving the second request sent by the client;
[0013] judging whether to process the second request sent by the client in batches based on at least one condition;
[0014] In the case of meeting the condition, the corresponding second request is cached.
[0015] In the above scheme, the at least one condition includes at least one of the following:
[0016] Whether the client supports batch processing;
[0017] Whether the message service supports the batch processing function;
[0018] Whether the interval duration of the first terminal sending the first request reaches;
[0019] Whether the maximum number of second requests that can be carried in the first request reaches;
[0020] Whether the second request is urgent;
[0021] Whether the validity duration of the second request reaches.
[0022] In the above scheme, before the first request is generated, the method further includes:
[0023] A third response is returned to the client corresponding to the second request; the third response is used to instruct the client to wait for the second response corresponding to the second request.
[0024] In the above scheme, the method further includes:
[0025] In the case of not meeting the condition, the second request is sent to the first server.
[0026] In the above scheme, after receiving the second request sent by the client, the method further includes:
[0027] A fourth response is returned to the client corresponding to the second request; wherein,
[0028] The fourth response represents configuration information of the corresponding client request, or represents a registration result of the message service requested by the corresponding client to register.
[0029] In the above scheme, before the second response corresponding to each client in the at least two clients is issued, the method includes:
[0030] According to the first list corresponding to the first request, the second response corresponding to each client in the at least two clients is split from the first response; wherein,
[0031] The first list is used to record the client corresponding to the second request carried in the first request.
[0032] Embodiments of the present application also provide a message service processing method, applied to a first server, the method comprising:
[0033] receiving a first request sent by a first terminal; wherein the first request carries a second request of each of at least two clients; the second request is used for requesting configuration information of a message service or for requesting registration of the message service;
[0034] returning a first response to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request.
[0035] Embodiments of the present application further provide a message service processing apparatus, comprising:
[0036] a first sending unit, configured to send a first request to a first server; wherein the first request carries a second request of each of at least two clients; the second request is used for requesting configuration information of a message service or for requesting registration of the message service;
[0037] a first receiving unit, configured to receive a first response returned by the first server; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request.
[0038] a second sending unit, configured to send the corresponding second response to each of the at least two clients.
[0039] Embodiments of the present application further provide a message service processing apparatus, comprising:
[0040] a second receiving unit, configured to receive a first request sent by a first terminal; wherein the first request carries a second request of each of at least two clients; the second request is used for requesting configuration information of a message service or for requesting registration of the message service;
[0041] a third sending unit, configured to return a first response to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request.
[0042] Embodiments of the present application further provide a first terminal, comprising a first processor and a first communication interface, wherein the first communication interface is configured to:
[0043] send a first request to a first server; wherein the first request carries a second request of each of at least two clients; the second request is used for requesting configuration information of a message service or for requesting registration of the message service;
[0044] receiving the first response returned by the first server; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request;
[0045] sending the corresponding second response to each of the at least two clients.
[0046] Embodiments of the present application also provide a first server, comprising a second processor and a second communication interface, wherein the second communication interface performs:
[0047] receiving a first request sent by a first terminal; wherein the first request carries a second request of each of at least two clients; the second request is used to request configuration information of a message service or to request registration of the message service;
[0048] returning a first response to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request.
[0049] Embodiments of the present application also provide a first terminal, characterized by comprising a processor and a memory for storing a computer program capable of running on the processor,
[0050] wherein the processor is configured to execute the steps of the message service processing method on the first terminal side when the computer program is run.
[0051] Embodiments of the present application also provide a first server, comprising a processor and a memory for storing a computer program capable of running on the processor,
[0052] wherein the processor is configured to execute the steps of the message service processing method on the first server side when the computer program is run.
[0053] Embodiments of the present application also provide a storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of any of the methods on the first terminal side or the steps of any of the methods on the first server side.
[0054] In the message service processing method and device, terminal, server and storage medium provided by the embodiment of the present application, the first terminal sends a first request to the first server; the first request carries a second request of each client in at least two clients; the second request is used to request to obtain configuration information of a message service or is used to request to register the message service; the first server receives the first request sent by the first terminal, and returns a first response to the first terminal; the first response carries a second response corresponding to each client in the at least two clients; the second response represents a response of the first server to the corresponding second request; and the first terminal receives the first response returned by the first server, and issues the corresponding second response to each client in the at least two clients. In this way, the first terminal is used to batch proxy a plurality of clients to obtain configuration information and register the service, and each client does not need to obtain the configuration information and register the service from the first server, thereby saving the resources of the terminal, reducing the data processing burden of the server, and improving the message interaction efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 A flowchart of a process of obtaining configuration information by an Internet of Things message client in the related art;
[0056] Figure 2 A flowchart of a process of registering a message service by an Internet of Things message client in the related art;
[0057] Figure 3 An example diagram of a system architecture for supporting message interaction in an Internet of Things scenario to which the embodiment of the present application is applicable;
[0058] Figure 4 An implementation flowchart of a message service processing method provided by the embodiment of the present application;
[0059] Figure 5 An implementation flowchart of another message service processing method provided by the embodiment of the present application;
[0060] Figure 6 An interaction flowchart of a message service processing method provided by the embodiment of the present application;
[0061] Figure 7 An interaction flowchart of another message service processing method provided by the embodiment of the present application;
[0062] Figure 8 An interaction flowchart of a message service configuration method provided by the embodiment of the present application;
[0063] Figure 9 An interaction flowchart of another message service registration method provided by the embodiment of the present application;
[0064] Figure 10 A structure schematic diagram of a message service processing apparatus provided for an embodiment of the present application is shown in FIG. 1.
[0065] Figure 11 A structure schematic diagram of another message service processing apparatus provided for an embodiment of the present application is shown in FIG. 2.
[0066] Figure 12 A structure schematic diagram of a first terminal provided for an embodiment of the present application is shown in FIG. 3.
[0067] Figure 13 A structure schematic diagram of a first server provided for an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION
[0068] In the related art, before using the Internet of Things message function, the Internet of Things message client in the terminal needs to first acquire the configuration information of the message service, such as the message server address, the service identifier (Service ID) used by the terminal in the message service, and the like, and then the Internet of Things message client carries the service identifier to the message server for message service registration, so that the message server acquires the information of the instant Internet of Things message application or the Internet of Things message client in the terminal, such as the reachability of the terminal. After the registration of the Internet of Things message client is completed, the instant Internet of Things message application or the Internet of Things message client in the terminal can start using the Internet of Things message function.
[0069] Figure 1 A flowchart for the related art process in which the Internet of Things message client acquires configuration information is shown in FIG. 5. The configuration management client is a configuration capability that can be called by the Internet of Things message client, and the configuration management client sends a configuration request to the configuration management server to obtain the configuration information returned by the configuration management server.
[0070] Figure 2 A flowchart for the related art process in which the Internet of Things message client registers the message service is shown in FIG. 6. The Internet of Things message client carries the service identifier and other information, acquires the address of the message server from the configuration information, and performs service registration to the message server. It should be noted that other instant message services, such as 5G messages, all have similar processes, that is, the client first acquires the configuration information related to the service through the configuration process, and then registers with the server based on the acquired configuration information, and then can start using the message service.
[0071] In the related art, each message client needs to acquire configuration information and register separately, which cannot meet the following common scenarios in the Internet of Things scenario:
[0072] 1. There are a large number of sensors, and since the sensors do not have direct networking capability or resources (such as power) to support long-term networking, the sensors are connected to the network through a terminal with direct networking capability; each sensor respectively obtains configuration information from a configuration management server and registers a business with a message server through the terminal, and the message interaction efficiency is low and the resource overhead of the terminal is too large.
[0073] 2. When a large number of Internet of Things terminals are deployed at the same time, they simultaneously request configuration information from the configuration management server and register a business with the message server, which causes great business pressure on the server.
[0074] Therefore, in the embodiments of the present application, the first terminal sends a first request to the first server; the first request carries a second request of each of the at least two clients; the second request is used to request to obtain configuration information of a message service or to request to register a message service; the first server receives the first request sent by the first terminal and returns a first response to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents the response of the first server to the corresponding second request; the first terminal receives the first response returned by the first server and issues the corresponding second response to each of the at least two clients. Thus, the clients in the first terminal batch proxy a plurality of clients to obtain configuration information and register a business, and it is not necessary for each client to respectively obtain configuration information and register a business from the first server, thereby saving the resources of the terminal, reducing the data processing burden of the server, and improving the message interaction efficiency.
[0075] The present application will be further described in detail below in conjunction with the drawings and embodiments.
[0076] First, in order to better illustrate the message service processing method provided by the embodiments of the present application, Figure 3 A system architecture example for supporting message interaction in an Internet of Things scenario is shown.
[0077] In Figure 3In the illustrated system architecture: terminal 1 is directly connected with the message server, while terminal 2 is limited by factors such as wireless connection capability and distance, and the message client in terminal 2 cannot be directly connected with the message server; the application server performs application logic processing based on the messages obtained from the message server, and the application client performs application logic processing based on the messages obtained from the message client, and the processing flow of the message service provided by the embodiments of the present application does not involve the application logic processing flow. Terminal 2 can discover terminal 1 through the 5G ProSe UE-to-Network Relay Discovery flow defined in 3GPP TS23.304 (or a similar flow in TS23.303), and the processing flow of the message service provided by the embodiments of the present application does not involve the discovery flow.
[0078] The configuration management client requests the configuration management server to obtain configuration information, and records the configuration information issued by the configuration management server. The configuration management server is configured to allocate configuration information related to the service of the configuration management client according to the configuration request sent by the configuration management client, such as the message server used by the configuration management client, the service identifier of the configuration management client, and the service related information (such as supported message shard size) of the configuration management client, and issue the allocated configuration information to the configuration management client. The configuration management client can be implemented in the message client, or can be implemented separately and then communicated with the message client through an interface, so that the message client obtains the configuration information.
[0079] In actual application, considering that most Internet of Things terminals belong to weak-capability terminals, in the embodiments of the present application, it is assumed that the weak-capability Internet of Things terminals do not support direct networking capability, only support message interaction between Internet of Things terminals, and cannot be directly connected with the message server, while another type of strong-capability Internet of Things terminals support direct networking capability and can be directly connected with the message server. In addition, as shown in the Figure 3 message client can communicate with the message server through the conversion gateway.
[0080] The embodiments of the present application provide a message service processing method, which is applied to a first terminal. Here, the first terminal can be understood as Figure 3 terminal 1 in the system architecture. Referring to Figure 4 , the method comprises:
[0081] Step 401: sending a first request to a first server.
[0082] The first request carries a second request of each of at least two clients; the second request is used to request to obtain configuration information of a message service or to request to register a message service.
[0083] Here, the at least two clients can include a client in the first terminal, or a client in the second terminal.
[0084] In actual application, the first terminal is directly connected with the network, and the second terminal connects the network through the first terminal, i.e., the second terminal cannot directly connect the network. In this embodiment, when the client initiating the second request is from the second terminal, it can be understood that the second terminal supports the message client. The message client in the second terminal and the message client in the first terminal perform message interaction through the MSGin5G-5 interface.
[0085] In actual application, the second request can be used to request to obtain configuration information of the message service. Since the configuration management client can be implemented separately or can be implemented in the message client, for example, the related functions of the configuration management client are integrated in the message client, correspondingly, the client initiating the second request is the configuration management client or the message client, and the first server is the configuration management server. At this time, the second request carries the device identifier of the message client.
[0086] In actual application, the second request can also be used to request to register the message service, correspondingly, the client initiating the second request is the message client, and the first server is the message server. At this time, the second request carries the service identifier and the registration related information of the message client.
[0087] In an embodiment, before the first request is sent to the first server, the method further includes:
[0088] The first request is generated based on the second request sent by each of the at least two clients in the cache.
[0089] Here, the first terminal caches the received second request, and when a set condition is met, for example, the number of cached second requests reaches a set number, or the timing of batch sending the second request is met, the first terminal packages the cached second request to obtain the first request.
[0090] In an embodiment, before the first request is generated, the method further includes:
[0091] The second request sent by the client is received.
[0092] It is determined whether to batch process the second request sent by the client based on at least one condition.
[0093] In the case where the condition is met, the corresponding second request is cached.
[0094] Herein, the first terminal judges whether the second request sent by the client can be batch processed based on at least one condition, and the second request sent by the client is batch processed when all of the at least one condition or any one of the at least one condition is met, and the first terminal caches the second request.
[0095] In an embodiment, the at least one condition comprises at least one of the following:
[0096] Whether the client supports batch processing;
[0097] Whether the message service supports the batch processing function;
[0098] Whether the interval duration of sending the first request by the first terminal reaches;
[0099] Whether the maximum number of the second request that can be carried in the first request reaches;
[0100] Whether the second request is urgent;
[0101] Whether the validity duration of the second request reaches.
[0102] Wherein, whether the client supports batch processing can be understood as whether the client allows the first terminal to batch process the second request. This information can be determined when the first terminal establishes a communication connection with the client, or can be carried in the second request sent by the client. The first identifier and the second duration can be carried in the second request.
[0103] In actual application, exemplarily, when at least one of the following conditions is met, the second request sent by the client is cached:
[0104] The client supports batch processing;
[0105] The message service supports the batch processing function;
[0106] The interval duration of sending the first request by the first terminal does not reach;
[0107] The maximum number of the second request that can be carried in the first request does not reach;
[0108] The second request is not urgent;
[0109] The validity duration of the second request does not reach.
[0110] In order to reduce the case that the client repeatedly sends the second request, in an embodiment, before the first request is generated, the method further comprises:
[0111] Returning a third response to the client sending the second request; the third response is used to instruct the client to wait for the second response corresponding to the second request.
[0112] Here, the third response is sent to the corresponding client, indicating that the configuration information or the registration result will be sent after the first terminal processes the second request in batch and obtains the batch processing result returned by the first server.
[0113] In an embodiment, the method further comprises: in the case where the condition is not met, sending a second request to the first server.
[0114] Here, in the case where any of the at least one condition is not met, the second request sent by the client cannot be processed in batch, at this time, the second request sent by the client is not cached, the first terminal forwards the received second request to the first server as a relay, receives the response about the second request sent by the first server, and forwards the response about the second request to the corresponding client, so that the corresponding client can receive the configuration information or the registration result in time.
[0115] In an embodiment, in the application scenario where the second terminal does not support the message client, after receiving the second request sent by the client, the method further comprises:
[0116] returning a fourth response to the client corresponding to the second request; wherein,
[0117] The fourth response represents the configuration information requested by the corresponding client, or represents the registration result of the message service requested by the corresponding client to register.
[0118] Here, the second terminal requests the configuration information from the first terminal, or requests to register the client to the first terminal. The message client in the second terminal and the message client in the first terminal interact through the MSGin5G-6 interface.
[0119] When the second request is used to request to obtain the configuration information of the message service, after receiving the second request sent by the client in the second terminal, the first terminal returns the application configuration information of the corresponding client in the first terminal to the client, for example, the message shard size supported by the message service. Since the client is not a message client, it does not need message-related configuration information, and the first terminal does not need to return message service-related configuration information, such as the service identifier of the message client, to the client. The first terminal does not need to interact with the configuration management server to obtain the configuration information of the client in the second terminal.
[0120] When the second request is used to request to register the message service, after receiving the second request sent by the message client in the second terminal, the first terminal returns the registration result about the second request to the message client.
[0121] It should be noted that, since the second terminal does not support the message client, the message client in the second terminal is invisible to the message server, and does not need to be registered for the message service, and only needs to be registered by the message client in the second terminal to the first terminal.
[0122] In the application scenario in which the second terminal does not support the message client, in the case that the message client in the first terminal needs to use the message service or the message client in the second terminal meets a set condition, the message client in the first terminal initiates the message service registration to the message server, and in the case that the message client in the first terminal completes the service registration, all the message clients registered to the message client in the first terminal are considered to complete the service registration. The set condition can be that the maximum proxy registration duration is reached, or the number of the message clients registered to the message client in the first terminal is equal to the maximum number of the proxy registration.
[0123] Step 402: receiving a first response returned by the first server.
[0124] The first response carries a second response corresponding to each of the at least two clients; and the second response represents a response of the first server to the corresponding second request.
[0125] Here, when the second request is used to request to obtain configuration information of the message service, the first response carries configuration information corresponding to each client, and the configuration information carries a service identifier of the message client and service-related information of the message client, for example, a message shard size supported by the message service. When the second request is used to request to register the message service, the first response carries a registration result corresponding to each client.
[0126] Step 403: issuing a corresponding second response to each of the at least two clients.
[0127] Here, the first terminal issues the corresponding second response to the client sending the second request.
[0128] In an embodiment, before issuing the corresponding second response to each of the at least two clients, the method comprises:
[0129] According to a first list corresponding to the first request, the second response corresponding to each of the at least two clients is split from the first response; and
[0130] The first list is used to record the client corresponding to the second request carried in the first request.
[0131] Here, the first response is packaged by the first server from responses of each client in the first list to the second request, so that the first terminal splits the second response corresponding to each client from the first response according to the first list corresponding to the first request after receiving the first response issued by the first server.
[0132] The embodiment of the application further provides a processing method of a message service, which is applied to a first server. Figure 3 The configuration management server or the message server in the system architecture example, refer to Figure 5 The method comprises the following steps.
[0133] Step 501: receiving a first request sent by a first terminal; wherein the first request carries a second request of each client in at least two clients; the second request is used for requesting to acquire configuration information of a message service or for requesting to register the message service.
[0134] Step 502: returning a first response to the first terminal; the first response carries a second response corresponding to each client in the at least two clients; the second response represents a response of the first server to the corresponding second request.
[0135] Here, the first server splits the second request corresponding to each client from the first request based on a first list corresponding to the first request.
[0136] In the case that the second request is used for requesting to acquire the configuration information of the message service, the first server allocates configuration information related to the message service to the corresponding client based on the second request corresponding to each client; and packs the configuration information corresponding to each client to obtain the first response, and returns the first response to the first terminal.
[0137] In the case that the second request is used for requesting to register the message service, the first server registers the corresponding client based on the second request corresponding to each client to obtain a registration result corresponding to each client; and packs the registration result corresponding to each client to obtain the first response, and returns the first response to the first terminal.
[0138] In actual application, for Figure 3 The message interaction of the client 1 on the terminal 1 directly connected with the first server (the configuration management server or the message server) in the system architecture example is as follows:
[0139] The embodiment of the application will be further described below in combination with the interactive flowchart.
[0140] As Figure 6As shown, in the application scenario that the second terminal supports the message client, the second request sent by the client in the second terminal is processed in batches through the client 1 in the first terminal; the first terminal is directly connected to the second server, and the second terminal cannot be directly connected to the first server; the client in the second terminal and the first terminal perform message interaction through a MSGin5G-6 interface; and the second request represents a configuration request or a registration request.
[0141] Step 1: The client 2a in the second terminal sends a second request to the client 1 in the first terminal.
[0142] Step 2: The client 1 in the first terminal determines whether to process the second request sent by the client 2a in batches based on at least one condition; the at least one condition includes at least one of the following:
[0143] Whether the client supports batch processing;
[0144] Whether the message service supports the batch processing function;
[0145] Whether the interval duration of the first terminal sending the first request reaches;
[0146] Whether the maximum number of the second request that can be carried in the first request reaches;
[0147] Whether the second request is urgent;
[0148] Whether the validity duration of the second request reaches.
[0149] Step 3a: In the case where the condition is met, the client 1 in the first terminal caches the second request sent by the client 2a.
[0150] Step 3b: After caching the second request sent by the client 2a, the client 1 in the first terminal returns a third response to the client 2a; the third response is used to instruct the client 2a to wait for the second response corresponding to the second request.
[0151] Step 4: The client 2b in the second terminal sends a second request to the client 1 in the first terminal.
[0152] Step 5: The client 1 in the first terminal determines whether to process the second request sent by the client 2b in batches based on at least one condition.
[0153] Step 6a: In the case where the condition is met, the client 1 in the first terminal caches the second request sent by the client 2b.
[0154] Step 6b: After the second request sent by the cache client 2b, the client 1 in the first terminal returns a third response to the client 2b; the third response is used to instruct the client 2b to wait for the second response corresponding to the second request.
[0155] Step 7: The client 1 in the first terminal sends a first request to the first server.
[0156] Wherein, the first terminal packs the second request cached by the client 1 into the first request, and sends the first request to the first server through the client 1. The first request carries a first list, and the first list is used to record the client corresponding to the second request carried in the first request.
[0157] Step 8: The client 1 in the first terminal receives the first response returned by the first server; the first response carries the second response corresponding to each client in the at least two clients; the second response represents the response of the first server to the corresponding second request.
[0158] Step 9: The client 1 in the first terminal splits the second response corresponding to each client in the at least two clients from the first response according to the first list corresponding to the first request.
[0159] Step 10: The client 1 in the first terminal issues the corresponding second response to the client 2a in the second terminal.
[0160] Step 11: The client 1 in the first terminal issues the corresponding second response to the client 2b in the second terminal.
[0161] As shown in the application scenario of supporting the message client in the second terminal, the second request sent by the client in the second terminal is forwarded through the client 1 in the first terminal, or the response about the second request returned by the first server is forwarded; the client in the second terminal and the first terminal perform message interaction through the MSGin5G-6 interface: Figure 7 Step 1: The client 2a in the second terminal sends a second request to the client 1 in the first terminal.
[0162] Step 2: The client 1 in the first terminal judges whether to process the second request sent by the client 2a in batches based on at least one condition.
[0163] Step 3: In the case where the condition is not met, the client 1 in the first terminal sends the second request to the first server.
[0164] Step 4: The client 1 in the first terminal receives the second response about the second request returned by the first server.
[0165]
[0166] Step 5: The client 1 in the first terminal forwards the corresponding second response to the client 2a in the second terminal.
[0167] Step 6: The client 2b in the second terminal sends a second request to the client 1 in the first terminal.
[0168] Step 7: The client 1 in the first terminal judges whether to batch process the second request sent by the client 2b based on at least one condition.
[0169] Step 8: In the case where the condition is not met, the client 1 in the first terminal sends the second request to the first server.
[0170] Step 9: The client 1 in the first terminal receives the second response returned by the first server about the second request.
[0171] Step 10: The client 1 in the first terminal forwards the corresponding second response to the client 2b in the second terminal.
[0172] As shown in Figure 8 In the application scenario where the second terminal does not support the message client, the message client in the second terminal does not need the message-related business configuration, such as the service identifier of the message service; the configuration management client in the second terminal obtains the corresponding configuration information, such as the message shard size, from the configuration information stored locally by the first terminal. That is, the first terminal does not need to interact with the configuration management server to obtain the configuration information requested by the configuration management client in the second terminal. The configuration management client in the second terminal interacts with the first terminal through the MSGin5G-5 interface. Figure 8 The configuration process of the message service shown includes:
[0173] Step 1: The configuration management client 2a in the second terminal sends a second request to the client 1 in the first terminal.
[0174] Step 2: The configuration management client 1 in the first terminal returns configuration information 2a to the client 2a in the second terminal.
[0175] Step 3: The configuration management client 2b in the second terminal sends a second request to the configuration management client 1 in the first terminal.
[0176] Step 4: The configuration management client 1 in the first terminal returns configuration information 2b to the configuration management client 2b in the second terminal.
[0177] As shown in Figure 9As shown, in the application scenario where the second terminal does not support the message client, the message client 2a and the message client 2b in the second terminal are invisible to the message server, and do not need to perform message service registration, and the message client 2a and the message client 2b in the second terminal only need to register with the message client 1 in the first terminal. Figure 9 The registration flow of the message service shown includes:
[0178] Step 1: The message client 2a in the second terminal sends a second request to the message client 1 in the first terminal.
[0179] Step 2: The message client 1 in the first terminal returns a registration result 2a to the message client 2a in the second terminal.
[0180] Step 3: The message client 2b in the second terminal sends a second request to the message client 1 in the first terminal.
[0181] Step 4: The message client 1 in the first terminal returns a registration result 2b to the message client 2b in the second terminal.
[0182] Step 5: The message client 1 in the first terminal initiates service registration to the message server.
[0183] In a case where the message client 1 in the first terminal needs to use the message service, or the message clients in the second terminal meet a set condition, the message client 1 in the first terminal initiates message service registration to the message server, and in a case where the message client 1 in the first terminal completes service registration, all the message clients registered to the first terminal are considered to complete service registration. The set condition can be reaching a maximum proxy registration duration, a number of message clients registered to the message client in the first terminal being equal to a maximum proxy registration number, and the like.
[0184] In the message service processing method, apparatus, related device, and storage medium provided by the embodiments of the present application, a first terminal sends a first request to a first server; the first request carries a second request of each of at least two clients; the second request is used to request to obtain configuration information of a message service or is used to request to register the message service; the first server receives the first request sent by the first terminal, and returns a first response to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request; and the first terminal receives the first response returned by the first server, and distributes the corresponding second response to each of the at least two clients. In this way, the first terminal is used to batch proxy a plurality of clients to obtain configuration information and perform service registration, and each client does not need to separately obtain configuration information from a server and perform service registration, thereby saving resources of the terminal, reducing a data processing burden of the server, and improving message interaction efficiency.
[0185] To implement the message service processing method of the embodiments of the present application, the embodiments of the present application further provide a message service processing apparatus arranged on a first terminal, as shown in Figure 10 The apparatus comprises:
[0186] A first sending unit 101 is configured to send a first request to a first server; wherein the first request carries a second request of each of at least two clients; the second request is used to request to obtain configuration information of a message service or is used to request to register the message service.
[0187] A first receiving unit 102 is configured to receive a first response returned by the first server; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request.
[0188] A second sending unit 103 is configured to distribute the corresponding second response to each of the at least two clients.
[0189] In an embodiment, the apparatus further comprises:
[0190] A generating unit is configured to generate the first request based on the second request sent by each of the at least two clients in the cache.
[0191] In an embodiment, the apparatus further comprises:
[0192] A second receiving unit is configured to receive the second request sent by the client.
[0193] A judging unit is configured to judge whether to batch process the second request sent by the client based on at least one condition.
[0194] a cache unit, configured to cache the corresponding second request if the condition is met.
[0195] In an embodiment, the at least one condition comprises at least one of the following:
[0196] whether the client supports batch processing;
[0197] whether the message service supports the batch processing function;
[0198] whether the interval duration of sending the first request by the first terminal reaches;
[0199] whether the maximum number of the second requests that can be carried in the first request reaches;
[0200] whether the second request is urgent;
[0201] whether the validity duration of the second request reaches.
[0202] In an embodiment, the apparatus further comprises:
[0203] a fourth sending unit, configured to return a third response to the client corresponding to the second request; the third response is used to instruct the client to wait for the second response corresponding to the second request.
[0204] In an embodiment, the apparatus further comprises:
[0205] a fifth sending unit, configured to send the second request to the first server if the condition is not met.
[0206] In an embodiment, the apparatus further comprises:
[0207] a sixth sending unit, configured to return a fourth response to the client corresponding to the second request; wherein,
[0208] the fourth response represents configuration information of the corresponding client request, or represents a registration result of the message service requested by the corresponding client to register.
[0209] In an embodiment, the apparatus further comprises:
[0210] a splitting unit, configured to split the second response corresponding to each of the at least two clients from the first response according to a first list corresponding to the first request; wherein,
[0211] the first list is used to record the client corresponding to the second request carried in the first request.
[0212] In actual application, the first sending unit 101, the first receiving unit 102, the second sending unit 103, the generating unit, the second receiving unit, the fourth sending unit, the fifth sending unit, the sixth sending unit and the splitting unit can be implemented by a processor in a processing device of the message service in combination with a communication interface, and the cache unit can be implemented by the processor in the processing device of the message service.
[0213] It should be noted that the message service processing device provided in the above embodiments is only used for example to illustrate the division of the above program modules when processing the message service, and in actual application, the above processing can be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the above processing. In addition, the message service processing device and the message service processing method provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.
[0214] In order to implement the message service processing method of the embodiments of the present application, the embodiments of the present application further provide a message service processing device arranged on a first server, wherein the first server includes a configuration management server or a message server, as shown in Figure 11 The device includes:
[0215] The second receiving unit 111 is configured to receive a first request sent by a first terminal, wherein the first request carries a second request of each of at least two clients; and the second request is used for requesting to obtain configuration information of a message service or is used for requesting to register the message service.
[0216] The third sending unit 112 is configured to return a first response to the first terminal, wherein the first response carries a second response corresponding to each of the at least two clients; and the second response represents a response of the first server to the corresponding second request.
[0217] In actual application, the second receiving unit 111 and the third sending unit 112 can be implemented by a processor in a processing device of the message service in combination with a communication interface.
[0218] It should be noted that the message receiving device provided in the above embodiments is only used for example to illustrate the division of the above program modules when receiving the message, and in actual application, the above processing can be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the above processing. In addition, the message receiving device and the message receiving method provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.
[0219] Based on the hardware implementation of the above program modules, and in order to implement the method of the first terminal side of the embodiments of the present application, the embodiments of the present application further provide an electronic device, such as Figure 12 As shown in the figure, the first terminal 12 comprises:
[0220] The first communication interface 121 is capable of interacting with other network nodes.
[0221] The first processor 122 is connected with the first communication interface 121 to realize the information interaction with other network nodes, and is used to run the computer program to execute the method provided by one or more technical solutions of the first terminal side. The computer program is stored on the first memory 123.
[0222] Specifically, the first communication interface 121 is used to:
[0223] Send a first request to the first server; wherein the first request carries a second request of each of the at least two clients; the second request is used to request to obtain the configuration information of the message service or to request to register the message service;
[0224] Receive the first response returned by the first server; the first response carries a second response corresponding to each of the at least two clients; the second response represents the response of the first server to the corresponding second request;
[0225] Distribute the corresponding second response to each of the at least two clients.
[0226] In an embodiment, the first processor 122 is used to generate the first request based on the second request sent by each of the at least two clients in the cache.
[0227] In an embodiment, the first communication interface 121 is further used to receive the second request sent by the client; the first processor 122 is further used to judge whether to batch process the second request sent by the client based on at least one condition; and the first processor 122 is further used to cache the corresponding second request in the case of meeting the condition.
[0228] In an embodiment, the at least one condition comprises at least one of the following:
[0229] Whether the client supports batch processing;
[0230] Whether the message service supports the batch processing function;
[0231] Whether the interval duration of sending the first request by the first terminal reaches;
[0232] Whether the maximum number of the second request that can be carried in the first request reaches;
[0233] whether the second request is urgent;
[0234] whether the validity duration of the second request reaches.
[0235] In an embodiment, the first communication interface 121 is further configured to: return a third response to the client corresponding to the second request; the third response is used to instruct the client to wait for the second response corresponding to the second request.
[0236] In an embodiment, the first communication interface 121 is further configured to: send the second request to the first server in the case that the condition is not met.
[0237] In an embodiment, the first communication interface 121 is further configured to: return a fourth response to the client corresponding to the second request; wherein,
[0238] The fourth response represents the configuration information requested by the corresponding client, or represents the registration result of the message service requested by the corresponding client to register.
[0239] In an embodiment, the first processor 122 is further configured to: according to the first list corresponding to the first request, split the second response corresponding to each client in the at least two clients from the first response; wherein, the first list is used to record the client corresponding to the second request carried in the first request.
[0240] It should be noted that the specific processing process of the first processor 122 and the first communication interface 121 can be understood with reference to the above method.
[0241] Of course, in actual application, various components in the first terminal 12 are coupled together through the bus system 124. It can be understood that the bus system 124 is used to realize the connection and communication between these components. In addition to including a data bus, the bus system 124 also includes a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the bus system 124 in Figure 12 .
[0242] The first memory 123 in the embodiment of the application is used to store various types of data to support the operation of the first terminal 12. Examples of these data include: any computer programs used to operate on the first terminal 12.
[0243] The method disclosed by the embodiments of the present application can be applied to the first processor 122 or implemented by the first processor 122. The first processor 122 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuits of hardware in the first processor 122 or instructions in the form of software. The first processor 122 described above can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The first processor 122 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of the present application, the hardware decoding processor can be directly embodied to execute the steps of the method, or the hardware and software modules in the decoding processor can be combined to execute the steps of the method. The software module can be located in a storage medium, which is located in the first memory 123, and the first processor 122 reads the information in the first memory 123 and combines the hardware to complete the steps of the method.
[0244] In the exemplary embodiments, the first terminal 12 can be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, micro controllers (MCUs), microprocessors (Microprocessors), or other electronic elements, for executing the foregoing method.
[0245] Based on the hardware implementation of the above program module, and in order to implement the method of the first server side in the embodiments of the present application, the embodiments of the present application further provide a first server, which includes a configuration management server or a message server, as shown in Figure 13 The first server 13 includes:
[0246] The second communication interface 131 can interact with other network nodes.
[0247] The second processor 132 is connected with the second communication interface 131 to realize information interaction with other network nodes, and is used to run a computer program to execute the method provided by one or more technical solutions of the electronic device. The computer program is stored in the second memory 133.
[0248] Specifically, the second communication interface 131 is configured to:
[0249] receive a first request sent by a first terminal; wherein the first request carries a second request of each of at least two clients; the second request is used to request configuration information of a message service or is used to request registration of the message service;
[0250] return a first response to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents a response of the first server to the corresponding second request.
[0251] It should be noted that the specific processing process of the second processor 132 and the second communication interface 131 can be understood with reference to the above method.
[0252] Of course, in actual application, various components in the first server 13 are coupled together through a bus system 134. It can be understood that the bus system 134 is used to realize the connection and communication between the components. The bus system 134 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the bus system 134 in the Figure 13 .
[0253] The second memory 133 in the embodiment of the application is used to store various types of data to support the operation of the electronic device 13. Examples of these data include any computer program used to operate on the first server 13.
[0254] The method disclosed by the embodiments of the present application can be applied to the second processor 132 or implemented by the second processor 132. The second processor 132 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the second processor 132 or instructions in the form of software. The second processor 132 can be a general processor, DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The second processor 132 can implement or execute each method, step and logic block disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of the present application, the hardware decoding processor can be directly embodied to execute the steps of the foregoing method, or the hardware and software modules in the decoding processor can be combined to execute the steps of the foregoing method. The software module can be located in a storage medium, and the storage medium is located in the second memory 133. The second processor 132 reads the information in the second memory 133 and combines the hardware to complete the steps of the foregoing method.
[0255] In the exemplary embodiments, the first server 13 can be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic elements, for executing the foregoing method.
[0256] It can be understood that the memory (the first memory 123 and the second memory 133) of the embodiments of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM). The magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as a static random access memory (SRAM), a synchronous static random access memory (SSRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a sync link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memory.
[0257] In the exemplary embodiments, the embodiments of the present application also provide a storage medium, i.e., a computer storage medium, specifically a computer readable storage medium, such as a first memory 123 storing a computer program executable by the first processor 122 of the first terminal 12 to complete the steps of the aforementioned first terminal side method. For example, a second memory 133 storing a computer program executable by the second processor 132 of the first server 13 to complete the steps of the aforementioned electronic device side method. The computer readable storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM, etc.
[0258] It should be noted that "first", "second", etc. are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0259] The term "and / or" herein is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any combination of at least two of any one or more of a plurality, for example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0260] In addition, the technical solutions described in the embodiments of the present application can be arbitrarily combined without conflict.
[0261] The above is only a preferred embodiment of the present application, and is not intended to limit the protection scope of the present application.
Claims
1. A method for processing message services, characterized in that, Applied to a first terminal, the method includes: A first request is sent to a first server; wherein the first request carries a second request from each of at least two clients; the second request is used to request configuration information for a messaging service or to request registration for a messaging service; the first request is a package of the second requests from each of the at least two clients; the at least two clients include clients in a second terminal, the second terminal being connected to the first server through the first terminal, but not supporting direct connection to the first server, not supporting direct network access, and only supporting message interaction between terminals; the first terminal supports direct network access and supports direct connection to the first server; The system receives a first response returned by the first server; the first response carries a second response corresponding to each of the at least two clients; the second response represents the first server's response to the corresponding second request, and carries the configuration information or message service registration result corresponding to the client. A corresponding second response is sent to each of the at least two clients; the second response for each of the at least two clients is obtained by splitting the first response.
2. The method according to claim 1, characterized in that, Before sending the first request to the first server, the method further includes: The first request is generated based on a second request sent by each of at least two clients, which are cached.
3. The method according to claim 2, characterized in that, Before generating the first request, the method further includes: Receive the second request sent by the client; Determine whether to batch process the second request sent by the client based on at least one condition; If the conditions are met, cache the corresponding second request.
4. The method according to claim 3, characterized in that, The at least one condition includes at least one of the following: Does the client support batch processing? Does the messaging service support batch processing? Whether the interval between the first terminal sending the first request has been reached; Has the maximum number of second requests that can be carried in the first request been reached? Is the second request urgent? Has the validity period of the second request been reached? 5. The method according to claim 3 or 4, characterized in that, Before generating the first request, the method further includes: A third response is returned to the client corresponding to the second request; the third response is used to instruct the client to wait for the second response corresponding to the second request to be sent.
6. The method according to claim 3 or 4, characterized in that, The method further includes: If the conditions are not met, a second request is sent to the first server.
7. The method according to claim 6, characterized in that, After receiving the second request from the client, the method further includes: A fourth response is returned to the client corresponding to the second request; where, The fourth response represents the configuration information of the corresponding client request, or the registration result of the message service registered by the corresponding client request.
8. The method according to claim 1, characterized in that, Before sending a corresponding second response to each of the at least two clients, the method includes: Based on the first list corresponding to the first request, a second response corresponding to each of the at least two clients is extracted from the first response; wherein... The first list is used to record the client corresponding to the second request carried in the first request.
9. A method for processing message services, characterized in that, Applied to a first server, the method includes: The system receives a first request sent by a first terminal; wherein the first request carries a second request from each of at least two clients; the second request is used to request configuration information for a messaging service or to request registration for a messaging service; the first request is a package of the second requests from each of the at least two clients; the at least two clients include clients in a second terminal, the second terminal being connected to the first server through the first terminal, but not supporting direct connection to the first server, not supporting direct network access, and only supporting message interaction between terminals; the first terminal supports direct network access and supports direct connection to the first server; A first response is returned to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents the first server's response to the corresponding second request, carrying the configuration information or message service registration result corresponding to the corresponding client; the second response corresponding to each of the at least two clients is obtained by splitting it from the first response.
10. A message service processing apparatus, characterized in that, include: A first sending unit is configured to send a first request to a first server; wherein the first request carries a second request from each of at least two clients; the second request is used to request configuration information for a messaging service or to request registration for a messaging service; the first request is a package of the second requests from each of the at least two clients; the at least two clients include clients in a second terminal, the second terminal being connected to the first server through the first terminal, but not supporting direct connection to the first server, not supporting direct network connectivity, and only supporting message interaction between terminals; the first terminal supports direct network connectivity and supports direct connection to the first server; The first receiving unit is configured to receive a first response returned by the first server; the first response carries a second response corresponding to each of the at least two clients; the second response represents the first server's response to the corresponding second request, and carries the configuration information or message service registration result corresponding to the client. The second sending unit is used to send a corresponding second response to each of the at least two clients; the second response for each of the at least two clients is obtained by splitting the first response.
11. A message service processing apparatus, characterized in that, include: The second receiving unit is configured to receive a first request sent by the first terminal; wherein the first request carries a second request from each of at least two clients; the second request is used to request configuration information for a messaging service or to request registration for a messaging service; the first request is a package of the second requests from each of the at least two clients; the at least two clients include clients in the second terminal, the second terminal being connected to the first server through the first terminal, but not supporting direct connection to the first server, not supporting direct network connectivity, and only supporting message interaction between terminals; the first terminal supports direct network connectivity and supports direct connection to the first server; The third sending unit is used to return a first response to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents the first server's response to the corresponding second request, carrying the configuration information or message service registration result corresponding to the corresponding client; the second response corresponding to each of the at least two clients is obtained by splitting it from the first response.
12. A first terminal, characterized in that, It includes a first processor and a first communication interface, wherein the first communication interface is used for: A first request is sent to a first server; wherein the first request carries a second request from each of at least two clients; the second request is used to request configuration information for a messaging service or to request registration for a messaging service; the first request is a package of the second requests from each of the at least two clients; the at least two clients include clients in a second terminal, the second terminal being connected to the first server through the first terminal, but not supporting direct connection to the first server, not supporting direct network access, and only supporting message interaction between terminals; the first terminal supports direct network access and supports direct connection to the first server; The system receives a first response returned by the first server; the first response carries a second response corresponding to each of the at least two clients; the second response represents the first server's response to the corresponding second request, and carries the configuration information or message service registration result corresponding to the client. A corresponding second response is sent to each of the at least two clients; the second response for each of the at least two clients is obtained by splitting the first response.
13. A first server, characterized in that, It includes a second processor and a second communication interface, wherein the second communication interface performs: The system receives a first request sent by a first terminal; wherein the first request carries a second request from each of at least two clients; the second request is used to request configuration information for a messaging service or to request registration for a messaging service; the first request is a package of the second requests from each of the at least two clients; the at least two clients include clients in a second terminal, the second terminal being connected to the first server through the first terminal, but not supporting direct connection to the first server, not supporting direct network access, and only supporting message interaction between terminals; the first terminal supports direct network access and supports direct connection to the first server; A first response is returned to the first terminal; the first response carries a second response corresponding to each of the at least two clients; the second response represents the first server's response to the corresponding second request, carrying the configuration information or message service registration result corresponding to the corresponding client; the second response corresponding to each of the at least two clients is obtained by splitting it from the first response.
14. A first terminal, characterized in that, This includes a processor and memory for storing computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 8.
15. A first server, characterized in that, This includes a processor and memory for storing computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method described in claim 9.
16. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8, or the steps of the method according to claim 9.
Citation Information
Patent Citations
Business processing method and device and electronic equipment
CN111327691A
Authorization method of batch equipment
CN111405046A
Mass Internet of Things equipment authentication method, storage medium and information data processing terminal
CN113079132A