Short link management method, device, equipment and medium

By monitoring the request speed of the SMS sender and pre-storing short links in Redis, the problem of the SMS sender being unable to obtain the 5G reading short link in time is solved, and efficient short link allocation is achieved and waiting time is reduced.

CN120358524BActive Publication Date: 2025-09-05SHANGHAI DAHAN TRICOM COMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510837260.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-05
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

In the existing technology, when applying for 5G message reading short links, SMS senders are constrained by the operator's network load and system response time, which affects the timeliness of message sending, makes it impossible to obtain short links in time, and causes serious system congestion.

Method used

By monitoring the request speed of the SMS sender, when the high-frequency conditions are met, short links are extracted and allocated from the target Redis. If the surplus is insufficient, an application is made to the operation side. Otherwise, the short links are directly stored in Redis to meet the demand.

Benefits of technology

It effectively reduces the time that SMS senders wait for the allocation of short links, reduces network load pressure, ensures that SMS senders can obtain short links in a timely manner, and improves the timeliness of message sending.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358524B_ABST
    Figure CN120358524B_ABST
Patent Text Reader

Abstract

The present application discloses a short link management method, device, equipment and medium, which relates to the field of computer technology, including: monitoring the SMS sending request speed of the SMS sending end; when the SMS sending request speed meets the preset high-frequency condition, searching the target Redis corresponding to the SMS sending end in the short link pool, extracting the target short link from the short links pre-stored in the target Redis, and allocating the target short link to the SMS sending end; judging whether the short link balance in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed; if the short link balance is less than the required number of short links, sending a short link application request corresponding to the SMS sending request speed to the operation end, so as to obtain each short link returned by the operation end based on the short link application request, and storing each short link in the target Redis. The time required to allocate short links to the SMS sender is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a short link management method, device, equipment and medium. Background Art

[0002] 5G Reading is a messaging method that sends rich media messages in the form of SMS. By embedding a short link in the SMS, the mobile terminal can pull the rich media message data from the server based on the short link and display it. The generation, distribution and parsing of the 5G Reading short link are centrally managed by the operator. Therefore, before sending 5G Reading, the SMS sender needs to obtain the short link from the operator.

[0003] Different operators have different restrictions on applying for 5G letter reading short links, which are constrained by factors such as network load and system response time between operators. Ultimately, the timeliness of sending a large number of messages is seriously affected, and there is no time to apply for 5G letter reading short links, which are congested in the system.

[0004] From the above, it can be seen that how to reduce the time required to allocate a short link to a text message sender is a problem to be solved in this field. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a short link management method, device, equipment and medium to reduce the time required to allocate a short link to the text message sender. The specific solution is as follows:

[0006] In a first aspect, the present application discloses a short link management method, comprising:

[0007] Monitor the SMS sending request speed of the SMS sender;

[0008] When the SMS sending request speed meets the preset high frequency condition, the target Redis corresponding to the SMS sender is searched in the short link pool, and the target short link is extracted from the short links pre-stored in the target Redis, and the target short link is assigned to the SMS sender;

[0009] Determine whether the short link balance in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed;

[0010] If the short link balance is less than the required number of short links, a short link application request corresponding to the SMS sending request speed is sent to the operation end to obtain the short links returned by the operation end based on the short link application request, and store each short link in the target Redis.

[0011] Optionally, monitoring the SMS sending request speed of the SMS sending end includes:

[0012] Determine the number of SMS sending requests at each time point by using a counter to determine the difference in the number of SMS sending requests between adjacent time points;

[0013] The ratio of the difference to the time interval between adjacent time points is determined as the SMS sending request speed of the SMS sending terminal at each time point.

[0014] Optionally, the using a counter to determine the number of SMS sending requests at each time point by the SMS sending terminal includes:

[0015] A counter is used to determine the number of mobile phone numbers sent by the SMS sending end at the current time point, and the number of mobile phone numbers sent at the current time point is determined as the number of SMS sending requests at the current time point.

[0016] Optionally, the short link management method further includes:

[0017] If the SMS sending request speed at the current time node is greater than the preset speed threshold, then determining the allowable speed offset based on the SMS sending request speed at the previous time node;

[0018] Determine whether the absolute value of the difference between the SMS sending request speed at the previous time node and the SMS sending request speed at the current time node exceeds the allowable speed offset;

[0019] If the absolute value of the difference does not exceed the allowable speed offset, it is determined that the SMS sending request speed at the current time node meets the preset high frequency condition.

[0020] Optionally, the short link management method further includes:

[0021] When the SMS request sending speed does not meet the preset high frequency condition, monitoring the short link margin in the target Redis at each time point;

[0022] If the short chain balance does not change for a preset number of consecutive time points, the short chain in the target Redis is destroyed and a short chain destruction record is generated.

