CN115297447B - Long short message merging method, system, equipment and storage medium - Google Patents

Long short message merging method, system, equipment and storage medium Download PDF

Info

Publication number
CN115297447B
CN115297447B CN202211186395.XA CN202211186395A CN115297447B CN 115297447 B CN115297447 B CN 115297447B CN 202211186395 A CN202211186395 A CN 202211186395A CN 115297447 B CN115297447 B CN 115297447B
Authority
CN
China
Prior art keywords
short message
long short
segments
long
level cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211186395.XA
Other languages
Chinese (zh)
Other versions
CN115297447A (en
Inventor
黄天沛
郑峰彰
伍雪平
李敏风
林少明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xuanwu Wireless Technology Co Ltd
Original Assignee
Guangzhou Xuanwu Wireless Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xuanwu Wireless Technology Co Ltd filed Critical Guangzhou Xuanwu Wireless Technology Co Ltd
Priority to CN202211186395.XA priority Critical patent/CN115297447B/en
Publication of CN115297447A publication Critical patent/CN115297447A/en
Application granted granted Critical
Publication of CN115297447B publication Critical patent/CN115297447B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0842Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/15Use in a specific computing environment
    • G06F2212/154Networked environment

Abstract

The invention discloses a method, a system, equipment and a storage medium for merging long short messages, which comprises the steps of receiving different segments of the same long short message sent by a short message initiator by using the same account, extracting the received long short message segment information by a short message service processing receiver and storing the information in a first-level cache of the corresponding short message service processing receiver, judging whether the first-level cache of the short message service processing receiver comprises all segments of the long short message or not, if not, storing the first-level cache segment of the long short message in a second-level cache corresponding to the short message service processing receiver, judging whether the second-level cache of the short message service processing receiver comprises all segments of the long short message or not, if so, merging all second-level cache segments of the long short message in the second-level cache in sequence to obtain the merged long short message, can support the submission of the long short message segments in a multi-connection high concurrency scene, and improve the merging efficiency of the long short message segments.

Description

Long short message merging method, system, equipment and storage medium
Technical Field
The present invention relates to the field of communication technologies, and in particular, to a method, a system, a device, and a storage medium for merging long and short messages.
Background
With the popularization of mobile phones, short messages have become an important communication medium, and are widely applied to daily communication, promotion and promotion information of merchants, administrative notifications issued by government departments, and the like. For design reasons, the length of a single short message is limited to 1120 bytes, namely about 70 Chinese characters, but for some short messages, such as sales promotion messages of merchants, the length of the short message often exceeds 70 Chinese characters, and the short message has to be split into a plurality of short messages to be sent.
The most widely applied at present are short message protocols of cmpp, sgip and smgp, among which, the long short message is a message type supported by the protocol, and the protocol of the long short message follows the GSM protocol specification, according to the GSM protocol specification, a Server (short message originator) can receive a long short message request from a Client (short message originator), but the current implementation scheme for merging the long short message has the problem that the Client must submit different segments of the same long short message to the same Server, and even if the distributed long short message merging is supported, the efficiency is not high, and the method is not suitable for the current distributed, high-concurrency and multi-connection environment.
Disclosure of Invention
The present invention is directed to solving at least the problems of the prior art. Therefore, the invention provides a long short message merging method, a system, equipment and a storage medium, which can support the submission of long short message segments in a multi-connection high-concurrency scene and improve the merging efficiency of the long short message segments.
In a first aspect of the present invention, a method for merging long and short messages is provided, which includes the following steps:
receiving different segments of the same long short message sent by the short message initiator by using the same account;
the short message service processing receiver extracts the received segmentation information of the long short message segment to obtain the long short message segment after information extraction, wherein the segmentation information of the long short message segment comprises a sending user of the long short message, a phone of the long short message, a grouping ID of the long short message, the segmentation number of the long short message, the position of the long short message segment in the long short message and the content of the long short message segment;
storing the long short message segments after the information extraction into a first-level cache of a corresponding short message service processing receiver to obtain first-level cache segments of the long short messages, wherein the first-level cache is an in-process cache;
judging whether a primary cache of the short message service processing receiver comprises all segments of the long short message or not, if the primary cache of the short message service processing receiver does not comprise all segments of the long short message, storing the primary cache segment of the long short message in a secondary cache corresponding to the short message service processing receiver to obtain a secondary cache segment of the long short message, wherein the secondary cache is an external distributed cache;
judging whether all the segments of the long short messages are included in the secondary cache of the short message service processing receiver, and if the secondary cache of the short message service processing receiver includes all the segments of the long short messages, combining all the secondary cache segments of the long short messages in the secondary cache in sequence to obtain the combined long short messages.
According to the embodiment of the invention, at least the following technical effects are achieved:
the method comprises the steps that different segments of the same long short message sent by a short message initiator by using the same account number are received, a short message service processing receiver extracts segment information of the received long short message segments to obtain the long short message segments after information extraction, wherein the segment information of the long short message segments comprises a sending user of the long short message, the phone of the long short message, the grouping ID of the long short message, the segment number of the long short message, the position of the long short message segments in the long short message and the content of the long short message segments, the extracted long short message segments are stored in a primary cache of the corresponding short message service processing receiver to obtain a primary cache segment of the long short message, wherein the primary cache is an in-process cache to judge whether all segments of the long short message are included in the primary cache of the short message service processing receiver or not, if all segments of the long short message are not included in the primary cache of the short message service processing receiver, the primary cache segment of the long short message is stored in a secondary cache corresponding to the short message service processing receiver to obtain a secondary cache segment of the long short message, and the secondary short message is merged in a distributed environment, the secondary cache of the long short message, and the secondary short message is recovered from the secondary short message, and the secondary short message service processing receiver can realize that the long short message is merged in a scene of a second level when the secondary short message is merged in which the secondary short message is merged in a second level. The method is convenient for the user to read, so that the user experience is better, and meanwhile, the merging efficiency of the long short message segments is improved.
According to some embodiments of the present invention, the determining whether all segments of the long short message are included in the primary cache of the short message service processing receiver includes:
obtaining the unique identification of the long short message according to the sending user of the long short message, the phone of the long short message and the grouping ID combination of the long short message;
acquiring a primary cache segment corresponding to the long short message in a primary cache of a short message service processing receiver through the unique identifier of the long short message;
if the number of the first-level cache segments corresponding to the long short message is equal to the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver comprise all the segments of the long short message;
and if the number of the primary cache segments corresponding to the long short message is less than the number of the segments of the long short message, all the primary cache segments of the short message service processing receiver do not comprise all the segments of the long short message.
According to some embodiments of the present invention, the merging all the second-level cache segments of the long short message in the second-level cache in sequence to obtain a merged long short message includes:
acquiring a second-level cache segment corresponding to the long short message in a second-level cache of a short message service processing receiver through the unique identifier of the long short message;
sequencing the second-level cache segments corresponding to the long short messages according to the positions of the long short message segments in the long short messages to obtain the sequenced second-level cache segments;
and combining the sorted secondary cache segments in sequence to obtain a combined long short message.
According to some embodiments of the present invention, after the determining whether the first-level cache of the short message service processing receiver includes all segments of the long short message, the long short message merging method further includes: if the first-level cache of the short message service processing receiver comprises all the segments of the long short message, all the first-level cache segments of the long short message in the first-level cache are combined in sequence.
According to some embodiments of the present invention, after determining whether all segments of the long short message are included in the secondary cache of the short message service processing receiver, the long short message merging method further includes: if the second-level cache of the short message service processing receiver does not comprise all the segments of the long short message, the short message service processing receiver does not process the segment.
In a second aspect of the present invention, a long short message merging system is provided, which is applied to a short message service processing receiver, and the long short message merging system includes:
the data receiving module is used for receiving different segments of the same long short message sent by the short message initiator by using the same account;
the data processing module is used for extracting the received segmentation information of the long short message segment by the short message service processing receiver to obtain the long short message segment after information extraction, wherein the segmentation information of the long short message segment comprises a sending user of the long short message, a phone of the long short message, a grouping ID of the long short message, the segmentation number of the long short message, the position of the long short message segment in the long short message and the content of the long short message segment;
the data storage module is used for storing the long short message segments after the information extraction into a first-level cache of a corresponding short message service processing receiver to obtain first-level cache segments of the long short message, wherein the first-level cache is an in-process cache;
the data judgment module is used for judging whether the primary cache of the short message service processing receiver comprises all the segments of the long short message or not, if the primary cache of the short message service processing receiver does not comprise all the segments of the long short message, the primary cache segments of the long short message are stored in a secondary cache corresponding to the short message service processing receiver, and secondary cache segments of the long short message are obtained, wherein the secondary cache is an external distributed cache;
and the data merging module is used for judging whether the second-level cache of the short message service processing receiver comprises all the segments of the long short message or not, and if the second-level cache of the short message service processing receiver comprises all the segments of the long short message, merging all the second-level cache segments of the long short message in the second-level cache in sequence to obtain the merged long short message.
The system extracts the segmentation information of the received long short message segments by receiving different segments of the same long short message sent by a short message initiator by using the same account number, obtains the information-extracted long short message segments, wherein the segmentation information of the long short message segments comprises a sending user of the long short message, the phone of the long short message, the grouping ID of the long short message, the segmentation number of the long short message, the position of the long short message segments in the long short message and the content of the long short message segments, stores the information-extracted long short message segments in a primary cache of the corresponding short message service processing receiver to obtain a primary cache segment of the long short message, wherein the primary cache is an in-process cache, judges whether all segments of the long short message are included in the primary cache of the short message service processing receiver, if all segments of the long short message are not included in the primary cache of the short message service processing receiver, stores the primary cache segment of the long short message in a secondary cache corresponding to the short message service processing receiver to obtain a secondary cache segment of the long short message, and realizes that all secondary cache segments of the long short messages are merged after different cache message service processing receivers are merged into a secondary cache segment of a secondary short message, wherein the secondary short message is merged in a normal distributed environment, and the secondary cache segment of the long short message processing receiver. The method and the device are convenient for the user to read, so that the user experience is better, and the merging efficiency of the long short message segments is improved.
According to some embodiments of the present invention, the determining whether all segments of the long short message are included in the primary cache of the short message service processing receiver comprises:
obtaining the unique identification of the long short message according to the sending user of the long short message, the phone of the long short message and the grouping ID combination of the long short message;
acquiring a primary cache segment corresponding to the long short message in a primary cache of a short message service processing receiver through the unique identifier of the long short message;
if the number of the first-level cache segments corresponding to the long short message is equal to the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver comprise all the segments of the long short message;
and if the number of the primary cache segments corresponding to the long short message is less than the number of the segments of the long short message, all the primary cache segments of the short message service processing receiver do not comprise all the segments of the long short message.
According to some embodiments of the invention, the data merge module further comprises:
the data acquisition module is used for acquiring a second-level cache segment corresponding to the long short message in a second-level cache of a short message service processing receiver through the unique identifier of the long short message;
the data sorting module is used for sorting the second-level cache segments corresponding to the long short messages according to the positions of the long short message segments in the long short messages to obtain the sorted second-level cache segments;
and the second-level cache segmentation and combination module is used for combining the sorted second-level cache segments in sequence to obtain the combined long short message.
The invention provides a long short message merging electronic device, which comprises at least one control processor and a memory, wherein the memory is in communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the long short message merging method.
In a fourth aspect of the present invention, a computer-readable storage medium is provided, where computer-executable instructions are stored, and the computer-executable instructions are configured to enable a computer to execute the long short message merging method described above.
It should be noted that the advantageous effects between the second to fourth aspects of the present invention and the prior art are the same as the advantageous effects between the above-mentioned long short message merging system and the prior art, and will not be described in detail here.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a long short message merging method according to an embodiment of the present invention;
fig. 2 is an application information diagram of a long short message merging method according to an embodiment of the present invention;
fig. 3 is a combined information diagram of a long short message combining method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an application of a long message merging method according to an embodiment of the present invention when a Client uses an Account to connect to different servers for submitting message segments;
FIG. 5 is a flowchart illustrating an application of different Client terminals to respectively connect to different Server terminals to submit segments of short messages using the same Account according to a method for merging long short messages in an embodiment of the present invention;
fig. 6 is an application flowchart of a long short message merging method according to an embodiment of the present invention, when a same Client uses a same Account to connect to a same Server to submit a short message segment;
fig. 7 is an application flowchart of a long short message merging method according to an embodiment of the present invention, where different Client terminals use the same Account to connect to the same Server terminal respectively to submit short message segments;
fig. 8 is an overall flowchart of a long short message merging method according to an embodiment of the present invention;
fig. 9 is a flowchart of a long short message merging system according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, if there are first, second, etc. described, it is only for the purpose of distinguishing technical features, and it is not understood that relative importance is indicated or implied or that the number of indicated technical features is implicitly indicated or that the precedence of the indicated technical features is implicitly indicated.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to, for example, the upper, lower, etc., is indicated based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, but does not indicate or imply that the device or element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
In the description of the present invention, it should be noted that unless otherwise explicitly defined, terms such as arrangement, installation, connection and the like should be broadly understood, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
The most widely applied at present are short message protocols of cmpp, sgip and smgp, among which, the long short message is a message type supported by the protocol, and the protocol of the long short message follows the GSM protocol specification, according to the GSM protocol specification, a Server (short message originator) can receive a long short message request from a Client (short message originator), but the current implementation scheme for merging the long short message has the problem that the Client must submit different segments of the same long short message to the same Server, and even if the distributed long short message merging is supported, the efficiency is not high, and the method is not suitable for the current distributed, high-concurrency and multi-connection environment.
In order to solve the technical defects, referring to fig. 1, the present invention further provides a long short message merging method, including:
step S101, receiving different segments of a same long short message sent by a short message initiator by using a same account;
step S102, a short message service processing receiver extracts the segmentation information of the received long short message segment to obtain the long short message segment after information extraction, wherein the segmentation information of the long short message segment comprises a sending user of the long short message, a phone of the long short message, a grouping ID of the long short message, the segmentation number of the long short message, the position of the long short message segment in the long short message and the content of the long short message segment;
step S103, storing the long short message segments after information extraction in a first-level cache of a corresponding short message service processing receiver to obtain first-level cache segments of the long short message, wherein the first-level cache is an in-process cache;
step S104, judging whether the primary cache of the short message service processing receiver comprises all segments of the long short message, if the primary cache of the short message service processing receiver does not comprise all segments of the long short message, storing the primary cache segments of the long short message in a secondary cache corresponding to the short message service processing receiver to obtain secondary cache segments of the long short message, wherein the secondary cache is an external distributed cache;
step S105, judging whether the second-level cache of the short message service processing receiver comprises all the segments of the long short messages, if the second-level cache of the short message service processing receiver comprises all the segments of the long short messages, combining all the second-level cache segments of the long short messages in the second-level cache in sequence to obtain the combined long short messages.
The method comprises the steps that different segments of the same long short message sent by a short message initiator by using the same account number are received, a short message service processing receiver extracts segment information of the received long short message segments to obtain the long short message segments after information extraction, wherein the segment information of the long short message segments comprises a sending user of the long short message, the phone of the long short message, the grouping ID of the long short message, the segment number of the long short message, the position of the long short message segments in the long short message and the content of the long short message segments, the extracted long short message segments are stored in a primary cache of the corresponding short message service processing receiver to obtain a primary cache segment of the long short message, wherein the primary cache is an in-process cache to judge whether all segments of the long short message are included in the primary cache of the short message service processing receiver or not, if all segments of the long short message are not included in the primary cache of the short message service processing receiver, the primary cache segment of the long short message is stored in a secondary cache corresponding to the short message service processing receiver to obtain a secondary cache segment of the long short message, and the secondary short message is merged in a distributed environment, the secondary cache of the long short message, and the secondary short message is recovered from the secondary short message, and the secondary short message service processing receiver can realize that the long short message is merged in a scene of a second level when the secondary short message is merged in which the secondary short message is merged in a second level. The method and the device are convenient for the user to read, so that the user experience is better, and the merging efficiency of the long short message segments is improved.
In some embodiments, step S104 may include, but is not limited to including, step S201 to step S204:
step S201, obtaining the unique identification of the long short message according to the sending user of the long short message, the phone of the long short message and the grouping ID combination of the long short message;
step S202, acquiring a primary cache segment corresponding to a long short message in a primary cache of a short message service processing receiver through the unique identifier of the long short message;
step S203, if the number of the first-level cache segments corresponding to the long short message is equal to the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver comprise all the segments of the long short message;
step S204, if the number of the first-level cache segments corresponding to the long short message is less than the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver do not comprise all the segments of the long short message.
Specifically, referring to fig. 2, account is a sending user of a long short message, phone is a phone of the long short message, TP _ pid is a packet ID of the long short message, pkTotal is a number of segments of the long short message, pkNumber is a position of the segments of the long short message in the long short message, content is content of the segments of the long short message, and Account + phone + TP _ pid three fields are separated by underlining between the fields to combine into one key, referring to fig. 2, for long short messages a and B, two key values, i.e., user1_13800138000 \ 1 and user2_13800138000 \ 2, can be combined, and the key value is a unique identifier corresponding to the long short message, and is also a basis for grouping the short message segments when a receiving party of a service processing of the short message receives different segments of the long short message.
In some embodiments, step S105 may include, but is not limited to including, steps S301 to S303:
step S301, acquiring a second-level cache segment corresponding to a long short message in a second-level cache of a short message service processing receiver through the unique identifier of the long short message;
step S302, sequencing the second-level cache segments corresponding to the long short messages according to the positions of the long short message segments in the long short messages to obtain the sequenced second-level cache segments;
and step S303, combining the sorted secondary cache segments in sequence to obtain a combined long short message.
Specifically, referring to fig. 3, after all segments of a short message of the same length are aligned, a merging operation needs to be performed, whether the segments are aligned in a first-level cache or a second-level cache, because the uncontrollable property when the short message originator submits the short message segments reaches the short message service processing receiver, the sequence of the segments is not necessarily received according to the sequence of PkNumber = 0, pkNumber = 1, and PkNumber = 2, and may be out of order, so that all segments of the short message of the same length need to be sorted when performing merging to ensure the accuracy of data, the sorting rule is arranged in order from small to large according to the sequence of PkNumber, and then contents are respectively taken out for splicing.
Specifically, referring to fig. 4, when a Client end sends a short message, a Server end is a short message service processing receiver, and a long short message is divided into two segments, for example, when the same Client end uses the same Account to connect to different Server ends to submit short message segments, the following process occurs, at this time, the first-level cache of either Server-1 or Server-2 cannot collect all short message segments, so with the help of the second-level cache, both Server-1 and Server-2 store short message segments 1 and short message segments 2 into the second-level cache, and two segments of data are collected in the second-level cache.
Specifically, referring to fig. 5, taking the example that a long short message is divided into two segments, when different Client terminals use the same Account to connect to different Server terminals respectively to submit short message segments, at this time, the Client terminals can submit the short message segments by using multiple processes, for the Client terminals, the submission performance of the short message segments is the highest, and the collection and merging process of the short message segments is the same as that in fig. 4.
In some embodiments, after determining whether all segments of the long short message are included in the primary cache of the short message service processing receiver, the method for merging the long short messages further includes: if the first-level cache of the short message service processing receiver comprises all the segments of the long short messages, all the first-level cache segments of the long short messages in the first-level cache are combined in sequence.
Specifically, referring to fig. 6, taking the case that a long short message is divided into two segments, when the same Client uses the same Account to connect to the same Server to submit the short message segments, all the segments may pass through the same Server, and all the segments may be collected in the first-level cache, so that the second-level cache is not needed to be used for collecting the segments, and the merging efficiency of the short message segments is also high.
Specifically, referring to fig. 7, taking the example that a long short message is divided into two segments, when different Client terminals use the same Account to connect with the same Server terminal respectively to submit short message segments, all the segments will pass through the same Server at this time, and all the segments can be collected in the first-level cache, so that the second-level cache is not needed to collect the segments, and the merging efficiency of the short message segments is high.
In some embodiments, after determining whether the second-level cache of the short message service processing receiver includes all segments of the long short message, the long short message merging method further includes: if the second-level cache of the short message service processing receiver does not comprise all the segments of the long short message, the short message service processing receiver does not process the segments.
Referring to FIG. 8, to facilitate understanding by those skilled in the art, a set of preferred embodiments is provided as follows:
when the Client end submits different segments of the same long short message to the same Server end, the Server end receives the different segments of the same long short message sent by the short message initiator by using the same account number;
the short message service processing receiver extracts the segmentation information of the received long short message segment to obtain the long short message segment after information extraction, wherein the segmentation information of the long short message segment comprises a sending user of the long short message, a phone of the long short message, a grouping ID of the long short message, the segmentation number of the long short message, the position of the long short message segment in the long short message and the content of the long short message segment;
storing the long short message after information extraction in a first-level cache of a corresponding short message service processing receiver to obtain a first-level cache segment of the long short message, wherein the first-level cache is an in-process cache;
judging whether the primary cache of the short message service processing receiver comprises all segments of the long short messages or not, and if the primary cache of the short message service processing receiver comprises all segments of the long short messages, combining all the primary cache segments of the long short messages in the primary cache in sequence; if the primary cache of the short message service processing receiver does not comprise all segments of the long short message, storing the primary cache segment of the long short message in a secondary cache corresponding to the short message service processing receiver to obtain a secondary cache segment of the long short message, wherein the secondary cache is an external distributed cache;
judging whether the second-level cache of the short message service processing receiver comprises all the segments of the long short messages or not, if the second-level cache of the short message service processing receiver comprises all the segments of the long short messages, combining all the second-level cache segments of the long short messages in the second-level cache in sequence to obtain the combined long short messages, and if the second-level cache of the short message service processing receiver does not comprise all the segments of the long short messages, not processing.
In addition, referring to fig. 9, an embodiment of the present invention provides a long short message merging system, which is applied to a short message service processing receiver, and includes a data receiving module 1100, a data processing module 1200, a data storage module 1300, a data determining module 1400, and a data merging module 1500, where:
the data receiving module 1100 is used for receiving different segments of a same long short message sent by a short message initiator by using a same account;
the data processing module 1200 is configured to extract the segmentation information of the received long short message segment by the short message service processing receiver to obtain the long short message segment after information extraction, where the segmentation information of the long short message segment includes a sending user of the long short message, a phone of the long short message, a packet ID of the long short message, a segmentation number of the long short message, a position of the long short message segment in the long short message, and a content of the long short message segment;
the data storage module 1300 is configured to store the long short message segment after information extraction in a first-level cache of a corresponding short message service processing receiver to obtain a first-level cache segment of the long short message, where the first-level cache is an in-process cache;
the data judging module 1400 is configured to judge whether the primary cache of the short message service processing receiver includes all segments of the long short message, and if the primary cache of the short message service processing receiver does not include all segments of the long short message, store the primary cache segment of the long short message in a secondary cache corresponding to the short message service processing receiver to obtain a secondary cache segment of the long short message, where the secondary cache is an external distributed cache;
the data merging module 1500 is configured to determine whether all segments of the long short message are included in the secondary cache of the short message service processing receiver, and if the secondary cache of the short message service processing receiver includes all segments of the long short message, sequentially merge all secondary cache segments of the long short message in the secondary cache to obtain a merged long short message.
The system extracts the segmentation information of the received long short message segments by receiving different segments of the same long short message sent by a short message initiator by using the same account number, obtains the information-extracted long short message segments, wherein the segmentation information of the long short message segments comprises a sending user of the long short message, the phone of the long short message, the grouping ID of the long short message, the segmentation number of the long short message, the position of the long short message segments in the long short message and the content of the long short message segments, stores the information-extracted long short message segments in a primary cache of the corresponding short message service processing receiver to obtain a primary cache segment of the long short message, wherein the primary cache is an in-process cache, judges whether all segments of the long short message are included in the primary cache of the short message service processing receiver, if all segments of the long short message are not included in the primary cache of the short message service processing receiver, stores the primary cache segment of the long short message in a secondary cache corresponding to the short message service processing receiver to obtain a secondary cache segment of the long short message, and realizes that all secondary cache segments of the long short messages are merged after different cache message service processing receivers are merged into a secondary cache segment of a secondary short message, wherein the secondary short message is merged in a normal distributed environment, and the secondary cache segment of the long short message processing receiver. The method and the device are convenient for the user to read, so that the user experience is better, and the merging efficiency of the long short message segments is improved.
In some embodiments, the determining whether the first-level cache of the short message service processing receiver includes all segments of the long short message includes:
obtaining the unique identification of the long short message according to the sending user of the long short message, the phone of the long short message and the grouping ID combination of the long short message;
acquiring a primary cache segment corresponding to the long short message in a primary cache of a short message service processing receiver through the unique identifier of the long short message;
if the number of the first-level cache segments corresponding to the long short message is equal to the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver comprise all the segments of the long short message;
if the number of the first-level cache segments corresponding to the long short message is less than the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver do not comprise all the segments of the long short message.
In some embodiments, the data merge module further comprises:
the data acquisition module is used for acquiring a second-level cache segment corresponding to the long short message in a second-level cache of a short message service processing receiver through the unique identifier of the long short message;
the data sorting module is used for sorting the second-level cache segments corresponding to the long short messages according to the positions of the long short message segments in the long short messages to obtain the sorted second-level cache segments;
and the second-level cache segmentation and combination module is used for combining the sorted second-level cache segments in sequence to obtain the combined long short message.
It should be noted that the embodiment of the present system and the embodiment of the system described above are based on the same inventive concept, and therefore, the related contents of the embodiment of the method described above are also applicable to the embodiment of the present system, and are not described herein again.
The present application further provides a long short message merging electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing: such as the above-mentioned long short message merging method.
The processor and memory may be connected by a bus or other means.
The memory, as a non-transitory computer-readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software program and instructions required to implement the long short message merging method of the above embodiment are stored in the memory, and when being executed by the processor, the long short message merging method of the above embodiment is performed, for example, the method steps S101 to S105 in fig. 1 described above are performed.
The present application further provides a computer-readable storage medium having stored thereon computer-executable instructions for performing: such as the above-mentioned long short message merging method.
The computer-readable storage medium stores computer-executable instructions, which are executed by a processor or controller, for example, by a processor in the above-mentioned embodiment of the electronic device, and can cause the processor to execute the long short message merging method in the above-mentioned embodiment, for example, execute the above-mentioned method steps S101 to S105 in fig. 1.
It will be understood by those of ordinary skill in the art that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, or suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program elements or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program elements, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as is well known to those of ordinary skill in the art.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (8)

1. A long short message merging method is characterized in that the method is applied to a short message service processing receiver, and the long short message merging method comprises the following steps:
receiving different segments of the same long short message sent by the short message initiator by using the same account;
the short message service processing receiver extracts the segmentation information of the received long short message segment to obtain the long short message segment after information extraction, wherein the segmentation information of the long short message segment comprises a sending user of the long short message, a phone of the long short message, a group ID of the long short message, the segmentation number of the long short message, the position of the long short message segment in the long short message and the content of the long short message segment, and the phone of the long short message is the telephone number of the long short message;
storing the long short message segments after the information extraction into a first-level cache of a corresponding short message service processing receiver to obtain first-level cache segments of the long short messages, wherein the first-level cache is an in-process cache;
judging whether the first-level cache of the short message service processing receiver comprises all the segments of the long short message, specifically:
obtaining the unique identification of the long short message according to the sending user of the long short message, the phone of the long short message and the grouping ID combination of the long short message;
acquiring a primary cache segment corresponding to the long short message in a primary cache of a short message service processing receiver through the unique identifier of the long short message;
if the number of the first-level cache segments corresponding to the long short message is equal to the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver comprise all the segments of the long short message;
if the number of the first-level cache segments corresponding to the long short message is less than the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver do not comprise all the segments of the long short message;
if the first-level cache of the short message service processing receiver does not comprise all segments of the long short message, storing the first-level cache segments of the long short message in a second-level cache corresponding to the short message service processing receiver to obtain second-level cache segments of the long short message, wherein the second-level cache is an external distributed cache;
judging whether all the segments of the long short messages are included in the secondary cache of the short message service processing receiver, and if the secondary cache of the short message service processing receiver includes all the segments of the long short messages, combining all the secondary cache segments of the long short messages in the secondary cache in sequence to obtain the combined long short messages.
2. The method as claimed in claim 1, wherein said combining all the second-level cache segments of the long short message in the second-level cache in sequence to obtain a combined long short message comprises:
acquiring a second-level cache segment corresponding to the long short message in a second-level cache of a short message service processing receiver through the unique identifier of the long short message;
sequencing the second-level cache segments corresponding to the long short messages according to the positions of the long short message segments in the long short messages to obtain the sequenced second-level cache segments;
and combining the sorted secondary cache segments in sequence to obtain a combined long short message.
3. The method as claimed in claim 2, wherein after said determining whether all segments of the long short message are included in the primary cache of the short message service processing receiver, the method further comprises: and if the primary cache of the short message service processing receiver comprises all the segments of the long short message, combining all the primary cache segments of the long short message in the primary cache in sequence.
4. The method of claim 3, wherein after determining whether all segments of the long short message are included in the secondary cache of the short message service processing receiver, the method further comprises: if the second-level cache of the short message service processing receiver does not comprise all the segments of the long short message, the short message service processing receiver does not process the segment.
5. A long short message merging system is characterized in that the long short message merging system is applied to a short message service processing receiver, and comprises:
the data receiving module is used for receiving different segments of the same long short message sent by the short message initiator by using the same account;
the data processing module is used for extracting the segmentation information of the received long short message segments by the short message service processing receiver to obtain the long short message segments after information extraction, wherein the segmentation information of the long short message segments comprises a sending user of the long short message, a phone of the long short message, a grouping ID of the long short message, the segmentation number of the long short message, the position of the long short message segments in the long short message and the content of the long short message segments, and the phone of the long short message is the telephone number of the long short message;
the data storage module is used for storing the long short message after the information extraction in a segmentation manner into a first-level cache of a corresponding short message service processing receiver to obtain a first-level cache segment of the long short message, wherein the first-level cache is an in-process cache;
the data judgment module is used for judging whether the primary cache of the short message service processing receiver comprises all the segments of the long short message, and specifically comprises the following steps:
obtaining the unique identification of the long short message according to the sending user of the long short message, the phone of the long short message and the grouping ID combination of the long short message;
acquiring a primary cache segment corresponding to the long short message in a primary cache of a short message service processing receiver through the unique identifier of the long short message;
if the number of the first-level cache segments corresponding to the long short message is equal to the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver comprise all the segments of the long short message;
if the number of the first-level cache segments corresponding to the long short message is less than the number of the segments of the long short message, all the first-level cache segments of the short message service processing receiver do not comprise all the segments of the long short message;
if the first-level cache of the short message service processing receiver does not comprise all segments of the long short message, storing the first-level cache segments of the long short message in a second-level cache corresponding to the short message service processing receiver to obtain second-level cache segments of the long short message, wherein the second-level cache is an external distributed cache;
and the data merging module is used for judging whether all the segments of the long short message are included in the secondary cache of the short message service processing receiver or not, and if the secondary cache of the short message service processing receiver includes all the segments of the long short message, merging all the secondary cache segments of the long short message in the secondary cache in sequence to obtain the merged long short message.
6. The system of claim 5, wherein the data merging module further comprises:
the data acquisition module is used for acquiring a second-level cache segment corresponding to the long short message in a second-level cache of a short message service processing receiver through the unique identifier of the long short message;
the data sorting module is used for sorting the second-level cache segments corresponding to the long short messages according to the positions of the long short message segments in the long short messages to obtain the sorted second-level cache segments;
and the second-level cache segmentation and combination module is used for combining the sorted second-level cache segments in sequence to obtain the combined long short message.
7. The long short message merging equipment is characterized by comprising at least one control processor and a memory which is in communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the long message merging method as claimed in any one of claims 1 to 4.
8. A computer-readable storage medium characterized by: the computer-readable storage medium stores computer-executable instructions for causing a computer to perform the long message merging method according to any one of claims 1 to 4.
CN202211186395.XA 2022-09-28 2022-09-28 Long short message merging method, system, equipment and storage medium Active CN115297447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211186395.XA CN115297447B (en) 2022-09-28 2022-09-28 Long short message merging method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211186395.XA CN115297447B (en) 2022-09-28 2022-09-28 Long short message merging method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115297447A CN115297447A (en) 2022-11-04
CN115297447B true CN115297447B (en) 2023-02-28

Family

ID=83833816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211186395.XA Active CN115297447B (en) 2022-09-28 2022-09-28 Long short message merging method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115297447B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116261109B (en) * 2023-05-16 2023-08-01 北京久佳信通科技有限公司 Long short message splicing method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662539A (en) * 2009-09-28 2010-03-03 深圳华为通信技术有限公司 Method and device for assembling long short message
CN101820596A (en) * 2010-01-22 2010-09-01 青岛海信移动通信技术股份有限公司 Ultralong short message processing method and mobile communication terminal
CN101931919A (en) * 2010-08-18 2010-12-29 中国电信股份有限公司 Long short message sending processing method and device, business gateway and communication system
CN106936977A (en) * 2015-12-30 2017-07-07 深圳富泰宏精密工业有限公司 Ultralong short message processing method and its mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4988766B2 (en) * 2006-12-22 2012-08-01 インターナショナル・ビジネス・マシーンズ・コーポレーション Message hub device, program, and method
CN106850936B (en) * 2015-12-07 2019-10-01 卓望数码技术(深圳)有限公司 A kind of method and device that the network information is shown in conjunction with SMS

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662539A (en) * 2009-09-28 2010-03-03 深圳华为通信技术有限公司 Method and device for assembling long short message
CN101820596A (en) * 2010-01-22 2010-09-01 青岛海信移动通信技术股份有限公司 Ultralong short message processing method and mobile communication terminal
CN101931919A (en) * 2010-08-18 2010-12-29 中国电信股份有限公司 Long short message sending processing method and device, business gateway and communication system
CN106936977A (en) * 2015-12-30 2017-07-07 深圳富泰宏精密工业有限公司 Ultralong short message processing method and its mobile terminal

Also Published As

Publication number Publication date
CN115297447A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN108810116B (en) Message processing method and related product
CN110267314B (en) Method and device for switching network slices
CN102821109A (en) Method, associated equipment and system for realizing data sharing in instant communication application
CN115297447B (en) Long short message merging method, system, equipment and storage medium
CN107911398B (en) Identity information authentication method, device and system
CN105653945A (en) Information processing method and device based on blacklist and electronic equipment
CN110659863B (en) Object monitoring method and device, electronic equipment and computer readable storage medium
CN112087475B (en) Message pushing method and device for cloud platform component application and message server
CN105491092B (en) Message pushing method and device
US20130188559A1 (en) Method for Establishing a Communication Connection over the Internet Between Mobile Terminals, Computer Program, and Storage Medium
CN114338794B (en) Service message pushing method and device, electronic equipment and storage medium
US10506021B2 (en) Method and device for providing communication connection for a plurality of candidate applications in a mobile device
CN115617611A (en) Generation method and device of signaling flow chart, electronic equipment and storage medium
CN101778055B (en) Message processing method and network entity
CN115378855A (en) Data packet testing method and device, communication device and storage medium
CN105163335B (en) A kind of network access management method, server, mobile terminal and system
CN110493735B (en) Short message processing method and device
CN109246686B (en) Multi-card user address book updating method and device based on cloud technology
CN110661697B (en) Message synchronization method, device, readable storage medium, electronic device and system
CN106330998B (en) File sending and receiving method and device
CN111885097A (en) Network card processing method and device, electronic equipment and storage medium
CN113923716B (en) User information acquisition method and device and electronic equipment
WO2017024888A1 (en) Information management method, apparatus, terminal
CN110971572A (en) Authentication method, server and client
CN110460586B (en) In-vehicle node communication method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant