5G message receipt sending method and apparatus, and electronic device

By creating an independent target receipt queue for the target developer of each 5G message and sending receipt messages in preset order, the problem of long-term waiting for receipt messages in the 5G message sending platform is solved, and the receipt timeliness is improved.

CN119854738AActive Publication Date: 2025-04-18CHINA MOBILE INTERNET CO LTD +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411910632.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-18
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

In the 5G message sending platform, due to the limit on the number of queues, the receipt messages of different developers may be placed in the same partition of the same queue, resulting in the receipt messages being in a long wait state, affecting the receipt timeliness.

Method used

By obtaining the target receipt message corresponding to the 5G message, create an independent target receipt queue for each target developer, and add the target receipt message to the corresponding queue. Send messages in each target receipt queue to the target developer in the preset send order.

Benefits of technology

The receipt messages of each target developer are sent in an independent queue, avoiding mutual blockage caused by the receipt messages of multiple developers being in the same queue, and improving receipt timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854738A_ABST
    Figure CN119854738A_ABST
Patent Text Reader

Abstract

The invention discloses a 5G message receipt sending method and apparatus, and an electronic device. 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 a 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] The present application belongs to the field of communication technology, and specifically relates to a method, device and electronic device for sending a receipt of a 5G message. Background Art

[0002] After the 5G message sending platform sends the message to the terminal device, the 5G message center pushes the message receipt to the 5G message sending platform. After the 5G message sending platform puts the receipt into a fixed number of queues, it asynchronously sends the receipt of each queue to different developers through the receipt processor. Among them, due to the limitation of the number of queues mentioned above, the 5G message sending platform will put the receipts of different developers in the same partition of the same queue. If a developer's receipt includes multiple receipts or the receipt sending takes a long time, the receipts of other developers arranged later in the same partition will be blocked in the queue in a long waiting state, and the receipts of other developers who enter the queue later need to wait for the previous receipts to be processed, so that the receipts of other developers who have higher requirements for the timeliness of receipts cannot be processed and sent in time. Summary of the invention

[0003] The embodiments of the present application provide a method, device and electronic device for sending receipts of 5G messages, which can solve the problem that receipts of other developers who have high requirements for receipt timeliness cannot be processed and sent in a timely manner.

[0004] In the first aspect, an embodiment of the present application provides a method for sending a receipt for a 5G message, the method comprising: obtaining a target receipt message corresponding to at least one 5G message; creating a target receipt queue for a target developer corresponding to each of the 5G messages, and adding the target receipt messages to the corresponding target receipt queues respectively; sending the target receipt messages in each of the target receipt queues to the target developer corresponding to the 5G message in a preset sending order.

[0005] In the second aspect, an embodiment of the present application provides a receipt sending device for 5G messages, which includes: an acquisition module for acquiring a target receipt message corresponding to at least one 5G message; a creation module for creating a target receipt queue for a target developer corresponding to each of the 5G messages, and adding the target receipt messages to the corresponding target receipt queues respectively; a sending module for sending the target receipt messages in each of the target receipt queues to the target developer corresponding to the 5G message in a preset sending order.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0007] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0008] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.

[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the method described in the first aspect are implemented.

[0010] In an embodiment of the present application, by obtaining a target receipt message corresponding to at least one 5G message, a target receipt queue for the target developer corresponding to each 5G message is created, and the target receipt messages are added to the corresponding target receipt queues, respectively, and an independent target receipt queue is created for each target developer. The receipt message corresponding to each target developer is added to its corresponding target receipt queue, which neither blocks the receipt messages corresponding to other developers, nor can the receipt message corresponding to itself be sent in an independent target receipt queue. Then, the target receipt message in each target receipt queue is sent to the target developer corresponding to the 5G message in a preset sending order, so that the target receipt messages in each target receipt queue can be independently sent to its corresponding target developer in a preset sending order, avoiding mutual blocking caused by receipt messages of multiple developers being in the same queue. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flowchart of a method for sending a receipt of a 5G message provided in an embodiment of the present application; Figure 2a It is a schematic diagram of a method for sending a receipt of a 5G message provided by the related technology; Figure 2b It is a schematic diagram of a method for sending a receipt of a 5G message provided in an embodiment of the present application; Figure 3 It is a flowchart of another method for sending a receipt of a 5G message provided in an embodiment of the present application; Figure 4 It is a module schematic diagram of a 5G message sending platform provided in an embodiment of the present application; Figure 5It is a structural diagram of a 5G message receipt sending device provided in an embodiment of the present application; Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0013] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0014] In the following, in combination with the accompanying drawings, the 5G message receipt sending method, device and electronic device provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0015] Figure 1 A schematic diagram of a process for sending a receipt of a 5G message provided in an embodiment of the present application is shown, and the method can be executed by an electronic device. Figure 1 , the method may include the following steps.

[0016] Step 102, obtain a target receipt message corresponding to at least one 5G message.

[0017] Among them, the 5G message is sent from the 5G message sending platform to the terminal device, and the target receipt message corresponding to the 5G message is forwarded by the 5G message center to the 5G message sending platform. 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.

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

[0019] Among them, an independent target receipt queue is created for the target developer corresponding to each 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 occurrence of sending blockage of receipt messages between different developers.

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

