Message sending method and device, message receiving method and device

By generating differential messages and processing them using compression coding algorithms, the problem of message transmission limits in existing technologies is solved, enabling the transmission of larger messages within a limited network transmission space.

CN116506815BActive Publication Date: 2025-12-19HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310272637.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2025-12-19
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

In existing technologies, there is still an upper limit to reducing the content of transmitted messages by compression or cropping, which makes it impossible to transmit larger messages.

Method used

By using pre-set templates and generating differential messages, and then processing these differential messages using compression and encoding algorithms, the upper limit of message transmission can be broken.

Benefits of technology

It enables the transmission of larger messages within a limited network transmission space, solving the problem of message transmission limit in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116506815B_ABST
    Figure CN116506815B_ABST
Patent Text Reader

Abstract

The application discloses a message sending method and device, a message receiving method and device, and relates to the technical field of smart homes. The message sending method comprises the following steps: acquiring a first message template corresponding to a template identifier according to the template identifier carried by a message pushing request, wherein the message pushing request is used for sending a pushing message, and the template identifier is used for identifying the first message template; generating a difference message of the pushing message and a template message in the first message template, wherein the difference message is used for indicating the different content of the pushing message and the template message; processing the difference message and the template identifier, and sending a target message obtained by processing to a target application; and through the above scheme, the problem that the upper limit still exists in the way of reducing the delivery message content by compression or cropping in the prior art, which leads to the problem that a larger message cannot be delivered.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of smart home, in particular to a message sending method and device, a message receiving method and device. BACKGROUND

[0002] With the continuous application of mobile applications in life, the use scenarios of long-link message push solutions in mobile applications gradually increase, and the message content also continuously increases. However, mobile phone manufacturers have made different degrees of restrictions on the length of messages, such as a mobile phone manufacturer limits the length of an additional message field to 1024 characters. It can be seen that, with the continuous development of business and the continuous transmission of various information streams, the transmission media are relied on, and therefore are subject to the limitations of the transmission media themselves. In particular, information that needs to be transmitted through a network is subject to restrictions on information length and information byte size by the network platform.

[0003] To solve the above problems, current technical solutions mostly perform clipping and compression on information itself. For example, a commonly used lightweight data interaction format JSON can shorten information content by agreeing on shorter names, or other more compact information transmission formats are used. In addition, data is compressed by a compression algorithm before transmission, thereby reducing the length of the information.

[0004] However, the above technical solutions still have a length limit, such as a maximum compression ratio or a maximum clipping size, and therefore still cannot transmit larger messages.

[0005] To solve the problem that the existing technology still has a limit on the way of reducing the transmission of message content by compression or clipping, which leads to the inability to transmit larger messages, no effective solution has been proposed. SUMMARY

[0006] Embodiments of the present application provide a message sending method and device, and a message receiving method and device, to at least solve the problem that the existing technology still has a limit on the way of reducing the transmission of message content by compression or clipping, which leads to the inability to transmit larger messages.

[0007] According to one embodiment of the present application, a message sending method is provided, including: obtaining a first message template corresponding to a template identifier according to the template identifier carried by a message push request, wherein the message push request is used to send a push message, and the template identifier is used to identify the first message template; generating a difference message of the push message and a template message in the first message template, wherein the difference message is used to indicate the difference content of the push message and the template message; processing the difference message and the template identifier, and sending a target message obtained to a target application.

[0008] In an example embodiment, generating the difference message of the push message and the template message in the first message template comprises: comparing the push message with the template message to determine a plurality of difference contents of the push message and the template message; determining a plurality of position information corresponding to the plurality of difference contents, wherein the plurality of position information is used to indicate positions of the plurality of difference contents in the template message; and determining the plurality of difference contents and the plurality of position information as the difference message.

[0009] In an example embodiment, processing the difference message and the template identifier and sending a target message obtained to a target application comprises: compressing the difference message and the template identifier by using a first compression algorithm to obtain a compressed message; encoding the compressed message by using a first encoding algorithm to obtain an encoded message; determining the first compression algorithm, the first encoding algorithm, and the encoded message as the target message, and sending the target message to the target application.

