Short message processing method and device, electronic device, and storage medium
By storing the SMS in the original table to the first list when the terminal is turned on, and broadcasting the SMS in the first list to the SMS application when unlocking, the problem of SMS duplication is solved, and the effect of SMS being broadcast only once is achieved.
Patent Information
- Application Number
- CN202211401289.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-11-09
AI Technical Summary
After the terminal is unlocked, when thread A and thread B process the text message at the same time, it may cause the newly received text message to be repeatedly broadcast to the text message application, causing the problem of duplication of text messages.
When the terminal is powered on, the SMS stored in the original table are stored in the first list, and the SMS stored in the first list is broadcast to the SMS application when unlocking, avoiding the newly received SMS stored directly in the original table, and reducing the possibility of repeated broadcasts.
By storing the text messages that were not processed before the last shutdown to the first list and broadcasting them when unlocked, we ensure that the newly received text messages are broadcast only once, avoiding the problem of duplication of text messages.
Smart Images

Figure CN115866537B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a text message processing method, a text message processing device, an electronic device, and a computer-readable storage medium. Background Art
[0002] When the terminal receives a new SMS, it can save the newly received SMS into a raw table, and the raw table also saves the SMS that has not been processed by the SMS application before the terminal was shut down last time.
[0003] After the terminal is unlocked, two threads can be executed. Thread A broadcasts the newly received SMS to the SMS application for processing. The SMS application can return the processed information, and then the terminal deletes the processed SMS from the original table; Thread B broadcasts the SMS stored in the original table to the SMS application for processing.
[0004] When thread A is running slowly, for example, when thread B is running, thread A has not deleted the newly received SMS that has been processed by the SMS application from the original table, then thread B will scan the newly received SMS and the SMS that have not been processed by the SMS application before the last shutdown from the original table, and broadcast the newly received SMS and the SMS that have not been processed by the SMS application before the last shutdown to the SMS application for processing. This causes both thread A and thread B to broadcast the newly received SMS to the SMS application for processing, resulting in the problem of SMS duplication. Summary of the invention
[0005] The present disclosure provides a text message processing method, a text message processing device, an electronic device, and a computer-readable storage medium to address deficiencies in related technologies.
[0006] According to a first aspect of an embodiment of the present disclosure, a method for processing text messages is proposed, which is executed by a terminal, and the method includes: in response to powering on, and newly received text messages have not yet been stored in an original table, storing the text messages stored in the original table into a first list, wherein the text messages stored in the original table include the first text messages that have not been processed by the text message application before the last shutdown; in response to unlocking, broadcasting the text messages stored in the first list to the text message application.
[0007] Optionally, the method further includes: receiving a second short message; and writing the second short message into the original table.
[0008] Optionally, the method further includes: distributing the second text message, wherein, when distributing the second text message, determining whether the terminal is in a locked state; when the terminal is in a locked state, filtering the second text message to obtain a filtered third text message; or, when the terminal is in an unlocked state, filtering the second text message to obtain a filtered third text message.
[0009] Optionally, the method also includes: when the terminal is in a locked state, filtering the second text message to obtain a filtered third text message, and then determining whether the terminal is in a locked state; when the terminal is in a locked state, displaying a notification of the third text message; or, when the terminal is in an unlocked state, broadcasting the third text message to the text message application.
[0010] Optionally, the method further includes: when the terminal is in an unlocked state, after filtering the second text message to obtain a filtered third text message, broadcasting the third text message to the text message application.
[0011] Optionally, the method further includes: receiving information indicating that the SMS application has completed processing the third SMS; and deleting the third SMS from the original table.
[0012] Optionally, the method further includes: when the terminal is in a locked state, after displaying the notification of the third text message, determining the card slot identifier of the SIM card to which the third text message belongs; and associating the third text message with the card slot identifier and storing them in the first list.
[0013] Optionally, broadcasting the text messages stored in the first list to the text message application includes: when it is determined that the identifier of the SIM card to which the third text message in the first list belongs is invalid, determining, based on the card slot identifier associated with the third text message, that the identifier of the SIM card in the card slot corresponding to the card slot identifier is the identifier of the SIM card to which the third text message belongs; and broadcasting the third text message in the first list to the text message application.
[0014] According to a second aspect of an embodiment of the present disclosure, a text message processing device is proposed, the device comprising: a storage module, configured to store text messages stored in the original table into a first list in response to powering on and newly received text messages not yet stored in the original table, wherein the text messages stored in the original table include first text messages that have not been processed by the text message application before the last shutdown; and a processing module, configured to broadcast the text messages stored in the first list to the text message application in response to unlocking.
[0015] According to a third aspect of an embodiment of the present disclosure, an electronic device is proposed, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above-mentioned text message processing method.
[0016] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned text message processing method is implemented.
[0017] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0018] As can be seen from the above embodiment, the terminal stores the text messages stored in the original table into the first list. When broadcasting the text messages in the first list to the text message application later, only the first text message that was not processed by the text message application before the last shutdown is broadcast to the text message application, and the newly received text messages are not broadcast to the text message application. Therefore, the newly received text message is only broadcast to the text message application once by the text message receiving module, and is not broadcast to the text message application again by the text message startup broadcast module, thus avoiding the problem of new text messages being repeated in the text message application.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a schematic flow chart of a text message processing method in the related art.
[0022] Figure 2 It is a schematic flow chart of a method for processing short messages according to an embodiment of the present disclosure.
[0023] Figure 3 It is a schematic flow chart of another method for processing short messages according to an embodiment of the present disclosure.
[0024] Figure 4 It is a schematic flow chart of another method for processing short messages according to an embodiment of the present disclosure.
[0025] Figure 5 It is a schematic flow chart of another method for processing short messages according to an embodiment of the present disclosure.
[0026] Figure 6 It is a schematic block diagram of a short message processing device according to an embodiment of the present disclosure.
[0027] Figure 7 It is a schematic block diagram of a device for short message processing according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0029] The terms used in the disclosed embodiments are only for the purpose of describing specific embodiments and are not intended to limit the disclosed embodiments. The singular forms of "a", "an" and "the" used in the disclosed embodiments and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0030] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the disclosed embodiments, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the disclosed embodiments, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0031] For the purpose of brevity and ease of understanding, the terms used herein to characterize size relationships are "greater than" or "less than", "higher than" or "lower than". However, those skilled in the art can understand that the term "greater than" also covers the meaning of "greater than or equal to", and "less than" also covers the meaning of "less than or equal to"; the term "higher than" covers the meaning of "higher than or equal to", and "lower than" also covers the meaning of "lower than or equal to".
[0032] Figure 1 It is a schematic flow chart of a text message processing method in the related art.
[0033] like Figure 1 As shown, taking the Android system as an example, the terminal can process SMS through the SMS broadcast module (SmsBroadcastUndelivered) and the SMS receiving module (InboundSmsHandler) in the application framework layer. Among them, SMS includes SMS (Short Messaging Service) messages, which can also be called short messages.
[0034] After the terminal is powered on, the SMS power-on broadcast module is initialized, and the SMS power-on broadcast module starts a new thread.
[0035] When a new SMS is received after it is turned on, the Radio Interface Layer (RIL) reports the new SMS to the LoopermsgQueue. The LoopermsgQueue tells the SMS receiving module to handle the new SMS event, and the SMS receiving module instructs the LoopermsgQueue to defer.
[0036] The SMS boot broadcast module instructs the SMS receiving module to change from the startup state to the idle state to start processing SMS.
[0037] The circular message queue reports new SMS events to the SMS receiving module, which writes the new SMS into the raw table, where the raw table also stores the SMS that the SMS application has not processed before the last shutdown. Then the SMS receiving module broadcasts the event to the circular message queue.
[0038] Next, the circular message queue distributes the SMS to the SMS receiving module. During this process, the SMS receiving module can determine whether the terminal is in a locked state.
[0039] If the terminal is in a locked state (eg, the screen is locked), the SMS receiving module may start the SMS filtering service and filter new SMS messages, and then display a notification for the filtered new SMS messages, such as displaying a notification at the top of the terminal screen to notify that a new SMS message has been received.
[0040] If the terminal is in an unlocked state (for example, after the user unlocks the lock screen), the SMS receiving module can start the SMS filtering service and filter new SMS messages, and then broadcast the filtered new SMS messages to the upper layer application, such as the SMS application.
[0041] The SMS application processes the received new SMS, and after the processing is completed, it can send a broadcast indicating that the processing of the new SMS is completed to the SMS receiving module, and the SMS receiving module can delete the processed new SMS from the original table.
[0042] On the other hand, after the terminal is unlocked, the SMS boot broadcast module will scan the original table and broadcast the scanned SMS to the SMS application for processing.
[0043] Based on the above process, when the SMS startup broadcast module scans the original table, the SMS receiving module has not yet deleted the processed new SMS from the original table, so the SMS startup broadcast module will scan the new SMS in the original table, and broadcast the SMS application and new SMS that have not been processed before the last shutdown in the original table to the SMS application. This causes the SMS receiving module to broadcast the new SMS to the SMS application once, and the SMS startup broadcast module to broadcast the new SMS to the SMS application once, resulting in the new SMS being repeated in the SMS application.
[0044] Figure 2 It is a schematic flow chart of a method for processing short messages according to an embodiment of the present disclosure. The method for processing short messages shown in this embodiment can be executed by a terminal, and the terminal includes but is not limited to a communication device such as a mobile phone, a tablet computer, a wearable device, a sensor, an Internet of Things device, etc. The terminal can communicate with a network device, and the network device includes but is not limited to a network device in a 4G, 5G, 6G, etc. communication system, such as a base station, a core network, etc.
[0045] like Figure 2 As shown, the text message processing method may include the following steps:
[0046] In step S201, in response to powering on and newly received short messages not yet stored in the original table, the short messages stored in the original table are stored in a first list, wherein the short messages stored in the original table include the first short messages that have not been processed by the short message application before the last power off;
[0047] In step S202, in response to unlocking, the short messages stored in the first list are broadcasted to (can also be described as sent to) a short message application (installed in the terminal).
[0048] In one embodiment, in response to the terminal being powered on, the terminal may store the short messages stored in the original table into the first list. In one embodiment, the short messages stored in the original table include the first short message that was not processed by the short message application before the last shutdown.
[0049] Among them, step 201 can be executed when the newly received text messages after the terminal is turned on have not yet been stored in the original table, then the text messages stored in the original table are stored in the first list, that is, the first text message that has not been processed by the text message application before the terminal was last shut down is stored in the first list, so that the first list only stores the first text message that has not been processed by the text message application before the terminal was last shut down.
[0050] Then, in response to unlocking (for example, receiving a user's instruction to unlock the screen), the terminal can broadcast the text messages stored in the first list to the text message application (for example, executed by a text message startup broadcast module in the terminal). Since the first list only stores the first text messages that were not processed by the text message application before the last shutdown, when broadcasting the text messages stored in the first list to the text message application, only the first text messages that were not processed by the text message application before the last shutdown and stored in the first list will be broadcast to the text message application, and newly received text messages will not be broadcast to the text message application.
[0051] According to the embodiment of the present disclosure, after the terminal is turned on, before the newly received SMS is stored in the original table, by storing the SMS stored in the original table in the first list, when broadcasting the SMS in the first list to the SMS application later, only the first SMS that was not processed by the SMS application before the last shutdown is broadcast to the SMS application, and the newly received SMS is not broadcast to the SMS application. Therefore, the newly received SMS is only broadcast to the SMS application once by the SMS receiving module, and is not broadcast to the SMS application again by the SMS startup broadcast module, thus avoiding the problem of new SMS being repeated in the SMS application.
[0052] In one embodiment, the method further comprises:
[0053] Receive the second SMS;
[0054] The second short message is written into the original table.
[0055] In one embodiment, after the terminal is turned on, a new text message is received, for example, called a second text message. The terminal can write the second text message into the original table, for example, by the text message receiving module. Accordingly, when the second text message is processed by the text message application, the terminal is turned off, and the second text message can still be saved in the original table without being deleted.
[0056] Based on Figure 1 In the illustrated embodiment, the subsequent terminal may store the text messages stored in the original table into the first list, and after unlocking, broadcast the text messages stored in the first list to the text message application to ensure that the second text message can be processed.
[0057] In one embodiment, the method further comprises:
[0058] Distributing the second short message, wherein when distributing the second short message, determining whether the terminal is in a locked state;
[0059] When the terminal is in a locked state, filtering the second short message to obtain a filtered third short message; or,
[0060] When the terminal is in an unlocked state, the second short message is filtered to obtain a filtered third short message.
[0061] In one embodiment, for a newly received SMS, i.e., the second SMS, the terminal can perform a distribution operation, for example, the terminal can distribute the second SMS to the SMS receiving module through a circular message queue. In the process of distributing the second SMS, the terminal can determine whether it is currently in a locked state. Regardless of whether the terminal is in a locked state, the second SMS needs to be filtered to obtain a filtered third SMS, but the operation after filtering is different when in a locked state and an unlocked state.
[0062] Among them, the filtering operation of the text messages can be implemented through the SMS filter service. For example, the filtering operation can filter out the text messages sent by the contacts in the blacklist in the second text messages, and for example, the filtering operation can filter out the text messages identified as spam in the second text messages. In this way, it can be ensured that the subsequent text messages for notification or the text messages processed by the text message application meet the user's needs, and it can avoid processing unnecessary text messages, which is conducive to saving resources.
[0063] In one embodiment, the method further comprises:
[0064] When the terminal is in a locked state, after filtering the second short message to obtain a filtered third short message, determining whether the terminal is in a locked state;
[0065] When the terminal is in a locked state, displaying a notification of the third short message; or,
[0066] When the terminal is in unlocked state, broadcasting the third short message to the short message application.
[0067] In one embodiment, since the filtering service may take a long time to filter (e.g., up to 2 seconds), the terminal may be in different states when filtering starts and after filtering is completed. For example, when filtering starts, the terminal is in a locked state, and after filtering is completed, the terminal is in an unlocked state.
[0068] If, based on the process in the related art, during the process of distributing SMS, when it is determined that the terminal is in a locked state, after filtering the second SMS to obtain the third SMS, only the notification of the third SMS will be displayed, and the third SMS will not be broadcast to the SMS application for processing. It is necessary to wait until the SMS broadcast module is turned on to scan the original table before the third SMS can be broadcast to the SMS application for processing. In fact, if the terminal is already in an unlocked state after the filtering is completed, the third SMS can be processed, so the process in the related art will delay the timing of processing the third SMS.
[0069] In this embodiment, when it is determined that the terminal is in a locked state, after filtering the second SMS to obtain the third SMS, it can be determined again whether the terminal is in a locked state. If the terminal is still in a locked state, the notification of the third SMS can be displayed; if the terminal is already in an unlocked state, the third SMS can be broadcast to the SMS application for processing, thereby ensuring that the third SMS can be processed in a timely manner.
[0070] In one embodiment, the method further comprises:
[0071] When the terminal is in an unlocked state, after filtering the second short message to obtain a filtered third short message, the third short message is broadcast to the short message application.
[0072] During the process of distributing text messages, when the terminal is determined to be in an unlocked state, the third text message obtained after filtering can be broadcast to the text message application for processing.
[0073] In one embodiment, the method further comprises:
[0074] receiving information that the SMS application has completed processing the third SMS;
[0075] The third short message is deleted from the original table.
[0076] In one embodiment, after completing processing of the third text message, the SMS application can return information that the processing of the third text message is completed. For example, the SMS receiving module can receive information that the processing of the third text message is completed. Based on this, it can be determined that the SMS application has completed processing of the third text message, and the third text message can be deleted from the original table. On the one hand, storage space is saved, and on the other hand, it is avoided that when the original table is scanned subsequently, the third text message is scanned and then advertised to the SMS application, resulting in duplication of the third text message in the SMS application.
[0077] It should be noted that after receiving the second SMS, the terminal will write the second SMS into the original table, and the third SMS is only the SMS that has not been filtered out in the second SMS. Therefore, the third SMS deleted from the original table refers to the third SMS that has been processed by the SMS application. The third SMS that has not been processed by the SMS application is still retained in the original table.
[0078] In addition, there is another technical problem with the process in the related art.
[0079] After receiving the second SMS, the terminal can determine the SIM card to which the second SMS belongs. For example, a multi-card terminal is provided with at least two SIM cards, SIM card #1 and SIM card #2, and both SIM cards can receive SMS. Then, it is necessary to determine which SIM card the received SMS belongs to. Then, when writing the second SMS into the original table, the terminal can associate the identifier of the SIM card to which the second SMS belongs with the second SMS.
[0080] When the original table is subsequently scanned, for the scanned second SMS, it is necessary to determine whether the identifier of the SIM card associated with the SMS is valid. If the identifier of the SIM card is invalid (for example, the SIM card is pulled out of the terminal), the scanned second SMS will not be broadcast to the SMS application, for example, the second SMS will be discarded. Accordingly, when the SIM card is pulled out of the terminal, the SMS belonging to the SIM card can be discarded.
[0081] However, the invalidation of the SIM card identification may not be caused by the SIM card being pulled out of the terminal, because after the terminal is turned on, the SIM card service needs to be loaded, and it takes some time to record. When the SIM card service is not loaded, the SIM card identification is also in an invalid state. When the SIM card is not loaded when scanning the original table, the SIM card identification is also in an invalid state, which will result in the second SMS being discarded even though the SIM card to which the second SMS belongs is not pulled out.
[0082] Figure 3 FIG. 1 is a schematic flow chart of another method for processing short messages according to an embodiment of the present disclosure. Figure 3 As shown, the method also includes:
[0083] In step S301, when the terminal is in a locked state, after displaying the notification of the third short message, the card slot identifier of the SIM card to which the third short message belongs (that is, the identifier of the card slot where the SIM card is located) is determined;
[0084] In step S302, the third short message is associated with the card slot identifier and stored in the first list.
[0085] In one embodiment, during the process of distributing text messages, if it is determined that the terminal is in a locked state, the second text message can be filtered to obtain a third text message. After obtaining the third text message, it can be determined again whether the terminal is in a locked state. If the terminal is still in a locked state, the notification of the third text message can be displayed.
[0086] It should be noted that the third SMS notification will not be processed by the SMS application because it is not broadcast to the SMS application. It is necessary to wait until the terminal is unlocked and the SMS startup broadcast module scans the original table and scans the third SMS notification before broadcasting the third SMS notification to the SMS application for processing.
[0087] Therefore, for the third SMS notification, there is a problem that the SIM card to which the third SMS belongs is not removed, but the third SMS is still discarded.
[0088] Although incomplete loading of the SIM card service will cause the SIM card identification to become invalid, the SIM card slot is fixed in the terminal and there is no situation where the loading is incomplete or the SIM card is pulled out.
[0089] Therefore, in this embodiment, for the third SMS of the notification, the card slot identifier of the SIM card to which the third SMS belongs can be determined, and then the third SMS and the card slot identifier are associated and stored in the first list. Accordingly, the third SMS and the card slot identifier of the SIM card to which the third SMS belongs are associated and stored in the first list, and when the third SMS is subsequently scanned in the first list and the third SMS is broadcast to the SMS application, the SIM card to which the third SMS belongs can be queried based on the card slot identifier (that is, the card slot coordinates correspond to the SIM card in the card slot), ensuring that if the SIM card to which the third SMS belongs is not pulled out, the third SMS will not be discarded even if the SIM card service is not loaded.
[0090] Figure 4 FIG. 1 is a schematic flow chart of another method for processing short messages according to an embodiment of the present disclosure. Figure 4 As shown, broadcasting the text messages stored in the first list to the text message application includes:
[0091] In step S401, when it is determined that the identifier of the SIM card to which the third text message belongs in the first list is invalid, according to the card slot identifier associated with the third text message, it is determined that the identifier of the SIM card in the card slot corresponding to the card slot identifier is the identifier of the SIM card to which the third text message belongs;
[0092] In step S402, the third SMS in the first list is broadcast to the SMS application.
[0093] In one embodiment, when the terminal scans the first list, after scanning the third text message, when broadcasting the third text message to the text message application, it can determine whether the identifier of the third SIM card to which the third text message belongs is valid. If the identifier of the third SIM card to which the third text message belongs is invalid, it can further determine, based on the card slot identifier associated with the third text message, that the identifier of the SIM card in the card slot corresponding to the card slot identifier is the identifier of the SIM card to which the third text message belongs, thereby making the identifier of the SIM card to which the third text message belongs valid, and then the scanned third text message can be broadcast to the text message application for processing.
[0094] Accordingly, even if the SIM card service to which the third SMS belongs is not loaded completely when scanning the first list, it is still possible to determine that the identifier of the SIM card to which the third SMS belongs is valid, thereby broadcasting the third SMS to the SMS application for processing, avoiding the problem of discarding the third SMS.
[0095] Figure 5 It is a schematic flow chart of another method for processing short messages according to an embodiment of the present disclosure.
[0096] The terminal is installed with an Android system, in which the application framework includes a text message startup broadcast module and a text message receiving module. The terminal also includes a wireless interface layer and is installed with a text message application, which can perform some processing through a paging message processing queue.
[0097] like Figure 5 As shown, after the terminal is powered on, the SMS power-on broadcast module is initialized, the SMS power-on broadcast module starts a new thread, and then the SMS power-on broadcast module scans the original table and stores the SMS stored in the original table into table A (ie, the first table).
[0098] When a new SMS (second SMS) is received after the start-up, the wireless interface layer reports the new SMS to the cyclic message queue. The cyclic message queue informs the SMS receiving module to handle the new SMS event, and the SMS receiving module indicates the delay to the cyclic message queue.
[0099] The SMS boot broadcast module instructs the SMS receiving module to change from the startup state to the idle state to start processing SMS.
[0100] The circular message queue reports the new SMS event to the SMS receiving module, and the SMS receiving module writes the second SMS into the original table, where the original table also stores the SMS (first SMS) that the SMS application has not processed before the last shutdown. Then the SMS receiving module broadcasts the event to the circular message queue.
[0101] The circular message queue distributes SMS messages to the SMS receiving module. During this process, the SMS receiving module can determine whether the terminal is in a locked state.
[0102] If the terminal is in an unlocked state (for example, after the user unlocks the lock screen), the SMS receiving module can start the SMS filtering service, filter the second SMS to obtain a third SMS, and then broadcast the third SMS to the SMS application for processing.
[0103] If the terminal is in a locked state (e.g., the screen is locked), the SMS receiving module can start the SMS filtering service and filter the second SMS to obtain a third SMS. After filtering, it can be determined again whether the terminal is in a locked state. If it is still in a locked state, a notification is displayed for the third SMS, such as displaying a notification above the terminal screen to notify that a new SMS has been received; if it is in an unlocked state, the third SMS can be broadcast to the SMS application for processing.
[0104] When the terminal is in a locked state, after displaying the notification of the third SMS, the card slot identifier of the SIM card to which the third SMS belongs can be determined, and then the third SMS and the card slot identifier are associated and stored in the table A.
[0105] The SMS application processes the received second SMS, and after processing, may send a broadcast indicating that processing of the second SMS is completed to the SMS receiving module, and the SMS receiving module may delete the processed second SMS from the original table.
[0106] On the other hand, after the terminal is unlocked, the SMS startup broadcast module can scan Table A, broadcast the first SMS stored in Table A to the SMS application for memory processing, and when it is determined that the identifier of the SIM card to which the third SMS in Table A belongs is invalid, determine, based on the card slot identifier associated with the third SMS, that the identifier of the SIM card in the card slot corresponding to the card slot identifier is the identifier of the SIM card to which the third SMS belongs, so that the identifier of the SIM card to which the third SMS belongs is valid, and then broadcast the third SMS in Table A to the SMS application for processing.
[0107] It should be noted that the operation of associating the third short message with the card slot identifier and storing it in the first list may be independent of Figure 2 The illustrated embodiment is implemented.
[0108] For example, in one embodiment, when the terminal distributes the second text message, it is determined whether the terminal is in a locked state. When the terminal is in a locked state, the second text message is filtered to obtain a filtered third text message; or when the terminal is in an unlocked state, the second text message is filtered to obtain a filtered third text message.
[0109] Furthermore, when the terminal is in a locked state, after filtering the second short message to obtain a filtered third short message, it is determined whether the terminal is in a locked state; when the terminal is in a locked state, a notification of the third short message is displayed.
[0110] Then, when the terminal is in a locked state, after displaying the notification of the third text message, the card slot identifier of the SIM card to which the third text message belongs is determined, and the third text message is associated with the card slot identifier and stored in the first list.
[0111] Finally, when it is determined that the identifier of the SIM card to which the third SMS in the first list belongs is invalid, according to the card slot identifier associated with the third SMS, the identifier of the SIM card in the card slot corresponding to the card slot identifier is determined to be the identifier of the SIM card to which the third SMS belongs, and the third SMS in the first list is broadcast to the SMS application.
[0112] Corresponding to the above-mentioned embodiments of the method for processing short messages, the present disclosure also provides embodiments of an apparatus for processing short messages.
[0113] Figure 6It is a schematic block diagram of a text message processing device according to an embodiment of the present disclosure. The text message processing device shown in this embodiment can be a terminal, or a device composed of modules in a terminal, and the terminal includes but is not limited to mobile phones, tablet computers, wearable devices, sensors, Internet of Things devices and other communication devices. The terminal can communicate with network devices, and the network devices include but are not limited to network devices in 4G, 5G, 6G and other communication systems, such as base stations, core networks, etc.
[0114] like Figure 6 As shown, the short message processing device may include:
[0115] The storage module 601 is configured to, in response to powering on and the newly received SMS not yet stored in the original table, store the SMS stored in the original table into a first list, wherein the SMS stored in the original table includes the first SMS that has not been processed by the SMS application before the last shutdown;
[0116] The processing module 602 is configured to broadcast the text messages stored in the first list to the text message application in response to unlocking.
[0117] In one embodiment, the device further includes: a receiving module configured to receive a second short message; wherein the storage module is further configured to write the second short message into the original table.
[0118] In one embodiment, the processing module is further configured to distribute the second text message, wherein, when distributing the second text message, it is determined whether the terminal is in a locked state; the device also includes: a filtering module, configured to filter the second text message when the terminal is in a locked state to obtain a filtered third text message; or, when the terminal is in an unlocked state, filter the second text message to obtain a filtered third text message.
[0119] In one embodiment, the processing module is further configured to, when the terminal is in a locked state, filter the second text message to obtain a filtered third text message, and then determine whether the terminal is in a locked state; when the terminal is in a locked state, display a notification of the third text message; or, when the terminal is in an unlocked state, broadcast the third text message to the text message application.
[0120] In one embodiment, the processing module is further configured to, when the terminal is in an unlocked state, filter the second text message to obtain a filtered third text message, and then broadcast the third text message to the text message application.
[0121] In one embodiment, the processing module is further configured to receive information indicating that the SMS application has completed processing the third SMS; and delete the third SMS from the original table.
[0122] In one embodiment, the processing module is further configured to, when the terminal is in a locked state, determine the card slot identifier of the SIM card to which the third text message belongs after displaying the notification of the third text message; the storage module is further configured to associate the third text message with the card slot identifier and store it in the first list.
[0123] In one embodiment, the processing module is configured to, when determining that the identifier of the SIM card to which the third text message in the first list belongs is invalid, determine, based on the card slot identifier associated with the third text message, that the identifier of the SIM card in the card slot corresponding to the card slot identifier is the identifier of the SIM card to which the third text message belongs; and broadcast the third text message in the first list to the text message application.
[0124] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the relevant method, and will not be elaborated here.
[0125] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0126] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the SMS processing method described in any of the above embodiments.
[0127] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for processing short messages described in any of the above embodiments is implemented.
[0128] Figure 7 700 is a schematic block diagram of a device 700 for short message processing according to an embodiment of the present disclosure. For example, the device 700 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0129] Reference Figure 7 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0130] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0131] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0132] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.
[0133] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0134] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0135] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0136] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0137] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0138] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the method described in any of the above embodiments.
[0139] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0140] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0141] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing short messages, characterized in that: Executed by a terminal, the method includes: In response to powering on, and if the newly received SMS has not been stored in the original table, storing the SMS stored in the original table in the first list, wherein the SMS stored in the original table includes the first SMS that has not been processed by the SMS application before the last shutdown; In response to unlocking, the text messages stored in the first list are broadcast to a text message application.
2. The method according to claim 1, characterized in that The method further comprises: Receive the second SMS; The second short message is written into the original table.
3. The method according to claim 2, characterized in that The method further comprises: Distributing the second short message, wherein when distributing the second short message, determining whether the terminal is in a locked state; When the terminal is in a locked state, filtering the second short message to obtain a filtered third short message; or, When the terminal is in an unlocked state, the second short message is filtered to obtain a filtered third short message.
4. The method according to claim 3, characterized in that The method further comprises: When the terminal is in a locked state, after filtering the second short message to obtain a filtered third short message, determining whether the terminal is in a locked state; When the terminal is in a locked state, displaying a notification of the third short message; or, When the terminal is in unlocked state, broadcasting the third short message to the short message application.
5. The method according to claim 3, characterized in that: The method further comprises: When the terminal is in an unlocked state, after filtering the second short message to obtain a filtered third short message, the third short message is broadcast to the short message application.
6. The method according to claim 5, characterized in that The method further comprises: receiving information that the SMS application has completed processing the third SMS; The third short message is deleted from the original table.
7. The method according to claim 4, characterized in that The method further comprises: When the terminal is in a locked state, after displaying a notification of the third text message, determining a card slot identifier of the SIM card to which the third text message belongs; The third short message is associated with the card slot identifier and stored in the first list.
8. The method according to claim 7, characterized in that The broadcasting of the short messages stored in the first list to the short message application includes: When it is determined that the identifier of the SIM card to which the third short message belongs in the first list is invalid, determining, according to the card slot identifier associated with the third short message, the identifier of the SIM card in the card slot corresponding to the card slot identifier as the identifier of the SIM card to which the third short message belongs; The third SMS in the first list is broadcasted to the SMS application.
9. A short message processing device, characterized in that: The device comprises: A storage module, configured to, in response to powering on and newly received short messages not yet stored in the original table, store the short messages stored in the original table into a first list, wherein the short messages stored in the original table include the first short messages that have not been processed by the short message application before the last shutdown; The processing module is configured to broadcast the text messages stored in the first list to the text message application in response to unlocking.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the SMS processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the text message processing method described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Short message processing method and user terminal
CN105554712A
Short message processing method and device
CN106302528A