[0021] The preset sending order can be set according to the receipt sending requirements, for example, the receipt messages of developers with high requirements for receipt timeliness are sent first, or the receipt messages of developers with set priorities are sent according to the priority.

[0022] In the embodiment of the present application, by obtaining the target receipt message corresponding to at least one 5G message, a target receipt queue of the target developer corresponding to each 5G message is created, and the target receipt messages are added to the corresponding target receipt queues respectively, and an independent target receipt queue is created for each target developer. The receipt message corresponding to each target developer is added to its corresponding target receipt queue, which neither blocks the receipt messages corresponding to other developers, nor can the receipt messages corresponding to the developer be sent in the independent target receipt queue. Figure 2a and Figure 2b , Figure 2a A schematic diagram of a 5G message receipt sending method provided by the related art is shown, in which receipt messages of 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, respectively). In the same receipt queue, receipt messages arranged later need to wait for receipt messages arranged earlier and cannot be sent first. Figure 2b A schematic diagram of a method for sending a receipt for a 5G message provided in an embodiment of the present application is shown, wherein each target developer creates an independent target receipt queue, and each receipt message is placed in its corresponding receipt queue, so that the target receipt message in each target receipt queue is sent to the target developer corresponding to the 5G message in a preset sending order, so that the target receipt messages in each target receipt queue can be independently sent to the corresponding target developer in a preset sending order, thereby avoiding mutual blocking due to receipt messages of multiple developers being in the same queue, and being able to flexibly meet the receipt message sending requirements of different target developers.

[0023] In one implementation, the above-mentioned step 106 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, including the following steps.

[0024] Step 1061, determine the sending order of each target receipt queue according to the receipt priority of each target receipt queue or the number of pending processes of each target receipt queue; wherein the number of pending processes of the target receipt queue is the number of times the target receipt queue is placed in the thread pool.

[0025] Among them, the thread pool is used to manage and process the receipt queue to be sent. The target receipt queue is placed in the thread pool, which means that the target receipt queue is about to be processed and sent to the target developer. If the target receipt queue is placed in the thread pool and sent successfully, it will not be placed in the thread pool again for another attempt. The more times the target receipt queue is placed in the thread pool, the more it means that there is some abnormality in the target receipt queue that causes the sending to fail. Therefore, the number of times the target receipt queue is to be processed can be used as an influencing factor in determining the sending order of the target receipt queue.

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

[0027] In an embodiment of the present application, the sending order of the target receipt queue can be determined by the receipt priority of each of the target receipt queues or the number of pending processes of each of the target receipt queues. For example, the receipt priority of the target receipt queue can be given priority, and the receipt priority is preset by the target developer, or dynamically determined by the 5G message sending platform according to the real-time sending situation. Secondly, the number of pending processes of the target receipt queue can be considered. When the receipt priority is the same, the fewer the number of pending processes of the target receipt queue, the higher its sending order. As a result, the target receipt queues with higher sending priority and / or fewer pending processes are given priority to be sent to the corresponding target developers, satisfying the target developers' receipt requirements for receipt messages.

[0028] In one implementation, before the above-mentioned step 1062 sends the target receipt message in each target receipt queue to the target developer corresponding to the 5G message in the sending order, the method also includes the following steps.

[0029] 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, and determine the first receipt queue and the second receipt queue; wherein the first receipt queue is the historical receipt queue to be removed from the set of queues to be sent; and the second receipt queue is the target receipt queue to be added to the set of queues to be sent.

[0030] Among them, in the embodiment of the present application, the set of queues to be sent includes receipt queues whose sending order has been determined and arranged in the sending order. For each target receipt queue including the currently acquired receipt message, that is, the new receipt queue that needs to be sent at present, by comparing with the 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 screened, including removing the receipt queues that do not need to be sent at present and removing the receipt queues that may fail to send, so as to improve the sending efficiency of the receipt queues.

[0031] In addition, by comparing the identification information of each of the target receipt queues with the identification information of the historical receipt queues in the set of queues to be sent, a third receipt queue can also be determined. The third receipt queue is the historical receipt queue to be retained in the set of queues to be sent. That is to say, during the receipt sending process this time, the third receipt queue is retained in the set of queues to be sent and forms a set of queues to be sent with the newly added target receipt queue, waiting to be sent.

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

[0033] The first receipt queue is a historical receipt queue to be removed, including a receipt queue that does not need to be sent currently.

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

[0035] Among them, the second receipt queue is the receipt queue in the target receipt queue, which is the receipt queue that currently needs to be sent. It is added to the queue set to be sent to wait for sending.

[0036] In an embodiment of the present application, a set of queues to be sent maintains receipt queues to be sent. By comparing the identification information of the target receipt queue with the identification information of the historical receipt queues already in the set of queues to be sent, the current new target receipt queue is added to the set of queues to be sent, and the historical receipt queues in the set of queues to be sent that do not currently need to be sent are removed. In the case where there is already a target receipt queue in the set of queues to be sent, it is retained without the need to remove it and then add it again, so that the set to be sent contains the target receipt queues that need to be sent in the order of sending, removes the historical receipt queues that do not need to be sent, reduces the redundant receipt queues in the set of queues to be sent, and improves the sending efficiency of the receipt queues.

