Short message issuing control method based on detection platform

By using high-performance local cache and unified detection portal in the SMS detection platform, combining refresh components and scheduling components, the problems of poor performance, high docking costs, high maintenance costs and poor fault tolerance in the existing technology are solved, and efficient SMS is achieved Improved detection and fault tolerance.

CN119211858APending Publication Date: 2024-12-27GUANGXI DONGXIN YITONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411346268.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing SMS detection platforms have poor performance, high docking costs, high maintenance costs and poor fault tolerance, making it difficult to cope with the challenges brought by high concurrency and interface changes.

Method used

Using local cache with higher performance than Redis, it uses unified detection portal, unified detection result format and status code, and combines refresh components and scheduling components to maintain the local information database, reducing docking costs and improving fault tolerance.

Benefits of technology

It realizes high-performance information query, reduces docking and maintenance costs, improves the stability and fault tolerance of the system, and ensures normal operation of the business when resource abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211858A_ABST
    Figure CN119211858A_ABST
Patent Text Reader

Abstract

The invention discloses a short message issuing control method based on a detection platform, belongs to the technical field of short message communication, and solves the technical problems of poor performance, high docking cost, high maintenance cost and poor fault tolerance in the prior art. The method comprises the steps that a main business adopts a local cache, information query with higher performance is realized through a reasonable data structure and a cache mode, and Redis serves as an auxiliary cache; by unifying a mobile phone detection entrance, a detection result format and a state code, the formats are summarized and converted into agreed formats, so that the docking work is simplified; a local information base is maintained in an inherent cache and refreshing cache mode, and then timely refreshing of the local information base is realized by a refreshing component and a scheduling component, so that extremely high accuracy can be realized while interface addresses and parameters are kept unchanged; by maintaining a local information library with high accuracy, normal use of services is not affected when a resource party or a resource library is abnormal, the operation and maintenance cost can be reduced, and the stability and fault tolerance can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of SMS communication, and more specifically, to a method for controlling the sending of SMS messages based on a detection platform. Background Art

[0002] At present, before sending a text message to a mobile phone number, a series of tests need to be performed on the mobile phone number to improve the delivery rate and reduce the complaint rate. There are many aspects of the test, such as whether it is a number that can be ported, whether it is a blacklist number, the sending time limit, the sending frequency limit, etc. Only when the test result shows that it can be sent, the text message will be sent to the corresponding mobile phone number to avoid complaints from mobile terminal users; the portability function can effectively improve the delivery rate.

[0003] The current technology has the following shortcomings:

[0004] 1. Poor performance: Many existing platforms have single functions. After a round of mobile phone detection, it may be necessary to call several different interfaces, which is time-consuming and difficult to cope with high-concurrency demand scenarios.

[0005] 2. High connection cost: Different interfaces return different parameter formats, status codes, etc., which require different processing, increasing the connection cost.

[0006] 3. High maintenance cost: Once the address or parameters of the connected interface change, the caller also needs to make corresponding adjustments, which increases the maintenance cost.

[0007] 4. Poor fault tolerance: Once a problem occurs on the resource side, the call will fail, which will affect the business. Summary of the invention

[0008] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art. The purpose of the present invention is to provide a method for controlling the sending of short messages based on a detection platform, which can effectively solve the existing problems of poor performance, high docking cost, high maintenance cost and poor fault tolerance.

[0009] The technical means of the present invention is: a method for controlling the sending of short messages based on a detection platform, which realizes higher-performance information query by adopting a local cache with higher performance than Redis for the main business, and uses Redis as an auxiliary cache through a reasonable data structure and cache mode;

[0010] By unifying the mobile phone detection entry, detection result format, and status code, various types of detection results are aggregated and converted into an agreed format to simplify the connection work;

[0011] A local information database is maintained through inherent cache + refresh cache, and the local information database is refreshed in time by the refresh component + scheduling component, ensuring that the interface address and parameters remain unchanged while maintaining extremely high accuracy.

[0012] By maintaining a highly accurate local information database, when anomalies occur in the resource party or resource library, the normal use of the business will not be affected. It is only necessary to ensure the stability of the local information database and service interface. This can reduce operation and maintenance costs and improve stability and fault tolerance.

[0013] As a further improvement, the cache model is as follows: create multiple groups of Hash Maps according to the content that needs to be detected; the key is grouped by the detection type and the first 3 digits of the mobile phone number, and the value uses Bit Set to store the corresponding last 8 digits of the mobile phone number.

[0014] Furthermore, Bit Set uses bit vectors to represent data internally, and one bit can represent a mobile phone number.

[0015] Furthermore, Bit Set also provides a variety of bit operation methods, including setting bits, clearing bits, flipping bits, and searching bits.

[0016] Furthermore, the mobile phone detection process includes:

[0017] Step 11. After receiving the request, first read the whitelist cache configured by the user from the cache, obtain the cached Bit Set based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in the Bit Set based on the last 8 digits of the mobile phone number. If it exists, it is considered as a whitelist and execute step 16; otherwise, execute step 12;

[0018] Step 12. Read the time zone restriction cache configured by the user from the cache, and then determine whether the current time is within the prohibited time zone. If yes, directly return a response indicating that it is not suitable to send SMS to the mobile phone number at present; otherwise, execute step 13;

[0019] Step 13. Read the frequency limit configured by the user from the cache, query the corresponding cache according to the frequency count and the first 3 digits of the mobile phone number, obtain the cached Bit Set, and then determine whether the current mobile phone number is in this Bit Set according to the last 8 digits of the mobile phone number. If it is, it is determined to be overclocked and a response indicating that it is not suitable for sending SMS is returned; if it is not in the Bit Set, query the number of times sent in the Redis cache, and if it is overclocked, return overclocked, and synchronize the Redis data to the Bit Set cache of each server; if it is not overclocked, increase the number of times sent by 1, and then refresh it to the Redis cache and the Bit Set cache of each server at the same time, and execute step 14;

[0020] Step 14. Read the public blacklist cache from the cache, obtain the cached public blacklist Bit Set based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in this Bit Set based on the last 8 digits of the mobile phone number. If it is, directly return to the public blacklist restriction, and at the same time push the mobile phone number and whether it is blacklisted to the refresh component and the scheduling component for cache judgment update processing; otherwise, execute step 15;

[0021] Step 15. Read the blacklist cache configured by the user from the cache, obtain the cached user blacklist Bit Set based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in this Bit Set based on the last 8 digits of the mobile phone number. If it is, directly return the user blacklist restriction, and push the mobile phone number to the refresh component and the scheduling component for cache judgment and update processing; otherwise, execute step 16;

[0022] Step 16. Check whether the number is ported. Determine the original operator of the mobile phone number based on the first 3 or 4 digits of the mobile phone number. Get the Bit Set corresponding to the non-original operator from the cache. Determine whether the mobile phone number is in the cache based on the last 8 digits of the mobile phone number. If it is in the cache, it is a ported number and return the corresponding real operator. If not, it is considered a non-ported number. At the same time, push the mobile phone number and whether the number is ported to the refresh component and the scheduling component for cache judgment and update processing.

[0023] Furthermore, the number processing process of the refresh component and the scheduling component includes:

[0024] Step 21. After receiving the number pushed by the detection platform, check the Redis cache according to Refresh_mobile number. If it exists, discard it and process the next number. If it does not exist, record it in Redis and save the first set time, which is used to control a number to refresh only once within the first set time. At the same time, treat the number as an active number, record it in the Redis cache, and save the second set time.

[0025] Step 22. Get the number refresh type. If you want to refresh the public blacklist, push the number to the blacklist scheduling component. The blacklist scheduling component chooses which resource library to call to query the blacklist status of the number according to the configured weight;

[0026] The resource library returns whether the number is a public blacklist number, and then compares it with the blacklist number transmitted by the detection platform; if they are the same, it means that the blacklist information has not changed, so it is discarded and the next number is processed; if there is a change, the latest status of the number is pushed to the detection platform and the cache is refreshed;

[0027] If you want to refresh whether to transfer the number, go to step 23;

[0028] Step 23. Push the number to the dispatching component of the number portability information, and the dispatching component of the number portability information selects which resource library to call to query the number portability status according to the configured weight;

[0029] The resource library returns whether the number is ported and which network it has been ported to, and then compares it with the network it has been ported to from the detection platform. If they are the same, it means that the porting information has not changed, so it is discarded and the next number is processed. If there is a change, the latest status of the number is pushed to the detection platform and the cache is refreshed.

[0030] Step 24. When the user adjusts his / her blacklist, whitelist, sending time limit, and sending frequency limit, the configuration component will immediately push the latest configuration information to the detection platform for refreshing the cache;

[0031] Step 25. The refresh cache component polls and scans the active numbers generated in step 21, calls the scheduling component to query the latest information, and refreshes the cache to ensure the timeliness of the data and improve the accuracy.

[0032] Furthermore, the first set time is 5 minutes, and the second set time is 1 day.

[0033] Beneficial Effects

[0034] Compared with the prior art, the present invention has the following advantages:

[0035] 1. The performance of the present invention is high, and almost all of them are memory operations. In a few cases, Redis cache will be called. Memory operations are all in microseconds, and a single node with 8-core CPU is sufficient to support tens of thousands of concurrency.

[0036] 2. The docking cost of the present invention is low, and only the detection interface of the docking detection platform needs to be connected. Various types of detection results and information of various resource libraries are uniformly packaged by the detection platform, and the caller does not need to worry about them.

[0037] 3. The present invention has low maintenance cost. When the address and parameters of the resource library change, only the scheduling component and the refresh component need to be adjusted. The application-oriented detection platform does not need to make any adjustments, nor does it need to adjust the application components.

[0038] 4. The present invention has high fault tolerance. It only needs to ensure the stability of the detection platform. Problems with other subsequent components, including the resource library, will not affect the normal operation of the detection platform, nor will it affect the application layer and business. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flowchart for calling the detection platform to detect the number;

[0040] Figure 2 A flowchart for a refresh component receiving a number refresh request;

[0041] Figure 3 A flowchart for a refresh component to refresh data spontaneously and receive user-adjusted refresh data;

[0042] Figure 4 Flowchart for querying data for the scheduling component. DETAILED DESCRIPTION

[0043] The present invention will be further described below with reference to the specific embodiments in the accompanying drawings.

[0044] See also Figure 1 to Figure 4 ,A method for controlling the delivery of SMS based on the detection platform, by using a local cache with higher performance than Redis for the main business, a higher performance information query can be achieved through a reasonable data structure and cache mode, and using Redis as an auxiliary cache can improve the performance;

[0045] By unifying the mobile phone detection entry, detection result format, and status code, various types of detection results are aggregated and converted into an agreed format to simplify the docking work and reduce the docking cost;

[0046] A local information database is maintained through inherent cache + refresh cache, and the local information database is refreshed in time by the refresh component + scheduling component, ensuring that the interface address and parameters remain unchanged while maintaining extremely high accuracy.

[0047] By maintaining a highly accurate local information database, when anomalies occur in the resource party or resource library, the normal use of the business will not be affected. It is only necessary to ensure the stability of the local information database and service interface. This can reduce operation and maintenance costs and improve stability and fault tolerance.

[0048] The cache model is as follows: create multiple groups of Hash Maps according to the content that needs to be detected; the key is grouped by the detection type and the first 3 digits of the mobile phone number, and the value uses Bit Set to store the corresponding last 8 digits of the mobile phone number.

[0049] Bit Set uses bit vectors to represent data internally. One bit can represent a mobile phone number, which can greatly save memory space and is suitable for storing large amounts of phone number data.

[0050] Bit Set also provides a variety of bit operation methods, including setting bits, clearing bits, flipping bits, and searching bits. These operations are all memory operations, with microsecond read and write speeds and extremely high performance.

