Short chain management method and device, equipment and medium

By monitoring the request speed of the SMS sending end and allocating pre-stored short links in the short chain pool, the problem that the SMS sending party cannot obtain the 5G short link in time under high frequency situations is solved, and efficient short link allocation and network load are achieved.

CN120358524AActive Publication Date: 2025-07-22SHANGHAI DAHAN TRICOM COMM
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, when applying for 5G short-link reading, the SMS sender is restricted by the operator's network load and system response time, resulting in poor timeliness and inability to obtain short-links in time, resulting in congestion in message transmission.

Method used

By monitoring the request speed of the SMS sending end, when the high-frequency conditions are met, the target Redis is found in the short-chain pool and the pre-stored short chain is allocated. If the margin is insufficient, apply for short chains to the operation end to ensure timely allocation.

Benefits of technology

It effectively reduces the time when the SMS sender waits for the allocation of short links, reduces the network load pressure, and ensures that the SMS sender obtains short links in a timely manner under high concurrency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358524A_ABST
    Figure CN120358524A_ABST
Patent Text Reader

Abstract

The invention discloses a short chain management method and device, equipment and a medium, and relates to the technical field of computers, and the method comprises the steps: monitoring the short message sending request speed of a short message sending end; when the short message sending request speed meets a preset high-frequency condition, searching a target Redis corresponding to the short message sending end in a short chain pool, extracting a target short chain from short chains pre-stored in the target Redis, and allocating the target short chain to the short message sending end; judging whether the short chain margin in the target Redis is not less than the short chain required number corresponding to the short message sending request speed or not; and if the short chain margin is smaller than the required number of the short chains, sending a short chain application request corresponding to the short message sending request speed to an operation end so as to obtain each short chain returned by the operation end based on the short chain application request, and storing each short chain into the target Redis. And the time required for distributing the short chain to the short message 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 particularly to a short link management method, device, equipment and medium. Background Art

[0002] 5G read message is a message sending method for sending rich media messages in the form of text messages. By embedding a short link in the text message, the mobile terminal can pull rich media message data from the server according to the short link and display it. The generation, allocation and parsing of 5G read message short links are centrally managed by the operation end. Therefore, before sending a 5G read message, the text message sender needs to obtain a short link from the operation end.

[0003] Different operation ends have different restrictions on applying for 5G read message short links. Restricted by factors such as network load and system response time with the operator, the timeliness of a large number of message transmissions is severely affected in the end, and there is no time to apply for 5G read message short links, congesting in the system.

[0004] In summary, how to reduce the time required to allocate short links for text message senders 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 short links for text message senders. The specific solutions are as follows:

[0006] In the first aspect, the present application discloses a short link management method, including: Monitoring the text message sending request speed of the text message sending end; When the text message sending request speed meets the preset high-frequency condition, search for the target Redis corresponding to the text message sending end in the short link pool, extract the target short link from the short links pre-stored in the target Redis, and allocate the target short link to the text message sending end; Judging whether the short link balance in the target Redis is not less than the short link requirement quantity corresponding to the text message sending request speed; If the short link balance is less than the short link requirement quantity, send a short link application request corresponding to the text message sending request speed 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.

[0007] Optionally, the monitoring of the text message sending request speed of the text message sending end includes: Using a counter to determine the text message sending request quantity of the text message sending end at each time point to determine the difference in the text message sending request quantity between adjacent time points; Determine the ratio of the difference value to the time interval between adjacent time points as the SMS sending request speed of the SMS sending end at each time point

[0008] Optionally, the determining the number of SMS sending requests of the SMS sending end at each time point by using a counter includes: Use a counter to determine the number of mobile phone numbers sent by the SMS sending end at the current time point, and determine the number of the mobile phone numbers sent at the current time point as the number of SMS sending requests at the current time point.

[0009] Optionally, the short link management method further includes: If the SMS sending request speed at the current time node is greater than the preset speed threshold, determine 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, determine that the SMS sending request speed at the current time node meets the preset high-frequency condition.