[0023] Optionally, the short link management method further includes:

[0024] Generate a short link storage record and / or a short link allocation record, and generate a target index of the short link storage record and / or the short link allocation record based on the identification information of the short message sending terminal;

[0025] Saving the short chain storage record and / or the short chain allocation record in a preset database based on the target index;

[0026] Accordingly, after generating the short link destruction record, the following steps are also included:

[0027] Determine the target index as the index of the short chain destruction record;

[0028] The short chain destruction record is saved in a preset database based on the target index.

[0029] Optionally, the sending of a short link application request corresponding to the SMS sending request speed to the operator to obtain each short link returned by the operator based on the short link application request includes:

[0030] Filtering a target server instance from the cluster, and adding a target distributed lock to the target server instance; wherein the identification information of the target distributed lock is the same as the identification information of the SMS sender;

[0031] Controlling the target server instance to send a generated short link application request corresponding to the SMS sending request speed to the operation end, and prohibiting other server instances in the cluster from sending the short link application request to the operation end; wherein the identification information of the short link application request is the same as the identification information of the SMS sending end;

[0032] Obtain each short chain returned by the operation end based on the short chain application request, and release the target distributed lock of the target server instance.

[0033] In a second aspect, the present application discloses a short chain management device, comprising:

[0034] A monitoring module is used to monitor the SMS sending request speed of the SMS sending end;

[0035] A short link allocation module is used to search the target Redis corresponding to the SMS sender in the short link pool when the SMS sending request speed meets the preset high frequency condition, extract the target short link from the short links pre-stored in the target Redis, and allocate the target short link to the SMS sender;

[0036] A judgment module, configured to judge whether the short link balance in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed;

[0037] The short link application module is used to send a short link application request corresponding to the SMS sending request speed to the operation end if the short link balance is less than the required number of short links, so as to obtain the short links returned by the operation end based on the short link application request, and store each short link in the target Redis.

[0038] In a third aspect, the present application discloses an electronic device, comprising:

[0039] Memory, used to store computer programs;

[0040] The processor is used to execute the computer program to implement the steps of the short link management method disclosed above.

[0041] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the short link management method disclosed above are implemented.

[0042] The beneficial effects of the present application are as follows: the present application monitors the SMS sending request speed of the SMS sending end; when the SMS sending request speed meets the preset high-frequency condition, the target Redis corresponding to the SMS sending end is searched in the short link pool, and the target short chain is extracted from the short chains pre-stored in the target Redis, and the target short chain is allocated to the SMS sending end; it is judged whether the short chain balance in the target Redis is not less than the required number of short chains corresponding to the SMS sending request speed; if the short chain balance is less than the required number of short chains, a short chain application request corresponding to the SMS sending request speed is sent to the operation end to obtain each short chain returned by the operation end based on the short chain application request, and each short chain is stored in the target Redis. It can be seen that this application monitors the SMS sending request speed of the SMS sending end. If the SMS sending request speed of the SMS sending end is high, the target Redis corresponding to the SMS sending end is searched in the short link pool, and the target short chain is extracted from the short chain pre-stored in the target Redis, and the target short chain is assigned to the SMS sending end. That is to say, when the SMS sending request speed of the SMS sending end is high, if the short chain is still applied to the operation end at this time, the operation end cannot generate a large number of short chains in a short time, and the SMS sending end needs to wait, and the network load pressure is relatively large. The short chain pre-stored in the target Redis is directly assigned to the SMS sending end, and there is no need to apply for a short chain from the operation end. When the waiting time for the allocation of short chains is effectively reduced, and the SMS sending request speed meets the preset high-frequency conditions, if the short chain margin in the target Redis is less than the required number of short chains corresponding to the SMS sending request speed, the short chain is applied to the operation end, instead of waiting until there is no pre-stored short chain in the target Redis before applying for a short chain, which effectively ensures that the SMS sending end can be assigned a short chain in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0044] Figure 1A flow chart of a short chain management method disclosed in this application;

[0045] Figure 2 A schematic diagram of a specific short chain destruction mechanism disclosed in this application;

[0046] Figure 3 A specific short-chain scheduling schematic diagram disclosed in this application;

[0047] Figure 4 This is a specific short chain distribution diagram disclosed in this application;

[0048] Figure 5 A schematic diagram of a short chain application disclosed in this application;

[0049] Figure 6 A schematic diagram of a specific short chain application disclosed in this application;

[0050] Figure 7 A specific record filing schematic diagram disclosed in this application;

[0051] Figure 8 This is a specific short chain management diagram disclosed in this application;

[0052] Figure 9 This is a schematic diagram of a specific inter-module collaborative management short chain disclosed in this application;

[0053] Figure 10 This is a schematic structural diagram of a short chain management device disclosed in this application;

[0054] Figure 11 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0055] 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 embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0056] 5G Reading is a messaging method that sends rich media messages in the form of SMS. By embedding a short link in the SMS, the mobile terminal can pull the rich media message data from the server based on the short link and display it. The generation, distribution and parsing of the 5G Reading short link are centrally managed by the operator. Therefore, before sending 5G Reading, the SMS sender needs to obtain the short link from the operator.

[0057] Different operators have different restrictions on applying for 5G letter reading short links, which are constrained by factors such as network load and system response time between operators. Ultimately, the timeliness of sending a large number of messages is seriously affected, and there is no time to apply for 5G letter reading short links, which are congested in the system.

[0058] To this end, this application provides a corresponding short link management solution that can reduce the time required to allocate short links to SMS senders.

[0059] See also Figure 1 As shown, the embodiment of the present application discloses a short link management method, including:

[0060] Step S11: monitoring the SMS sending request speed of the SMS sending end.

[0061] In one traditional sending solution, the SMS sender uses a file to send the message. At this time, the operator will use a separate thread resource to prepare the 5G reading short link according to the number file before sending it. However, this solution can only meet the situation where the SMS sender is a client web page. It is not applicable to the SMS sender that only uses the interface to send 5G reading messages. In another traditional sending solution, that is, the 5G reading short link solution, the data to be sent by the SMS sender is known in advance, and the 5G reading short link is applied in advance. It is used directly when sending. First, this method is not suitable for SMS senders that will not be notified in advance. Secondly, in the case of large-scale sending, it occupies a large amount of system storage. Finally, since it is unclear which mobile phone number will be sent first, all must be prepared, which takes a certain amount of time. If the SMS sender does not send, it wastes manpower and material resources.

[0062] In this embodiment, the monitoring of the SMS sending request speed of the SMS sending end includes: using a counter to determine the number of SMS sending requests of the SMS sending end at each time point, so as to determine the difference in the number of SMS sending requests between adjacent time points; and determining the ratio of the difference to the time interval between adjacent time points as the SMS sending request speed of the SMS sending end at each time point.

[0063] Continuously monitor the sending status of the SMS sender so as to create a short link pool in time. First, the monitoring module will maintain a counter of the SMS sender dimension, and use the counter to determine the number of SMS sending requests at each time point. At the same time, during each monitoring process, the difference in the number of SMS sending requests between adjacent time points will be recorded. For example, if the counter records the number of SMS sending requests at the first time point as M0, the number of SMS sending requests at the second time point as M1, and the number of SMS sending requests at the third time point as M2, then the difference in the number of SMS sending requests between the second time point and the first time point is M1-M0, and the difference in the number of SMS sending requests between the third time point and the second time point is M2-M1. Furthermore, each time the difference in the number of SMS sending requests between the current time point and the previous time point is obtained, the ratio of the difference to the time interval between adjacent time points must be determined. This ratio is the SMS sending request speed at the current time point. For example, if the time interval between each adjacent time point is T, then the calculation formula for the SMS sending request speed is:

[0064] ;

[0065] Among them, V n M is the SMS sending request speed at the current time point n. n is the number of SMS sending requests at the current time point, and T is the time interval between adjacent time points.

[0066] In this way, the SMS sending request speed of the SMS sender can be monitored in real time. The SMS sending request speed can reflect the size of the SMS sending demand of the SMS sender at different time points, that is, the customer business pressure can be perceived in real time.

[0067] In this embodiment, the use of a counter to determine the number of SMS sending requests at each time point by the SMS sender includes: using a counter to determine the number of mobile phone numbers sent by the SMS sender at the current time point, and determining the number of mobile phone numbers sent at the current time point as the number of SMS sending requests at the current time point.

[0068] It is understandable that a counter is used to determine the number of mobile phone numbers sent by the SMS sender at the current time point, and the number of mobile phone numbers sent at the current time point is determined as the number of SMS sending requests at the current time point.

[0069] In this embodiment, it also includes: if the SMS sending request speed at the current time node is greater than the preset speed threshold, determining an allowable speed offset based on the SMS sending request speed at the previous time node; judging whether the absolute value of the difference between the SMS sending request speed at the previous time node and the SMS sending request speed at the current time node exceeds the allowable speed offset; if the absolute value of the difference does not exceed the allowable speed offset, determining that the SMS sending request speed at the current time node meets the preset high-frequency condition.

[0070] Furthermore, since the SMS sender may submit messages intermittently and may not be able to submit them continuously and stably, the SMS sender may have a sudden increase in the number of SMS sending requests at a certain point in time, but the number of SMS sending requests at subsequent time points may return to a small number. In other words, if the number of SMS sending requests at each time point is plotted as a quantity curve, there may be a situation where the curve changes greatly but the duration is very short. In this case, although the SMS sending request speed at a certain point in time is very high, it will not be judged as meeting the preset high-frequency condition. There may be intermittent fluctuations in the SMS sending of customers (such as sudden pauses or bursts). If the short chain pool operation is triggered directly based on a single speed, short-term speed fluctuations may be misjudged as high load, triggering unnecessary short chain applications. Low-speed periods may mask the actual high concurrency demand. Therefore, in order to avoid such misjudgments and missed judgments, there will be an allowable speed offset F in the monitoring module. Specifically, the SMS sending request speed V at the previous time node is judged. n-1 The SMS sending request speed V at the current time node n Whether the absolute value of the difference between them exceeds the allowable speed offset F. If the absolute value of the difference does not exceed the allowable speed offset F, then determine the SMS sending request speed V at the current time node. n Satisfy the preset high frequency condition. On the contrary, if the absolute value of the difference exceeds the allowable speed offset F, that is, , it is determined that the SMS sending request speed at the current time node does not meet the preset high-frequency condition, and no record is made this time; wherein, the allowable speed offset F can be half of the SMS sending request speed at the previous time node, that is, .

[0071] In this embodiment, it also includes: when the SMS sending request speed does not meet the preset high frequency condition, monitoring the short link balance in the target Redis at each time point; if the short link balance at a preset number of time points does not change, destroying the short link in the target Redis and generating a short link destruction record.

[0072] For example Figure 2The following is a schematic diagram of a specific short link destruction mechanism. When the SMS request sending speed does not meet the preset high-frequency condition, the short link pool module monitors the short link balance in the target Redis at the current time point. If the short link balance does not change for a preset number of consecutive time points, it means that the SMS sender does not have a high concurrency demand and the target Redis has too many short links stored, which will cause unnecessary waste of short link resources. In this case, the short links in the target Redis can be destroyed, that is, resource recycling is performed, reducing storage and maintenance costs, and also avoiding the situation where short links become invalid due to long-term storage of unused short links. This process is actively initiated by the short link pool module, and self-checks are performed every few intervals. Since the destruction is triggered when the inventory of the short link pool is no longer changing, the self-check time interval should not be too short. The maintained short link pool is stored in the customer dimension to prevent different customers with different sending speeds from affecting other customers.

[0073] Furthermore, if the short chain balance changes at a preset number of time points in a row, it is necessary to determine whether the short chain balance is sufficient. If not, it is necessary to replenish short chains in the target Redis and calculate whether the number of short chains in the target Redis is less than or equal to applyOneTime (i.e., single replenishment quantity) * applyThreshold (short chain replenishment threshold). If the conditions are met, the short chain replenishment operation is performed, and the replenishment quantity is applyOneTime. That is to say, the short chain balance in the target Redis at each time point is monitored. If the short chain balance changes at a preset number of time points in a row, it is determined whether the short chain balance in the target Redis is not greater than the product of the preset single replenishment quantity and the preset short chain replenishment threshold. If the short chain balance in the target Redis is not greater than the product of the preset single replenishment quantity and the preset short chain replenishment threshold, it is determined that the short chain balance in the target Redis is insufficient, and it is necessary to apply for short chains from the operation end based on the preset single replenishment quantity.

[0074] Step S12: When the SMS sending request speed meets the preset high frequency condition, the target Redis corresponding to the SMS sender is searched in the short link pool, and the target short link is extracted from the short links pre-stored in the target Redis, and the target short link is allocated to the SMS sender.

[0075] When the SMS sending request speed meets the preset high-frequency condition, it indicates that the SMS sending end has a high concurrency demand, for example Figure 3A specific short chain scheduling diagram is shown, in which the target Redis corresponding to the SMS sender is searched in the short chain pool. It can be understood that if the target Redis corresponding to the SMS sender can be found in the short chain pool, the target short chain can be directly extracted from the short chains pre-stored in the target Redis, and the target short chain can be assigned to the SMS sender. If the target Redis corresponding to the SMS sender cannot be found in the short chain pool, it is necessary to create a target Redis corresponding to the SMS sender in the short chain pool, and save the short chain applied for from the operation end to the target Redis.

[0076] It should be noted that each Redis in the short link pool corresponds to a different SMS sender ID (identification information), that is, different Redis corresponds to different SMS sender IDs. The Redis index information is the identification information of the SMS sender, so you can directly search for the corresponding target Redis in the short link pool based on the identification information of the SMS sender.

[0077] For example Figure 4 The diagram shows a specific short link allocation diagram, which allocates the target short link in the target Redis to the SMS sender. The external access module exists to simplify the logic of externally obtaining short links. Regardless of the status of the short link pool, the short link will be returned to the caller, so that the caller does not need to worry about the status of the short link pool when applying for the short link, which short link to assign the mobile phone number to, and other abnormal situations. Although this module will find the short link pool module to obtain the short link, it will not control the behavior of the short link pool. For example, if the short link pool is replenished with a short link, it needs to be processed by the scheduling module.

