Receipt sending method and device of 5g message and electronic equipment

By creating an independent receipt queue for each developer and sending receipt messages in a preset order, the problem of receipt message blocking in the 5G message sending platform is solved, and efficient receipt processing is achieved.

CN119854738BActive Publication Date: 2026-04-28CHINA MOBILE INTERNET CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE INTERNET CO LTD
Filing Date
2024-12-24
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In the 5G messaging platform, due to the limited number of queues, the acknowledgment messages from different developers are placed at the end of the queue and wait for a long time, blocking the processing of acknowledgment messages from other developers and preventing them from being sent in a timely manner.

Method used

Create an independent target receipt queue for each developer and send receipt messages to the target developers in a preset sending order, giving priority to receipt priority and the number of pending processing times, and use a thread pool to manage the sending of receipt queues.

Benefits of technology

Independent sending of each target receipt queue was achieved, avoiding receipt message blocking, meeting the receipt message sending requirements of different developers, and improving receipt timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854738B_ABST
    Figure CN119854738B_ABST
Patent Text Reader

Abstract

The application discloses a receipt sending method, device and electronic equipment of a 5G message, and the method comprises the steps of: obtaining a target receipt message corresponding to at least one 5G message; creating a target receipt queue of a target developer corresponding to each 5G message, and adding the target receipt message into the corresponding target receipt queue; and sending the target receipt message in each target receipt queue to the target developer corresponding to the 5G message according to a preset sending sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and specifically relates to a method, apparatus and electronic device for sending 5G message receipts. Background Technology

[0002] After the 5G messaging platform sends a message to the terminal device, the 5G messaging center pushes the message receipt to the 5G messaging platform. The 5G messaging platform then places the receipts into a fixed number of queues and asynchronously sends the receipts from each queue to different developers through the receipt processor. Due to the limited number of queues, the 5G messaging platform places receipts from different developers in the same partition of the same queue. If a developer has multiple receipts or if the receipt sending process is time-consuming, other developers' receipts that are later in the queue will be blocked in the queue and will have to wait for the previous receipts to be processed. This prevents timely processing and sending of receipts from developers with high timeliness requirements. Summary of the Invention

[0003] This application provides a method, apparatus, and electronic device for sending 5G message receipts, which can solve the problem that receipts from other developers with high timeliness requirements cannot be processed and sent in a timely manner.

[0004] In a first aspect, embodiments of this application provide a method for sending receipts for 5G messages. The method includes: obtaining at least one target receipt message corresponding to a 5G message; creating a target receipt queue for each target developer corresponding to the 5G message, and adding the target receipt messages to the corresponding target receipt queues respectively; and sending the target receipt messages in each target receipt queue to the target developer corresponding to the 5G message according to a preset sending order.

[0005] Secondly, embodiments of this application provide a 5G message receipt sending device, which includes: an acquisition module for acquiring at least one target receipt message corresponding to a 5G message; a creation module for creating a target receipt queue for each target developer corresponding to the 5G message, and adding the target receipt messages to the corresponding target receipt queues respectively; and a sending module for sending the target receipt messages in each target receipt queue to the target developer corresponding to the 5G message according to a preset sending order.

[0006] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0007] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0008] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the method described in the first aspect.

[0009] In a sixth aspect, embodiments of this application provide a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including a program or instructions, which, when executed, implement the steps of the method described in the first aspect.

[0010] In this embodiment, by acquiring at least one target receipt message corresponding to a 5G message, a target receipt queue is created for each target developer corresponding to the 5G message. The target receipt messages are then added to their respective target receipt queues, creating an independent target receipt queue for each target developer. Each target developer's receipt message is added to its own independent target receipt queue, ensuring that receipt messages from other developers are not blocked, and that each developer's own receipt message can be sent within its own independent target receipt queue. The target receipt messages in each target receipt queue are then sent to the target developer corresponding to the 5G message according to a preset sending order. This ensures that the target receipt messages in each target receipt queue are sent independently to their corresponding target developers according to the preset sending order, avoiding mutual blocking caused by multiple developers' receipt messages being in the same queue. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating a method for sending 5G message receipts according to an embodiment of this application.

[0012] Figure 2a This is a schematic diagram of a 5G message receipt sending method provided by related technologies;

[0013] Figure 2b This is a schematic diagram of a 5G message receipt sending method provided in an embodiment of this application;

[0014] Figure 3 This is a flowchart illustrating another method for sending 5G message receipts provided in an embodiment of this application.

[0015] Figure 4This is a schematic diagram of a module of a 5G message sending platform provided in an embodiment of this application;

[0016] Figure 5 This is a schematic diagram of the structure of a 5G message receipt sending device provided in an embodiment of this application;

[0017] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0020] The following description, in conjunction with the accompanying drawings, details the 5G message receipt sending method, apparatus, and electronic device provided in this application through specific embodiments and application scenarios.

[0021] Figure 1 This diagram illustrates a flowchart of a 5G message receipt sending method provided in an embodiment of this application. This method can be executed by an electronic device. See also... Figure 1 The method may include the following steps.

[0022] Step 102: Obtain at least one target receipt message corresponding to a 5G message.

[0023] The 5G message is sent to the terminal device by the 5G message sending platform. The target receipt message corresponding to the 5G message is forwarded to the 5G message sending platform by the 5G message center. The 5G message sending platform adds the target receipt message to the receipt queue and sends it to the target developer corresponding to the 5G message.

[0024] Step 104: Create a target receipt queue for each target developer corresponding to the 5G message, and add the target receipt messages to the corresponding target receipt queues respectively.

[0025] Specifically, an independent target receipt queue is created for each target developer corresponding to a 5G message, so that the receipt queues of different developers are independent of each other. Each receipt queue includes the receipt message corresponding to a single developer, avoiding the blocking of sending receipt messages between different developers.

[0026] Step 106: Send the target receipt message in each target receipt queue to the target developer corresponding to the 5G message according to the preset sending order.

[0027] The preset sending order can be set according to the delivery receipt requirements. For example, delivery receipt messages for developers with high timeliness requirements can be sent first. Alternatively, delivery receipt messages for developers with set priorities can be sent according to their priority.