[0010] Optionally, the short link management method further includes: When the SMS sending request speed does not meet the preset high-frequency condition, monitor the short link balance in the target Redis at each time point; If the short link balance does not change at a continuous preset number of time points, destroy the short links in the target Redis and generate a short link destruction record.

[0011] Optionally, the short link management method further 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 SMS sending end; Save the short link storage record and / or the short link allocation record to a preset database based on the target index; Correspondingly, after generating the short link destruction record, it further includes: Determine the target index as the index of the short link destruction record; Save the short link destruction record to a preset database based on the target index.

[0012] Optionally, the sending a short link application request corresponding to the SMS sending request speed to the operation end to obtain each short link returned by the operation end based on the short link application request includes: Screen a target server instance from the cluster and add 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; Control the target server instance to send a short link application request corresponding to the SMS sending request speed to the operation end, and prohibit 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 link returned by the operation end based on the short link application request, and release the target distributed lock of the target server instance.

[0013] In a second aspect, the present application discloses a short link management device, including: A monitoring module, configured to monitor the SMS sending request speed of the SMS sending end; A short link allocation module, configured to, when the SMS sending request speed meets a preset high-frequency condition, search for a target Redis corresponding to the SMS sending end in the short link pool, extract a target short link from the short links pre-stored in the target Redis, and allocate the target short link to the SMS sending end; A judgment module, configured to judge whether the short link balance in the target Redis is not less than the short link required quantity corresponding to the SMS sending request speed; A short link application module, configured to, if the short link balance is less than the short link required quantity, send a short link application request corresponding to the SMS sending request speed 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.

[0014] In a third aspect, the present application discloses an electronic device, including: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the steps of the short link management method disclosed above.

[0015] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store 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.

[0016] The beneficial effects of this application are as follows: This application monitors the SMS sending request speed of the SMS sending end; when the SMS sending request speed meets the preset high-frequency condition, it searches for the target Redis corresponding to the SMS sending end in the short link pool, extracts the target short link from the short links pre-stored in the target Redis, and assigns the target short link to the SMS sending end; it judges whether the short link balance in the target Redis is not less than the short link requirement quantity corresponding to the SMS sending request speed; if the short link balance is less than the short link requirement quantity, it sends a short link application request corresponding to the SMS sending request speed to the operation end to obtain each short link returned by the operation end based on the short link application request, and stores each short link 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 relatively high, it searches for the target Redis corresponding to the SMS sending end in the short link pool, extracts the target short link from the short links pre-stored in the target Redis, and assigns the target short link to the SMS sending end. That is to say, when the SMS sending request speed of the SMS sending end is relatively high, if a short link is still applied to the operation end at this time, the operation end cannot generate a large number of short links in a short time, and the SMS sending end needs to wait, and the network load pressure is relatively large. Instead, the short links pre-stored in the target Redis are directly assigned to the SMS sending end without applying for short links from the operation end, which effectively reduces the time for waiting to allocate short links. And when the SMS sending request speed meets the preset high-frequency condition, if the short link balance in the target Redis is less than the short link requirement quantity corresponding to the SMS sending request speed, a short link is applied to the operation end, rather than waiting until there are no pre-stored short links in the target Redis before applying for short links, which effectively ensures that the SMS sending end can be allocated short links in time. Brief Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to the provided drawings.

[0018] Figure 1 It is a flowchart of a short link management method disclosed in this application; Figure 2 It is a schematic diagram of a specific short link destruction mechanism disclosed in this application; Figure 3 It is a schematic diagram of a specific short link scheduling disclosed in this application; Figure 4 It is a schematic diagram of a specific short link allocation disclosed in this application; Figure 5 Schematic diagram of a short-chain application disclosed in this application; Figure 6 Specific schematic diagram of a short-chain application disclosed in this application; Figure 7 Specific schematic diagram of a record filing disclosed in this application; Figure 8 Specific schematic diagram of a short-chain management disclosed in this application; Figure 9 Specific schematic diagram of collaborative management of short-chains between modules disclosed in this application; Figure 10 Schematic diagram of the structure of a short-chain management device disclosed in this application; Figure 11 Schematic diagram of the structure of an electronic device disclosed in this application. Specific implementation manners

[0019] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0020] 5G Read Message is a message sending method that sends rich media messages in the form of text messages. By embedding a short-chain in the text message, the mobile terminal can pull rich media message data from the server according to the short-chain and display it. The generation, distribution, and parsing of the 5G Read Message short-chain are centrally managed by the operation side. Therefore, before sending a 5G Read Message, the text message sender needs to obtain a short-chain from the operation side.

[0021] Different operation sides have different restrictions on the short-chains for applying for 5G Read Messages. Restricted by factors such as network load and system response time with the operator, the timeliness of sending a large number of messages is ultimately severely affected, and there is no time to apply for a 5G Read Message short-chain, resulting in congestion in the system.

[0022] Therefore, this application correspondingly provides a short-chain management solution, which can reduce the time required to allocate short-chains for text message senders.

[0023] See Figure 1 As shown, the embodiments of this application disclose a short-chain management method, including:

[0024] Step S11: Monitor the text message sending request speed of the text message sending end.

[0025] In a traditional sending scheme, the SMS sending end uses file sending. At this time, the operation end will use separate thread resources to prepare the 5G reading letter short link according to the number file first and then send it. However, this scheme can only meet the situation where the SMS sending end is the client web page, and it is not applicable to the SMS sending end that only uses the interface to send the 5G reading letter. In another traditional sending scheme, that is, the 5G reading letter short link preparation scheme, the data to be sent by the SMS sending end is known in advance manually, and the 5G reading letter short link is applied in advance and directly used during sending. First of all, this method is not applicable to the SMS sending end that will not give prior notice. Secondly, in the case of a large number of sendings, it will occupy a large amount of system storage. Finally, since it is not clear which mobile phone number will be sent first, all must be prepared, which will take a certain amount of time. If the SMS sending end does not send, it will waste manpower and material resources.

[0026] In this embodiment, monitoring 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 to determine the difference in the number of SMS sending requests between adjacent time points; 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.

[0027] Continuously monitor the sending situation of the SMS sending end to create a short link pool in a timely manner. First, the monitoring module will maintain a counter for the SMS sending end dimension. Use the counter to determine the number of SMS sending requests of the SMS sending end 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 that the number of SMS sending requests at the first time point is M0, the number of SMS sending requests at the second time point is M1, and the number of SMS sending requests at the third time point is 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. Further, 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 also needs to be determined. This ratio is the SMS sending request speed at the current time point. For example, the time interval between each adjacent time point is T, then the calculation formula for the SMS sending request speed is: ; where, V n is the SMS sending request speed at the current time point n, M n is the number of SMS sending requests at the current time point, and T is the time interval between adjacent time points.

[0028] In this way, the SMS sending request speed of the SMS sending end can be monitored in real time, and the SMS sending request speed can reflect the size of the SMS sending demand of the SMS sending end at different time points, that is, the customer service pressure can be perceived in real time.

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

[0030] It can be understood that the 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.

[0031] In this embodiment, it further includes: if the SMS sending request speed at the current time node is greater than the preset speed threshold, then determining an allowable speed offset based on the SMS sending request speed at the previous time node; determining 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.