[0037] In one implementation, the above-mentioned step 1062 sends the target receipt message in each target receipt queue to the target developer corresponding to the 5G message in the sending order, including the following steps.

[0038] Step 1062a, sorting the receipt queues in the to-be-sent queue set in the order of the receipt priorities from high to low or the number of to-be-processed times from small to large.

[0039] The sending order of the receipt queues in the waiting-to-send queue set is determined according to the receipt priority and / or the number of pending processing times. The receipt queues with higher receipt priority are sorted first, and the receipt queues with the same receipt priority and fewer pending processing times are sorted first.

[0040] 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 described.

[0041] In the embodiment of the present application, the order of the receipt queues in the set of queues to be sent is from high to low in terms of receipt priority or from few to many in terms of the number of pending processes, so that the receipt queues in the set of queues to be sent are sent to the target developers corresponding to the 5G message in the order of the sorted receipt priorities in the set to be sent from high to low or from few to many in terms of the number of pending processes. This ensures that the target developers with higher receipt priorities can receive the receipt message first.

[0042] In one implementation, the above step a1 compares 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, including the following contents.

[0043] (1) For each of the historical receipt queues, when 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.

[0044] Among them, the identification information of the historical receipt queue is different from the identification information of each of the target receipt queues, indicating that the historical receipt queue stored in the current set of queues to be sent is different from the new target receipt queue that needs to be sent. The historical receipt queue cannot replace the new target receipt queue and is stored in the set of queues to be sent and needs to be removed.

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

[0046] Among them, the identification information of the target receipt queue is different from the identification information of each of the historical receipt queues, which means that the target receipt queue does not exist in the set of queues to be sent and needs to be added to the set of queues to be sent.

[0047] In addition, when 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 determined as the third receipt queue. The identification information of the historical receipt queue is the same as the identification information of the target receipt queue, indicating that the historical receipt queue in the set of queues to be sent is the same as the new target receipt queue, and the historical receipt queue can be used as the new target receipt queue without being added again.

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

[0049] Step a4, obtaining a network exception queue set and a timeout queue set.

[0050] Among them, the network exception queue set includes historical receipt queues that sent network exceptions and the number of consecutive attempts of the historical receipt queues; the timeout queue set includes historical receipt queues whose sending duration exceeds a preset duration and the number of consecutive attempts of the historical receipt queues.

[0051] Step a5: if the first receipt queue exists in the network abnormality queue set or the timeout queue set, remove the first receipt queue from the network abnormality queue set or the timeout queue set.

[0052] The network exception queue set and the timeout queue set include the receipt queues that need to be sent but failed in history, and these receipt queues need to be sent later. The first receipt queue is the historical receipt queue to be removed, including the receipt queue that does not need to be sent currently, and it is removed from the network exception queue set and the timeout queue set.

[0053] Step a6: When there is a first abnormal queue or a second abnormal queue in the set of queues to be sent, a first abnormal tag is marked for the first abnormal queue or a second abnormal tag is marked for the second abnormal queue.

[0054] Among them, the first exception queue is a historical receipt queue in the network exception queue set, in which the number of consecutive attempts is greater than or equal to a first preset threshold; the second exception queue is a historical receipt queue in the timeout queue set, in which the number of consecutive attempts is greater than or equal to a second preset threshold.

[0055] In an embodiment of the present application, the receipt queue sending process also includes a network exception queue set and a timeout queue set, wherein the receipt queue is a receipt queue that needs to be sent but fails to send in the history. In the subsequent receipt queue sending process, the new target receipt queue can be sent first, and then it is determined whether it is possible to try again to send the receipt queues in the network exception queue set and the timeout queue set based on the specific situation. This allows the receipt queue that failed to send before to be processed again without affecting the sending of the new target receipt queue, thereby meeting the real-time and high efficiency of sending the target receipt queue and avoiding sending congestion.

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

[0057] Step b1, obtaining the first number of receipt queues sorted in front from the set of queues to be sent in the order, and putting 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.

[0058] Among them, based on the number of currently available threads in the thread pool, a first number of receipt queues ranked in front 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 exception queue set whose number of consecutive attempts is greater than or equal to the first preset threshold, or historical receipt queues in the timeout queue set whose number of consecutive attempts is greater than or equal to the second preset threshold, that is, the first number of receipt queues are not marked with the first exception label or the second exception label.

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

[0060] In an embodiment of the present application, since the number of available threads in the thread pool is not necessarily equal to the number of receipt queues in the set of queues to be sent, a first number of receipt queues are first selected from the set of queues to be sent and put into the thread pool, and the available threads in the thread pool send the first number of receipt queues to the target developers corresponding to the 5G message, thereby efficiently utilizing the available threads in the thread pool.

[0061] Optionally, according to 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.

[0062] In one implementation, after the above-mentioned step b2 sends the first number of receipt queues to the target developers corresponding to the 5G message through the available threads in the thread pool, the method further includes the following steps.

[0063] Step b3, when there are still available threads in the thread pool, obtain the second number of receipt queues sorted in front from the set of queues to be sent in the order, 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.

[0064] After preferentially sending the first number of unmarked receipt queues, it is determined whether there are still available threads in the thread pool, so as to process the receipt queues marked with the second abnormal label.

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