[0028] In this embodiment, by obtaining at least one target receipt message corresponding to a 5G message, a target receipt queue is created for each target developer corresponding to the 5G message. The target receipt messages are then added to their respective target receipt queues. This creates an independent target receipt queue for each target developer, ensuring that each developer's receipt message is added to its own independent target receipt queue. This approach avoids blocking receipt messages from other developers while allowing the developer's own receipt message to be sent within its own independent target receipt queue. See [link to relevant documentation]. Figure 2a and Figure 2b , Figure 2a The diagram illustrates a method for sending 5G message receipts provided by related technologies. Receipt messages from multiple developers are placed in the same partition of the same queue (for example, receipt messages 1, 3, and 5 are placed in receipt queue 1, and receipt messages 2, 4, and 6 are placed in receipt queue 2, where receipt messages 1, 2, 3, 4, 5, and 6 correspond to different developers). In the same receipt queue, receipt messages that are later in the queue must wait for receipt messages that are earlier in the queue and cannot be sent first. Figure 2b This illustration shows a schematic diagram of a 5G message receipt sending method provided in an embodiment of this application. Each target developer creates an independent target receipt queue, and each receipt message is placed in its corresponding receipt queue. Then, the target receipt messages in each target receipt queue are sent to the target developer corresponding to the 5G message according to a preset sending order. This allows the target receipt messages in each target receipt queue to be sent independently to their corresponding target developers according to a preset sending order, avoiding mutual blocking caused by multiple developers' receipt messages being in the same queue, and also flexibly meeting the receipt message sending requirements of different target developers.

[0029] In one implementation, step 106 above, which sends the target receipt message in each target receipt queue to the target developer corresponding to the 5G message according to a preset sending order, includes the following steps.

[0030] Step 1061: Determine the sending order of each target receipt queue based on the receipt priority of each target receipt queue or the number of pending processing times of each target receipt queue; wherein, the number of pending processing times of each target receipt queue is the number of times the target receipt queue is placed into the thread pool.

[0031] The thread pool is used to manage and process the queue of receipts to be sent. When a target receipt is placed into the thread pool, it indicates that the receipt is about to be processed and sent to the target developer. If a target receipt is placed into the thread pool and successfully sent, it will not be placed back into the thread pool for retry. The more times a target receipt is placed into the thread pool, the more likely there is an anomaly in the queue causing sending failures. Therefore, the number of times a target receipt is pending processing can be considered a factor in determining the sending order of the target receipts.

[0032] Step 1062: Send each target receipt message in the target receipt queue to the target developer corresponding to the 5G message according to the sending order.

[0033] In this embodiment, the sending order of the target receipt queues can be determined by the receipt priority of each target receipt queue or the number of pending processing times for each target receipt queue. For example, the receipt priority of the target receipt queues can be given priority, which is preset by the target developer or dynamically determined by the 5G messaging platform based on real-time sending conditions. Secondly, the number of pending processing times for the target receipt queues can be considered; when receipt priorities are the same, the fewer the number of pending processing times for a target receipt queue, the earlier its sending order. This ensures that target receipt queues with higher sending priorities and / or fewer pending processing times are sent to the corresponding target developers first, satisfying the target developers' receipt requirements for receipt messages.

[0034] In one implementation, before step 1062 above, in which each target receipt message in the target receipt queue is sent to the target developer corresponding to the 5G message according to the sending order, the method further includes the following steps.

[0035] Step a1: Compare the identification information of each target receipt queue with the identification information of the historical receipt queues in the set of queues to be sent to determine the first receipt queue and the second receipt queue; wherein, the first receipt queue is the historical receipt queue to be removed in the set of queues to be sent; and the second receipt queue is the target receipt queue to be added in the set of queues to be sent.

[0036] In this embodiment, the set of queues to be sent includes receipt queues whose sending order has been determined and arranged in that order. Each target receipt queue, including currently acquired receipt messages, is a new receipt queue that needs to be sent. By comparing these queues with existing historical receipt queues in the set of queues to be sent, the existing historical receipt queues in the set of queues to be sent are filtered, including removing receipt queues that do not need to be sent currently and removing receipt queues that may fail to send, in order to improve the sending efficiency of the receipt queues.

[0037] Furthermore, by comparing the identification information of each target receipt queue with the identification information of the historical receipt queues in the queue set to be sent, a third receipt queue can be determined. The third receipt queue is a historical receipt queue to be retained in the queue set to be sent. In other words, during this receipt sending process, the third receipt queue is retained in the queue set to be sent and together with the newly added target receipt queues to form a queue set to be sent, ready for transmission.

[0038] Step a2: Remove the first receipt queue from the set of queues to be sent.

[0039] The first receipt queue is a historical receipt queue to be removed, including receipts that do not need to be sent at present.

[0040] Step a3: Add the second receipt queue to the set of queues to be sent.

[0041] The second receipt queue is the receipt queue in the target receipt queue. It is the receipt queue that needs to be sent at present. It is added to the set of queues to be sent, ready for sending.

[0042] In this embodiment, the queue set to be sent maintains a queue of receipts to be sent. By comparing the identification information of the target receipt queue with the identification information of the existing historical receipt queues in the queue set to be sent, a new target receipt queue is added to the queue set to be sent, and historical receipt queues that do not need to be sent are removed from the queue set to be sent. If there is already a target receipt queue in the queue set to be sent, it is retained without removal and addition. This ensures that the queue set to be sent contains target receipt queues that need to be sent in the sending order, and removes historical receipt queues that do not need to be sent, thereby reducing redundant receipt queues in the queue set to be sent and improving the sending efficiency of the receipt queues.

[0043] In one implementation, step 1062 above, which sends the target receipt message in each target receipt queue to the target developer corresponding to the 5G message according to the sending order, includes the following steps.

[0044] Step 1062a: Sort the receipt queues in the set of queues to be sent in order of receipt priority from high to low or the number of times to be processed from few to many.

[0045] The sending order of the receipt queues in the pending sending queue set is determined based on receipt priority and / or the number of pending processing times. Receipt queues with higher receipt priority are sorted first, and receipt queues with the same priority but fewer pending processing times are sorted first.

[0046] Step 1062b: Send the receipt queue in the set of queues to be sent to the target developer corresponding to the 5G message in the order stated.

[0047] In this embodiment, the receipt queues in the pending delivery queue set are sorted by receipt priority from high to low or by the number of pending processing times from few to many. This allows the receipt queues in the pending delivery queue set to be sent to the target developers corresponding to the 5G messages in the sorted order of receipt priority from high to low or the number of pending processing times from few to many. This ensures that target developers with higher receipt priority receive receipt messages first.