[0010] According to an example embodiment of the present application, an example embodiment further provides a message receiving method, characterized in that the method comprises: receiving a target message sent by a push system; parsing a difference message and a template identifier from the target message, wherein the difference message is a difference message of a push message and a template message in a first message template, the template identifier is used to identify the first message template, and the difference message is used to indicate different contents of the push message and the template message; obtaining the first message template corresponding to the template identifier according to the template identifier, and determining a push message according to the difference message and the template message.

[0011] In an example embodiment, parsing the difference message and the template identifier from the target message comprises: parsing a first compression algorithm, a first encoding algorithm, and an encoded message from the target message, wherein the encoded message is obtained by processing the difference message and the template identifier by using the first compression algorithm and the first encoding algorithm; decoding the encoded message by using the first encoding algorithm, and decompressing the decoded encoded message by using the first compression algorithm to obtain the difference message and the template identifier.

[0012] In an example embodiment, determining a push message according to the difference message and the template message comprises: obtaining a plurality of difference contents and a plurality of position information contained in the difference message, wherein the plurality of position information is used to indicate positions of the plurality of difference contents in the template message; and respectively replacing the plurality of difference contents into the template message according to the plurality of position information to obtain the push message.

[0013] According to another embodiment of the present application, a message sending device is also provided, comprising: an obtaining module, configured to obtain a first message template corresponding to a template identifier according to the template identifier carried by a message push request, wherein the message push request is used for sending a push message, and the template identifier is used for identifying the first message template; a generating module, configured to generate a difference message of the push message and a template message in the first message template, wherein the difference message is used for indicating different contents of the push message and the template message; and a processing module, configured to process the difference message and the template identifier, and send a target message obtained by processing to a target application.

[0014] According to still another embodiment of the present application, a message receiving device is also provided, comprising: a receiving module, configured to receive a target message sent by a push system; an analyzing module, configured to analyze a difference message and a template identifier from the target message, wherein the difference message is a difference message of a push message and a template message in a first message template, the template identifier is used for identifying the first message template, and the difference message is used for indicating different contents of the push message and the template message; and a determining module, configured to obtain the first message template corresponding to the template identifier according to the template identifier, and determine a push message according to the difference message and the template message.

[0015] According to still another aspect of the present application, a computer readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the message sending method or the message receiving method when running.

[0016] According to still another aspect of the present application, an electronic device is also provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the message sending method or the message receiving method through the computer program.

[0017] In the embodiments of the present application, a first message template corresponding to a template identifier carried by a message push request is obtained, wherein the message push request is used for sending a push message, and the template identifier is used for identifying the first message template; a difference message of the push message and a template message in the first message template is generated, wherein the difference message is different contents of the push message and the template message; then the difference message and the template identifier are processed to obtain a target message, and finally the target message is sent to a target application; by using the above technical solution, the problem that the upper limit of the way of reducing the delivery message content by compression or cropping still exists in the prior art, and a larger message cannot be delivered is solved; the upper limit of message delivery is broken through by pre-setting a template and generating a difference message through the template, so that a larger message can be delivered. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the accompanying drawings required by the embodiments or prior art description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, the other drawings can be obtained based on these drawings without any creative effort.

[0020] Figure 1 is a hardware environment schematic diagram of an optional message sending method according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of an optional message sending method according to an embodiment of the present application;

[0022] Figure 3 is a flow chart of an optional message receiving method according to an embodiment of the present application;

[0023] Figure 4 is a system framework diagram of an optional message passing system according to an embodiment of the present application;

[0024] Figure 5 is a flow timing chart of an optional message passing process according to an embodiment of the present application;

[0025] Figure 6 is a structural block diagram of an optional message sending device according to an embodiment of the present application;

[0026] Figure 7 is a structural block diagram of an optional message receiving device according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the technical personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort should be within the scope of protection of the present application.