[0051] In this embodiment, the mobile phone detection process includes the following steps 11 to 16:

[0052] Step 11. After receiving the request, first read the user-configured whitelist cache from the cache. The whitelist cache is: <whitelist_user ID, <first 3 digits of the number, Bit Set>>. Get the cached Bit Set based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in the Bit Set based on the last 8 digits of the mobile phone number. If it exists, it is considered as a whitelist, and execute step 16 to directly query the portability information and return; otherwise, execute step 12.

[0053] Step 12. Read the time zone restriction cache configured by the user from the cache. The time zone restriction cache is: <time limit_user ID, List<start time_end time>>. Then determine whether the current time is within the prohibited time zone. If yes, directly return a response that it is not suitable to send SMS to the mobile phone number at present; otherwise, execute step 13.

[0054] Step 13. Read the user-configured frequency limit from the cache, and query the corresponding cache based on the frequency count and the first 3 digits of the mobile phone number. The frequency cache is: <Frequency limit_User ID_Limited times, <First 3 digits of the number, Bit Set>>. Get the cached Bit Set, and then determine whether the current mobile phone number is in this Bit Set based on the last 8 digits of the mobile phone number. If it is, it is judged to be overclocked and a response is returned that it is not suitable for sending text messages. If it is not in the Bit Set, query the number of times the Redis cache has been sent. If it is overclocked, it returns overclocking, and synchronizes the Redis data to the Bit Set cache of each server. If it is not overclocked, add 1 to the number of times it is sent, and then refresh it to the Redis cache and the Bit Set cache of each server at the same time, and execute step 14.

[0055] Step 14. Read the public blacklist cache from the cache. The public blacklist cache is: <public blacklist, <first 3 digits of the number, Bit Set>. Get the cached public blacklist Bit Set based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in this Bit Set based on the last 8 digits of the mobile phone number. If it is, directly return to the public blacklist restriction, and push the mobile phone number and whether it is in the blacklist to the refresh component and the scheduling component for cache judgment and update processing; otherwise, execute step 15.

[0056] Step 15. Read the user-configured blacklist cache from the cache: <blacklist_user ID, <first 3 digits of number, Bit Set>. Get the cached user blacklist Bit Set based on the first 3 digits of the mobile phone number, and then determine whether it is in this Bit Set based on the last 8 digits of the mobile phone number. If it is, directly return the user blacklist restriction, and push the mobile phone number to the refresh component and the scheduling component for cache judgment and update processing; otherwise, execute step 16.

[0057] Step 16. Check whether the number is ported, and determine the original operator of the mobile phone number based on the first 3 or 4 digits of the mobile phone number. For example, if it is a mobile number, obtain the corresponding Bit Set from the cache: <Port_China Unicom, <First 3 digits of the number, Bit Set>> and <Port_China Telecom, <First 3 digits of the number, Bit Set>>. That is, obtain the Bit Set corresponding to the non-original operator from the cache, and determine whether it is in the cache based on the last 8 digits of the mobile phone number. If it is in the cache, it is a ported number, and the corresponding real operator is returned; if not, it is regarded as a non-ported number; at the same time, the mobile phone number and whether the number is ported are pushed to the refresh component and the scheduling component for cache judgment and update processing.

[0058] The process of processing numbers by the refresh component and the dispatch component includes steps 21 to 25:

[0059] Step 21. Receive the number pushed by the detection platform, check the Redis cache according to Refresh_mobile number, if it exists, discard it and process the next number; if it does not exist, record it in Redis and save the first set time, which is used to control a number to refresh at most once within the first set time. At the same time, treat the number as an active number, the active number is: Active_mobile number, record it in the Redis cache, and save the second set time. In this embodiment, the first set time is 5 minutes and the second set time is 1 day.

[0060] Step 22. Get the number refresh type. If you want to refresh the public blacklist, push the number to the blacklist scheduling component. The blacklist scheduling component chooses which resource library to call to query the blacklist status of the number based on the configured weight.

