Short message template configuration system, method and device and storage medium
By introducing statistics modules and interpolation modules into the SMS template configuration system, the efficiency and compatibility problems of traditional SMS template components in handling special characters and editing are solved, and more efficient SMS generation and length calculation are achieved.
Patent Information
- Application Number
- CN202510155586.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-06
AI Technical Summary
Traditional SMS template components are difficult to accurately calculate the length of SMS text when processing special characters, and there are duplicate operations when editing SMS templates, resulting in low efficiency in generating SMS and poor compatibility in length calculations.
Provide a SMS template configuration system, including a display module, an interpolation module and a statistical module. The statistics module recognizes and replaces special characters in the text message, calculates the replaced text length to determine the remaining characters and the number of text messages. The interpolation module automatically determines and fills the interpolation variable when the user triggers the interpolation action to reduce repeated operations.
By accurately processing special characters, the accuracy and compatibility of text length calculation of text messages are improved, the repetitive operations of business personnel are reduced, and the efficiency of generating text messages based on text messages templates is improved.
Smart Images

Figure CN119940333A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software design technology, and in particular to a text message template configuration system, method, device and storage medium. Background Art
[0002] With the rapid development of mobile communication technology, SMS has been widely used in all walks of life as a simple and fast communication method. Especially in scenarios where information needs to be quickly transmitted, operations need to be confirmed, or users need to be reminded, SMS services play an indispensable role. In order to meet the needs of different business scenarios, SMS templates have emerged, which allow business personnel to quickly generate SMS content that meets specific formats and requirements through preset templates.
[0003] However, as SMS application scenarios continue to expand and become more complex, traditional SMS template components have gradually exposed some problems. In particular, it is difficult to accurately calculate the length of SMS text when processing special characters, and because there are some repeated operations when editing SMS templates, the efficiency of generating SMS based on SMS templates is low and the length calculation compatibility is poor. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above technical defects, especially the traditional SMS template components in the prior art gradually expose some problems. In particular, it is difficult to accurately calculate the length of the SMS text when processing special characters, and because there are some repeated operations when editing SMS templates, the efficiency of generating SMS based on SMS templates is low and the length calculation compatibility is poor.
[0005] In a first aspect, the present application provides a SMS template configuration system, the system comprising a display module, an interpolation module and a statistics module;
[0006] The statistical module is used to detect that the text content in the text box of the display module is updated, identify the special characters in the text content, replace the special characters in the text content with preset characters, and calculate the text length based on the replaced text content to determine the number of remaining characters and the number of text messages;
[0007] The display module is used to edit and display the text content of the SMS text box and to display the number of remaining characters and the number of SMS messages in real time;
[0008] The interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action, and after determining the location of the cursor in the SMS text box, fill the interpolation variable into the location of the cursor.
[0009] In one embodiment, the interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action, including:
[0010] When the interpolation module detects that the user triggers the interpolation action, it determines the text box identifier corresponding to the text box according to the short message text box, and obtains the variable list corresponding to the text box identifier to display the variable list;
[0011] The interpolation module receives a target variable determined based on the variable list, and generates an interpolation variable according to a preset placeholder and the target variable.
[0012] In one embodiment, the interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action, including:
[0013] When detecting that a user triggers an interpolation action, the interpolation module obtains the text content in the SMS text box and determines the semantic information of the text content. After predicting the target variable to be filled in at the cursor position in the SMS text box based on the semantic information, the interpolation variable is generated based on the preset placeholder and the target variable.
[0014] In one embodiment, the statistical module is used to identify special characters in the text content and replace the special characters in the text content with preset characters, including:
[0015] The statistical module obtains a preset character list, matches corresponding characters in the text content according to the character list, and after determining the successfully matched characters as special characters, replaces the special fields in the text content with preset characters.
[0016] In one embodiment, the statistical module is used to calculate the text length based on the replaced text content to determine the number of remaining characters and the number of short messages, including:
[0017] The statistical module determines whether the text content contains non-Latin characters, and after determining the basic length and the additional length according to the determination result, calculates the text length based on the replaced text content, and determines the initial number of items according to the text length and the basic length;
[0018] When the initial number is not greater than 1, the statistical module determines the difference between the basic length and the text length as the number of remaining characters, and determines the initial number as the number of short messages.
[0019] In one embodiment, the statistical module is used to calculate the text length based on the replaced text content to determine the number of remaining characters and the number of short messages, including:
[0020] The statistical module determines whether the text content contains non-Latin characters, and after determining the basic length and the additional length according to the determination result, calculates the text length based on the replaced text content, and determines the initial number of items according to the text length and the basic length;
[0021] When the initial number is greater than 1, the statistical module determines the character length of the last text message in the replaced text content; if the character length is greater than the additional length, the initial number is updated to obtain the number of text messages, and the additional length is determined as the remaining number of characters; if the character length is not greater than the additional length, the difference between the additional length and the character length is determined as the remaining number of characters, and the initial number is determined as the number of text messages.
[0022] In a second aspect, the present application provides a method for configuring a text message template, which is applied to the text message template configuration system described in any one of the above embodiments, and the method includes:
[0023] When it is detected that the user enters information in the SMS text box, the text content in the SMS text box is obtained, and the corresponding basic length and additional length are determined according to the text content;
[0024] Recognizing special characters in the text content, replacing the special characters in the text content with preset characters, and calculating the text length based on the replaced text content;
[0025] Calculate the number of remaining characters according to the text length, the basic length and the additional length, and display the number of remaining characters in its corresponding display position;
[0026] When the user is inputting information in the target text box, if it is detected that the user triggers the interpolation action of the target text box, the interpolation variable is determined according to the target text box, and after determining the cursor position in the target text box, the interpolation variable is filled in the cursor position.
[0027] In a third aspect, the present application provides a device for configuring a text message template, which is applied to the text message template configuration system described in any one of the above embodiments, and the device includes:
[0028] The length determination module is used to obtain the text content in the text box when it is detected that the user inputs information in the text box, and determine the corresponding basic length and additional length according to the text content;
[0029] A character recognition module, used for recognizing special characters in the text content, replacing the special characters in the text content with preset characters, and calculating the text length based on the replaced text content;
[0030] A character calculation module, used for calculating the number of remaining characters according to the text length, the basic length and the additional length, and displaying the number of remaining characters in a corresponding display position;
[0031] The interpolation module is used to determine the interpolation variable according to the target text box when the user inputs information in the target text box. After detecting that the user triggers the interpolation action of the target text box, the interpolation variable is filled into the cursor position after determining the cursor position in the target text box.
[0032] In a third aspect, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the SMS template configuration method described in any of the above embodiments.
[0033] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;
[0034] The memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, the steps of the SMS template configuration method described in any one of the above embodiments are performed.
[0035] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0036] The SMS template configuration system, method, device and storage medium provided by the present application include a display module, an interpolation module and a statistical module; on the one hand, the statistical module is used to identify special characters in the text content when the text content in the SMS text box is detected to be updated, and after replacing the special characters in the text content with preset characters, the text length is calculated based on the replaced text content to determine the number of remaining characters and the number of SMS messages; and the display module is used to edit and display the text content of the SMS text box and display the number of remaining characters and the number of SMS messages in real time. The statistical module can process the special characters in the text content to ensure the accuracy of the SMS text length calculation, so that the SMS containing special characters can be compatible when calculating the SMS text length to improve the length calculation compatibility. On the other hand, the interpolation module is used to determine the interpolation variable according to the SMS text box when the user triggers the interpolation action, and after determining the location of the cursor in the SMS text box, the interpolation variable is filled in the location of the cursor. The interpolation module can automatically determine the interpolation variable when the user triggers the interpolation action, and fill it in the location of the cursor, reducing the repeated operations of the business personnel, thereby improving the efficiency of generating SMS based on the SMS template. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 A schematic diagram of the structure of a SMS template configuration system provided in an embodiment of the present application;
[0039] Figure 2 An example diagram of the front-end design of the display module provided in the embodiment of the present application;
[0040] Figure 3 One of the flowchart diagrams of the process of the interpolation module provided in the embodiment of the present application for determining the interpolation variable according to the text box of the short message when detecting that the user triggers the interpolation action;
[0041] Figure 4 The second flowchart of the process of the interpolation module provided in the embodiment of the present application for determining the interpolation variable according to the text box of the short message when detecting that the user triggers the interpolation action;
[0042] Figure 5 A flowchart of a method for configuring a text message template provided in an embodiment of the present application;
[0043] Figure 6 A schematic diagram of the structure of a device for configuring a text message template provided in an embodiment of the present application;
[0044] Figure 7 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] In one embodiment, the present application provides a text message template configuration system, and the following embodiment is described with the system deployed on a client.
[0047] like Figure 1 As shown, the present application provides a short message template configuration system, the system comprising a display module 101, an interpolation module 103 and a statistics module 102;
[0048] The statistics module 102 is used to identify special characters in the text content when it detects that the text content in the SMS text box of the display module 101 is updated, and after replacing the special characters in the text content with preset characters, calculate the text length based on the replaced text content to determine the number of remaining characters and the number of SMS messages; the display module 101 is used to edit and display the text content of the SMS text box and display the number of remaining characters and the number of SMS messages in real time; the interpolation module 103 is used to determine the interpolation variable according to the SMS text box when it detects that the user triggers the interpolation action, and after determining the position of the cursor in the SMS text box, fill the interpolation variable into the position of the cursor.
[0049] In this embodiment, on the one hand, when the statistics module 102 detects that the text content in the text box of the display module 101 is updated, the special character recognition process is started. The built-in character recognition algorithm is used to accurately locate all special characters. Then each special character is replaced with a preset character one by one. Next, the statistics module 102 counts the replaced text content according to the preset character counting method to obtain an accurate total number of characters. Then, the maximum number of characters of the determined text message is subtracted from the text length of the replaced text that has been counted, so as to obtain the number of remaining characters. At the same time, the number of text messages is determined based on the text length of the replaced text content and the maximum number of characters of a single text message.
[0050] Special characters refer to characters that are not regular letters, numbers, or common punctuation marks in SMS texts. Special characters include, but are not limited to, some special symbols (such as §, ©, etc.), emoji expressions, or certain industry-specific identification codes. Preset characters refer to pre-set unified characters used to replace special characters. Usually, simple characters that do not affect the basic semantic understanding of SMS are selected, such as "*" and "x", so that the text can be standardized for subsequent accurate calculations.
[0051] Furthermore, in the special character recognition process, the special characters in the text content in the SMS text box can be recognized through two main steps: text scanning and character matching. It should be noted that the text content in the SMS text box refers to all the text content edited in this SMS template.
[0052] On the other hand, when the interpolation module 103 detects that the user has triggered a preset interpolation action, it can determine the text box type and number according to the text box of the SMS currently being edited, and then further determine at least one variable corresponding to the text box type and number, so that the user can select the determined variable. After the system receives the variable selected by the user, it automatically generates an interpolation variable and fills it in where the cursor is. In addition, based on the semantic information of the text content in the SMS text box, especially the semantic information near the cursor, variables can be predicted based on this, and interpolation variables can be generated based on the predicted variables to fill in the cursor. The specific implementation method can be determined according to the actual situation, and this application does not impose specific restrictions on this. It should be noted that the user in this embodiment refers to the relevant staff of the SMS template configuration.
[0053] Among them, interpolation action refers to the user UI operation that triggers interpolation, such as clicking a specific button, right-clicking and selecting a specific menu option, etc. Interpolation variables refer to pre-set key elements with dynamic changing properties. Interpolation variables are usually used to represent information fragments that need to be flexibly changed in different SMS sending scenarios. For example, in marketing SMS, interpolation variables can be customer names, purchased product names, promotion time, etc.
[0054] Specifically, the display module 101 can be used to edit and display the text content of the SMS text box, so that the business personnel (i.e., the user) can adaptively edit the SMS template through the client interface. At the same time, the display module 101 can also display the number of remaining characters and the number of SMS messages in real time. In this embodiment, the statistics module 102 can calculate the number of remaining characters and the number of SMS messages when the text content of the SMS text box changes. In other words, as long as the user is editing and updating the text content, the display module 101 can synchronously display the calculation results of the statistics module 102.
[0055] The number of remaining characters refers to the number of characters that can be entered at present, and can reflect the space left for the user to fill up the SMS quota in the current SMS template editing state. The number of SMS messages refers to the number of SMS messages that need to be split to send the currently edited SMS content completely.
[0056] The SMS template configuration system, method, device and storage medium provided by the present application include a display module, an interpolation module and a statistical module; on the one hand, the statistical module is used to identify special characters in the text content when the text content in the SMS text box is detected to be updated, and after replacing the special characters in the text content with preset characters, the text length is calculated based on the replaced text content to determine the number of remaining characters and the number of SMS messages; and the display module is used to edit and display the text content of the SMS text box and display the number of remaining characters and the number of SMS messages in real time. The statistical module can process the special characters in the text content to ensure the accuracy of the SMS text length calculation, so that the SMS containing special characters can be compatible when calculating the SMS text length to improve the length calculation compatibility. On the other hand, the interpolation module is used to determine the interpolation variable according to the SMS text box when the user triggers the interpolation action, and after determining the location of the cursor in the SMS text box, the interpolation variable is filled in the location of the cursor. The interpolation module can automatically determine the interpolation variable when the user triggers the interpolation action, and fill it in the location of the cursor, reducing the repeated operations of the business personnel, thereby improving the efficiency of generating SMS based on the SMS template.
[0057] In one example, if Figure 2 As shown, Figure 2 This is an example diagram of the front-end design of the display module provided in the embodiment of the present application. Figure 2 In the figure, the module logic corresponding to "Add variable placeholder" in the upper left corner is the interpolation module. The upper right corner is used to display the number of remaining characters and the number of text messages in real time. The text message text box is used to edit and display the text content of the text message text box.
[0058] like Figure 3 As shown, in one embodiment, the process in which the interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action includes:
[0059] S201: When detecting that a user triggers an interpolation action, the interpolation module determines a text box identifier corresponding to the text box of the short message, and obtains a variable list corresponding to the text box identifier to display the variable list.
[0060] In this step, when the interpolation module detects that the user has triggered the interpolation action, the interpolation module will determine the text box identifier corresponding to the SMS text box, and then obtain the corresponding pre-set variable list based on the text box identifier. When the interpolation module obtains the variable list, it can send the variable list to the display module to display the variable list, so that business personnel can select the target variable based on the variable list.
[0061] Furthermore, a correspondence relationship between the text box identifier and the variable list may be preset, and when determining the corresponding variable list according to the text box identifier, the variable list corresponding to the text box identifier may be determined by querying the correspondence relationship.
[0062] S202: The interpolation module receives a target variable determined based on a variable list, and generates an interpolation variable according to a preset placeholder and the target variable.
[0063] Specifically, after the business personnel selects the target variable based on the display module, the display module will send the target variable or the identifier of the target variable to the interpolation module. When the interpolation module receives the target variable determined based on the variable list, it can fill the target variable into the preset placeholder to generate the interpolation variable.
[0064] Among them, a placeholder is a symbol used to occupy a specific position in various information carriers such as text, code, and graphics to indicate that this place will be replaced by specific content later. In an example, the placeholder can be set to {{}}. When the target variable is a, the target variable can be filled into the placeholder to obtain an interpolated variable of {{a}}.
[0065] In this embodiment, by pre-binding the text box identifier and its corresponding variable list, the business personnel only need to select the desired target variable after triggering the interpolation action to automatically generate the interpolation variable, thereby avoiding the business personnel from frequently entering placeholders and manually entering variables, thereby improving the efficiency of SMS template editing and the efficiency of SMS generation based on SMS templates.
[0066] like Figure 4 As shown, in one embodiment, the process in which the interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action includes:
[0067] S301: When detecting that a user triggers an interpolation action, the interpolation module obtains text content in a text box of a short message and determines semantic information of the text content.
[0068] In this step, when the interpolation module detects that the user has triggered the interpolation action, the interpolation module will obtain the text content in the SMS text box, and then detect the semantic information of the text content. It can be understood that since the determined target variable is located at the cursor, the semantic information near the cursor can be focused on when performing semantic information detection, and finally the semantic information of the text content is obtained.
[0069] S302: After the interpolation module predicts the target variable to be filled in the location where the cursor is located in the text box of the short message according to the semantic information, it generates an interpolation variable based on the preset placeholder and the target variable.
[0070] In this step, the interpolation module can use semantic information as input, and predict and determine the target variable to be filled in the cursor position in the text box of the SMS message through the preset prediction model in the existing variables. It can be understood that the prediction model of the present application can be obtained by using semantic information samples as training samples, using the target variables corresponding to the training samples as sample labels, and using the loss function to train the preset pre-trained model. During the training process, the server can input the training samples and their corresponding sample labels into the pre-trained model for forward propagation, and use the loss function in the back propagation of the pre-trained model to adjust the parameters of the pre-trained model until the pre-trained model meets certain iteration conditions, and the pre-trained model that has been trained can be determined as the prediction model.
[0071] Specifically, semantic information is used to predict the target variable that needs to be filled in at the cursor position, thereby generating interpolation variables. In this way, after the business personnel trigger the interpolation action, the interpolation variables can be automatically generated, avoiding the situation where the business personnel frequently enter placeholders and variables, thereby improving the efficiency of SMS template editing and improving the efficiency of SMS generation based on SMS templates.
[0072] In one embodiment, the statistical module is used to identify special characters in text content and replace the special characters in the text content with preset characters, including:
[0073] The statistical module obtains a preset character list, matches corresponding characters in the text content according to the character list, determines the successfully matched characters as special characters, and replaces the special fields in the text content with the preset characters.
[0074] In this embodiment, special characters in the text content are identified and replaced with preset characters. This can simplify the complexity of text length calculation and ensure that special characters can be processed correctly, thereby ensuring the accuracy of text length calculation. At the same time, it can also be compatible with SMS length calculation containing special characters.
[0075] In one embodiment, the statistical module is used to calculate the text length based on the replaced text content to determine the number of remaining characters and the number of short messages, including:
[0076] S1: The statistical module determines whether the text content contains non-Latin characters, and after determining the basic length and the additional length according to the determination result, calculates the text length based on the replaced text content, and determines the initial number of entries according to the text length and the basic length.
[0077] Among them, non-Latin characters refer to characters that do not belong to the Latin alphabet system. Basic length refers to the standard limit of the number of characters for SMS billing. Additional length refers to the standard number of characters for each SMS used for separate SMS billing.
[0078] In this step, the statistical module determines whether the text content contains non-Latin characters to obtain a judgment result of inclusion or non-inclusion, and then determines the basic length and additional length based on the judgment result, and calculates the number of characters in the replaced text content to determine the text length of the text content, and then determines the initial number of items based on the text length and the basic length.
[0079] Furthermore, in the process of determining the initial number of items based on the text length and the basic length, the text length is divided by the basic length and rounded up to obtain a first value. The text length and the basic length are then modulo each other. If the modulo result is 0, the initial number of items is set to the first value. If the modulo result is not 0, the first value plus one is used as the initial number of items.
[0080] In one example, if the text content contains non-Latin characters, the basic length is set to 70 and the additional length is set to 63. If the text content does not contain non-Latin characters, the basic length is set to 160 and the additional length is set to 153.
[0081] S2: When the initial number of messages is not greater than 1, the statistical module determines the difference between the basic length and the text length as the number of remaining characters, and determines the initial number of messages as the number of short messages.
[0082] S3: When the initial number of messages is greater than 1, the statistical module determines the character length of the last SMS message in the replaced text content. If the character length is greater than the additional length, the initial number of messages is updated to obtain the number of SMS messages, and the additional length is determined as the remaining number of characters. If the character length is not greater than the additional length, the difference between the additional length and the character length is determined as the remaining number of characters, and the initial number of messages is determined as the number of SMS messages.
[0083] Specifically, when the character length is greater than the additional length, the initial number of entries is increased by one to obtain a new initial number of entries, so as to complete the update of the initial number of entries.
[0084] In this embodiment, the basic length and the additional length are dynamically determined by judging whether non-Latin characters are included, so that the calculation of the SMS length can be compatible with multiple languages, thereby improving the accuracy and compatibility of the SMS length calculation, thereby assisting business personnel to accurately control the SMS length and achieve high-precision SMS flow control.
[0085] The SMS template configuration method provided in an embodiment of the present application is described below. The SMS template configuration method described below and the SMS template configuration system described above can be referenced to each other.
[0086] like Figure 5 As shown, the present application provides a method for configuring a text message template, which is applied to the text message template configuration system of any of the above embodiments, and the method includes:
[0087] S401: When it is detected that the user inputs information in the SMS text box, the text content in the SMS text box is obtained, and the corresponding basic length and additional length are determined according to the text content.
[0088] S402: identifying special characters in the text content, replacing the special characters in the text content with preset characters, and calculating the text length based on the replaced text content.
[0089] S403: Calculate the number of remaining characters according to the text length, the basic length and the additional length, and display the number of remaining characters in its corresponding display position.
[0090] S404: When the user inputs information in the target text box, if it is detected that the user triggers the interpolation action of the target text box, the interpolation variable is determined according to the target text box, and after the cursor position in the target text box is determined, the interpolation variable is filled into the cursor position.
[0091] For instructions on the above steps, please refer to the corresponding instructions in the SMS template configuration system.
[0092] By implementing SMS template configuration through the method in this embodiment, on the one hand, special characters in the text content can be processed to ensure the accuracy of SMS text length calculation, so that when calculating the SMS text length, SMS containing special characters can be compatible, and the basic length and additional length can be dynamically determined according to the text content to be compatible with length calculations in multiple languages, thereby improving the compatibility of length calculation. On the other hand, when it is detected that the user triggers an interpolation action, the interpolation variable can be determined according to the SMS text box, and after determining the location of the cursor in the SMS text box, the interpolation variable is filled in the location of the cursor. In this way, the interpolation variable can be automatically determined when the user triggers the interpolation action, and it can be filled in to the location of the cursor, reducing the repeated operations of business personnel, thereby improving the efficiency of generating SMS based on SMS templates.
[0093] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0094] The SMS template configuration device provided in an embodiment of the present application is described below. The SMS template configuration device described below and the SMS template configuration method described above can be referenced to each other.
[0095] like Figure 6 As shown, the present application provides a SMS template configuration device 500, which is applied to the SMS template configuration system of any of the above embodiments, and the device includes:
[0096] The length determination module 501 is used to obtain the text content in the text box when it is detected that the user inputs information in the text box, and determine the corresponding basic length and additional length according to the text content;
[0097] A character recognition module 502 is used to recognize special characters in the text content, replace the special characters in the text content with preset characters, and calculate the text length based on the replaced text content;
[0098] The character calculation module 503 is used to calculate the number of remaining characters according to the text length, the basic length and the additional length, and display the number of remaining characters in the corresponding display position;
[0099] The interpolation module 504 is used to determine the interpolation variable according to the target text box and fill the interpolation variable into the cursor position after determining the cursor position in the target text box when the user triggers the interpolation action of the target text box during the user inputting information in the target text box.
[0100] The division of each module in the above-mentioned device or system is only for illustration. In other embodiments, the device or system can be divided into different modules as needed to complete all or part of the functions of the above-mentioned device or system. Each module in the above-mentioned device or system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0101] In one embodiment, the present application also provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the SMS template configuration method described in any of the above embodiments.
[0102] In one embodiment, the present application also provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the SMS template configuration method as described in any of the above embodiments.
[0103] Indicatively, Figure 7 As shown, Figure 7 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 600 may be provided as a server. Figure 7 The computer device 600 includes a processing component 602, which further includes one or more processors, and a memory resource represented by a memory 601, for storing instructions executable by the processing component 602, such as an application. The application stored in the memory 601 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 602 is configured to execute instructions to perform the SMS template configuration method of any of the above embodiments.
[0104] The computer device 600 may further include a power supply component 603 configured to perform power management of the computer device 600, a wired or wireless network interface 604 configured to connect the computer device 600 to a network, and an input / output (I / O) interface 605. The computer device 600 may operate based on an operating system stored in the memory 601, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0105] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0106] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish an entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, the singular "one", "one" and "described / the" may also include plural forms, unless the context clearly indicates another way. It should also be understood that the terms "include / comprise" or "have" etc. specify the existence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the existence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.
[0107] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0108] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A SMS template configuration system, characterized in that: The system includes a display module, an interpolation module and a statistics module; The statistical module is used to detect that the text content in the text box of the display module is updated, identify the special characters in the text content, replace the special characters in the text content with preset characters, and calculate the text length based on the replaced text content to determine the number of remaining characters and the number of text messages; The display module is used to edit and display the text content of the SMS text box and to display the number of remaining characters and the number of SMS messages in real time; The interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action, and after determining the location of the cursor in the SMS text box, fill the interpolation variable into the location of the cursor.
2. The SMS template configuration system according to claim 1, characterized in that: The interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action, including: When the interpolation module detects that the user triggers the interpolation action, it determines the text box identifier corresponding to the text box according to the short message text box, and obtains the variable list corresponding to the text box identifier to display the variable list; The interpolation module receives a target variable determined based on the variable list, and generates an interpolation variable according to a preset placeholder and the target variable.
3. The SMS template configuration system according to claim 1, characterized in that: The interpolation module is used to determine the interpolation variable according to the SMS text box when detecting that the user triggers the interpolation action, including: When detecting that a user triggers an interpolation action, the interpolation module obtains the text content in the SMS text box and determines the semantic information of the text content. After predicting the target variable to be filled in at the cursor position in the SMS text box based on the semantic information, the interpolation variable is generated based on the preset placeholder and the target variable.
4. The SMS template configuration system according to claim 1, characterized in that: The statistical module is used to identify special characters in the text content and replace the special characters in the text content with preset characters, including: The statistical module obtains a preset character list, matches corresponding characters in the text content according to the character list, and after determining the successfully matched characters as special characters, replaces the special fields in the text content with preset characters.
5. The SMS template configuration system according to claim 1, characterized in that: The statistical module is used to calculate the text length based on the replaced text content to determine the number of remaining characters and the number of short messages, including: The statistical module determines whether the text content contains non-Latin characters, and after determining the basic length and the additional length according to the determination result, calculates the text length based on the replaced text content, and determines the initial number of items according to the text length and the basic length; When the initial number is not greater than 1, the statistical module determines the difference between the basic length and the text length as the number of remaining characters, and determines the initial number as the number of short messages.
6. The SMS template configuration system according to claim 1, characterized in that: The statistical module is used to calculate the text length based on the replaced text content to determine the number of remaining characters and the number of short messages, including: The statistical module determines whether the text content contains non-Latin characters, and after determining the basic length and the additional length according to the determination result, calculates the text length based on the replaced text content, and determines the initial number of items according to the text length and the basic length; When the initial number is greater than 1, the statistical module determines the character length of the last text message in the replaced text content; if the character length is greater than the additional length, the initial number is updated to obtain the number of text messages, and the additional length is determined as the remaining number of characters; if the character length is not greater than the additional length, the difference between the additional length and the character length is determined as the remaining number of characters, and the initial number is determined as the number of text messages.
7. A method for configuring a short message template, characterized in that: Applied to the SMS template configuration system according to any one of claims 1 to 6, the method comprising: When it is detected that the user enters information in the SMS text box, the text content in the SMS text box is obtained, and the corresponding basic length and additional length are determined according to the text content; Recognizing special characters in the text content, replacing the special characters in the text content with preset characters, and calculating the text length based on the replaced text content; Calculate the number of remaining characters according to the text length, the basic length and the additional length, and display the number of remaining characters in its corresponding display position; When the user is inputting information in the target text box, if it is detected that the user triggers the interpolation action of the target text box, the interpolation variable is determined according to the target text box, and after determining the cursor position in the target text box, the interpolation variable is filled in the cursor position.
8. A device for configuring a short message template, characterized in that: The SMS template configuration system according to any one of claims 1 to 6, wherein the device comprises: The length determination module is used to obtain the text content in the text box when it is detected that the user inputs information in the text box, and determine the corresponding basic length and additional length according to the text content; A character recognition module, used for recognizing special characters in the text content, replacing the special characters in the text content with preset characters, and calculating the text length based on the replaced text content; A character calculation module, used for calculating the number of remaining characters according to the text length, the basic length and the additional length, and displaying the number of remaining characters in a corresponding display position; The interpolation module is used to determine the interpolation variable according to the target text box when the user inputs information in the target text box. After detecting that the user triggers the interpolation action of the target text box, the interpolation variable is filled into the cursor position after determining the cursor position in the target text box.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the SMS template configuration method as described in claim 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the SMS template configuration method according to claim 7 are executed.