[0078] Step S13: Determine whether the short link balance in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed.

[0079] like Figure 3 As shown, it is determined in real time whether the short link margin in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed. In other words, it is necessary to monitor whether the short link margin in the target Redis is sufficient.

[0080] Step S14: If the short link balance is less than the required number of short links, a short link application request corresponding to the SMS sending request speed is sent to the operation end to obtain each short link returned by the operation end based on the short link application request, and store each short link in the target Redis.

[0081] For example Figure 5A short chain application diagram is shown. If the short chain margin is less than the required number of short chains, it means that if the number of short chains in the target Redis is not increased, the high concurrency demand of the SMS sender cannot be supported. Therefore, a short chain application request corresponding to the SMS sending request speed is sent to the operation side to obtain the short chains returned by the operation side based on the short chain application request, and store each short chain in the target Redis, that is, try to keep sufficient short chains stored in the target Redis to provide protection for the high concurrency demand of the SMS sender.

[0082] In this embodiment, the sending of a short chain application request corresponding to the SMS sending request speed to the operation end to obtain the short chains returned by the operation end based on the short chain application request includes: screening the target server instance from the cluster, and adding a target distributed lock to the target server instance; wherein the identification information of the target distributed lock is the same as the identification information of the SMS sending end; controlling the target server instance to send the generated short chain application request corresponding to the SMS sending request speed to the operation end, and prohibiting other server instances in the cluster from sending the short chain application request to the operation end; wherein the identification information of the short chain application request is the same as the identification information of the SMS sending end; obtaining the short chains returned by the operation end based on the short chain application request, and releasing the target distributed lock of the target server instance.

[0083] It should be noted that there are multiple server instances in the short link management cluster, but only one server instance is required to manage the short link for one SMS sender. For example, if server instance A is responsible for managing SMS sender a, then server instance B cannot be responsible for managing SMS sender a. Otherwise, two server instances may apply for short links for SMS sender a at the same time. Therefore, to prevent repeated submission of short link pool creation instructions, Redis distributed locks are used to achieve the effect of only one short link pool creation instruction at the same time. That is, the target server instance is selected from the cluster and a target distributed lock is added to the target server instance. The identification information of the target distributed lock is the same as the identification information of the SMS sender. The target server instance is controlled to send the generated short link application request corresponding to the SMS sending request speed to the operation end. At this time, other server instances in the cluster are prohibited from sending short link application requests to the operation end. The identification information of the short link application request is the same as the identification information of the SMS sender. The short links returned by the operation end based on the short link application request are obtained, and then the target distributed lock of the target server instance is released. In this way, different server instances will not apply for short links for the same SMS sender at the same time.

[0084] A single service will only have one monitoring task, which reduces the probability of races between tasks when creating instructions, thereby improving the efficiency of sending instructions. Figure 6The diagram below shows a specific short-link application. The data collector uses the monitoring component of the Spring framework. It provides some default metrics, as well as custom metrics such as the total number of data received and the processing speed of a specific action. Combined with a message traffic monitoring algorithm, tracking behavior can be performed to monitor customer message sending. When the processing speed of a corresponding customer is determined, a system-configured speed threshold is set. If this threshold is reached multiple times (also a system configuration), a short-link pool creation instruction is initiated. In addition to the parameters for requesting short links from the operator, the creation instruction also includes the number of short links to be replenished each time (applyOneTime) and the short-link replenishment threshold (applyThreshold), which provide a basis for how the short-link pool is replenished.

[0085] In this embodiment, it also includes: generating a short link storage record and / or a short link allocation record, and generating a target index of the short link storage record and / or the short link allocation record based on the identification information of the SMS sender; saving the short link storage record and / or the short link allocation record to a preset database based on the target index.

[0086] Furthermore, after the applied short link is stored in the corresponding redis, a short link storage record is generated, and after the short link is allocated to the corresponding SMS sending end, a short link allocation record is generated, wherein various records of the short link are stored with the identification information of the SMS sending end, that is, the target index of the short link storage record is the same as the identification information of its corresponding SMS sending end, and the target index of the short link allocation record is the same as the identification information of its corresponding SMS sending end, and based on the target index, the short link storage record and / or short link allocation record is saved to the preset database, and the specific preset database can be a Mysql database.

[0087] In this embodiment, after generating the short chain destruction record, the method further includes: determining the target index as the index of the short chain destruction record; and saving the short chain destruction record into a preset database based on the target index.

[0088] When certain short links are destroyed, a destruction record of the destroyed short links is also created, and the short link destruction record is also stored in the preset database with the identification information of the SMS sender, that is, the short link destruction record is saved in the preset database based on the target index.