[0028] It should be noted that the terms "first", "second" and the like in the description and in the claims of the present application and above-described accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged, where appropriate, so that the embodiments of the present application described herein can be carried out in other than the order shown or described herein. Furthermore, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, processes, methods, systems, products, or devices that include a series of steps or units are not necessarily limited to those clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0029] According to an aspect of the embodiments of the present application, a message sending method is provided. The message sending method is widely applied to smart home (Smart Home), smart home, smart home device ecology, intelligence house (Intelligence House) ecology, and whole-house intelligent digital control application scenarios. Optionally, in the present embodiment, the device upgrading method can be applied to the hardware environment composed of a terminal device 102 and a server 104 as shown in the figure. Figure 1 As shown in the figure, the server 104 is connected with the terminal device 102 through a network, which can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, a database can be set on the server or independently of the server, which is used to provide data storage services for the server 104, cloud computing and / or edge computing services can be configured on the server or independently of the server, which is used to provide data operation services for the server 104. Figure 1 As shown in the figure, the server 104 is connected with the terminal device 102 through a network, which can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, a database can be set on the server or independently of the server, which is used to provide data storage services for the server 104, cloud computing and / or edge computing services can be configured on the server or independently of the server, which is used to provide data operation services for the server 104.

[0030] The network can include but is not limited to at least one of the following: wired network, wireless network. The wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network. The wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart oven, refrigerator device, smart oven, smart oven, smart washing machine, smart water heater, smart washing device, smart dishwasher, smart projection device, smart television, smart clothesline, smart curtain, smart audio and video, smart socket, smart sound, smart sound box, smart fresh air device, smart kitchen and bathroom device, smart bathroom device, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification device, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.

[0031] The embodiment provides a message sending method applied to a push system, Figure 2 is a flowchart of an optional message sending method according to the embodiment of the application, and the flowchart comprises the following steps:

[0032] In step S202, a first message template corresponding to a template identifier is acquired according to the template identifier carried in a message push request, wherein the message push request is used for sending a push message, and the template identifier is used for identifying the first message template.

[0033] It should be noted that the first message template can be acquired from a preset data source or from a network resource, and the application does not limit this.

[0034] In step S204, a difference message of the push message and a template message in the first message template is generated, wherein the difference message is used for indicating the difference content of the push message and the template message.

[0035] In step S206, the difference message and the template identifier are processed, and a target message obtained by the processing is sent to a target application.

[0036] It should be noted that the processing of the difference message and the template identifier can include compression and encoding processing, and other processing can also be performed, and the application does not limit this.

[0037] In the embodiment of the application, a first message template corresponding to a template identifier carried in a message push request is acquired, wherein the message push request is used for sending a push message, and the template identifier is used for identifying the first message template; a difference message of the push message and a template message in the first message template is generated, the difference message being the difference content of the push message and the template message; then the difference message and the template identifier are processed to obtain a target message, and finally the target message is sent to a target application; by using the technical solution, the problem that the upper limit of the way of reducing the delivery message content by compression or cropping still exists in the prior art, and a larger message cannot be delivered is solved; the upper limit of message delivery is broken through by presetting a template and generating a difference message through the template, so that a larger message can be delivered.

[0038] Optionally, the step S204 of generating the difference message of the push message and the template message in the first message template can be performed through the following scheme, comprising: comparing the push message with the template message to determine a plurality of difference contents of the push message and the template message; determining a plurality of position information corresponding to the plurality of difference contents, wherein the plurality of position information is used for indicating the positions of the plurality of difference contents in the template message; and determining the plurality of difference contents and the plurality of position information as the difference message.

[0039] The template message is similar to the push message content, and therefore, the difference between the template message and the push message can be compared, the position and content of the difference are marked, the position is the position of the difference content in the template message, and the difference content is the difference content of the push message; a plurality of difference contents and a plurality of position information corresponding to the plurality of difference contents of the push message and the template message are determined, and the difference message is obtained.

[0040] Optionally, the step S206 is performed: the difference message and the template identifier are processed, and a target message obtained is sent to a target application. The following scheme can be used: the difference message and the template identifier are compressed by using a first compression algorithm to obtain a compressed message; the compressed message is encoded by using a first encoding algorithm to obtain an encoded message; the first compression algorithm, the first encoding algorithm, and the encoded message are determined as the target message, and the target message is sent to the target application.