[0066] In an embodiment of the present application, by giving priority to sending the first number of unmarked receipt queues, then determining whether there are still available threads stored in the thread pool, and then obtaining the second number of receipt queues that are sorted first and marked with a second exception label from the set of queues to be sent in the order described, the receipt queues are sent, thereby flexibly sending the receipt queues in the set of queues to be sent, which not only ensures that the current new receipt queues that need to be sent are not delayed or blocked, but also avoids ignoring historical receipt queues whose sending time exceeds the preset time.

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

[0068] Step b41, obtaining the receipt messages in the second number of receipt queues from the database in batches through the available threads in the thread pool; wherein the database stores the receipt messages to be sent.

[0069] Among them, in the embodiment of the present application, the receipt queue uses the list (List) structure of the database (Redis) to store the receipt messages in each receipt queue, and the removal and addition of the receipt queue in the above-mentioned queue set to be sent are performed by operating the identification information of the receipt queue to avoid too frequent access to data.

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

[0071] In an embodiment of the present application, the available threads in the thread pool send the receipt queues in the set of queues to be sent, specifically by batch acquiring the receipt messages in a second number of receipt queues from a database according to the identification information of the receipt queues, and then batch sending the receipt messages in each receipt queue to the target developer corresponding to the receipt queue.

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

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

[0074] Step b5: updating the number of pending processing times of the first number of receipt queues or updating the number of pending processing times of the second number of receipt queues.

[0075] After the first number of receipt queues or the second number of receipt queues are added to the thread pool, their pending processing times are changed accordingly, and the pending processing times are updated to update the arrangement order of the receipt queues in the set of queues to be sent in real time.

[0076] 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.

[0077] In an embodiment of the present application, after obtaining a first number of receipt queues sorted first from the set of queues to be sent in the order described, putting the first number of receipt queues into the thread pool, and obtaining a second number of receipt queues sorted first from the set of queues to be sent in the order described, and putting the second number of receipt queues into the thread pool, each receipt queue added to the thread pool is already in a state to be sent, and the number of pending times recorded for each receipt queue added to the thread pool will also change. The number of pending times is updated, so that the receipt queues in the set of queues to be sent are reordered according to the updated number of pending times or the receipt priority, thereby ensuring the accuracy of the arrangement order of the receipt queues in the set of queues to be sent.

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

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

[0080] Among them, the sending status of the receipt queue can be known through the first sending result, such as whether the sending is successful and the reason for the sending failure.

[0081] Step b81: When the first sending result indicates that the sending network of the fourth receipt queue is abnormal, the fourth receipt queue is added to the network abnormality queue set, and the number of consecutive attempts of the fourth receipt queue is updated.

[0082] Among them, the fourth receipt queue is a receipt queue in the above-mentioned first number of receipt queues or the second number of receipt queues, and the number of consecutive attempts of the fourth receipt queue is updated to zero.

[0083] Step b82: When 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.

[0084] Among them, the second receipt queue is a receipt queue in the above-mentioned first number of receipt queues or the second number of receipt queues, and the number of consecutive attempts of the fifth receipt queue is updated to zero.

[0085] In an embodiment of the present application, after the first number of receipt queues or the second number of receipt queues are processed by the available threads in the thread pool and sent to the target developer, based on the first sending result obtained, the receipt queue with the network exception sent in the first number of receipt queues or the second number of receipt queues is added to the above-mentioned network exception queue set, or the receipt queue with a sending time exceeding the preset time is added to the timeout queue set, and the number of consecutive attempts is updated to record the receipt queues that failed to send through the network exception queue set or the timeout queue set, so as to facilitate the subsequent acquisition of the receipt queues that need to be tried again from these two sets, so as to avoid ignoring the receipt queues that failed to send before.

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

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

[0088] Among them, the historical receipt queues in the network exception queue set whose number of consecutive attempts is greater than or equal to the first preset threshold or the historical receipt queues in the timeout queue set whose number of consecutive attempts is greater than or equal to the second preset threshold are periodically tried to be sent to their corresponding target developers again, and the sending status of these historical receipt queues can be known through the second sending result, such as whether the sending is successful and the reason for the sending failure, so that the status of these historical receipt queues is updated again according to the second sending result.

[0089] Step a81: when the second sending result indicates that the first exception queue is sent successfully, remove the first exception queue from the network exception queue set.

[0090] The successful sending of the first exception queue indicates that the sending network of the first exception queue is normal and the first exception queue can be sent to the target developer normally.

[0091] Step a82: When the second sending result indicates that the sending duration of the second exception queue does not exceed the preset duration, remove the second exception queue from the timeout queue set.

[0092] Among them, the sending duration of the second exception queue does not exceed the preset duration, which indicates that the sending duration of the first exception queue is within the normal range. There is no need to postpone sending when there are still available threads in the thread pool, and it can be sent according to the arrangement order in the set of queues to be sent.

[0093] In an embodiment of the present application, a scheduled sending task is set for the first exception queue in the network exception queue set and the second exception queue in the timeout queue set, and the first exception queue and the second exception queue are sent regularly, so as to judge whether the sending of the receipt queues in the network exception queue set and the timeout queue set has returned to normal according to the second sending result. If it has returned to normal, the first exception queue is removed from the network exception queue set, and the second exception queue is removed from the timeout queue set.

[0094] In one implementation, the above step 104 adds the target receipt messages to the corresponding target receipt queues respectively, including the following steps.

[0095] Step 1041, obtain the information of the target developer corresponding to the 5G message.

[0096] The target developer's information includes information about various functions set, allowed, and authorized by the target developer.

[0097] Step 1042: Determine whether the receipt function of the target developer is enabled according to the information.

[0098] If the receipt function is turned on, the target developer supports receiving receipt messages; if the receipt function is turned off, the target developer does not support receiving receipt messages.

[0099] Step 1043a: When the information indicates that the target developer has disabled the receipt function, discard the target receipt message.

[0100] If the target developer turns off the receipt function, there is no need to add the target receipt message to the target receipt queue, and thus there is no need to send it to the target developer. The target receipt message is discarded and not stored in the database to avoid occupying storage space.

[0101] Step 1043b: When the information indicates that the target developer has enabled the receipt function, the target receipt message is added to the corresponding target receipt queue.

[0102] In the embodiment of the present application, the target developer's information is used to determine whether the target developer's receipt function is turned on, thereby determining whether to retain the target receipt message and send it. If the target developer's receipt function is turned off, the target receipt message is discarded. If the target developer's receipt function is turned on, the target receipt message is added to the target developer's target receipt queue, and the subsequent sending process is executed.

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

[0104] Step c1, obtaining a notification of a change in the priority level of the receipt.

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

[0106] Step c2: Change the receipt priority of the target receipt queue according to the change notification.

[0107] In the embodiment of the present application, the notification of the change of the receipt priority can be issued by the target developer or by the 5G message sending platform. Only the operator with the change permission can change the receipt priority. According to the change notification, the receipt priority of the target receipt queue is changed, and then the receipt queues in the to-be-sent queue set are reordered according to the changed receipt priority or the number of pending processing times, and the receipt priority is updated in time to ensure the accuracy of the arrangement order of the receipt queues in the to-be-sent queue set.

[0108] Figure 3 A flow chart of another method for sending a receipt for a 5G message provided in an embodiment of the present application is shown, which is applied to a 5G message sending platform. The 5G message sending platform includes a receipt processor and a queue distributor, and the receipt processor includes a thread pool. Figure 4A module schematic diagram of a 5G message sending platform provided by an embodiment of the present application is shown, wherein the receipt queue including the receipt message is stored in the List structure of Redis. The queue allocator is used to monitor the receipt queue and allocate the receipt queue to the receipt processor. The service registry (ServiceRegistry) is used to store the heartbeats of registered services and receipt processors, and is stored in the zset structure of Redis, including the identifier (member) of the receipt processor and the timestamp (score) of the reported heartbeat. The global queue set (GlobalQueues) is used to store the receipt queues of all developers, and is stored in the zset structure of Redis, including the identifier (member) of the receipt queue and the timestamp (score) when the receipt queue joins the set. The global allocation record table (GlobalAssignRecord) is used to record the allocation of queues, and is stored in the hash structure of Redis, including the identifier of the receipt processor and the identifier of the receipt queue. See Figure 3 , the method comprises the following steps.

[0109] 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.

[0110] Step 302: monitor the receipt processor and the receipt queue regularly through three distributed timing tasks, and allocate a receipt queue to the receipt processor.

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

[0112] Step S11, obtain the elements with a score greater than or equal to a certain value from ServiceRegistry, which are the online receipt processor list, recorded as ServiceList; the remaining elements are offline receipt processors, which are removed from ServiceRegistry and the result ServiceList is returned.

[0113] Step S12, obtaining the local receipt queue from GlobalQueues, and obtaining the local receipt queue assignment record from GlobalAssignRecord.

[0114] 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 that no longer needs to be sent (RemvoeQueues).

[0115] Step S14, remove RemvoeQueues from the local receipt queue.

[0116] Step S15, adding the receipt queue in the offline receipt processor to NewQueues according to the local receipt queue allocation record.

[0117] Step S16, putting the receipt handler that is in the ServiceList but not in the LocalAssignRecord into the LocalAssignRecord.

[0118] Step S17, assign NewQueues to the receipt processor of LocalAssignRecord.

[0119] Among them, scheduled task 2: reallocate the receipt queue according to the message volume of the receipt messages.

[0120] Step S21, obtaining the message volume of receipt messages in each receipt queue.

[0121] Step S22, respectively compare the message volumes of the receipt queues of the same priority level of each receipt processor, and when the difference in the message volumes is greater than a preset threshold, change the priority level of the receipt queue of that priority level.

[0122] Among them, scheduled task 3: remove the receipt queue.

[0123] Step S31, obtaining the receipt queues in the GlobalQueues collection whose scores are less than a preset threshold, that is, there are no receipt messages within a certain period of time.

[0124] Step S32, query whether there is any unsent receipt message in the receipt queue, and if not, remove the receipt queue from GlobalQueues. That is, all receipt messages in the receipt queue whose score is less than the preset threshold have been sent.

[0125] Step 303, regularly add the identifier of the current receipt processor to the ServiceRegistry, score is the current timestamp, and maintain the heartbeat.