[0048] In one implementation, step a1 above compares the identification information of each target receipt queue with the identification information of historical receipt queues in the set of queues to be sent to determine the first receipt queue and the second receipt queue, including the following:

[0049] (1) For each of the historical receipt queues, if the identification information of the historical receipt queue is different from the identification information of each of the target receipt queues, the historical receipt queue is determined as the first receipt queue.

[0050] The fact that the identification information of the historical receipt queue is different from that of each of the target receipt queues indicates that the historical receipt queues already existing in the current set of queues to be sent are different from the new target receipt queues that need to be sent. The historical receipt queues cannot replace the new target receipt queues and should be removed from the set of queues to be sent.

[0051] (2) For each target receipt queue, if the identification information of the target receipt queue is different from the identification information of each historical receipt queue, the target receipt queue is determined as the second receipt queue.

[0052] The fact that the identification information of the target receipt queue is different from that of each of the historical receipt queues indicates that the target receipt queue is not in the set of queues to be sent and needs to be added to the set of queues to be sent.

[0053] Furthermore, if the identification information of the historical receipt queue is the same as the identification information of the target receipt queue, the historical receipt queue is designated as the third receipt queue. The fact that the identification information of the historical receipt queue is the same as the identification information of the target receipt queue indicates that the historical receipt queue in the set of queues to be sent is the same as the new target receipt queue, and this historical receipt queue can be used as the new target receipt queue without needing to be added again.

[0054] In one implementation, the above method further includes the following steps.

[0055] Step a4: Obtain the network error queue set and the timeout queue set.

[0056] The network anomaly queue set includes a historical receipt queue for sending network anomalies and the number of consecutive attempts in the historical receipt queue; the timeout queue set includes a historical receipt queue for sending data for a duration exceeding a preset duration and the number of consecutive attempts in the historical receipt queue.

[0057] Step a5: If the first receipt queue exists in the network error queue set or the timeout queue set, remove the first receipt queue from the network error queue set or the timeout queue set.

[0058] The network error queue set and the timeout queue set include historical receipt queues that needed to be sent but failed to be sent; these receipt queues still need to be sent again later. The first receipt queue is the historical receipt queue to be removed, including receipt queues that do not currently need to be sent, and these are removed from the network error queue set and the timeout queue set.

[0059] Step a6: If a first abnormal queue or a second abnormal queue exists in the set of queues to be sent, mark the first abnormal queue with a first abnormal label or mark the second abnormal queue with a second abnormal label.

[0060] Wherein, the first abnormal queue is the historical receipt queue in the network abnormal queue set whose consecutive attempt count is greater than or equal to a first preset threshold; the second abnormal queue is the historical receipt queue in the timeout queue set whose consecutive attempt count is greater than or equal to a second preset threshold.

[0061] In this embodiment, the receipt queue sending process also includes a network error queue set and a timeout queue set. The receipt queues are historical receipt queues that needed to be sent but failed to be sent. In subsequent receipt queue sending processes, new target receipt queues can be sent first. Then, based on the specific situation, it is determined whether to try sending receipt queues from the network error queue set and the timeout queue set again. This allows the previously failed receipt queues to be processed again without affecting the sending of new target receipt queues, satisfying the real-time and efficiency requirements of sending target receipt queues and avoiding sending blockages.

[0062] In one implementation, step 1062b above, which sends the receipt queues in the set of queues to be sent to the target developer corresponding to the 5G message in the order described, may include the following steps.

[0063] Step b1: Obtain the first number of receipt queues sorted first from the set of queues to be sent in the order described, and put the first number of receipt queues into the thread pool; wherein, the first number is the number of available threads in the thread pool; the first number of receipt queues are unmarked receipt queues.

[0064] Specifically, based on the number of currently available threads in the thread pool, the first number of receipt queues sorted first are obtained from the set of queues to be sent. The first number of receipt queues need to be sent first and do not include historical receipt queues in the network error queue set whose consecutive attempt count is greater than or equal to a first preset threshold, or historical receipt queues in the timeout queue set whose consecutive attempt count is greater than or equal to a second preset threshold. That is, none of the first number of receipt queues are marked with the first error label or the second error label.

[0065] Step b2: The first number of receipt queues are sent to the target developer corresponding to the 5G message through the available threads in the thread pool.

[0066] In this embodiment of the application, since the number of available threads in the thread pool is not necessarily equal to the number of receipt queues in the queue set to be sent, a first number of receipt queues are selected from the queue set to be sent and placed into the thread pool. The available threads in the thread pool send the first number of receipt queues to the target developer corresponding to the 5G message, which can efficiently utilize the available threads in the thread pool.

[0067] Optionally, based on the number of receipt queues in the set of queues to be sent, a certain number of receipt queues can be added to multiple thread pools for processing to improve the sending efficiency of the receipt queues.

[0068] In one implementation, after step b2 above, in which the first number of receipt queues are sent to the target developer corresponding to the 5G message through the available threads in the thread pool, the method further includes the following steps.

[0069] Step b3: If there are still available threads in the thread pool, retrieve the second number of receipt queues that are sorted first from the set of queues to be sent in the order described above, and put the second number of receipt queues into the thread pool; wherein, the second number is the number of available threads in the thread pool; the second number of receipt queues are receipt queues marked with the second exception label.

[0070] Specifically, after sending the first number of unmarked receipt queues first, it is determined whether there are still available threads in the thread pool, and then the receipt queues marked with the second exception label are processed.

[0071] Step b4: The second number of receipt queues are sent to the target developer corresponding to the 5G message through the available threads in the thread pool.

[0072] In this embodiment, by prioritizing the sending of a first number of unmarked receipt queues, then determining whether there are still available threads stored in the thread pool, and then retrieving the second number of receipt queues marked with the second exception tag from the set of queues to be sent in the order stated above, the receipt queues in the set of queues to be sent are sent flexibly, thereby ensuring that the current new receipt queues that need to be sent are not delayed or blocked, and also avoiding ignoring historical receipt queues whose sending time exceeds the preset time.

[0073] In one implementation, step b4 above, which sends the second number of receipt queues to the target developer corresponding to the 5G message through available threads in the thread pool, may include the following steps.