[0041] The difference message and the template identifier are first compressed by using a first compression algorithm, the compressed message is then encoded by using a first encoding algorithm, so that the size of the message body to be transmitted is further reduced, and then the encoded message, the first compression algorithm, and the first encoding algorithm are sent to the target application as the target message.

[0042] In this embodiment, a message receiving method is also provided, which is applied to a target application, Figure 3 is a flowchart of an optional message receiving method according to an embodiment of the present application, and the flowchart includes the following steps:

[0043] S302, receiving a target message sent by a push system;

[0044] S304, parsing a difference message and a template identifier from the target message, wherein the difference message is a difference message of a push message and a template message in a first message template, the template identifier is used to identify the first message template, and the difference message is used to indicate the difference content of the push message and the template message;

[0045] S306, obtaining the first message template corresponding to the template identifier according to the template identifier, and determining a push message according to the difference message and the template message.

[0046] It should be noted that the first message template can be obtained from a preset data source or from a network resource, and the present application does not limit this.

[0047] In the embodiment of the present application, after receiving the target message sent by the push system, the target message is parsed, and a differential message and a template identifier are parsed from the target message, wherein the differential message is a differential message of a push message and a template message in a first message template, the template identifier is used to identify the first message template, and the differential message is a differential content of the push message and the template message; the first message template corresponding to the template identifier is acquired according to the template identifier, and then the push message is restored according to the differential message and the template message of the first message template; by using the above technical solution, the problem that the upper limit still exists in the way of reducing the delivery message content by compression or cropping in the prior art is solved, and the upper limit of message delivery is broken through by pre-setting a template and generating a differential message through the template, so that a larger message can be delivered.

[0048] Optionally, the step S304 is performed: the differential message and the template identifier are parsed from the target message, which can be implemented by the following scheme, including: a first compression algorithm, a first encoding algorithm and an encoded message are parsed from the target message, wherein the encoded message is obtained by processing the differential message and the template identifier by using the first compression algorithm and the first encoding algorithm; the encoded message is decoded by using the first encoding algorithm, and the decoded encoded message is decompressed by using the first compression algorithm, so as to obtain the differential message and the template identifier.

[0049] First, the first compression algorithm and the first encoding algorithm are acquired from the target message, so that the differential message and the template identifier can be obtained by decoding and decompressing the encoded message according to the first compression algorithm and the first encoding algorithm; wherein the encoded message is obtained by processing the differential message and the template identifier by using the first compression algorithm and the first encoding algorithm; by the above steps, the push system and the target application can determine the algorithm for compressing and encoding data, so that the target application can quickly parse the differential message and the template identifier.

[0050] Optionally, the step S306 is performed: the push message is determined according to the differential message and the template message, which can be implemented by the following scheme, specifically including: a plurality of differential contents and a plurality of position information contained in the differential message are acquired, wherein the plurality of position information is used to indicate the positions of the plurality of differential contents in the template message; the plurality of differential contents are respectively replaced into the template message according to the plurality of position information, so as to obtain the push message.

[0051] The process of determining the push message includes: obtaining a plurality of differential contents and a plurality of position information contained in the differential message, wherein the plurality of position information is used to indicate the positions of the plurality of differential contents in the template message; then according to the obtained template message of the first message template, the differential contents are replaced into the corresponding positions in sequence, and the push message is restored, thereby completing the message transmission between the push system and the target application.

[0052] The above message sending method and message receiving method can be applied to a message transmission system composed of an app and its support system, as shown in Figure 4

[0053] The app internally includes a push module and an app business module.

[0054] The push module includes: a push message receiver responsible for receiving the message pushed by the message push system; a message parser responsible for parsing the message; a template manager and a differential merging processor will be used according to the parsed message content; after the message parsing is completed, the appropriate message will be forwarded to the business layer (i.e. the app business module) of the app according to the need; the template manager is mainly used to parse the template from the data source, and the specific template content is obtained through the template id in the message; then the complete message content is merged through the differential merging processor according to the specific template content and the differential message provided in the message; the processing mode of the message is determined according to the category of the complete message content, including forwarding the message to the app business layer or other processing mode, which is not limited by the present application.