[0032] Furthermore, since the SMS sending end may submit messages intermittently when submitting messages and may not be able to submit continuously and stably, that is, there may be a situation where the number of SMS sending requests at a certain time point suddenly increases but the number of SMS sending requests at subsequent time points returns to a smaller value. That is to say, when plotting the number of SMS sending requests at each time point 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 time point is very high, it will not be determined to meet the preset high-frequency condition. The customer's SMS sending may have intermittent fluctuations (such as sudden pauses or bursts). If the short link pool operation is directly triggered according to the single speed, it may cause short-term speed fluctuations to be misjudged as high load, resulting in unnecessary short link applications. The low-speed period may cover up the real 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, determining whether the absolute value of the difference between the SMS sending request speed V n-1 at the previous time node and the SMS sending request speed V n at the current time node exceeds the allowable speed offset F. If the absolute value of the difference does not exceed the allowable speed offset F, it is determined that the SMS sending request speed V nMeet 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 this time is not recorded; among them, the allowable speed offset F can be half of the SMS sending request speed at the previous time node, that is to say, .

[0033] In this embodiment, it further 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 does not change at a continuous preset number of time points, the short links in the target Redis are destroyed, and a short link destruction record is generated.

[0034] For example Figure 2 As shown in a specific schematic diagram of the short link destruction mechanism, when the SMS sending request 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 at a continuous preset number of time points, it means that there is no high concurrency demand at the SMS sending end and there are too many short links stored in the target Redis, which will cause unnecessary waste of short link resources. Therefore, in this case, the short links in the target Redis can be destroyed, that is, resource recycling is carried out to reduce storage costs and maintenance costs, and it can also avoid the situation of short link invalidation caused by long-term storage of unused short links. This process is initiated actively by the short link pool module and performs a self-check every certain period of time. Since the destruction is triggered when it is checked that the stock in the short link pool no longer changes, the time interval of the self-check should not be too short. The maintained short link pool is stored by customer dimension to prevent different customers and different sending speeds from affecting other customers.

[0035] Furthermore, if the short link balance changes at a continuous preset number of time points, it is necessary to determine whether the short link balance is sufficient. If it is not sufficient, it is necessary to supplement the short links in the target Redis. Calculate whether the number of short links in the target Redis is less than or equal to applyOneTime (i.e., the single replenishment quantity) * applyThreshold (the short link replenishment threshold). If the condition is met, the short link replenishment operation is performed, and the replenishment quantity is applyOneTime. That is to say, monitor the short link balance in the target Redis at each time point. If the short link balance changes at a continuous preset number of time points, then determine whether the short link balance in the target Redis is not greater than the product of the preset single replenishment quantity and the preset short link replenishment threshold. If the short link balance in the target Redis is not greater than the product of the preset single replenishment quantity and the preset short link replenishment threshold, it is determined that the short link balance in the target Redis is not sufficient, and it is necessary to apply for short links from the operation end based on the preset single replenishment quantity.

[0036] Step S12: When the SMS sending request speed meets the preset high-frequency condition, search for the target Redis corresponding to the SMS sending end in the short link pool, extract the target short link from the short links pre-stored in the target Redis, and assign the target short link to the SMS sending end.

[0037] When the SMS sending request speed meets the preset high-frequency condition, it indicates that the SMS sending end has high concurrency requirements. For example Figure 3 As shown in a specific short link scheduling schematic diagram, search for the target Redis corresponding to the SMS sending end in the short link pool. It can be understood that if the target Redis corresponding to the SMS sending end can be found in the short link pool, the target short link can be directly extracted from the short links pre-stored in the target Redis and assigned to the SMS sending end. If the target Redis corresponding to the SMS sending end cannot be found in the short link pool, it is necessary to create the target Redis corresponding to the SMS sending end in the short link pool and save the short link applied from the operation end to the target Redis.

[0038] It should be noted that each Redis in the short link pool corresponds to a different SMS sending end ID (identification information), that is, different Redis correspond to different SMS sending end IDs, and the index information of the Redis is the identification information of the SMS sending end. Therefore, the target Redis corresponding to it can be directly found in the short link pool according to the identification information of the SMS sending end.