[0074] Step b41: Retrieve the second number of receipt messages from the receipt queue in batches from the database using available threads in the thread pool; wherein, the database stores receipt messages to be sent.

[0075] In this embodiment of the application, the receipt queue uses a list structure of the database (Redis) to store the receipt messages in each receipt queue. The removal and addition of receipt queues in the above-mentioned set of queues to be sent are performed by operating on the identification information of the receipt queues, so as to avoid excessively frequent data access.

[0076] Step b42: Send the receipt messages in batches to the target developers corresponding to the 5G messages.

[0077] In this embodiment of the application, the available threads in the thread pool send the receipt queues in the set of queues to be sent. Specifically, the receipt messages in the second number of receipt queues are retrieved from the database in batches according to the identification information of the receipt queues, and then the receipt messages in each receipt queue are sent in batches to the target developer corresponding to the receipt queue.

[0078] Optionally, for the first number of receipt queues mentioned above, receipt messages in the first number of receipt queues can also be retrieved in batches from the database by available threads in the thread pool, and the receipt messages can be sent in batches to the target developers corresponding to the 5G messages.

[0079] In one implementation, the above method may further include the following steps.

[0080] Step b5: Update the pending count of the first number of receipt queues or update the pending count of the second number of receipt queues.

[0081] When the first or second number of receipt queues are added to the thread pool, their pending processing count changes accordingly. The pending processing count is updated to update the order of receipt queues in the set of queues to be sent in real time.

[0082] Step b6: Reorder the receipt queues in the set of queues to be sent according to the updated number of pending processing times or the receipt priority.

[0083] In this embodiment, after obtaining the first number of receipt queues ranked first from the set of queues to be sent in the order described, and placing the first number of receipt queues into the thread pool, and after obtaining the second number of receipt queues ranked first from the set of queues to be sent in the order described, and placing the second number of receipt queues into the thread pool, each receipt queue added to the thread pool is in a ready-to-send state. The number of times each receipt queue has been added to the thread pool will also change. The number of times it has been added to the thread pool will be updated, so that the receipt queues in the set of queues to be sent are reordered according to the updated number of times it has been added to the thread pool or the receipt priority, thus ensuring the accuracy of the order of the receipt queues in the set of queues to be sent.

[0084] In one implementation, the above method may further include the following steps.

[0085] Step b7: Obtain the first sending result of the first number of receipt queues or the second number of receipt queues.

[0086] The first sending result reveals the sending status of the receipt queue, such as whether the sending was successful or the reason for the failure.

[0087] Step b81: If the first sending result indicates a network error in the fourth receipt queue, add the fourth receipt queue to the network error queue set and update the number of consecutive attempts in the fourth receipt queue.

[0088] The fourth receipt queue is either the first or second number of receipt queues mentioned above, and the number of consecutive attempts in the fourth receipt queue is updated to zero.

[0089] Step b82: If the first sending result indicates that the sending time of the fifth receipt queue exceeds the preset time, add the fifth receipt queue to the timeout queue set and update the number of consecutive attempts of the fifth receipt queue.

[0090] The second receipt queue is either the first number of receipt queues or the second number of receipt queues mentioned above, and the number of consecutive attempts in the fifth receipt queue is updated to zero.

[0091] In this embodiment of the application, after the first number of receipt queues or the second number of receipt queues are processed by available threads in the thread pool and sent to the target developer, based on the obtained first sending result, the receipt queues that sent network errors in the first number of receipt queues or the second number of receipt queues are added to the aforementioned network error queue set, or the receipt queues whose sending time exceeds the preset time are added to the timeout queue set, and the number of consecutive attempts is updated, so as to record the receipt queues that failed to send through the network error queue set or the timeout queue set, so as to know the receipt queues that need to be sent again from these two sets in the future, so as not to ignore the receipt queues that failed to send before.

[0092] In one implementation, the above method may further include the following steps.

[0093] Step a7: Periodically send the first abnormal queue or the second abnormal queue to the target developer corresponding to the 5G message, and obtain the second sending result of the first abnormal queue or the second abnormal queue.

[0094] Specifically, the historical receipt queues in the network anomaly queue set whose consecutive attempts are greater than or equal to a first preset threshold, or the historical receipt queues in the timeout queue set whose consecutive attempts are greater than or equal to a second preset threshold, are periodically resent to their corresponding target developers. The sending status of these historical receipt queues can be obtained through the second sending result, such as whether the sending was successful or the reason for the sending failure. Therefore, the status of these historical receipt queues is updated again based on the second sending result.

[0095] Step a81: If the second sending result indicates that the first abnormal queue was successfully sent, the first abnormal queue is removed from the network abnormal queue set.

[0096] The successful transmission of the first exception queue indicates that the network for transmitting the first exception queue is normal and can successfully transmit the first exception queue to the target developer.

[0097] Step a82: If the second sending result indicates that the sending time of the second abnormal queue does not exceed the preset time, the second abnormal queue is removed from the timeout queue set.

[0098] The fact that the sending time of the second exception queue does not exceed the preset time indicates that the sending time of the first exception queue is within the normal range. There is no need to delay sending until there are still available threads in the thread pool, and the sending can be carried out in the order of arrangement in the set of queues to be sent.

[0099] In this embodiment of the application, a timed sending task is set for the first abnormal queue in the network abnormal queue set and the second abnormal queue in the timeout queue set. The first abnormal queue and the second abnormal queue are sent at regular intervals. Based on the second sending result, it is determined whether the sending of the receipt queue in the network abnormal queue set and the timeout queue set has returned to normal. If it has returned to normal, the first abnormal queue is removed from the network abnormal queue set and the second abnormal queue is removed from the timeout queue set.

[0100] In one implementation, step 104 above, which adds the target receipt messages to the corresponding target receipt queues, includes the following steps.

[0101] Step 1041: Obtain the information of the target developer corresponding to the 5G message.

[0102] The target developer's information includes information about the various functions that the target developer has set, allowed, or authorized.

[0103] Step 1042: Determine whether the receipt function of the target developer is enabled based on the information.

[0104] When the receipt function is enabled, the target developer can receive receipt messages; when the receipt function is disabled, the target developer cannot receive receipt messages.

[0105] Step 1043a: If the information instructs the target developer to disable the receipt function, discard the target receipt message.