[0055] The support system includes:

[0056] A business push message sending system for sending a business push request message;

[0057] A message differential generation system for generating a differential message of a push message;

[0058] A template management system for managing the template for generating the differential message;

[0059] A message push system for sending the generated differential message;

[0060] A template acquisition network interface for acquiring the template from the network;

[0061] An app construction system for constructing the connected app.

[0062] ​Through the message delivery system, the message pushing from the pushing system to the target application is completed, the pushing message is generated into a differential message according to the template content, the differential message is delivered to the target application, and then the differential message is restored into the pushing message according to the template content, so that the problem that the upper limit still exists in the prior art by reducing the delivery message content through compression or cutting, and a larger message cannot be delivered is solved; the upper limit of message delivery is broken through by presetting the template and generating the differential message through the template, so that a larger message can be delivered.

[0063] In order to further describe the above message delivery process, the embodiments of the present application combine Figure 5 The above process is further described, Figure 5 is a flow timing diagram of an optional message delivery process of the embodiments of the present application, and the message delivery process is applied to Figure 4 the message delivery system as shown in Figure 5 , and includes:

[0064] Step 1: an operator or a program triggers a message pushing request;

[0065] Step 2: a business pushing system calls a pushing interface;

[0066] Step 3: the pushing system obtains template content from a template management system through a template id, and the template management system returns specific template content;

[0067] Step 4: a differential generation system generates a differential message according to the template content and the message content, and the differential generation system returns the generated differential message content;

[0068] Step 5: the pushing system pushes the differential message to a pushing message receiver (equivalent to the target application);

[0069] Step 6: the pushing message receiver calls a message parser to parse and process the message;

[0070] Step 7: the message parser parses the message to obtain differential content and a template id;

[0071] Step 8: the message parser queries a template manager for template content according to the template id;

[0072] Step 9: the template manager queries whether a template corresponding to the template id exists, if the template exists, step 10 is executed, and if the template does not exist, step 12 is executed;

[0073] Step 10: the template manager requests a data source for obtaining the template content;

[0074] Step 11: an app preset template is parsed from a software preset data source, and a query result is returned to the data source;

[0075] Step 12: If it does not exist, the data source will query the template from the network interface data source;

[0076] Step 13: The network interface data source sends a request to the template to obtain the network interface, receives the returned network data, and then sends the retrieved template content back to the data source;

[0077] Step 14: The data source sends the template content back to the message parser;

[0078] Step 15: The message parser calls the message differential merger to use the template content and differential message to merge the push message and return the merged push message;

[0079] Step 16: The message parser distributes the push message to the app's business layer.

[0080] Through the above steps, using template and differential mechanisms, messages that need to be sent through limited space channels are kept within a controllable range. When mobile software is released, appropriate template messages are pre-configured, and the template management system publishes newly added templates in real time via the network. This allows templated message content to be transferred from limited channels to templates, saving space on the limited channels.

[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0082] This embodiment also provides a message sending device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0083] Figure 6 A structural block diagram of an optional message sending device according to an embodiment of this application; as shown below. Figure 6 As shown, it includes:

[0084] The acquisition module 62 is configured to acquire a first message template corresponding to a template identifier according to the template identifier carried in a message push request, where the message push request is used to send a push message, and the template identifier is used to identify the first message template.

[0085] It should be noted that the first message template can be acquired from a preset data source or from a network resource, and the application does not limit this.

[0086] The generation module 64 is configured to generate a difference message of the push message and a template message in the first message template, where the difference message is used to indicate the difference between the push message and the template message.

[0087] The processing module 66 is configured to process the difference message and the template identifier, and send a target message obtained to a target application.

[0088] It should be noted that the processing of the difference message and the template identifier can include compression and encoding processing, and can also include other processing, and the application does not limit this.

[0089] According to the above device, the first message template corresponding to the template identifier carried in the message push request is acquired, where the message push request is used to send the push message, and the template identifier is used to identify the first message template. The difference message of the push message and the template message in the first message template is generated, and the difference message is the difference between the push message and the template message. Then, the difference message and the template identifier are processed to obtain the target message, and finally the target message is sent to the target application. By using the above technical solution, the problem that the upper limit of the way of reducing the message content by compression or cropping in the prior art still exists, which leads to the inability to deliver larger messages. The upper limit of message delivery is broken through by presetting the template and generating the difference message through the template, so that larger messages can be delivered.