[0039] For example Figure 4 As shown in a specific short link assignment schematic diagram, assign the target short link in the target Redis to the SMS sending end. The existence of the external access module is to simplify the usage logic of obtaining short links externally. Regardless of the status of the short link pool, a short link will be returned to the caller, so that the caller does not need to care about the status of the short link pool when applying for a short link, which mobile phone number is assigned to which short link, and other abnormal situations. Although this module will obtain short links from the short link pool module, it will not control the behavior of the short link pool, such as asking the short link pool to replenish short links, which needs to be processed by the scheduling module.

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

[0041] Such as Figure 3 As shown, it is necessary to continuously determine whether the remaining amount of short links in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed. That is to say, it is necessary to monitor whether the remaining amount of short links in the target Redis is sufficient.

[0042] Step S14: If the short link surplus is less than the required quantity of short links, send a short link application request corresponding to the speed of the SMS sending request 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.

[0043] For example Figure 5 As shown in a schematic diagram of a short link application, if the short link surplus is less than the required quantity of short links, it means that if the number of short links in the target Redis is not increased, the high concurrency requirements of the SMS sending end cannot be supported. Therefore, a short link application request corresponding to the speed of the SMS sending request 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, that is, try to keep enough short links stored in the target Redis to ensure the high concurrency requirements of the SMS sending end.

[0044] In this embodiment, the sending a short link application request corresponding to the speed of the SMS sending request to the operation end to obtain each short link returned by the operation end based on the short link application request includes: screening 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 sending end; controlling the target server instance to send the generated short link application request corresponding to the speed of the SMS sending request 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; obtaining each short link returned by the operation end based on the short link application request, and releasing the target distributed lock of the target server instance.

[0045] 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 links of one SMS sending end. For example, if server instance A is responsible for managing SMS sending end a, then server instance B cannot be responsible for managing SMS sending end a anymore. Otherwise, it may happen that two server instances apply for short links for SMS sending end a at the same time. Therefore, to prevent the situation of repeated submission of short link pool creation instructions, a distributed lock of Redis is used to achieve the effect that only one short link pool creation instruction exists at the same time. That is to say, the target server instance is screened from the cluster, and the 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 sending end. The target server instance is controlled to send a 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. Among them, the identification information of the short link application request is the same as the identification information of the SMS sending end. Each short link returned by the operation end based on the short link application request is obtained, and then the target distributed lock of the target server instance is released. In this way, there will be no situation where different server instances apply for short links for the same SMS sending end at the same time.

[0046] There will be only one monitoring task for a single service, reducing the probability of race conditions occurring during instruction creation among tasks to improve the instruction sending efficiency. For example Figure 6 As shown in a specific short link application schematic diagram, the data collector uses a monitoring component under the Spring framework system. It can default to provide some metrics and can also customize metrics, such as counting the total number of a certain data received and the processing speed of a certain behavior, etc. Combining with the message traffic monitoring algorithm, the buried point behavior can be carried out to achieve the purpose of monitoring the customer's message sending. When obtaining the processing speed of the corresponding customer, there will be a system configuration of a speed threshold. If it reaches this threshold continuously for multiple times (also a system configuration), a short link pool creation instruction will be initiated. In the creation instruction, in addition to the parameters for applying for short links from the operator, there will also be the following parameters: the number of short links replenished each time (applyOneTime) and the short link replenishment threshold (applyThreshold), providing a basis for how to replenish the short link pool.

[0047] In this embodiment, it further 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 sending end; saving the short link storage record and / or the short link allocation record to a preset database based on the target index.

[0048] Further, after storing the applied short link into the corresponding Redis, a short link storage record is generated. After allocating the short link to the corresponding SMS sending end, a short link allocation record is generated. Among them, various records of the short link are stored based on the identification information of the SMS sending end. That is to say, 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 the short link allocation record is saved to a preset database. Specifically, the preset database can be a Mysql database.

[0049] In this embodiment, after generating the short link destruction record, it further includes: determining the target index as the index of the short link destruction record; and saving the short link destruction record to a preset database based on the target index.