[0106] If the target developer disables the receipt function, then there is no need to add the target receipt message to the target receipt queue, and therefore no need to send it to the target developer. The target receipt message is discarded and not stored in the database to avoid consuming storage space.

[0107] Step 1043b: If the information instructs the target developer to enable the receipt function, add the target receipt message to the corresponding target receipt queue.

[0108] In this embodiment, the system determines whether to retain and send the target receipt message by checking whether the target developer's receipt function is enabled. If the target developer's receipt function is disabled, the target receipt message is discarded. If the target developer's receipt function is enabled, the target receipt message is added to the target developer's target receipt queue, and the subsequent sending process is executed.

[0109] In one implementation, the above method may further include the following steps.

[0110] Step c1: Obtain the notification of the change in the receipt priority.

[0111] The change notification is used to indicate that the priority of the target receipt queue of the target developer has changed.

[0112] Step c2: According to the change notification, change the receipt priority of the target receipt queue.

[0113] In this embodiment, the notification of the change in receipt priority can be issued by the target developer or by the 5G messaging platform. Only operators with the authority to change the priority can modify it. Based on the notification, the receipt priority of the target receipt queue is changed, and then the receipt queues in the set of queues to be sent are reordered according to the changed priority or the number of pending processing times. This timely update of receipt priorities ensures the accuracy of the order of receipt queues in the set of queues to be sent.

[0114] Figure 3 The illustration shows a flowchart of another 5G message receipt sending method provided in this application embodiment, which is applied to a 5G message sending platform. The 5G message sending platform includes a receipt processor and a queue allocator, and the receipt processor includes a thread pool. Figure 4 This diagram illustrates a module schematic of a 5G messaging platform provided in an embodiment of this application. The receipt queue, including receipt messages, is stored using a Redis List structure. A queue allocator monitors the receipt queues and allocates them to receipt processors. A ServiceRegistry stores the heartbeats of registered services and receipt processors, using a Redis zset structure, including the receipt processor's identifier (member) and the timestamp (score) of the reported heartbeat. A GlobalQueues set stores all developers' receipt queues, also using a Redis zset structure, including the receipt queue's identifier (member) and the timestamp (score) of the receipt queue being added to the set. A GlobalAssignRecord records queue allocation information, using a Redis hash structure, including the receipt processor's identifier and the receipt queue's identifier. See also... Figure 3 The method includes the following steps.

[0115] Step 301: Obtain the developer's information and determine whether the developer's receipt function is enabled. If enabled, add the receipt queue, including the receipt message, to GlobalQueues. If disabled, discard the receipt message.

[0116] Step 302 involves using three distributed scheduled tasks to periodically monitor the receipt processor and receipt queue, and to allocate receipt queues to the receipt processor.

[0117] Among them, scheduled task 1: allocates a receipt queue to the receipt processor.

[0118] Step S11: Retrieve elements with a score greater than or equal to a certain value from ServiceRegistry. These are the online receipt processors, denoted as ServiceList. The remaining elements are offline receipt processors, which are removed from ServiceRegistry. Return the result ServiceList.

[0119] Step S12: Obtain the local receipt queue from GlobalQueues and the local receipt queue assignment record from GlobalAssignRecord.

[0120] Step S13: Compare the local receipt queue with the local receipt queue allocation record to determine the newly added receipt queue set (NewQueues) and the receipt queue set (RemvoeQueues) that no longer needs to be sent.

[0121] Step S14: Remove RemvoeQueues from the local receipt queue.

[0122] Step S15: Add the receipt queue of the offline receipt processor to NewQueues according to the local receipt queue allocation record.

[0123] Step S16: Add the receipt handlers that are in ServiceList but not in LocalAssignRecord to LocalAssignRecord.

[0124] Step S17: Assign NewQueues to the receipt processor of LocalAssignRecord.

[0125] Among them, scheduled task 2: reallocates the receipt queue based on the amount of receipt messages.

[0126] Step S21: Obtain the message count of each receipt queue.

[0127] Step S22: Compare the message volume of the same priority of each receipt processor's receipt queue. If the difference in message volume is greater than a preset threshold, change the priority of the receipt queue of that priority.

[0128] Among them, scheduled task 3: Remove the receipt queue.

[0129] Step S31: Obtain the acknowledgment queues in the GlobalQueues set whose scores are less than a preset threshold. This means there are no acknowledgment messages within a certain period.

[0130] Step S32: Check if there are any unsent receipt messages in the receipt queue. If not, remove the receipt queue from GlobalQueues. This means that all receipt messages in the receipt queue with a score less than a preset threshold have been sent.

[0131] Step 303: Periodically add the identifier of the current receipt processor to the ServiceRegistry, with the score being the current timestamp, to maintain a heartbeat.

[0132] The current receipt processor includes: 1. A thread pool: Receipt queues are added to the thread pool. The thread pool retrieves the corresponding receipt messages from Redis based on the receipt queue's identifier for processing and sending. 2. A consumption queue set (ConsumeQueues): This records the receipt queues of the current receipt processor and the number of times each receipt queue has been added to the thread pool (HandleTimes). Elements in ConsumeQueues are sorted according to the developer's receipt priority from high to low. If priorities are the same, they are sorted according to HandleTimes from low to high. That is, the higher the receipt priority, the earlier it appears in the set; and for the same priority, the fewer times it has been added to the thread pool, the earlier it appears in the set. 3. A network exception queue set (TimeoutQueues): This records receipt queues that experienced network exceptions while sending receipt queues and the number of consecutive attempts (value) for each receipt queue. When the value of a receipt queue reaches a preset threshold, sending of that receipt queue is stopped. 4. The timeout queue collection (LongTimeQueues) records the number of receipts that took too long to send and the number of consecutive attempts (value) of the receipt queue. When the value of a receipt queue reaches a preset threshold, the receipt queue will only be processed if there are still available threads after the thread pool has processed other normal receipt queues.

[0133] Step 304: Obtain NewQueues, update ConsumeQueues with NewQueues, and sort the receipt queue in ConsumeQueues.

[0134] This includes: Step 3041, comparing NewQueues and ConsumeQueues; determining receipt queues that exist in ConsumeQueues but not in NewQueues as receipt queues to be removed, and determining receipt queues that exist in NewQueues but not in ConsumeQueues as receipt queues to be added. Step 3042, removing receipt queues to be removed from ConsumeQueues, TimeoutQueues, and LongTimeQueues, adding receipt queues to be added to ConsumeQueues, and reordering them.