[0090] Optionally, the generation module 64 is further configured to compare the push message with the template message to determine a plurality of difference contents of the push message and the template message, determine a plurality of position information corresponding to the plurality of difference contents, where the plurality of position information is used to indicate the positions of the plurality of difference contents in the template message, and determine the plurality of difference contents and the plurality of position information as the difference message.

[0091] The template message is similar to the push message content, and therefore, by comparing the differences between the template message and the push message, the position and content of the differences can be marked, wherein the position is the position of the differential content in the template message, and the differential content is the differential content of the push message; a plurality of differential contents and a plurality of position information corresponding to the plurality of differential contents of the push message and the template message are determined, and the differential message is obtained.

[0092] Optionally, the processing module 66 is further configured to compress the differential message and the template identifier by using a first compression algorithm to obtain a compressed message; encode the compressed message by using a first encoding algorithm to obtain an encoded message; determine the first compression algorithm, the first encoding algorithm, and the encoded message as the target message, and send the target message to the target application.

[0093] The differential message and the template identifier are first compressed by using a first compression algorithm, and the compressed message is then encoded by using a first encoding algorithm, so that the size of the message to be transmitted is further reduced, and then the obtained encoded message, the first compression algorithm, and the first encoding algorithm are sent to the target application as the target message.

[0094] In this embodiment, a message receiving device is also provided, which is used to implement the above-described embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0095] Figure 7 An optional structure block diagram of a message receiving device according to an embodiment of the present application; as shown in Figure 7 , comprising:

[0096] The receiving module 72 is configured to receive the target message sent by the push system;

[0097] The parsing module 74 is configured to parse the differential message and the template identifier from the target message, wherein the differential message is the differential message of the template message in the push message and the first message template, the template identifier is used to identify the first message template, and the differential message is used to indicate the difference content of the push message and the template message;

[0098] The determining module 76 is configured to obtain the first message template corresponding to the template identifier according to the template identifier, and determine the push message according to the differential message and the template message.

[0099] It should be noted that the first message template can be obtained from a preset data source or from a network resource, and the application does not limit this.

[0100] Through the above device, after receiving the target message sent by the push system, the target message is parsed to parse the difference message and the template identifier from the target message, wherein the difference message is the difference message of the push message and the template message in the first message template, the template identifier is used to identify the first message template, and the difference message is the difference content of the push message and the template message; the first message template corresponding to the template identifier is obtained according to the template identifier, and then the push message is restored according to the difference message and the template message of the first message template; by using the above technical solution, the problem that the upper limit still exists in the way of reducing the delivery message content by compression or clipping in the prior art is solved, which leads to the problem that larger messages cannot be delivered; the upper limit of message delivery is broken through by presetting the template and generating the difference message through the template, so that larger messages can be delivered.

[0101] Optionally, the parsing module 74 is further configured to parse a first compression algorithm, a first encoding algorithm and an encoded message from the target message, wherein the encoded message is obtained by processing the difference message and the template identifier by using the first compression algorithm and the first encoding algorithm; the encoded message is decoded by using the first encoding algorithm, and the decoded encoded message is decompressed by using the first compression algorithm to obtain the difference message and the template identifier.

[0102] First, the first compression algorithm and the first encoding algorithm are obtained from the target message, so that the encoded message can be decoded and decompressed according to the first compression algorithm and the first encoding algorithm to obtain the difference message and the template identifier; wherein the encoded message is obtained by processing the difference message and the template identifier by using the first compression algorithm and the first encoding algorithm; through the above steps, the push system and the target application can determine the algorithm for compressing and encoding the data, so that the target application can quickly parse the difference message and the template identifier.

[0103] Optionally, the determining module 76 is further configured to obtain a plurality of difference contents and a plurality of position information contained in the difference message, wherein the plurality of position information is used to indicate the positions of the plurality of difference contents in the template message; the plurality of difference contents are replaced into the template message according to the plurality of position information respectively to obtain the push message.