[0126] Among them, the current receipt processor includes: 1. Thread pool, the receipt queue joins the thread pool, and the thread pool pulls the receipt message corresponding to the receipt queue from Redis according to the identifier of the receipt queue for processing and sending. 2. Consumption queue collection (ConsumeQueues), which records the receipt queue of the current receipt processor and the number of times the receipt queue is placed in the thread pool (HandleTimes). The elements in ConsumeQueues are sorted. The sorting rule is to sort from high to low according to the developer's receipt priority. If the priority is the same, it is sorted from low to high according to HandleTimes, that is, the higher the receipt priority, the higher it is in the collection. The fewer times it is placed in the thread pool for processing at the same priority, the higher it is in the collection. 3. Network exception queue collection (TimeoutQueues), which records the receipt queue where the network exception occurs when sending the receipt queue and the number of consecutive attempts (value) of the receipt queue. When the value of a receipt queue reaches the preset threshold, the receipt queue is stopped from being sent. 4. Timeout queue collection (LongTimeQueues), records the receipt queues that take too long to send receipt queues and the number of consecutive attempts (value) of the receipt queues. When the value of a receipt queue reaches the preset threshold, the receipt queue will be processed only if there are available threads after the thread pool has processed other normal receipt queues.

[0127] Step 304, obtain NewQueues, update NewQueues to ConsumeQueues, and sort the receipt queues in ConsumeQueues.

[0128] The steps include: Step 3041, comparing NewQueues and ConsumeQueues, determining the receipt queues that do not exist in NewQueues but exist in ConsumeQueues as the receipt queues to be removed, and determining the receipt queues that exist in NewQueues but do not exist in ConsumeQueues as the receipt queues to be added. Step 3042, removing the receipt queues to be removed from ConsumeQueues, TimeoutQueues, and LongTimeQueues, adding the receipt queues to be added to ConsumeQueues and reordering them.

[0129] Step 305, obtain the number of available threads in the thread pool (Count1), and put the normal receipt queue into the thread pool. After excluding the queues whose value in TimeoutQueues is greater than or equal to N and whose value in LongTimeQueues is greater than or equal to M, obtain Count1 receipt queues from the ConsumeQueues collection in order and put them into the thread pool. The HandleTimes of these receipt queues in ConsumeQueues are increased by 1, and the ConsumeQueues are reordered.

[0130] Putting the normal receipt queue into the thread pool may include: extracting the receipt message corresponding to the receipt queue from Redis according to the identifier of the normal receipt queue, and putting it into the thread pool for sending.

[0131] Optionally, the above method may further include: placing the receipt queue in LongTimeQueues into the thread pool. Determine whether there are any available threads in the thread pool. If so, record the number as Count2. Obtain Count2 receipt queues whose value in LongTimeQueues is greater than or equal to M from ConsumeQueues in order and place them into the thread pool. The HandleTimes of these receipt queues in ConsumeQueues are increased by 1, and the ConsumeQueues are reordered.

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

[0133] Step 307, obtain the first sending result of Count1 receipt queues or Count2 receipt queues. If the first sending result indicates that the sending network of receipt queue a is abnormal, then receipt queue a is added to TimeoutQueues, and the corresponding value is increased by 1. If the first sending result indicates that the time consumed by receipt queue b exceeds the time length threshold, then receipt queue b is added to LongTimeQueues, and the corresponding value is increased by 1.

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

[0135] Step 308, regularly put the receipt queues with a value greater than or equal to N in TimeoutQueues and the receipt queues with a value greater than or equal to M in LongTimeQueues into the thread pool.

[0136] Step 309: Send the receipt messages in each abnormal receipt queue added to the thread pool to the developer.

[0137] Step 310, obtain the second sending result of the receipt queues in TimeoutQueues and LongTimeQueues, and if the second sending result indicates that receipt queue c is successfully sent, remove receipt queue c from TimeoutQueues. If the second sending result indicates that the sending time of receipt queue d is less than the time length threshold, remove receipt queue d from LongTimeQueues.

[0138] Among them, receipt queue c and receipt queue d are the receipt queues in the above-mentioned TimeoutQueues or LongTimeQueues.

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

[0140] In the embodiment of the present application, a receipt queue is dynamically created for the developer by using Redis, and receipt messages are flexibly sent according to the receipt priority, thereby avoiding the problem that the receipt messages between multiple developers are blocked due to network failure, too long sending time, etc., and the message volume of the receipt queue of each receipt processor is regularly monitored. When the difference in the message volume of multiple receipt processors is too large, the receipt queue can be automatically reallocated to the receipt processor, and the sending mechanism of the receipt message can be optimized.

[0141] It should be noted that the execution subject of the method for sending a receipt of a 5G message provided in the embodiment of the present application can be a 5G message receipt sending device, or a control module in the 5G message receipt sending device for executing the 5G message receipt sending method. In the embodiment of the present application, the 5G message receipt sending device executing the 5G message receipt sending method is taken as an example to illustrate the 5G message receipt sending device provided in the embodiment of the present application.

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