[0050] When destroying some short links, a destruction record of the destroyed short links is also created, and the short link destruction record is also stored in the preset database based on the identification information of the SMS sending end, that is, the short link destruction record is saved to the preset database based on the target index.

[0051] In this way, the short link records of different SMS sending ends are stored in the preset database. For example, the short link storage, allocation, destruction and other short link records of SMS sending end a, and the short link storage, allocation, destruction and other short link records of SMS sending end b. Then, these short link records can be traced.

[0052] For example Figure 7 As shown in a specific record filing schematic diagram, in the filing module, different filing contents are processed by different buffer queues and filing tasks. Different processing tasks have different processing parameters. For example, the filing task pressure of the short link is relatively large, and more resources will be allocated for it to process. When the service is shut down, for the data in the buffer queue, it will be all taken out by the corresponding filing task for rapid filing. If the remaining number is too large (configured according to the processing capacity of Mysql), serialization will be performed and wait for the next service startup for further processing. The filing module is responsible for storing the filing records, including each 5G read letter short link record and the trace record. If there is congestion during storage or database exception, delayed processing will be performed and wait for the next operation to reduce the pressure on Mysql and ensure that the data will not be lost.

[0053] The beneficial effects of this application are as follows: This application monitors the SMS sending request speed of the SMS sending end; when the SMS sending request speed meets the preset high-frequency condition, it searches for the target Redis corresponding to the SMS sending end in the short link pool, extracts the target short link from the short links pre-stored in the target Redis, and assigns the target short link to the SMS sending end; determines whether the short link balance in the target Redis is not less than the short link requirement quantity corresponding to the SMS sending request speed; if the short link balance is less than the short link requirement quantity, it sends a short link application request corresponding to the SMS sending request speed to the operation end to obtain each short link returned by the operation end based on the short link application request, and stores each short link 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 relatively high, it searches for the target Redis corresponding to the SMS sending end in the short link pool, extracts the target short link from the short links pre-stored in the target Redis, and assigns the target short link to the SMS sending end. That is to say, when the SMS sending request speed of the SMS sending end is relatively high, if it still applies for a short link from the operation end at this time, the operation end cannot generate a large number of short links in a short time, and the SMS sending end needs to wait, and the network load pressure is relatively large. Instead, directly assign the short links pre-stored in the target Redis to the SMS sending end without applying for a short link from the operation end, which effectively reduces the time for waiting to allocate short links. And when the SMS sending request speed meets the preset high-frequency condition, if the short link balance in the target Redis is less than the short link requirement quantity corresponding to the SMS sending request speed, it applies for a short link from the operation end, rather than waiting until there are no pre-stored short links in the target Redis before applying for a short link, which effectively ensures that the SMS sending end can be allocated short links in time.

[0054] The following takes Figure 8 A specific short link management schematic diagram shown as an example to make corresponding explanations for the creation of the short link pool and short link allocation of this application. The SMS sending end pushes the collected message sending monitoring data, that is, the number of mobile phone numbers sent by the SMS sending end at the current time point, to the short link pool service provider, that is, the short link management system. In this way, the short link management system can monitor the SMS sending request speed of the SMS sending end according to this data. When the SMS sending request speed meets the preset high-frequency condition, it searches for the target Redis corresponding to the SMS sending end in the short link pool. If not found, it creates a short link pool, that is, creates a target Redis corresponding to the SMS sending end in the short link pool, and applies for multiple short links from the operation end, and stores these short links in the created target Redis. At this time, it can respond to the short link application request of the SMS sending end, that is, return the corresponding short link to the SMS sending end.