[0104] The process of determining the push message includes: obtaining a plurality of differential contents and a plurality of position information contained in the differential message, wherein the plurality of position information is used to indicate the positions of the plurality of differential contents in the template message; then replacing the differential contents into the corresponding positions according to the obtained template message of the first message template in sequence, restoring the push message, thereby completing the message transmission between the push system and the target application.

[0105] Embodiments of the present application also provide a storage medium comprising a stored program, wherein the program performs any of the above methods when executed.

[0106] Optionally, in the embodiment, the storage medium can be configured to store program code for performing the following steps:

[0107] S1, obtaining a first message template corresponding to a template identifier according to the template identifier carried by a message push request, wherein the message push request is used to send a push message, and the template identifier is used to identify the first message template;

[0108] S2, generating a differential message of the push message and a template message in the first message template, wherein the differential message is used to indicate the different contents of the push message and the template message;

[0109] S3, processing the differential message and the template identifier, and sending a target message obtained to a target application.

[0110] Optionally, in the embodiment, the storage medium can be further configured to store program code for performing the following steps:

[0111] S1, receiving a target message sent by a push system;

[0112] S2, parsing a differential message and a template identifier from the target message, wherein the differential message is a differential message of a push message and a template message in a first message template, the template identifier is used to identify the first message template, and the differential message is used to indicate the different contents of the push message and the template message;

[0113] S3, obtaining the first message template corresponding to the template identifier according to the template identifier, and determining a push message according to the differential message and the template message.

[0114] Embodiments of the present application also provide an electronic device comprising a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.

[0115] Optionally, the electronic device can further include a transmission device connected to the processor and an input / output device connected to the processor.

[0116] Optionally, in the embodiment, the processor can be configured to execute the following steps by using a computer program:

[0117] S1, obtaining a first message template corresponding to a template identifier according to the template identifier carried in a message push request, wherein the message push request is used for sending a push message, and the template identifier is used for identifying the first message template;

[0118] S2, generating a difference message of the push message and a template message in the first message template, wherein the difference message is used for indicating the difference between the push message and the template message;

[0119] S3, processing the difference message and the template identifier, and sending a target message obtained to a target application.

[0120] Optionally, in the embodiment, the processor can be further configured to execute the following steps by using a computer program:

[0121] S1, receiving a target message sent by a push system;

[0122] S2, parsing a difference message and a template identifier from the target message, wherein the difference message is a difference message of a push message and a template message in a first message template, the template identifier is used for identifying the first message template, and the difference message is used for indicating the difference between the push message and the template message;

[0123] S3, obtaining the first message template corresponding to the template identifier according to the template identifier, and determining the push message according to the difference message and the template message.

[0124] Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0125] Optionally, specific examples in the embodiment can refer to examples described in the above embodiments and optional implementation manners, and the embodiment will not be described here.

[0126] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with general computing devices, which can be centralized on a single computing device or distributed on a network of multiple computing devices, and optionally implemented with program codes executable by the computing devices, which can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in an order different from that shown, or made into individual integrated circuit modules, or made into a single integrated circuit module. Thus, the present application is not limited to any particular combination of hardware and software.

[0127] The preferred embodiments of the present application described above are only used to explain the principles of the present application and should not be used to limit the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application should be included in the protection scope of the present application.

Claims

1. A message sending method characterized by, The method comprises the following steps: According to the template identifier carried by the message pushing request, a first message template corresponding to the template identifier is obtained, wherein the message pushing request is used for sending a push message, and the template identifier is used for identifying the first message template; A difference message of the push message and a template message in the first message template is generated, wherein the difference message is used for indicating the different content of the push message and the template message; The difference message and the template identifier are processed, and a target message obtained by the processing is sent to a target application; Wherein, the generation of the difference message of the push message and the template message in the first message template comprises: Comparing the push message with the template message, a plurality of difference contents of the push message and the template message are determined; A plurality of position information corresponding to the plurality of difference contents is determined, wherein the plurality of position information is used for indicating the position of the plurality of difference contents in the template message; The plurality of difference contents and the plurality of position information are determined as the difference message; Wherein, the processing of the difference message and the template identifier, and the sending of the target message obtained by the processing to the target application, comprises: The difference message and the template identifier are compressed by a first compression algorithm to obtain a compressed message; The compressed message is encoded by a first encoding algorithm to obtain an encoded message; The first compression algorithm, the first encoding algorithm and the encoded message are determined as the target message, and the target message is sent to the target application.

2. A message receiving method characterized by comprising: The method comprises the following steps: Receiving a target message sent by a push system; Parsing a difference message and a template identifier from the target message, wherein the difference message is a difference message of a push message and a template message in a first message template, the template identifier is used for identifying the first message template, and the difference message is used for indicating the different content of the push message and the template message; According to the template identifier, the first message template corresponding to the template identifier is obtained, and according to the difference message and the template message, a push message is determined; Wherein, according to the difference message and the template message, the push message is determined, comprising: Obtaining a plurality of difference contents and a plurality of position information contained in the difference message, wherein the plurality of position information is used for indicating the position of the plurality of difference contents in the template message; According to the plurality of position information, the plurality of difference contents are replaced into the template message respectively to obtain the push message; Wherein, the parsing of the difference message and the template identifier from the target message comprises: Parsing a first compression algorithm, a first encoding algorithm and an encoded message from the target message, wherein the encoded message is obtained by processing the difference message and the template identifier by the first compression algorithm and the first encoding algorithm; The encoded message is decoded by the first encoding algorithm, and the decoded encoded message is decompressed by the first compression algorithm to obtain the difference message and the template identifier.

3. A message sending apparatus characterized by comprising: The method comprises the following steps: The acquisition module is configured to acquire a first message template corresponding to a template identifier according to the template identifier carried in a message push request, wherein the message push request is used to send a push message, and the template identifier is used to identify the first message template. The generation module is configured to generate a difference message of the push message and a template message in the first message template, wherein the difference message is used to indicate different contents of the push message and the template message. The processing module is configured to process the difference message and the template identifier, and send a target message obtained by processing to a target application. The generation module is further configured to compare the push message with the template message, determine a plurality of difference contents of the push message and the template message, determine a plurality of position information corresponding to the plurality of difference contents, wherein the plurality of position information is used to indicate positions of the plurality of difference contents in the template message, and determine the plurality of difference contents and the plurality of position information as the difference message. The processing module is further configured to compress the difference message and the template identifier by using a first compression algorithm to obtain a compressed message, encode the compressed message by using a first encoding algorithm to obtain an encoded message, determine the first compression algorithm, the first encoding algorithm, and the encoded message as the target message, and send the target message to the target application.

4. A message receiving apparatus characterized by comprising: The receiving module is configured to receive a target message sent by a push system. The parsing module is configured to parse a difference message and a template identifier from the target message, wherein the difference message is a difference message of a push message and a template message in a first message template, the template identifier is used to identify the first message template, and the difference message is used to indicate different contents of the push message and the template message. The determination module is configured to acquire the first message template corresponding to the template identifier according to the template identifier, and determine a push message according to the difference message and the template message. The determination module is further configured to acquire a plurality of difference contents and a plurality of position information included in the difference message, wherein the plurality of position information is used to indicate positions of the plurality of difference contents in the template message, and replace the plurality of difference contents into the template message according to the plurality of position information respectively to obtain the push message. The parsing module is further configured to parse a first compression algorithm, a first encoding algorithm, and an encoded message from the target message, wherein the encoded message is obtained by processing the difference message and the template identifier by using the first compression algorithm and the first encoding algorithm, decode the encoded message by using the first encoding algorithm, and decompress the decoded encoded message by using the first compression algorithm to obtain the difference message and the template identifier. The computer readable storage medium includes a stored program, wherein the program is executed to perform the method of claim 1 or the method of claim 2.

5. A computer readable storage medium, characterized in that, ​ 6.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to execute the method of claim 1 or the method of claim 2 by using the computer program.

Citation Information

Patent Citations

  • Message management method and device, platform and storage medium

    CN115237635A