[0089] In this way, the preset database stores short chain records of different SMS sending ends, such as the short chain storage, allocation, and destruction records of SMS sending end a, and the short chain storage, allocation, and destruction records of SMS sending end b. Then, traceability can be performed based on these short chain records.

[0090] For example Figure 7 As shown in the figure, a specific record archiving diagram is shown. In the archiving module, different archive contents are processed by different buffer queues and archiving tasks. Different processing tasks have different processing parameters. For example, the archiving task of a short chain is under greater pressure, and more resources will be allocated to it for processing. When the service is shut down, all the data in the buffer queue will be taken out by the corresponding archiving task for rapid archiving. If the number of remaining items is too large (the number of items is configured according to the processing capacity of MySQL), they will be serialized and wait for the next service startup to process them. The archiving module is responsible for storing archive records, including each 5G letter reading short chain record and tracing record. If there is congestion during storage or the database is abnormal, the processing will be delayed and wait for the next operation to reduce the pressure on MySQL and ensure that data will not be lost.

[0091] The beneficial effects of the present application are as follows: the present application monitors the SMS sending request speed of the SMS sending end; when the SMS sending request speed meets the preset high-frequency condition, the target Redis corresponding to the SMS sending end is searched in the short link pool, and the target short chain is extracted from the short chains pre-stored in the target Redis, and the target short chain is allocated to the SMS sending end; it is judged whether the short chain balance in the target Redis is not less than the required number of short chains corresponding to the SMS sending request speed; if the short chain balance is less than the required number of short chains, a short chain application request corresponding to the SMS sending request speed is sent to the operation end to obtain each short chain returned by the operation end based on the short chain application request, and each short chain is stored in the target Redis. It can be seen that this application monitors the SMS sending request speed of the SMS sending end. If the SMS sending request speed of the SMS sending end is high, the target Redis corresponding to the SMS sending end is searched in the short link pool, and the target short chain is extracted from the short chain pre-stored in the target Redis, and the target short chain is assigned to the SMS sending end. That is to say, when the SMS sending request speed of the SMS sending end is high, if the short chain is still applied to the operation end at this time, the operation end cannot generate a large number of short chains in a short time, and the SMS sending end needs to wait, and the network load pressure is relatively large. The short chain pre-stored in the target Redis is directly assigned to the SMS sending end, and there is no need to apply for a short chain from the operation end. When the waiting time for the allocation of short chains is effectively reduced, and the SMS sending request speed meets the preset high-frequency conditions, if the short chain margin in the target Redis is less than the required number of short chains corresponding to the SMS sending request speed, the short chain is applied to the operation end, instead of waiting until there is no pre-stored short chain in the target Redis before applying for a short chain, which effectively ensures that the SMS sending end can be assigned a short chain in time.

[0092] Below is Figure 8Taking a specific short link management diagram shown as an example, the creation of a short link pool and the allocation of short links in this application are explained accordingly. The SMS sender pushes the collected message sending monitoring data to the short link pool service provider, that is, the short link management system, that is, the number of mobile phone numbers sent by the SMS sender at the current time point. In this way, the short link management system can monitor the SMS sending request speed of the SMS sender based on the data. When the SMS sending request speed meets the preset high-frequency condition, the target Redis corresponding to the SMS sender is searched in the short link pool. If it is not found, a short link pool is created, that is, a target Redis corresponding to the SMS sender is created in the short link pool, and multiple short links are applied for from the operation end, and these short chains are stored in the created target Redis. At this time, the short link application request of the SMS sender can be responded to, that is, the corresponding short link is returned to the SMS sender.