[0143] Among them, the acquisition module 51 is used to obtain the target receipt message corresponding to at least one 5G message; the creation module 52 is used to create a target receipt queue for the target developer corresponding to each of the 5G messages, 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 of the target receipt queues to the target developer corresponding to the 5G message according to a preset sending order.

[0144] In one implementation, the above-mentioned sending module 53 can be used to determine the sending order of each target receipt queue according to the receipt priority of each target receipt queue or the number of pending processes of each target receipt queue; wherein the number of pending processes of the target receipt queue is the number of times the target receipt queue is placed in the thread pool; and the target receipt message in each target receipt queue is sent to the target developer corresponding to the 5G message in the sending order.

[0145] In one implementation, the above-mentioned device 500 may also include a screening module for comparing the identification information of each of the target receipt queues 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 from the set of queues to be sent; the second receipt queue is the 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.

[0146] In one implementation, the above-mentioned sending module 53 can be used to sort the receipt queues in the set of queues to be sent according to the order of the receipt priority from high to low or the number of pending processes from small to large; and send the receipt queues in the set of queues to be sent in the order to the target developer corresponding to the 5G message.

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

[0148] In one implementation, the above-mentioned device 500 may also include a marking module for obtaining a network exception queue set and a timeout queue set; wherein the network exception queue set includes a historical receipt queue for sending network exceptions and the number of consecutive attempts of the historical receipt queue; the timeout queue set includes a historical receipt queue for sending a duration exceeding a preset duration and the number of consecutive attempts of the historical receipt queue; in the case where the first receipt queue exists in the network exception queue set or the timeout queue set, the first receipt queue is removed from the network exception queue set or the timeout queue set; in the case where the first exception queue or the second exception queue exists in the queue set to be sent, the first exception queue is marked with a first exception tag or the second exception queue is marked with a second exception tag; wherein the first exception queue is a historical receipt queue in the network exception queue set whose number of consecutive attempts is greater than or equal to a first preset threshold; the second exception 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.

[0149] In one implementation, the above-mentioned sending module 53 can be used to obtain the first number of receipt queues sorted in front 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; 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.

[0150] In one implementation, the above-mentioned sending module 53 can also be used to obtain the second number of receipt queues sorted in front from the set of queues to be sent in the order when there are still available threads in the thread pool, 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 through the available threads in the thread pool.

[0151] In one implementation, the above-mentioned sending module 53 can be used to batch obtain the receipt messages in the second number of receipt queues from the database through the available threads in the thread pool; wherein the database stores the receipt messages to be sent; and the receipt messages are sent in batches to the target developers corresponding to the 5G messages.

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

[0153] In one implementation, the above-mentioned update module can also be used to obtain the first sending result of the first number of receipt queues or the second number of receipt queues; when the first sending result indicates that the sending network of the fourth receipt queue is abnormal, the fourth receipt queue is added to the network abnormality queue set, and the number of consecutive attempts of the fourth receipt queue is updated; when 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.

[0154] In one implementation, the above-mentioned sending module can also be used to periodically send the first exception queue or the second exception queue to the target developer corresponding to the 5G message. The above-mentioned update module can also be used to obtain the second sending result of the first exception queue or the second exception queue; when the second sending result indicates that the first exception queue is sent successfully, the first exception queue is removed from the network exception queue set; when the second sending result indicates that the sending duration of the second exception queue does not exceed the preset duration, the second exception queue is removed from the timeout queue set.

[0155] In one implementation, the above-mentioned acquisition module 51 can be used to obtain the information of the target developer corresponding to the 5G message; determine whether the receipt function of the target developer is turned on based on the information; if the information indicates that the target developer turns off the receipt function, discard the target receipt message; if the information indicates that the target developer turns on the receipt function, add the target receipt message to the target receipt queue of the target developer.

[0156] In one implementation, the above-mentioned device 500 may also include a receipt priority change module, which is used to obtain 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; according to the change notification, the receipt priority of the target receipt queue is changed.

[0157] The 5G message receipt sending device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0158] The 5G message receipt sending device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0159] The 5G message receipt sending device provided in the embodiment of the present application can achieve Figures 1 to 3 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0160] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned 5G message receipt sending method. Figure 6 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. Electronic devices may have relatively large differences due to different configurations or performances, and may include a processor (processor) 601, a communication interface (Communications Interface) 602, a memory (memory) 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604. The processor 601 can call a computer program stored in the memory 603 and can run on the processor 601 to execute the various steps of the above-mentioned 5G message receipt sending method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0161] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0162] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a 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 link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0163] 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 processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0164] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned 5G message receipt sending method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0166] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned 5G message receipt sending method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0167] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0168] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes a program or instructions. When the program or instructions are executed, the various processes of the above-mentioned 5G message receipt sending method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0169] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0171] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for sending a receipt of a 5G message, characterized in that: include: Obtain a target receipt message corresponding to at least one 5G message; Create a target receipt queue for the target developer corresponding to each of the 5G messages, and add the target receipt messages to the corresponding target receipt queues respectively; The target receipt message in each target receipt queue is sent to the target developer corresponding to the 5G message in a preset sending order.

2. The method according to claim 1, characterized in that The sending of the target receipt message in each target receipt queue to the target developer corresponding to the 5G message according to the preset sending order includes: Determine the sending order of each target receipt queue according to 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 in the thread pool; Send the target receipt message in each target receipt queue to the target developer corresponding to the 5G message in the sending order.