[0055] For example Figure 9A schematic diagram of a specific inter-module collaborative management short link is shown. The short link pool service party 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 situation of the entire message, that is, monitoring the short message sending request speed of the short message sending end, so as to timely discover the situation that requires a large number of short link applications. There will be only one monitoring task for a single service, reducing the probability of race conditions occurring when creating instructions between tasks to improve the instruction sending efficiency. When the short message sending request speed meets the preset high-frequency condition, an instruction to trigger the response of the scheduling module is generated. When the scheduling module receives this instruction, it searches for the target Redis corresponding to the short message sending end in the short link pool. If it exists, it extracts the target short link from the short links pre-stored in the target Redis, assigns the target short link to the short message sending end, and determines whether the short link balance in the target Redis is not less than the short link requirement quantity corresponding to the short message sending request speed. If the short link balance is less than the short link requirement quantity or there is no target Redis corresponding to the short message sending end in the short link pool, a short link application request corresponding to the short message 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 each short link is stored in the created target Redis. That is, the scheduling module is mainly responsible for directly interacting 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 short link pool parameters, and the destruction of the short link pool. When replenishing the short link pool, checks are only carried out when applying for short links, creating a short link pool, or modifying short link pool parameters. This is a fallback behavior to avoid the short link pool module itself not being able to detect in time whether the inventory is sufficient, which is determined by the parameters specified when creating the short link pool, such as being specified as 50%. The scheduling module sends the short link trace record to the archiving module. The short link pool module stores the short links in the corresponding Redis and sends various generated short link records to the archiving module. The archiving module processes different archiving contents by different buffer queues and archiving tasks, and different processing tasks have different processing parameters. For example, the archiving task pressure of short links is relatively large, and more resources will be allocated for it to process. When the service is shut down, for the data in the buffer queue, all of it will be taken out by the corresponding archiving task for rapid archiving. If the remaining number is too large (configured according to the processing capacity of Mysql), it will be serialized and wait for the next service startup for further processing. The external access module is to simplify the usage logic of obtaining short links externally. Regardless of the status of the short link pool, it will return short links to the caller, so that the caller does not need to care about the status of the short link pool when applying for short links, which short link the mobile phone number is assigned to, and other abnormal situations. Although this module will obtain short links from the short link pool module, it will not control the behavior of the short link pool. For example, to let the short link pool replenish short links, it needs to be processed by the scheduling module.

[0056] It can be seen that this application reduces human intervention. There is no need for customers to give prior notice to prepare the 5G reading message short link in advance. The system automatically prepares the 5G reading message short link in advance, reducing the possibility of human errors and releasing productivity. At the same time, a certain space for human intervention is left to promptly correct abnormal situations occurring in the system. It has full-scenario coverage. Whether the customer sends a 5G reading message or a file through the interface, it can process the 5G reading message short link and will not consume too much time during the sending process. It occupies less resources and does not require the customer to wait until all 5G reading message short link applications are completed before sending. The system automatically monitors and automatically replenishes the 5G reading message short link.

[0057] See Figure 10 As shown, an embodiment of this application discloses a short link management device, including: A monitoring module 11, configured to monitor the short message sending request speed of the short message sending end; A short link allocation module 12, configured to, when the short message sending request speed meets a preset high-frequency condition, search for a target Redis corresponding to the short message sending end in the short link pool, extract a target short link from the short links pre-stored in the target Redis, and allocate the target short link to the short message sending end; A judgment module 13, configured to judge whether the remaining amount of short links in the target Redis is not less than the required number of short links corresponding to the short message sending request speed; A short link application module 14, configured to, if the remaining amount of short links is less than the required number of short links, send a short link application request corresponding to the short message sending request speed 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.