[0093] For example Figure 9The diagram shows a specific schematic diagram of inter-module collaborative management of short links. The short link pool service provider includes a monitoring module, a scheduling module, an external access module, a short link pool module, and an archiving module. The monitoring module focuses on monitoring the sending of the entire message, that is, monitoring the SMS sending request speed of the SMS sending end, so as to promptly discover scenarios where a large number of short links need to be applied for. A single service will only have one monitoring task, reducing the probability of contention between tasks when creating instructions, so as to improve the efficiency of instruction sending. When the SMS sending request speed meets the preset high-frequency conditions, an instruction is generated to trigger the scheduling module to respond. When the scheduling module receives the instruction, it searches for the target Redis corresponding to the SMS sending end in the short link pool. If it exists, the target short chain is extracted from the short chains pre-stored in the target Redis, and the target short chain is assigned to the SMS sending end. It is also determined whether the short chain balance in the target Redis is not less than the short chain requirement number corresponding to the SMS sending request speed. If the short chain balance is less than the short chain requirement number or the target Redis corresponding to the SMS sending end does not exist in the short chain pool, a short chain application request corresponding to the SMS sending request speed is sent to the operation end to obtain the Based on the short links returned by the short link application request, the operation end stores each short link in the created target Redis. That is, the scheduling module is mainly responsible for interacting directly with the short link pool to control the life cycle of the short link pool, including the creation of the short link pool, the modification of the short link pool parameters, and the destruction of the short link pool. When replenishing the short link pool, it will only be checked when applying for a short link, creating a short link pool, or modifying the short link pool parameters. This is a fallback behavior to prevent the short link pool module itself from being unable to discover whether the inventory is sufficient. It is determined by the parameters specified when creating the short link pool, such as 50%; the scheduling module sends the short chain traceability record to the archiving module. The short chain pool module stores the short chain in the corresponding Redis and sends the generated various short chain records to the archiving module. The archiving module processes different archive contents by different buffer queues and archiving tasks. Different processing tasks have different processing parameters. For example, the archiving task of short links is under greater pressure, so more resources will be allocated to it for processing. When the service is shut down, the corresponding archiving task will retrieve all the data in the buffer queue and quickly archive it. If the number of remaining items is too large (the number of items is configured according to the processing capacity of Mysql), it will be serialized and wait for the next service startup to process it. The external access module is designed to simplify the logic of external short link acquisition. Regardless of the status of the short link pool, the short link will be returned to the caller, so that the caller does not need to worry about the status of the short link pool when applying for the short link, which short link to assign the mobile phone number to, and other abnormal situations. Although this module will find the short link pool module to obtain the short link, it will not control the behavior of the short link pool. For example, asking the short link pool to replenish the short link needs to be processed by the scheduling module.

[0094] It can be seen that this application reduces human intervention and does not require customers to notify in advance to prepare 5G letter reading short links in advance. The system automatically prepares 5G letter reading short links in advance, reducing the possibility of human error and releasing productivity. At the same time, there is room for some human intervention to promptly correct abnormal situations that occur in the system. Full scene coverage, whether the customer sends 5G letter reading messages or files through the interface, the 5G letter reading short link can be processed, and it will not take too long in the sending process. It takes up less resources and does not require customers to wait for all 5G letter reading short links to be applied for before they can be sent. The system automatically monitors and automatically replenishes the 5G letter reading short link.

[0095] See also Figure 10 As shown, the embodiment of the present application discloses a short link management device, including:

[0096] Monitoring module 11, used to monitor the SMS sending request speed of the SMS sending end;

[0097] The short link allocation module 12 is configured to search the target Redis corresponding to the SMS sender in the short link pool when the SMS sending request speed meets the preset high frequency condition, extract the target short link from the short links pre-stored in the target Redis, and allocate the target short link to the SMS sender;

[0098] A judging module 13 is configured to judge whether the short link balance in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed;

[0099] The short link application module 14 is used to send a short link application request corresponding to the SMS sending request speed to the operation end if the short link balance is less than the required number of short links, so as to obtain the short links returned by the operation end based on the short link application request, and store each short link in the target Redis.

[0100] The beneficial effects of the present application are as follows: the present application monitors the SMS sending request speed of the SMS sending end; when the SMS sending request speed meets the preset high-frequency condition, the target Redis corresponding to the SMS sending end is searched in the short link pool, and the target short chain is extracted from the short chains pre-stored in the target Redis, and the target short chain is allocated to the SMS sending end; it is judged whether the short chain balance in the target Redis is not less than the required number of short chains corresponding to the SMS sending request speed; if the short chain balance is less than the required number of short chains, a short chain application request corresponding to the SMS sending request speed is sent to the operation end to obtain each short chain returned by the operation end based on the short chain application request, and each short chain is stored in the target Redis. It can be seen that this application monitors the SMS sending request speed of the SMS sending end. If the SMS sending request speed of the SMS sending end is high, the target Redis corresponding to the SMS sending end is searched in the short link pool, and the target short chain is extracted from the short chain pre-stored in the target Redis, and the target short chain is assigned to the SMS sending end. That is to say, when the SMS sending request speed of the SMS sending end is high, if the short chain is still applied to the operation end at this time, the operation end cannot generate a large number of short chains in a short time, and the SMS sending end needs to wait, and the network load pressure is relatively large. The short chain pre-stored in the target Redis is directly assigned to the SMS sending end, and there is no need to apply for a short chain from the operation end. When the waiting time for the allocation of short chains is effectively reduced, and the SMS sending request speed meets the preset high-frequency conditions, if the short chain margin in the target Redis is less than the required number of short chains corresponding to the SMS sending request speed, the short chain is applied to the operation end, instead of waiting until there is no pre-stored short chain in the target Redis before applying for a short chain, which effectively ensures that the SMS sending end can be assigned a short chain in time.

[0101] Furthermore, an embodiment of the present application also provides an electronic device. Figure 11 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.