[0135] Step 305: Obtain the number of available threads in the thread pool (Count1), and add the normal receipt queues to the thread pool. After excluding queues with values ​​greater than or equal to N in TimeoutQueues and values ​​greater than or equal to M in LongTimeQueues, retrieve Count1 receipt queues from the ConsumeQueues set in order and add them to the thread pool. Increment the HandleTimes of these receipt queues by 1, and reorder the ConsumeQueues.

[0136] The process of placing a normal receipt queue into a thread pool can include: retrieving the receipt message corresponding to the receipt queue from Redis based on the identifier of the normal receipt queue, and placing it into the thread pool for later sending.

[0137] Optionally, the above method may further include: adding the receipt queues in LongTimeQueues to a thread pool. Checking if the thread pool has available threads; if so, recording the number as Count2. Retrieving Count2 receipt queues from ConsumeQueues whose values ​​in LongTimeQueues are greater than or equal to M, and adding them to the thread pool. Incrementing the HandleTimes of these receipt queues by 1, and reordering ConsumeQueues.

[0138] Step 306: Send the receipt messages from each normal receipt queue added to the thread pool to the developer.

[0139] Step 307: Obtain the first transmission result of Count1 or Count2 receipt queues. If the first transmission result indicates that the transmission network of receipt queue a is abnormal, add receipt queue a to TimeoutQueues and increment the corresponding value by 1. If the first transmission result indicates that the time consumption of receipt queue b exceeds the duration threshold, add receipt queue b to LongTimeQueues and increment the corresponding value by 1.

[0140] Among them, receipt queue a and receipt queue b are the receipt queues in the above-mentioned Count1 receipt queues or Count2 receipt queues.

[0141] Step 308: Periodically add the receipt queues in TimeoutQueues with values ​​greater than or equal to N and LongTimeQueues with values ​​greater than or equal to M to the thread pool.

[0142] Step 309: Send the receipt messages from each exception receipt queue added to the thread pool to the developer.

[0143] Step 310: Obtain the second transmission result of the receipt queues in TimeoutQueues and LongTimeQueues. If the second transmission result indicates that receipt queue c was successfully transmitted, remove receipt queue c from TimeoutQueues. If the second transmission result indicates that the transmission time of receipt queue d is less than the duration threshold, remove receipt queue d from LongTimeQueues.

[0144] Among them, receipt queue c and receipt queue d are the receipt queues in the aforementioned TimeoutQueues or LongTimeQueues.

[0145] Step 311: Obtain a notification of a change in receipt priority, or periodically query the developer's information to determine if the receipt priority has changed, change the receipt priority, and reorder ConsumeQueues.

[0146] In this embodiment, Redis is used to dynamically create a receipt queue for developers, and receipt messages are sent flexibly according to receipt priority. This avoids the problem of receipt messages from multiple different developers blocking each other due to network connectivity issues or excessively long sending times. Furthermore, the message volume of each receipt processor's receipt queue is monitored periodically. When the message volume difference among multiple receipt processors is too large, the receipt queue can be automatically reallocated to the receipt processor, optimizing the receipt message sending mechanism.

[0147] It should be noted that the 5G message receipt sending method provided in this application embodiment can be executed by a 5G message receipt sending device, or a control module within the 5G message receipt sending device for executing the 5G message receipt sending method. This application embodiment uses the execution of the 5G message receipt sending method by a 5G message receipt sending device as an example to illustrate the 5G message receipt sending device provided in this application embodiment.

[0148] Figure 5 A schematic diagram of a 5G message receipt sending device provided in an embodiment of this application is shown. Figure 5 As shown, the device 500 includes: an acquisition module 51, a creation module 52, and a sending module 53.

[0149] The acquisition module 51 is used to acquire at least one target receipt message corresponding to a 5G message; the creation module 52 is used to create a target receipt queue for each target developer corresponding to the 5G message, and add the target receipt messages to the corresponding target receipt queues respectively; the sending module 53 is used to send the target receipt messages in each target receipt queue to the target developer corresponding to the 5G message according to a preset sending order.

[0150] In one implementation, the sending module 53 described above can be used to determine the sending order of each target receipt queue based on the receipt priority of each target receipt queue or the number of pending processing times of each target receipt queue; wherein, the number of pending processing times of the target receipt queue is the number of times the target receipt queue is placed into the thread pool; and the target receipt messages in each target receipt queue are sent to the target developers corresponding to the 5G message according to the sending order.

[0151] In one implementation, the aforementioned apparatus 500 may further include a filtering module, configured to compare the identification information of each target receipt queue with the identification information of historical receipt queues in the set of queues to be sent, to determine a first receipt queue and a second receipt queue; wherein the first receipt queue is a historical receipt queue to be removed from the set of queues to be sent; the second receipt queue is a target receipt queue to be added to the set of queues to be sent; the first receipt queue is removed from the set of queues to be sent; and the second receipt queue is added to the set of queues to be sent.

[0152] In one implementation, the sending module 53 described above can be used to sort the receipt queues in the set of queues to be sent according to the receipt priority from high to low or the number of pending processing times from few to many; and send the receipt queues in the set of queues to be sent to the target developer corresponding to the 5G message in the order described above.

[0153] In one implementation, the filtering module described above can be used to, for each historical receipt queue, determine the historical receipt queue as the first receipt queue if the identification information of the historical receipt queue is different from the identification information of each target receipt queue; and for each target receipt queue, determine the target receipt queue as the second receipt queue if the identification information of the target receipt queue is different from the identification information of each historical receipt queue.

[0154] In one implementation, the aforementioned apparatus 500 may further include a marking module for acquiring a network anomaly queue set and a timeout queue set; wherein the network anomaly queue set includes a historical receipt queue for sending network anomalies and the number of consecutive attempts of the historical receipt queue; the timeout queue set includes a historical receipt queue for sending for a duration exceeding a preset duration and the number of consecutive attempts of the historical receipt queue; if the first receipt queue exists in the network anomaly queue set or the timeout queue set, the first receipt queue is removed from the network anomaly queue set or the timeout queue set; if a first anomaly queue or a second anomaly queue exists in the queue set to be sent, a first anomaly tag is assigned to the first anomaly queue or a second anomaly tag is assigned to the second anomaly queue; wherein the first anomaly queue is a historical receipt queue in the network anomaly queue set whose number of consecutive attempts is greater than or equal to a first preset threshold; and the second anomaly queue is a historical receipt queue in the timeout queue set whose number of consecutive attempts is greater than or equal to a second preset threshold.