[0061] The resource library returns whether the number is a public blacklist number, and then compares it with the blacklist number transmitted by the detection platform; if they are the same, it means that the blacklist information has not changed, so it is discarded and the next number is processed; if there is a change, the latest status of the number is pushed to the detection platform and the cache is refreshed.

[0062] If you want to refresh whether to transfer the number, go to step 23.

[0063] Step 23: Push the number to the dispatch component of the number portability information, and the dispatch component of the number portability information selects which resource library to call to query the number portability status according to the configured weight.

[0064] The resource library returns whether the number has been ported and which network it has been ported to, and then compares it with the network it has been ported to from the detection platform. If they are the same, it means that the porting information has not changed, so it is discarded and the next number is processed. If there is a change, the latest status of the number is pushed to the detection platform and the cache is refreshed.

[0065] Step 24. When the user adjusts his or her blacklist, whitelist, sending time limit, and sending frequency limit, the configuration component will immediately push the latest configuration information to the detection platform to refresh the cache.

[0066] Step 25. The refresh cache component polls and scans the active numbers generated in step 21, calls the scheduling component to query the latest information, and refreshes the cache to ensure the timeliness of the data and improve the accuracy.

[0067] This method is almost entirely memory operation, and in a few cases, Redis cache will be called. Memory operations are all in microseconds, and a single node with 8-core CPU is sufficient to support tens of thousands of concurrency. It only needs to connect to the detection interface of the detection platform. Various types of detection results and information of each resource library are uniformly packaged by the detection platform, and the caller does not need to care. When the address and parameters of the resource library change, only the scheduling component and the refresh component need to be adjusted. The application-oriented detection platform does not need to make any adjustments, nor does it need to adjust the application components. It only needs to ensure the stability of the detection platform. Problems with other subsequent components, including the resource library, will not affect the normal operation of the detection platform, nor will they affect the application layer and business.

[0068] The above are only preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent.

Claims

1. A method for controlling the sending of short messages based on a detection platform, characterized in that: By using local cache with higher performance than Redis for the main business, higher performance information query can be achieved through reasonable data structure and cache mode, and Redis can be used as auxiliary cache; By unifying the mobile phone detection entry, detection result format, and status code, various types of detection results are aggregated and converted into an agreed format to simplify the connection work; A local information database is maintained through inherent cache + refresh cache, and the local information database is refreshed in time by the refresh component + scheduling component, ensuring that the interface address and parameters remain unchanged while maintaining extremely high accuracy. By maintaining a highly accurate local information database, when anomalies occur in the resource party or resource library, the normal use of the business will not be affected. It is only necessary to ensure the stability of the local information database and service interface. This can reduce operation and maintenance costs and improve stability and fault tolerance.

2. According to a method for controlling the sending of short messages based on a detection platform according to claim 1, it is characterized in that: The cache model is as follows: create multiple groups of Hash Maps according to the content that needs to be detected; the key is grouped by the detection type and the first 3 digits of the mobile phone number, and the value uses Bit Set to store the corresponding last 8 digits of the mobile phone number.

3. According to the method for controlling the sending of short messages based on a detection platform according to claim 2, it is characterized in that: BitSet uses bit vectors to represent data internally, and one bit can represent a mobile phone number.

4. According to a method for controlling the sending of short messages based on a detection platform according to claim 2, it is characterized in that: BitSet also provides a variety of bit operation methods, including setting bits, clearing bits, flipping bits, and searching bits.