3. The method according to claim 2, characterized in that Before sending the target receipt message in each target receipt queue to the target developer corresponding to the 5G message in the sending order, the method further includes: Compare the identification information of each of the target receipt queues with the identification information of the historical receipt queues in the set of queues to be sent, and 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; and the second receipt queue is a target receipt queue to be added to 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.

4. The method according to claim 3, characterized in that The sending of the target receipt message in each target receipt queue to the target developer corresponding to the 5G message in the sending order includes: Sorting the receipt queues in the set of to-be-sent queues in the order of the receipt priorities from high to low or the number of to-be-processed times from small to large; 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 described.

5. The method according to claim 3, characterized in that: The step of comparing 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 includes: For each of the historical receipt queues, when the identification information of the historical receipt queue is different from the identification information of each of the target receipt queues, determining the historical receipt queue as the first receipt queue; For each of the target receipt queues, when the identification information of the target receipt queue is different from the identification information of each of the historical receipt queues, the target receipt queue is determined as the second receipt queue.

6. The method according to claim 4, characterized in that The method further comprises: Obtain a network exception queue set and a timeout queue set; wherein the network exception queue set includes a historical receipt queue for sending network exceptions and the number of consecutive attempts of the historical receipt queue; the timeout queue set includes a historical receipt queue for which the sending duration exceeds a preset duration and the number of consecutive attempts of the historical receipt queue; If the first receipt queue exists in the network exception queue set or the timeout queue set, remove the first receipt queue from the network exception queue set or the timeout queue set; When there is a first abnormal queue or a second abnormal queue in the set of queues to be sent, marking a first abnormal label for the first abnormal queue or marking a second abnormal label for the second abnormal queue; Among them, the first exception queue is a historical receipt queue in the network exception queue set, in which the number of consecutive attempts is greater than or equal to a first preset threshold; the second exception queue is a historical receipt queue in the timeout queue set, in which the number of consecutive attempts is greater than or equal to a second preset threshold.

7. The method according to claim 6, characterized in that The sending the receipt queues in the set of queues to be sent to the target developer corresponding to the 5G message in the order includes: Obtaining the first number of receipt queues that are sorted first from the set of queues to be sent in the order, and placing the first number of receipt queues into the thread pool; wherein the first number is the number of available threads in the thread pool; and 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.

8. The method according to claim 7, 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: When there are still available threads in the thread pool, obtaining the second number of receipt queues that are sorted first from the set of queues to be sent in the order, and putting the second number of receipt queues into the thread pool; wherein the second number is the number of available threads in the thread pool; and the second number of receipt queues are receipt queues marked with the second exception tag; 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.

9. The method according to claim 8, characterized in that The sending the second number of receipt queues to the target developer corresponding to the 5G message through the available threads in the thread pool includes: Acquiring the receipt messages in the second number of receipt queues in batches from a database through 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.

10. The method according to claim 8, characterized in that The method further comprises: Updating the number of pending processing times of the first number of receipt queues or updating the number of pending processing times 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 times or the receipt priority.

11. The method according to claim 8, characterized in that The method further comprises: Obtain a first sending result of the first number of receipt queues or the second number of receipt queues; When the first sending result indicates that the sending network of the fourth receipt queue is abnormal, adding the fourth receipt queue to the network abnormality queue set, and updating the number of consecutive attempts of the fourth receipt queue; When 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.

12. The method according to claim 6, characterized in that The method further comprises: Periodically sending the first exception queue or the second exception queue to a target developer corresponding to the 5G message, and obtaining a second sending result of the first exception queue or the second exception queue; When the second sending result indicates that the first exception queue is sent successfully, removing the first exception queue from the network exception queue set; When the second sending result indicates that the sending duration of the second exception queue does not exceed the preset duration, the second exception queue is removed from the timeout queue set.

13. 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 information of a target developer corresponding to the 5G message; Determine whether the receipt function of the target developer is enabled according to the information; If the information indicates that the target developer has disabled the receipt function, discarding the target receipt message; When the information indicates that the target developer has enabled the receipt function, the target receipt message is added to the corresponding target receipt queue.

14. The method according to claim 2, characterized in that The method further comprises: 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; According to the change notification, the receipt priority of the target receipt queue is changed.

15. A 5G message receipt sending device, characterized in that: include: An acquisition module, used to acquire a target receipt message corresponding to at least one 5G message; A creation module, used to create a target receipt queue for a target developer corresponding to each of the 5G messages, and add the target receipt messages to the corresponding target receipt queues respectively; A sending module is used to send the target receipt message in each target receipt queue to the target developer corresponding to the 5G message according to a preset sending order.

16. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for sending a receipt of a 5G message as described in any one of claims 1 to 14.

17. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the method for sending a receipt of a 5G message as described in any one of claims 1 to 14 are implemented.

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

Citation Information

Patent Citations

  • Multi-queue data transmission method

    CN110225109A

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

    CN111147351A

  • Application message pushing method, electronic equipment and storage medium

    CN114338792A

  • Message processing method and device, storage medium and program product

    CN115277614A

  • Message processing method, device and equipment

    CN117170891A