[0155] In one implementation, the sending module 53 described above can be used to obtain a first number of receipt queues sorted first from the set of queues to be sent in the order described above, and put the first number of receipt queues into the thread pool; wherein, the first number is the number of available threads in the thread pool; the first number of receipt queues are unmarked receipt queues; and the first number of receipt queues are sent to the target developer corresponding to the 5G message through the available threads in the thread pool.

[0156] In one implementation, the sending module 53 described above can also be used to, when there are still available threads in the thread pool, obtain the second number of receipt queues sorted first from the set of queues to be sent in the order described above, and put the second number of receipt queues into the thread pool; wherein, the second number is the number of available threads in the thread pool; the second number of receipt queues are receipt queues marked with the second exception label; and the second number of receipt queues are sent to the target developer corresponding to the 5G message by the available threads in the thread pool.

[0157] In one implementation, the sending module 53 described above can be used to retrieve the second number of receipt messages from the database in batches using available threads in the thread pool; wherein the database stores receipt messages to be sent; and the receipt messages are sent in batches to the target developers corresponding to the 5G messages.

[0158] In one implementation, the device 500 may further include an update module for updating the pending count of the first number of receipt queues or updating the pending count of the second number of receipt queues; and reordering the receipt queues in the set of queues to be sent according to the updated pending count or the receipt priority.

[0159] In one implementation, the update module described above can also be used to obtain the first transmission result of the first number of receipt queues or the second number of receipt queues; if the first transmission result indicates that the transmission network of the fourth receipt queue is abnormal, the fourth receipt queue is added to the network abnormal queue set, and the number of consecutive attempts of the fourth receipt queue is updated; if the first transmission result indicates that the transmission time of the fifth receipt queue exceeds the preset time, the fifth receipt queue is added to the timeout queue set, and the number of consecutive attempts of the fifth receipt queue is updated.

[0160] In one implementation, the sending module described above can also be used to periodically send the first abnormal queue or the second abnormal queue to the target developer corresponding to the 5G message. The updating module described above can also be used to obtain a second sending result of the first abnormal queue or the second abnormal queue; if the second sending result indicates that the first abnormal queue was successfully sent, remove the first abnormal queue from the network abnormal queue set; if the second sending result indicates that the sending time of the second abnormal queue does not exceed the preset time, remove the second abnormal queue from the timeout queue set.

[0161] In one implementation, the acquisition module 51 described above can be used to acquire information about the target developer corresponding to the 5G message; determine whether the receipt function of the target developer is enabled based on the information; discard the target receipt message if the information instructs the target developer to disable the receipt function; and add the target receipt message to the target developer's target receipt queue if the information instructs the target developer to enable the receipt function.

[0162] In one implementation, the device 500 may further include a receipt priority change module for obtaining a change notification of the receipt priority; wherein the change notification is used to indicate that the receipt priority of the target receipt queue of the target developer has changed; and the receipt priority of the target receipt queue is changed according to the change notification.

[0163] The 5G message receipt sending device in this application embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device; for example, it can be a mobile phone, tablet, laptop, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. Non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0164] The 5G message receipt sending device in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system.

[0165] The 5G message receipt sending device provided in this application embodiment can achieve Figures 1 to 3 The various processes implemented in the method embodiments are not described in detail here to avoid repetition.

[0166] Based on the same technical concept, embodiments of this application also provide an electronic device for executing the above-described 5G message receipt sending method. Figure 6This is a schematic diagram of the structure of an electronic device to implement the various embodiments of this application. The electronic device can vary significantly due to differences in configuration or performance, and may include a processor 601, a communications interface 602, a memory 603, and a communication bus 604. The processor 601, communications interface 602, and memory 603 communicate with each other via the communication bus 604. The processor 601 can call a computer program stored in the memory 603 and executable on the processor 601 to perform the various steps of the above-described 5G message receipt sending method embodiments, achieving the same technical effects. To avoid repetition, further details are omitted here.

[0167] The above electronic device structure does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or arrange them differently. For example, an input unit may include a Graphics Processing Unit (GPU) and a microphone, and a display unit may use a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar display panels. User input units include at least one of a touch panel and other input devices. A touch panel is also called a touchscreen. Other input devices may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be elaborated further here.

[0168] Memory can be used to store software programs and various data. Memory can primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area can store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, memory can include volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0169] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly handles operations related to the operating system, user interface, and applications, while the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor.

[0170] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described 5G message receipt sending method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0171] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0172] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described 5G message receipt sending method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0173] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0174] This application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes a program or instructions. When the program or instructions are executed, they implement the various processes of the above-described 5G message receipt sending method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0175] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

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

[0177] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for sending 5G message receipts, characterized in that, include: Obtain at least one target receipt message corresponding to a 5G message; Create a target receipt queue for each target developer corresponding to the 5G message, and add the target receipt messages to the corresponding target receipt queues respectively; The target receipt messages in each of the target receipt queues are sent to the target developers corresponding to the 5G messages in a preset sending order. The step of sending the target receipt messages in each of the target receipt queues to the target developers corresponding to the 5G messages according to a preset sending order includes: The sending order of each target receipt queue is determined based on the receipt priority of each target receipt queue or the number of pending processing times of each target receipt queue; wherein, the number of pending processing times of each target receipt queue is the number of times the target receipt queue has been placed into the thread pool; The target receipt messages in each of the target receipt queues are sent to the target developers corresponding to the 5G messages in the order described. The sending order includes the order of the number of pending processing times in the target receipt queue from fewest to most.

2. The method according to claim 1, characterized in that, Before sending the target receipt messages in each of the target receipt queues to the target developers corresponding to the 5G messages according to the sending order, the method further includes: The identification information of each target receipt queue is compared with the identification information of the historical receipt queues in the set of queues to be sent to determine the first receipt queue and the second receipt queue; wherein, the first receipt queue is the historical receipt queue to be removed in the set of queues to be sent; and the second receipt queue is the target receipt queue to be added in the set of queues to be sent. Remove the first receipt queue from the set of queues to be sent; Add the second receipt queue to the set of queues to be sent.