5. According to a method for controlling the sending of short messages based on a detection platform according to claim 1, it is characterized in that: The mobile phone detection process includes: Step 11. After receiving the request, first read the whitelist cache configured by the user from the cache, obtain the cached Bit Set based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in the Bit Set based on the last 8 digits of the mobile phone number. If it exists, it is considered as a whitelist and execute step 16; otherwise, execute step 12; Step 12. Read the user-configured time zone restriction cache from the cache, and then determine whether the current time is within the prohibited time zone. If yes, directly return a response indicating that it is not currently suitable to send SMS to the mobile phone number; otherwise, execute step 13; Step 13. Read the frequency limit configured by the user from the cache, query the corresponding cache according to the frequency count and the first 3 digits of the mobile phone number, obtain the cached Bit Set, and then determine whether the current mobile phone number is in this Bit Set according to the last 8 digits of the mobile phone number. If it is, it is determined to be overclocked and a response indicating that it is not suitable for sending SMS is returned; if it is not in the Bit Set, query the number of times sent in the Redis cache, and if it is overclocked, return overclocked, and synchronize the Redis data to the Bit Set cache of each server; if it is not overclocked, increase the number of times sent by 1, and then refresh it to the Redis cache and the Bit Set cache of each server at the same time, and execute step 14; Step 14. Read the public blacklist cache from the cache, obtain the cached public blacklist BitSet based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in this BitSet based on the last 8 digits of the mobile phone number. If it is, directly return to the public blacklist restriction, and at the same time push the mobile phone number and whether it is blacklisted to the refresh component and the scheduling component for cache judgment update processing; otherwise, execute step 15; Step 15. Read the blacklist cache configured by the user from the cache, obtain the cached user blacklist Bit Set based on the first 3 digits of the mobile phone number, and then determine whether the mobile phone number is in this Bit Set based on the last 8 digits of the mobile phone number. If it is, directly return the user blacklist restriction, and push the mobile phone number to the refresh component and the scheduling component for cache judgment and update processing; otherwise, execute step 16; Step 16. Check whether the number is ported. Determine the original operator of the mobile phone number based on the first 3 or 4 digits of the mobile phone number. Get the Bit Set corresponding to the non-original operator from the cache. Determine whether the mobile phone number is in the cache based on the last 8 digits of the mobile phone number. If it is in the cache, it is a ported number and return the corresponding real operator. If not, it is considered a non-ported number. At the same time, push the mobile phone number and whether the number is ported to the refresh component and the scheduling component for cache judgment and update processing.

6. A method for controlling the sending of short messages based on a detection platform according to claim 1, characterized in that: The number processing process of the refresh component and the dispatch component includes: Step 21. After receiving the number pushed by the detection platform, check the Redis cache according to Refresh_mobile number. If it exists, discard it and process the next number. If it does not exist, record it in Redis and save the first set time, which is used to control a number to refresh only once within the first set time. At the same time, treat the number as an active number, record it in the Redis cache, and save the second set time. Step 22. Get the number refresh type. If you want to refresh the public blacklist, push the number to the blacklist scheduling component. The blacklist scheduling component chooses which resource library to call to query the blacklist status of the number according to the configured weight; The resource library returns whether the number is a public blacklist number, and then compares it with the blacklist number transmitted by the detection platform; if they are the same, it means that the blacklist information has not changed, so it is discarded and the next number is processed; if there is a change, the latest status of the number is pushed to the detection platform and the cache is refreshed; If you want to refresh whether to transfer the number, go to step 23; Step 23. Push the number to the dispatching component of the number portability information, and the dispatching component of the number portability information selects which resource library to call to query the number portability status according to the configured weight; The resource library returns whether the number is ported and which network it has been ported to, and then compares it with the network it has been ported to from the detection platform. If they are the same, it means that the porting information has not changed, so it is discarded and the next number is processed. If there is a change, the latest status of the number is pushed to the detection platform and the cache is refreshed. Step 24. When the user adjusts his / her blacklist, whitelist, sending time limit, and sending frequency limit, the configuration component will immediately push the latest configuration information to the detection platform for refreshing the cache; Step 25. The refresh cache component polls and scans the active numbers generated in step 21, calls the scheduling component to query the latest information, and refreshes the cache to ensure the timeliness of the data and improve the accuracy.

7. A method for controlling the sending of short messages based on a detection platform according to claim 6, characterized in that: The first set time is 5 minutes, and the second set time is 1 day.