[0058] The beneficial effects of this application are as follows: This application monitors the SMS sending request speed of the SMS sending end; when the SMS sending request speed meets the preset high-frequency condition, it searches for the target Redis corresponding to the SMS sending end in the short link pool, extracts the target short link from the short links pre-stored in the target Redis, and assigns the target short link to the SMS sending end; it judges whether the remaining amount of short links in the target Redis is not less than the required number of short links corresponding to the SMS sending request speed; if the remaining amount of short links is less than the required number of short links, it sends a short link application request corresponding to the SMS sending request speed to the operation end to obtain each short link returned by the operation end based on the short link application request, and stores each short link in the target Redis. It can be seen from this 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 relatively high, it searches for the target Redis corresponding to the SMS sending end in the short link pool, extracts the target short link from the short links pre-stored in the target Redis, and assigns the target short link to the SMS sending end. That is to say, when the SMS sending request speed of the SMS sending end is relatively high, if it still applies for short links to the operation end at this time, the operation end cannot generate a large number of short links in a short time, and the SMS sending end needs to wait, and the network load pressure is relatively large. Instead, directly assign the short links pre-stored in the target Redis to the SMS sending end without applying for short links to the operation end, which effectively reduces the time for waiting to allocate short links. And when the SMS sending request speed meets the preset high-frequency condition, if the remaining amount of short links in the target Redis is less than the required number of short links corresponding to the SMS sending request speed, it applies for short links to the operation end, rather than waiting until there are no pre-stored short links in the target Redis before applying for short links, which effectively ensures that the SMS sending end can be allocated short links in time.

[0059] Further, the embodiment of this application also provides an electronic device. Figure 11 It is a structural diagram of the electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be regarded as any limitation on the scope of use of this application.

[0060] Figure 11 It is a schematic structural diagram of an electronic device provided by an embodiment of this application. Specifically, it 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. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the short link management method executed by the electronic device disclosed in any of the foregoing embodiments.

[0061] In this embodiment, the power supply 23 is used to provide operating voltages 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, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and no specific limitation is imposed thereon herein; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type thereof can be selected according to specific application requirements, and no specific limitation is imposed herein.

[0062] 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 may be implemented in at least one of the following hardware forms: 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 wake state, also known as the 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), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.

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

[0064] Among them, the operating system 221 is used to manage and control each hardware device and computer program 222 on the electronic device, so as to implement the operation and processing of the massive data 223 in the memory 22 by the processor 21. It can be Windows, Unix, Linux, etc. In addition to the computer program that can be used to complete the short-chain management method executed by the electronic device disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks. The data 223 may include not only the data transmitted by the external device received by the electronic device, but also the data collected by its own input / output interface 25, etc.

[0065] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the foregoing disclosed short-chain management method is implemented. For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0066] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part.

[0067] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application. The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal 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 disks, removable disks, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium well-known in the technical field.

[0068] Finally, it should also be noted that in this text, relational terms such as "first" and "second" are only used 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 term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0069] The above has introduced in detail a short-chain management method, device, equipment and medium provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A short-chain management method, characterized in that, 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 for 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 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.

2. The short-chain management method according to claim 1, wherein 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 to determine the difference in the number of SMS sending requests between adjacent time points; 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.

3. The short-chain management method according to claim 2, wherein The using of the counter to determine the number of SMS sending requests of the SMS sending end at each time point includes: Using a counter to determine the number of mobile phone numbers sent by the SMS sending end 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.

4. The short-chain management method according to claim 2, wherein Also including: If the SMS sending request speed at the current time node is greater than the preset speed threshold, determining the 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.

5. The short-chain management method according to claim 1, wherein, Also including: 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 does not change at a continuous preset number of time points, destroying the short links in the target Redis and generating a short link destruction record.

6. The short-chain management method according to claim 5, wherein, Also including: 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 sending end; Saving the short link storage record and / or the short link allocation record to a preset database based on the target index; Correspondingly, after generating the short link destruction record, it also includes: Determining the target index as the index of the short link destruction record; Saving the short link destruction record to a preset database based on the target index.

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

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

9. An electronic device, characterized in that, Includes: A memory, used to save a computer program; A processor, used 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 a computer program; wherein, when the computer program is executed by the 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 chain testing method, system, device and storage medium

    CN110475268A

  • Short link generation method and device

    CN115238209A

  • Short chain generation method, wireless communication method and device

    CN119255202A

  • System and method for assigning a senderid

    US20110294479A1