3. The method according to claim 2, characterized in that, The step of sending the target receipt messages in each of the target receipt queues to the target developers corresponding to the 5G messages according to the sending order includes: The receipt queues in the set of queues to be sent are sorted in order of receipt priority from high to low or the number of times to be processed from few to many. The receipt queues in the set of queues to be sent are sent to the target developers corresponding to the 5G messages in the order stated.

4. The method according to claim 2, characterized in that, The step of comparing the identification information of each target receipt queue with the identification information of historical receipt queues in the set of queues to be sent to determine the first receipt queue and the second receipt queue includes: For each historical receipt queue, if the identification information of the historical receipt queue is different from the identification information of each target receipt queue, the historical receipt queue is determined as the first receipt queue. For each target receipt queue, if the identification information of the target receipt queue is different from the identification information of each historical receipt queue, the target receipt queue is determined as the second receipt queue.

5. The method according to claim 3, characterized in that, The method further includes: Obtain a network error queue set and a timeout queue set; wherein, the network error queue set includes a historical receipt queue for sending network errors and the number of consecutive attempts in the historical receipt queue; the timeout queue set includes a historical receipt queue for sending for a duration exceeding a preset duration and the number of consecutive attempts in the historical receipt queue; If the first receipt queue exists in the network error queue set or the timeout queue set, the first receipt queue shall be removed from the network error queue set or the timeout queue set. If a first abnormal queue or a second abnormal queue exists in the set of queues to be sent, mark the first abnormal queue with a first abnormal label or mark the second abnormal queue with a second abnormal label; Wherein, the first abnormal queue is the historical receipt queue in the network abnormal queue set whose consecutive attempt count is greater than or equal to a first preset threshold; the second abnormal queue is the historical receipt queue in the timeout queue set whose consecutive attempt count is greater than or equal to a second preset threshold.

6. The method according to claim 5, characterized in that, The step of sending the receipt queues in the set of queues to be sent to the target developers corresponding to the 5G messages in the specified order includes: The first number of receipt queues ordered first are retrieved from the set of queues to be sent, and the first number of receipt queues are placed into the thread pool; wherein, the first number is the number of available threads in the thread pool; the first number of receipt queues are unmarked receipt queues. The first number of receipt queues are sent to the target developer corresponding to the 5G message through the available threads in the thread pool.

7. The method according to claim 6, characterized in that, After sending the first number of receipt queues to the target developer corresponding to the 5G message through the thread pool, the method further includes: If there are still available threads in the thread pool, the second number of receipt queues sorted first are obtained from the set of queues to be sent in the order described above, and the second number of receipt queues are put into the thread pool; wherein, the second number is the number of available threads in the thread pool; the second number of receipt queues are receipt queues marked with the second exception label; The second number of receipt queues are sent to the target developer corresponding to the 5G message through the available threads in the thread pool.

8. The method according to claim 7, characterized in that, The step of sending the second number of receipt queues to the target developer corresponding to the 5G message through available threads in the thread pool includes: The second number of receipt messages in the receipt queue are retrieved in batches from the database using available threads in the thread pool; wherein, the database stores receipt messages to be sent. The receipt messages are sent in batches to the target developers corresponding to the 5G messages.

9. The method according to claim 7, characterized in that, The method further includes: Update the pending count of the first number of receipt queues or update the pending count of the second number of receipt queues; The receipt queues in the set of queues to be sent are reordered according to the updated number of pending processing or the receipt priority.

10. The method according to claim 7, characterized in that, The method further includes: Obtain the first sending result of the first number of receipt queues or the second number of receipt queues; If the first sending result indicates a network error in the fourth receipt queue, the fourth receipt queue is added to the network error queue set, and the number of consecutive attempts in the fourth receipt queue is updated. If the first sending result indicates that the sending time of the fifth receipt queue exceeds the preset time, the fifth receipt queue is added to the timeout queue set, and the number of consecutive attempts of the fifth receipt queue is updated.

11. The method according to claim 5, characterized in that, The method further includes: The first abnormal queue or the second abnormal queue is periodically sent to the target developer corresponding to the 5G message, and the second sending result of the first abnormal queue or the second abnormal queue is obtained. If the second sending result indicates that the first abnormal queue was successfully sent, the first abnormal queue is removed from the network abnormal queue set; If the second sending result indicates that the sending time of the second abnormal queue does not exceed the preset time, the second abnormal queue is removed from the timeout queue set.

12. The method according to claim 1, characterized in that, The step of adding the target receipt messages to the corresponding target receipt queues includes: Obtain the target developer information corresponding to the 5G message; Based on the information, determine whether the receipt function of the target developer is enabled; If the information instructs the target developer to disable the receipt function, the target receipt message is discarded. When the information instructs the target developer to enable the receipt function, the target receipt message is added to the corresponding target receipt queue.

13. The method according to claim 1, characterized in that, The method further includes: Obtain a notification of a change in the receipt priority; wherein the notification is used to indicate that the receipt priority of the target developer's target receipt queue has changed; According to the change notification, the receipt priority of the target receipt queue is changed.

14. A 5G message receipt sending device, characterized in that, include: The acquisition module is used to acquire at least one target receipt message corresponding to a 5G message; A creation module is used to create a target receipt queue for each target developer corresponding to the 5G message, and to add the target receipt messages to the corresponding target receipt queues respectively; The sending module is used to send each target receipt message in the target receipt queue to the target developer corresponding to the 5G message in a preset sending order; Specifically, the sending module is used to determine the sending order of each target receipt queue based on the receipt priority of each target receipt queue or the number of pending processing times of each target receipt queue; wherein the number of pending processing times of each target receipt queue is the number of times the target receipt queue has been placed in the thread pool; and to send the target receipt messages in each target receipt queue to the target developer corresponding to the 5G message according to the sending order. The sending order includes the order of the number of pending processing times in the target receipt queue from fewest to most.

15. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the 5G message receipt sending method as described in any one of claims 1 to 13.

16. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the 5G message receipt sending method as described in any one of claims 1 to 13.

17. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including programs or instructions that, when executed, implement the steps of the 5G message receipt sending method as described in any one of claims 1 to 13.

Citation Information

Patent Citations

  • Group message receipt updating method and device, readable storage medium and electronic equipment

    CN111147351A

  • Message transmission method and device, equipment and storage medium

    CN117857490A