Information transmission method, electronic device, and program product
By using a full-variable template mechanism and real-time status monitoring, the problems of high template maintenance costs and insufficient security control in SMS sending platforms are solved, achieving low-cost, efficient information sending and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KE COM (BEIJING) TECHNOLOGY CO LTD
- Filing Date
- 2026-06-16
- Publication Date
- 2026-07-31
AI Technical Summary
Maintaining templates from multiple service providers in SMS sending platforms leads to high template maintenance costs, difficulties in selection and switching, complex system implementation, and insufficient security control.
A full-variable template mechanism is adopted, which matches the corresponding business template content through the business template identifier, converts it into a format that conforms to the target service provider, and fills it into the full-variable template to generate the information to be sent. This simplifies the process of connecting multiple service providers and performs security audits and real-time status monitoring to select and optimize service providers.
It reduces the access cost for service users, simplifies template maintenance and integration processes, improves the success rate and stability of information transmission, and ensures security and compliance.
Smart Images

Figure CN122496783A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to information transmission methods, electronic devices, and program products. Background Technology
[0002] In SMS sending platform application scenarios, multiple roles such as service users, SMS sending platforms, service providers, operators, and target user terminals are involved in collaboration. To standardize SMS content, an SMS template mechanism is introduced. The template contains custom variable placeholders, and the service user carries the variable values when sending to complete the replacement and achieve accurate delivery.
[0003] In existing technologies, when interfacing with multiple service providers, SMS sending platforms or service users need to maintain templates provided by multiple service providers, even though the content of these templates is essentially the same. However, the large number of templates to maintain leads to high maintenance costs, difficulties in selecting and switching service providers, complex system implementation, and insufficient security controls. Therefore, a low-cost, high-efficiency message sending solution is needed. Summary of the Invention
[0004] This disclosure provides information transmission methods, electronic devices, and program products.
[0005] According to a first aspect of this disclosure, an information sending method is provided. The method specifically includes: responding to an information sending request carrying a business template identifier issued by a service user; matching corresponding business template content according to the business template identifier; and determining a target service provider; converting the business template content into template content conforming to the target service provider's all-variable template format; and filling the template content into the all-variable template to generate information to be sent, so that the target service provider can send the information to be sent.
[0006] According to the above solution, by isolating the differences in template specifications among service providers through business templates, service users do not need to understand the template requirements of each service provider. They only need to use the business template identifier uniformly assigned by the platform to initiate a request, which greatly reduces the access cost for service users. At the same time, the SMS sending platform adapts to different service providers through fully variable templates, eliminating the need to apply for exclusive business templates from multiple service providers for the same business scenario, thus simplifying the process of connecting with multiple service providers.
[0007] According to at least one embodiment of this disclosure, before matching the corresponding business template content based on the business template identifier and determining the target service provider, the method further includes: applying to multiple service providers for a full-variable template containing a single variable placeholder; assigning a business template identifier to the service user; and determining the correspondence between the business template content fed back by each service user and the business template identifier; wherein the business template content contains at least one business variable placeholder.
[0008] According to the above solution, by requesting only one full-variable template with a unified format (single variable placeholder) from multiple service providers, the template format specifications of all service providers are ensured to be consistent. This provides a foundation for the unified conversion and adaptation of subsequent business template content, avoiding increased adaptation complexity due to differences in service provider template formats. The SMS sending platform only needs to maintain one full-variable template for each connected service provider, effectively reducing the maintenance difficulty and workload of the SMS sending platform.
[0009] According to at least one embodiment of this disclosure, in response to an information sending request carrying a business template identifier issued by a service user, matching the corresponding business template content according to the business template identifier and determining the target service provider includes: in response to an information sending request issued by a service user, searching for the corresponding business template content according to the business template identifier; and determining the corresponding business template type according to the business template identifier; wherein the information sending request includes: a business template identifier and a business variable value; and selecting the target service provider according to the business template type.
[0010] According to the above solution, based on the association strategy between business template type and service provider channel, SMS messages for different business scenarios are matched with service providers that have corresponding advantages (e.g., verification codes are matched with high-stability service providers, and notifications are matched with low-cost service providers), thereby improving the SMS delivery success rate while controlling operating costs. Through pre-selected service providers and real-time status monitoring, a quick switch can be made when the preferred service provider is abnormal, ensuring the stable performance of the information delivery service.
[0011] Determining the correspondence between the business template content and the business template identifier reported by each service user according to at least one embodiment of this disclosure includes: responding to a business template creation request submitted by a service user, the business template creation request including: a business template identifier and business template content; performing a security audit on the business template content to verify whether it contains illegal content; if the verification result is that it does not contain illegal content, then storing the business template content and the business template identifier together.
[0012] According to the above plan, multi-dimensional security audits are conducted through the SMS sending platform to intercept illegal content, thereby avoiding uncontrollable risks caused by the distribution of illegal SMS messages and ensuring the compliance of business operations.
[0013] According to at least one embodiment of this disclosure, selecting a target service provider based on a business template type includes: configuring a template type identifier for each business template type, wherein the business template type includes at least one of verification code type, notification type, and marketing type; constructing a mapping table between each template type identifier and each service provider channel, wherein the mapping table contains status information of each service provider channel; in response to an information sending request sent by a service user, querying the template type identifier corresponding to the business template identifier; and selecting a target service provider from multiple candidate service providers based on the template type identifier and the current status information of the service provider channel.
[0014] According to the above solution, by differentiating business template types and selecting service provider channels accordingly, service providers with different capabilities and characteristics can be chosen as target service providers based on different business template types, thereby enabling better execution of information sending tasks. Furthermore, it improves the system's fault tolerance and stability; when a service provider channel fails, the platform can quickly switch to a backup channel based on the template type.
[0015] According to at least one embodiment of this disclosure, a target service provider is selected from multiple candidate service providers based on template type identifier and current service provider channel status information, including: monitoring the real-time status information of each service provider channel; when an abnormal status of the current service provider channel is detected, switching the verification code type business template to the target service provider channel with normal status information according to a preset degradation strategy; when the sending volume of the marketing type business template exceeds a threshold, allocating subsequent requests to the target service provider channel with lower cost; recording the service provider selection result each time, and dynamically adjusting the service provider priority based on historical success rate.
[0016] According to the above solution, by setting a degradation strategy for service provider selection based on different business types (verification code type, marketing type), the information sending needs of different business types can be better met. Furthermore, by recording historical success rates and dynamically adjusting service provider priorities, the SMS sending platform can continuously learn and adapt to changes in service provider quality, avoiding the problem of decreased SMS delivery rates caused by fluctuations in service provider quality.
[0017] According to at least one embodiment of this disclosure, converting business template content into a single variable value conforming to the full variable template format of the target service provider includes: parsing each business variable placeholder in the business template content; filling each business variable value provided in the information sending request into the corresponding business variable placeholder; and assigning the filled business template content as a single variable value to the single variable placeholder according to the format of the full variable template.
[0018] According to the above solution, by sending the complete content as a single variable value, the high maintenance cost caused by each service provider maintaining multiple different business templates is resolved. Secondly, all content review and variable replacement in this solution are completed internally by the platform, avoiding the security risks of exposing sensitive business content to multiple service providers. Furthermore, since all service providers use full-variable templates, when a service provider needs to be changed, the platform only needs to assign the filled-in complete content to the new service provider's full-variable template placeholder, without requiring the service user to reapply for a template ID or modify code.
[0019] According to at least one embodiment of this disclosure, the method further includes: in response to a service user's request to disable a service template, after verifying the validity of the permission for the request, marking the corresponding service template identifier as disabled; if a received information sending request carries a service template identifier marked as disabled, rejecting the information sending request.
[0020] According to the above solution, this solution enables enterprises to immediately block the use of a template after discovering security issues (such as containing sensitive information or illegal content) through an instant disabling mechanism, thereby preventing the large-scale sending of problematic text messages and significantly improving template management efficiency and capabilities.
[0021] According to a second aspect of this disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, such that the processor performs a first aspect of any embodiment of this disclosure.
[0022] According to a third aspect of this disclosure, a readable storage medium is provided, wherein executable instructions are stored therein, which, when executed by a processor, are used to implement a first aspect of any embodiment of this disclosure.
[0023] According to a fourth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements a first aspect of any embodiment of this disclosure. Attached Figure Description
[0024] The accompanying drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0025] Figure 1 This is a flowchart illustrating the information sending method provided in an embodiment of the present disclosure.
[0026] Figure 2 A flowchart illustrating the basic information configuration method provided in this embodiment of the disclosure.
[0027] Figure 3 This is a flowchart illustrating the method for determining a target service provider provided in an embodiment of this disclosure.
[0028] Figure 4 This is a flowchart illustrating the method for establishing the correspondence between identifiers and content provided in the embodiments of this disclosure.
[0029] Figure 5 This is a flowchart illustrating the method for selecting a target service provider as provided in an embodiment of the present disclosure.
[0030] Figure 6 This is a schematic flowchart illustrating a method for selecting a target service provider according to an embodiment of the present disclosure.
[0031] Figure 7 This is a flowchart illustrating the template content conversion method provided in this embodiment of the disclosure.
[0032] Figure 8 This is a flowchart illustrating the template disabling method provided in an embodiment of this disclosure.
[0033] Figure 9 This is a flowchart illustrating the information sending and interaction process as an example of an embodiment of this disclosure.
[0034] Figure 10 This is a schematic block diagram of an information transmission device according to one embodiment of the present disclosure.
[0035] Figure 11 This is a schematic block diagram of an electronic device according to one embodiment of the present disclosure. Detailed Implementation
[0036] The present disclosure will now be described in further detail with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the accompanying drawings.
[0037] It should be noted that, where there is no conflict, the embodiments and features described in this disclosure can be combined with each other. The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0038] First, let's briefly explain the information sending system. This system includes service users (i.e., users) who need to send information, an SMS sending platform, service providers, telecommunications operators, and receivers. Service users refer to the internal business systems or users of the enterprise that initiate the SMS sending request. The SMS sending platform is the core platform deployed within the enterprise, used to connect with service users, manage business templates, adapt to multiple service provider channels, and complete SMS sending scheduling. Service providers are those with SMS delivery qualifications and capable of connecting with telecommunications operators to complete SMS transmission. Telecommunications operators are communication service companies that provide fixed-line telephones, mobile phones, and internet access; in this solution, they are used to execute the task of sending SMS messages to receivers (e.g., mobile phones, smartwatches, etc.).
[0039] Figure 1 This is a flowchart illustrating the information transmission method provided in an embodiment of this disclosure. Figure 1 The method shown includes steps S101 to S103. This method can be executed by an SMS sending platform.
[0040] Specifically, Figure 1 The method shown includes step S101: Step S101: In response to the information sending request carrying the business template identifier sent by the service user, match the corresponding business template content according to the business template identifier, and determine the target service provider.
[0041] It should be noted that the full-variable template mentioned here refers to the full-variable template that the SMS sending platform applies to each service provider for, which only contains a single variable placeholder and has no fixed business text. The full-variable template is used to adapt to the service provider's interface specifications and the telecommunications operator's filing requirements. For example, the template content is "{#content}".
[0042] It should be noted that the business template identifier mentioned here refers to a string or code uniformly assigned by the SMS sending platform to uniquely identify an SMS template for a specific business scenario, such as "captcha" (corresponding to the verification code scenario). The information sending request mentioned here refers to a request initiated by the service user that contains the necessary parameters for SMS sending. This request includes at least the business template identifier, business variable values (placeholders matching the business template), and the target mobile phone number.
[0043] In practical applications, when a user triggers the operation of obtaining a corporate login verification code, the service user initiates a message sending request to the SMS sending platform through the business device. This request is transmitted via an HTTP interface and may include: the business template identifier "captcha", the business variable value (code=123456, minute=5), and the target mobile phone number "18888888888".
[0044] After receiving the request, the SMS sending platform's request processing module first verifies the validity of each parameter carried in the request (e.g., verifying the existence of the business template identifier and the completeness of variable values). Once the verification is successful, it queries the local template management database using the business template identifier to quickly match the corresponding business template content.
[0045] In addition, the SMS sending platform determines the template type based on the matched business template content and queries the local "template type - service provider channel" mapping table (pre-configured: verification code templates are preferentially assigned to high-stability service provider channels). If the SMS sending platform detects that a service provider's channel status is normal and the response latency is below the threshold, it determines that service provider as the target service provider for this SMS message.
[0046] Step S102: Convert the business template content into template content that conforms to the target service provider's full-variable template format.
[0047] In practical applications, the SMS sending platform parses the matched business template content and identifies the business variable placeholders, such as "{#code}" and "{#minute}".
[0048] Subsequently, the corresponding business variable values are extracted from the information sending request. Then, the business variable value code=123456 is filled into the business variable placeholder "{#code}", and the business variable value minute=5 is filled into the business variable placeholder "{#minute}", thereby generating complete business SMS content, such as "[Verification Code] Your verification code is 123456. Please complete the login verification within 5 minutes."
[0049] Furthermore, the complete business SMS content (i.e., the business template content) is used as a single variable value to generate a single variable value that conforms to the full variable template format of the target service provider A. That is, the content of the single variable value is "[Verification Code] Your verification code is 123456. Please complete the login verification within 5 minutes", which is used to fill the "{#content}" placeholder in the full variable template of the target service provider.
[0050] Step S103: Fill the template content into the full variable template to generate the message to be sent, so that the target service provider can send the message. Next, the service provider (e.g., supplier) can choose a telecommunications operator to send the message to the terminal device (e.g., mobile phone, smartwatch, etc.) in the form of SMS or MMS.
[0051] The SMS sending platform retrieves the full variable template of the target service provider (assuming the full template is identified as "provider_A" and its content is "{#content}"). It then fills the "{#content}" placeholder in the full variable template with the single variable value "[Verification Code] Your verification code is 123456. Please complete the login verification within 5 minutes" obtained earlier, generating the message to be sent: "[Verification Code] Your verification code is 123456. Please complete the login verification within 5 minutes."
[0052] Furthermore, the SMS sending platform initiates an SMS delivery request to the target service provider through an interface protocol agreed upon with the target service provider (such as HTTP+JSON format). This request includes the identifier "provider_A" of the target service provider's full-variable template, the generated message to be sent, and the target mobile phone number "18888888888". After receiving the request, the target service provider verifies that the relevant parameters are correct, submits the message to be sent to the corresponding telecom operator, and finally the telecom operator delivers the SMS to the target user's terminal.
[0053] Based on the publicly available solutions mentioned above, by isolating service providers' template specifications through business templates, service users do not need to understand the template requirements of each service provider. They only need to use the business template identifier uniformly assigned by the platform to initiate a request, which greatly reduces the access cost for service users. At the same time, the SMS sending platform adapts to different service providers through fully variable templates, eliminating the need to apply for exclusive business templates from multiple service providers for the same business scenario, thus simplifying the process of connecting with multiple service providers.
[0054] In one or more embodiments of this disclosure, such as Figure 2 This is a flowchart illustrating the basic information configuration method provided in the embodiments of this disclosure. Figure 2 As shown in step S101, before matching the corresponding business template content based on the business template identifier and determining the target service provider, the method further includes: Step S201: Requesting only one full-variable template containing a single variable placeholder from each of the multiple service providers. Step S202: Assigning the business template identifier to the service user. And, Step S203: Determining the correspondence between the business template content returned by each service user and the business template identifier; wherein, the business template content contains at least one business variable placeholder.
[0055] In practical applications, the SMS sending platform connects to multiple different service providers (e.g., service provider A, service provider B, and service provider C), and establishes a unified standard for applying for all-variable templates (e.g., the template must include a single variable placeholder for adapting to general SMS content filling). Subsequently, based on a preset service provider connection order (different weight values can be assigned to different service providers according to indicators such as channel stability and service price, allowing for ranking of multiple service providers according to their weight values), the SMS sending platform sequentially initiates all-variable template application requests to each service provider. Each service provider's application request message uniformly includes enterprise qualification information, a description of the template's purpose (adapting to general SMS delivery), and template format requirements (containing only a single variable placeholder).
[0056] After receiving the application for a business template, the SMS sending platform verifies the completeness of the application materials submitted by each service user, confirming that the business scenario description is clear and the business template content format is compliant (including at least one business variable placeholder). Upon successful verification, a unique business template identifier is assigned to each service user according to a preset coding rule (e.g., "Business Scenario Abbreviation_Service User Identifier_Serial Number"): the identifier "captcha_login_001" is assigned to the verification code template for service user 1, and the identifier "notice_order_001" is assigned to the order notification template for service user 2. After the generated business template identifier undergoes uniqueness verification by the platform (e.g., it can be used to query the template management database to ensure no duplicate identifiers), the platform returns the corresponding business template identifier to the respective service user via an interface, while simultaneously recording the identifier allocation log (including allocation time, service user information, and the purpose of the corresponding template) for subsequent traceability and management.
[0057] After assigning business template identifiers to service users, a mapping relationship is established between each business template identifier and its content. This mapping relationship can then be stored as key-value pairs in the business template table of the template management database, where the key is the business template identifier and the value is the corresponding business template content. This is accompanied by additional information such as storage service user information, content confirmation time, and review status.
[0058] Based on the publicly available solutions described above, by applying for a unified format (single variable placeholder) full-variable template from multiple service providers, the template format specifications of all service providers are ensured to be consistent. This provides a foundation for the unified conversion and adaptation of subsequent business template content, avoiding increased adaptation complexity due to differences in service provider template formats. The SMS sending platform only needs to maintain one full-variable template for each connected service provider, effectively reducing the maintenance difficulty and workload of the SMS sending platform.
[0059] In one or more embodiments of this disclosure, such as Figure 3 This is a flowchart illustrating the method for determining a target service provider provided in an embodiment of this disclosure. Figure 3 As shown, step S102, which involves responding to an information sending request carrying a service template identifier sent by a service user, matching the corresponding service template content based on the service template identifier, and determining the target service provider, includes: Step S1021: Responding to an information sending request sent by a service user, searching for the corresponding service template content based on the service template identifier. And, Step S1022: Determining the corresponding service template type based on the service template identifier; wherein, the information sending request includes: a service template identifier and a service variable value. Step S1023: Selecting the target service provider based on the service template type.
[0060] In practical applications, after receiving a message sending request from the service user, the system further queries the local template management database (e.g., a MySQL database) for the key-value pair relationship between the "business template identifier and the business template content," using the business template identifier as the retrieval key. To improve subsequent processing efficiency, the SMS sending platform can also cache the retrieved business template content in a Redis cache (with a 30-minute cache validity period) to avoid repeated database queries.
[0061] In addition, the SMS sending platform also pre-establishes a "business template identifier - business template type" association configuration table in the template management database, that is, establishes the correspondence between business template identifier and business template type.
[0062] After finding the business template content, the system performs a related query on the aforementioned configuration table. For example, using "captcha_login_001" as the search key, it retrieves the corresponding template type code 01 and type name "verification code". If the corresponding type cannot be found (e.g., the business template identifier has not completed type configuration), the platform triggers an exception handling process, thereby ensuring that each business template has a clear type affiliation.
[0063] In practical applications, a "business template type - service provider channel" mapping table can be pre-built on the SMS sending platform to clearly define the preferred service provider, alternative service providers, and selection priorities for different template types. For example, for verification codes: preferred service provider A (99.9% channel stability, ensuring timely delivery of verification codes), alternative service provider B; for notifications: preferred service provider B (15% lower cost than the industry average, controlling notification SMS costs), alternative service provider A. Although different service provider ranking (degradation strategy) methods are established for different template types, each service provider has only one fully variable template, which does not increase the template maintenance burden of the SMS sending platform and can effectively improve the sending efficiency of different types of information and reduce sending costs.
[0064] It should be noted that, in order to ensure the selection of a suitable service provider, the status of the service provider's channel can also be monitored. For example, a timed polling mechanism (polling every 5 seconds) can be used to obtain the real-time status (normal / abnormal), response latency, current sending volume, and other indicators of the service provider's channel by calling the status query interface of each service provider. This will allow for a more scientific and accurate selection of the appropriate target service provider when choosing between providers.
[0065] Based on the publicly available solutions described above, the association strategy between business template type and service provider channel ensures that SMS messages for different business scenarios are matched with service providers that offer corresponding advantages (e.g., verification codes are matched with high-stability service providers, and notifications are matched with low-cost service providers), thereby improving SMS delivery success rates while controlling operating costs. Through pre-selected service providers and real-time status monitoring, a rapid switch can be made when the preferred service provider experiences an anomaly, ensuring stable message delivery service performance.
[0066] In one or more embodiments of this disclosure, such as Figure 4 This is a flowchart illustrating the method for establishing the correspondence between identifiers and content provided in embodiments of this disclosure. Figure 4 As shown, step S1013, determining the correspondence between the business template content and the business template identifier submitted by each service user, includes: Step S401: Responding to the business template creation request submitted by the service user, the business template creation request includes: business template identifier and business template content. Step S402: Performing a security audit on the business template content to verify whether it contains any illegal content. Step S403: If the verification result is that it does not contain any illegal content, then the business template content is associated with and stored with the business template identifier.
[0067] In practical applications, after obtaining the business template identifier assigned by the SMS sending platform, the service user submits a business template creation request to the platform. Upon receiving the request, the SMS sending platform parses the template creation request, extracts the core parameters using a JSON parsing tool (such as FastJSON), and verifies whether the request contains the complete "business template identifier (which is pre-assigned to the service user by the SMS sending platform)" and "business template content." If any parameters are missing, an error message is returned directly, and the subsequent process is terminated. If the parameters are complete, subsequent security audit steps are triggered. During the security audit, it can check for prohibited or sensitive words, and can also use artificial intelligence models for semantic auditing. For example, if no prohibited keywords are matched after the scan, the semantic analysis determines it is compliant, and the audit result is "passed." If the template content submitted by a service user contains "Click the link to receive high cash, no repayment required," the keyword matches "no repayment required" (a prohibited term), the audit result is "failed," and an error message and specific prohibited content are returned.
[0068] After the SMS sending platform verifies the content of the business template as a violation and passes the verification, it will establish and store the correspondence between the business template content and the business template identifier. This allows for easy retrieval of the corresponding business template content based on the business template identifier in the future.
[0069] Based on the publicly available solutions mentioned above, sending receipts via SMS allows for multi-dimensional security audits to intercept illegal content, preventing uncontrollable risks caused by the issuance of illegal SMS messages and ensuring the compliance of business operations.
[0070] In one or more embodiments of this disclosure, such as Figure 5 This is a flowchart illustrating the method for selecting a target service provider as provided in an embodiment of this disclosure. Figure 5 As shown, step S1023, selecting the target service provider based on the business template type, includes: configuring a template type identifier for each business template type, where the business template type includes at least one of verification code type, notification type, and marketing type; step S501: constructing a mapping table between each template type identifier and each service provider channel, wherein the mapping table contains the status information of each service provider channel; step S502: responding to an information sending request sent by the service user, querying the template type identifier corresponding to the business template identifier; step S503: selecting the target service provider from multiple candidate service providers based on the template type identifier and the current status information of the service provider channel.
[0071] In practical applications, the SMS sending platform first configures a template type identifier for each business template type. This process occurs during the stage when the service user creates the SMS template. When a service user applies to create an SMS template on the SMS sending platform, in addition to providing the template content, they also need to specify the business template type to which the template belongs. The SMS sending platform assigns a corresponding template type identifier to the template based on the characteristics of the business template content or the service user's selection.
[0072] After assigning template type identifiers, the SMS sending platform further constructs a mapping table between each template type identifier and each service provider's channel. This mapping table not only records the correspondence between template types and service provider channels but also includes real-time status information for each service provider's channel. This service provider channel status information is obtained through periodic probing and real-time monitoring, including metrics such as API response status, SMS delivery rate, and channel load. This status information is dynamically updated in the mapping table to ensure that service provider selection decisions are based on the latest data, thereby enabling the selection of the most suitable target service provider.
[0073] When a service user sends a message sending request, the SMS sending platform first queries the template type identifier corresponding to the business template identifier in the request. This query operation is based on the template information centrally maintained by the SMS sending platform, avoiding the complex process of querying template information from multiple service providers as required by traditional solutions.
[0074] Based on the template type identifier and the current service provider channel status information recorded in the mapping table, the SMS sending platform selects the most suitable target service provider from multiple alternative service providers. During the selection process, a more flexible degradation strategy must be implemented while ensuring high service stability and controllable costs. For example, for verification code templates, the SMS sending platform prioritizes service provider channels with a "high delivery rate" and "normal status" to ensure users receive verification codes promptly. If the selected service provider's channel status becomes abnormal, it automatically switches to a backup high-stability channel. This dynamic selection mechanism based on template type and service provider channel status allows the SMS sending platform to dynamically adjust its service provider strategy according to different business needs, ensuring the stability of critical business operations while optimizing overall costs.
[0075] Based on the publicly available solutions described above, by differentiating business template types and selectively choosing service provider channels, the system can select service providers with different capabilities and characteristics as target service providers according to different business template types, thereby enabling better execution of information sending tasks. Furthermore, it enhances the system's fault tolerance and stability; when a service provider channel fails, the platform can quickly switch to a backup channel based on the template type.
[0076] In one or more embodiments of this disclosure, such as Figure 6 This is a schematic flowchart illustrating a method for selecting a target service provider according to an embodiment of this disclosure. Figure 6 As shown, step S503, which selects a target service provider from multiple candidate service providers based on the template type identifier and the current service provider channel's status information, includes: Step S601: Monitoring the real-time status information of each service provider channel. Step S602: When an abnormal status is detected in the current service provider channel, the verification code type business template is switched to the target service provider channel with normal status information according to a preset degradation strategy. Step S603: When the sending volume of the marketing type business template exceeds a threshold, subsequent requests are allocated to the target service provider channel with lower cost. Step S604: Recording each service provider selection result and dynamically adjusting the service provider priority based on historical success rates.
[0077] In practical applications, when the SMS sending platform detects an abnormal status of the current service provider's channel, it will switch to a backup service provider with normal status as the target service provider according to a preset degradation strategy. For example, if the SMS sending platform detects that the API response timeout rate of service provider A's channel exceeds 80% for 5 consecutive minutes, it is determined to be in an abnormal state. At this time, for all verification code type business template requests, the SMS sending platform will no longer use service provider A's channel, but will switch to the backup channel according to the preset degradation strategy.
[0078] It's important to note that the degradation strategy can be configured to prioritize the available service provider with the highest historical delivery rate, or it can be configured to consistently switch to the high-stability channel of service provider B. This avoids the problem of SMS messages failing to be sent due to the failure of a single service provider, as seen in traditional solutions. Furthermore, the SMS sending platform maintains a library of degradation strategies for different template types. For example, for verification codes, the degradation strategy is typically set to immediately switch to a backup high-stability channel if the primary channel fails, while marketing SMS messages can tolerate a short delay. When the SMS sending platform detects that the sending volume of marketing-type business templates exceeds a threshold, the platform will intelligently allocate subsequent requests to the target service provider channel with lower cost.
[0079] Furthermore, the SMS sending platform continuously records each service provider selection result and dynamically adjusts service provider priorities based on historical success rates. The platform maintains detailed success rate statistics for each service provider channel, including SMS submission success rate, operator reception success rate, and end-user actual reception success rate. When adjusting service provider priorities based on historical success rates, not only overall data but also template type are considered, significantly improving the overall quality and cost-effectiveness of the SMS service.
[0080] Based on the publicly available solutions, it is evident that by implementing a downgrade strategy for service provider selection based on different business types (verification code type, marketing type), the information delivery needs of different business types can be better met. Furthermore, by recording historical success rates and dynamically adjusting service provider priorities, the SMS sending platform can continuously learn and adapt to changes in service provider quality, avoiding the problem of decreased SMS delivery rates caused by fluctuations in service provider quality.
[0081] In one or more embodiments of this disclosure, such as Figure 7 This is a flowchart illustrating the template content conversion method provided in this embodiment of the disclosure. Figure 7 As shown, step S103, converting the business template content into a single variable value conforming to the target service provider's full-variable template format, includes: Step S1031: Parsing each business variable placeholder in the business template content. Step S1032: Filling the corresponding business variable placeholders with the business variable values provided in the information sending request. Step S1033: Assigning the business variable values carried in the filled business template content to the single variable placeholders according to the full-variable template format.
[0082] In practical applications, the SMS sending platform first parses the placeholders for each business variable in the business template content. This is the foundation for converting the business template into a full-variable template format. When the platform receives an SMS sending request from the service user, it locates the corresponding business template content based on the business template identifier in the request. Then, it performs syntax analysis on the content to identify all business variable placeholders. The parsing algorithm can be selected as needed. For example, it can use regular expression matching in the {#\w+} pattern to recognize business variable placeholders in various formats, while handling special character escape sequences to avoid misidentifying ordinary text in the template as variable placeholders.
[0083] Furthermore, the SMS sending platform fills the corresponding business variable placeholders with the values of each business variable provided in the message sending request, forming the complete business SMS content. Based on the variable placeholder list parsed in the previous step, the SMS sending platform extracts the corresponding business variable values from the message sending request and replaces them in the business template content according to their position order. This filling operation not only performs simple string replacement but also includes necessary data validation and formatting. For example, it checks whether the business variable values conform to preset rules (e.g., verification codes must be 6 digits), escapes special characters to prevent content truncation or tampering, and ensures that the generated complete SMS content complies with operator specifications. This rigorous filling mechanism guarantees the accuracy and compliance of the SMS content, avoiding the SMS content anomalies caused by variable replacement errors in traditional methods.
[0084] The SMS sending platform assigns the business variable values carried in the populated business template content to the single variable placeholders according to the format of the full variable template, completing the format conversion for the target service provider. The SMS sending platform then directly assigns the complete business SMS content generated in the previous step as a single string to the single variable placeholder in the full variable template. By simplifying various business type templates previously scattered across multiple service providers into a unified full variable template, the SMS sending platform allows service providers to handle only the simple full variable templates. Service providers do not need to understand any business logic.
[0085] Based on the publicly available solutions described above, sending the complete content as a single variable value solves the problem of high maintenance costs caused by each service provider maintaining multiple different business templates. Secondly, all content review and variable replacement in this solution are completed internally by the platform, avoiding the security risks of exposing sensitive business content to multiple service providers. Furthermore, since all service providers use full-variable templates, when a service provider needs to be changed, the platform only needs to assign the filled-in complete content to the new service provider's full-variable template placeholder, without requiring the service user to reapply for a template ID or modify code.
[0086] In one or more embodiments of this disclosure, such as Figure 8 This is a flowchart illustrating the template disabling method provided in an embodiment of this disclosure. Figure 8 As shown, it also includes: Step 801: In response to a service user's request to disable a service template, after verifying the validity of the permission for the request, the corresponding service template identifier is marked as disabled. Step 802: If a received information sending request carries a service template identifier marked as disabled, the information sending request is rejected.
[0087] In practical applications, when a service user submits a request to disable a service template, the SMS sending platform, after verifying the validity of the request, marks the corresponding service template as disabled. For example, the service user can submit a disable request to the SMS sending platform through the management interface or API.
[0088] Specifically, the template disabling request includes the identifier of the business template to be disabled. Upon receiving the request, the SMS sending platform immediately initiates an authorization verification process to check whether the service user submitting the request has the authority to disable the template. Authorization verification can employ a multi-dimensional verification mechanism, such as confirming whether the service user is the creator of the template, whether they are an administrator of the business line to which the template belongs, or whether they have global template management permissions. After successful verification, the SMS sending platform updates the status of the business template identifier to disabled. This operation is completed only internally within the platform and does not require notification to any service provider, effectively improving template management efficiency.
[0089] When the platform receives a text message request from a service user, it queries the template status based on the business template identifier in the request. If the status is disabled, the processing flow is immediately terminated, a clear error message is returned to the service user (e.g., the template has been disabled, please contact the administrator), and the rejection event is recorded.
[0090] Based on the publicly available solutions mentioned above, this solution enables enterprises to immediately block the use of templates upon discovering security issues (such as the inclusion of sensitive information or illegal content) through an immediate disabling mechanism, thereby preventing the large-scale sending of problematic text messages and significantly improving template management efficiency and capabilities.
[0091] To facilitate understanding, the implementation scheme of this application will be described below through specific embodiments. For example... Figure 9 This is a flowchart illustrating the information sending and interaction process, exemplified by an embodiment of this disclosure. For example... Figure 9 As shown, in step S901: When the SMS sending platform connects to the new service provider 1 platform, it requests a full variable template from the service provider 1 platform. In step S902: The SMS sending platform receives the full variable template from the service provider 1. This full variable template includes, for example, the full variable template id as provider_1 and the full variable template content as {#content} (i.e., a single variable).
[0092] Step S903: The user (equivalent to the service user mentioned earlier) applies to create an SMS template (equivalent to the business template mentioned earlier) on the SMS sending platform. Step S904: The SMS sending platform sends the business template to the user, which includes, for example: Business template ID: captcha, template content: [Verification Code] Your verification code is {#code}, please complete the login verification within {#minute} minutes.
[0093] Step S905: The user initiates a request to send an SMS message on the SMS sending platform. The request includes the following information: business template ID: captcha, code: 123456, minute: 5, and mobile number: 18888888888.
[0094] Step S906: After receiving the request, the SMS sending platform finds the business template content corresponding to the business template ID and selects a suitable service provider based on the business template type. Here, we assume that service provider 1 is selected.
[0095] Step S907: The SMS sending platform packages the SMS content (i.e., the filled-in business template content) and sends an SMS sending request to service provider 1. This request includes: template id (all variables): provider_1; content: [Verification Code] Your verification code is 123456. Please complete the login verification within 5 minutes. Mobile number: 18888888888.
[0096] Step S908: After receiving the request, Service Provider 1 uses the value of the content variable to construct the template. Since it is a full variable template, the final SMS content is: [Verification Code] Your verification code is 123456. Please complete the login verification within 5 minutes. It is no longer necessary to fill in variable values one by one.
[0097] Step S909: The operator sends an SMS message to the template terminal.
[0098] As demonstrated by the above embodiments, using an SMS platform to maintain business templates eliminates the differences in interface specifications between different service providers. This allows service users to operate without needing to be aware of the template configuration requirements from the service provider's side. They only need to create a business template containing at least one business variable placeholder based on their own business needs. The management and approval of business templates are handled by the SMS sending platform. Furthermore, each service provider provides its own fully variable template, which is applicable to various business types, improving the template maintenance efficiency of the SMS sending platform.
[0099] By converting the content of the business template after filling in business variable values into a single variable value of the full variable template, the same business template can be reused for multiple service provider channels, achieving decoupling between the business layer and the service provider adaptation layer and the ability to intelligently schedule multiple service provider channels.
[0100] Based on any of the above embodiments, this disclosure also provides an information transmission device. Figure 10 This is a schematic block diagram of an information transmitting device according to one embodiment of the present disclosure. Figure 10 As shown, the information sending device includes: The determination module 1002 is used to respond to the information sending request carrying the business template identifier sent by the service user, match the corresponding business template content according to the business template identifier, and determine the target service provider.
[0101] Conversion module 1003 is used to convert business template content into single variable values that conform to the target service provider's full-variable template format. And, The generation module 1004 is used to fill the single variable value into the full variable template to generate the information to be sent, so that the target service provider can send the information to the telecommunications operator.
[0102] The template processing module 1001 is used to apply to multiple service providers for a full-variable template containing a single variable placeholder; to assign a business template identifier to the service user; and to determine the correspondence between the business template content and the business template identifier fed back by each service user; wherein the business template content contains at least one business variable placeholder.
[0103] The determination module 1002 is used to respond to an information sending request sent by a service user, find the corresponding business template content based on the business template identifier, and determine the corresponding business template type based on the business template identifier; wherein, the information sending request includes: a business template identifier and a business variable value; and selects a target service provider based on the business template type.
[0104] The determination module 1002 is also used to respond to the business template creation request submitted by the service user. The business template creation request includes: business template identifier and business template content; to perform security audit on the business template content to verify whether it contains illegal content; if the verification result is that it does not contain illegal content, then the business template content is associated with the business template identifier and stored.
[0105] The determination module 1002 is also used to configure a template type identifier for each business template type, wherein the business template type includes at least one of verification code type, notification type and marketing type; construct a mapping relationship table between each template type identifier and each service provider channel, wherein the mapping relationship table contains the status information of each service provider channel; in response to the information sending request sent by the service user, query the template type identifier corresponding to the business template identifier; and select the target service provider from multiple candidate service providers based on the template type identifier and the current status information of the service provider channel.
[0106] The determination module 1002 is also used to monitor the real-time status information of each service provider channel; when an abnormal status of the current service provider channel is detected, the verification code type business template is switched to the target service provider channel with normal status information according to the preset degradation strategy; when the sending volume of the marketing type business template exceeds the threshold, subsequent requests are allocated to the target service provider channel with lower cost; the service provider selection results are recorded each time, and the service provider priority is dynamically adjusted based on the historical success rate.
[0107] The conversion module 1003 is used to parse the business variable placeholders in the business template content; fill the corresponding business variable placeholders with the business variable values provided in the information sending request; and assign the filled business template content as a single variable value to the single variable placeholder according to the format of the full variable template.
[0108] Optionally, it also includes a disabling module 1005, which is used to respond to a service user's request to disable a service template. After verifying that the permission of the service template disabling request is valid, the corresponding service template identifier is marked as disabled. If the received information sending request carries a service template identifier marked as disabled, the information sending request is rejected.
[0109] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0110] The entity executing the information sending method in the specific embodiments of this disclosure may be an electronic device such as a server (including a local server or a cloud computing platform).
[0111] Therefore, based on any of the above embodiments, this disclosure also provides an electronic device that can execute the information transmission method of any of the embodiments described above.
[0112] Figure 11 This is a schematic block diagram of an electronic device according to one embodiment of the present disclosure.
[0113] The hardware architecture of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnect buses and bridges, depending on the specific application of the hardware and overall design constraints. Bus 1100 connects various circuits, including one or more processors 1200, memory 1300, and / or hardware modules. Bus 1100 can also connect various other circuits 1400, such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0114] Bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one connection line is used in this diagram, but this does not imply that there is only one bus or only one type of bus.
[0115] This disclosure also provides a readable storage medium storing a computer program that, when executed by a processor, is used to implement the methods described above. A "readable storage medium" can be any means capable of containing, storing, communicating, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples of a readable storage medium include: an electrical connection with one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable read-only memory (CDROM), etc.
[0116] This disclosure also provides a computer program product, the methods of which can be implemented wholly or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, all or part of the processes or functions of this disclosure are performed.
[0117] Computer programs or instructions can be stored in a readable storage medium or transferred from one readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The readable storage medium can be any available medium capable of access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or it can include both volatile and non-volatile types of storage media.
[0118] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0121] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0122] In the description of this specification, the references to terms such as "one embodiment / mode," "some embodiments / modes," "example," "specific example," or "some examples," etc., refer to specific features, structures, or characteristics described in connection with that embodiment / mode or example, which are included in at least one embodiment / mode or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment / mode or example. Moreover, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments / modes or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments / modes or examples described in this specification, as well as the features of different embodiments / modes or examples.
[0123] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0124] Those skilled in the art should understand that the above embodiments are merely for illustrating the present disclosure and are not intended to limit the scope of the disclosure. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present disclosure.
Claims
1. A method for sending information, characterized in that, The method includes: In response to a service user's request to send information carrying a service template identifier, the system matches the corresponding service template content based on the service template identifier and determines the target service provider. Convert the business template content into template content that conforms to the full-variable template format of the target service provider; and The template content is filled into the full variable template to generate the message to be sent, so that the target service provider can send the message to be sent.
2. The information transmission method according to claim 1, characterized in that, Before matching the corresponding business template content based on the business template identifier and determining the target service provider, the process also includes: Request a full variable template containing a single variable placeholder from each of the multiple service providers; Assign the service template identifier to the service user, and, Determine the correspondence between the business template content reported by each service user and the business template identifier; wherein the business template content contains at least one business variable placeholder.
3. The information transmission method according to claim 1, characterized in that, The step of responding to the information sending request carrying the service template identifier sent by the service user, matching the corresponding service template content according to the service template identifier, and determining the target service provider includes: In response to the information sending request sent by the service user, the corresponding service template content is located based on the service template identifier; and, The corresponding business template type is determined based on the business template identifier; wherein, the information sending request includes: the business template identifier and the business variable value; Select the target service provider based on the business template type.
4. The information transmission method according to claim 2, characterized in that, Determining the correspondence between the service template content reported by each service user and the service template identifier includes: In response to a business template creation request submitted by the service user, the business template creation request includes: the business template identifier and the business template content; The content of the business template is subject to security audit to verify whether it contains any illegal content; If the verification result indicates that no illegal content is found, the business template content is stored in association with the business template identifier.
5. The information transmission method according to claim 3, characterized in that, The step of selecting the target service provider based on the business template type includes: Configure a template type identifier for each of the aforementioned business template types, wherein the business template type includes at least one of verification code type, notification type, and marketing type; Construct a mapping table between each template type identifier and each service provider channel, wherein the mapping table contains the status information of each service provider channel; In response to the information sending request sent by the service user, query the template type identifier corresponding to the service template identifier; Based on the template type identifier and the current service provider channel status information, the target service provider is selected from multiple alternative service providers.
6. The information transmission method according to claim 5, characterized in that, The step of selecting the target service provider from multiple candidate service providers based on the template type identifier and the current service provider channel status information includes: Monitor the real-time status information of each service provider's channels; When an abnormal status is detected in the current service provider channel, the business template of the verification code type is switched to the target service provider channel with normal status information according to the preset degradation strategy. When the number of marketing-type business templates sent exceeds the threshold, subsequent requests will be routed to the target service provider channel with lower cost.
7. The information transmission method according to claim 1, characterized in that, The step of converting the business template content into template content that conforms to the full-variable template format of the target service provider includes: Parse the placeholders for each business variable in the business template content; Fill the corresponding business variable placeholders with the business variable values provided in the information sending request; The filled-in business template content is used as a single variable value and assigned to the single variable placeholder according to the format of the full variable template.
8. The information transmission method according to claim 1, characterized in that, Also includes: In response to a service user's request to disable a service template, once the permissions of the request to disable the service template are verified to be valid, the corresponding service template identifier will be marked as disabled. If the received information sending request carries the service template identifier that is marked as disabled, the information sending request is rejected.
9. An electronic device, characterized in that, include: The memory stores execution instructions; as well as, A processor that executes execution instructions stored in the memory, causing the processor to perform the method of any one of claims 1 to 8.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.