[0102] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, the device may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the short link management method performed by the electronic device disclosed in any of the aforementioned embodiments.

[0103] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0104] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0105] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0106] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device to enable the processor 21 to calculate and process the massive data 223 in the memory 22. It can be Windows, Unix, Linux, etc. In addition to including computer programs that can be used to complete the short link management method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks. In addition to including data transmitted by external devices received by the electronic device, the data 223 can also include data collected by its own input and output interface 25.

[0107] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the short link management method disclosed above is implemented. For the specific steps of this method, please refer to the corresponding content disclosed in the above embodiments and will not be repeated here.

[0108] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0109] Professionals may further appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable EPROM (Erasable Programmable Read Only Memory), electrically erasable programmable EEPROM (Electrically Erasable Programmable read only memory), registers, hard disk, removable disk, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0110] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0111] The above is a detailed introduction to the short link management method, device, equipment and medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A short link management method, characterized in that: include: Monitor the SMS sending request speed of the SMS sender; When the SMS sending request speed meets the preset high frequency condition, the target Redis corresponding to the SMS sender is searched in the short link pool, and the target short link is extracted from the short links pre-stored in the target Redis, and the target short link is assigned to the SMS sender; Determine whether the short link balance in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed; If the short link balance is less than the required number of short links, a short link application request corresponding to the SMS sending request speed is sent to the operation end to obtain the short links returned by the operation end based on the short link application request, and store each short link in the target Redis.

2. The short link management method according to claim 1, characterized in that: The monitoring of the SMS sending request speed of the SMS sending terminal includes: Determine the number of SMS sending requests at each time point by using a counter to determine the difference in the number of SMS sending requests between adjacent time points; The ratio of the difference to the time interval between adjacent time points is determined as the SMS sending request speed of the SMS sending end at each time point.

3. The short link management method according to claim 2, characterized in that: The method of using a counter to determine the number of SMS sending requests at each time point by the SMS sending terminal includes: A counter is used to determine the number of mobile phone numbers sent by the SMS sending end at the current time point, and the number of mobile phone numbers sent at the current time point is determined as the number of SMS sending requests at the current time point.

4. The short link management method according to claim 2, characterized in that: Also includes: If the SMS sending request speed at the current time node is greater than the preset speed threshold, then determining the allowable speed offset based on the SMS sending request speed at the previous time node; Determine whether the absolute value of the difference between the SMS sending request speed at the previous time node and the SMS sending request speed at the current time node exceeds the allowable speed offset; If the absolute value of the difference does not exceed the allowable speed offset, it is determined that the SMS sending request speed at the current time node meets the preset high frequency condition.

5. The short link management method according to claim 1, characterized in that: Also includes: When the SMS request sending speed does not meet the preset high frequency condition, monitoring the short link margin in the target Redis at each time point; If the short chain balance does not change at a preset number of consecutive time points, the short chain in the target Redis is destroyed and a short chain destruction record is generated.

6. The short link management method according to claim 5, characterized in that: Also includes: Generate a short link storage record and / or a short link allocation record, and generate a target index of the short link storage record and / or the short link allocation record based on the identification information of the short message sending terminal; Saving the short chain storage record and / or the short chain allocation record in a preset database based on the target index; Accordingly, after generating the short link destruction record, the following steps are also included: Determine the target index as the index of the short chain destruction record; The short chain destruction record is saved in a preset database based on the target index.

7. The short link management method according to claim 5, characterized in that: The sending of a short link application request corresponding to the SMS sending request speed to the operation side to obtain each short link returned by the operation side based on the short link application request includes: Filtering a target server instance from the cluster, and adding a target distributed lock to the target server instance; wherein the identification information of the target distributed lock is the same as the identification information of the SMS sender; Controlling the target server instance to send a generated short link application request corresponding to the SMS sending request speed to the operation end, and prohibiting other server instances in the cluster from sending the short link application request to the operation end; wherein the identification information of the short link application request is the same as the identification information of the SMS sending end; Obtain each short chain returned by the operation end based on the short chain application request, and release the target distributed lock of the target server instance.

8. A short chain management device, characterized in that: include: A monitoring module is used to monitor the SMS sending request speed of the SMS sending end; A short link allocation module is used to search the target Redis corresponding to the SMS sender in the short link pool when the SMS sending request speed meets the preset high frequency condition, extract the target short link from the short links pre-stored in the target Redis, and allocate the target short link to the SMS sender; A judgment module, configured to judge whether the short link balance in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed; The short link application module is used to send a short link application request corresponding to the SMS sending request speed to the operation end if the short link balance is less than the required number of short links, so as to obtain the short links returned by the operation end based on the short link application request, and store each short link in the target Redis.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the short link management method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the short link management method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Long and short link switching method and system

    CN106375189A

  • Short link generation method and device

    CN115238209A