SMS channel test configuration method, device, equipment and storage medium

Through centralized channel configuration management and automated testing process, the problem of time-consuming, labor-intensive and security-intensive traditional SMS channel testing methods is solved, efficient and accurate SMS channel testing is achieved, adapting to diversified needs, and system security is enhanced and manageability.

CN119136229BActive Publication Date: 2025-01-10SHENZHEN GAUSS COMM CO LTD

Patent Information

Application Number
CN202411615239.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-01-10
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

Traditional SMS channel testing methods are time-consuming and labor-intensive, error-prone, and due to the complex relationships of data tables, testers are inefficient and risky when configuring and testing, making it difficult for them to adapt to diverse and personalized testing needs.

Method used

Provide a SMS channel testing configuration method, which centrally manages channel configuration information, provides an intuitive user interface and flexible query and filtering functions, realizes an automated test process, adopts strict data verification and secure encryption mechanism, and is based on user type permission allocation. The automation channel is associated with the engine user configuration and supports flexible SMS content segmentation and sending.

Benefits of technology

It greatly reduces manual operation time and complexity, reduces error rate and data leakage risks, improves the accuracy and credibility of test results, enhances system security and manageability, adapts to various complex testing needs, and provides detailed The sending result records and statistical reports helps quickly locate problems and optimize channel performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119136229B_ABST
    Figure CN119136229B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of SMS channel testing, and discloses a method, device, equipment and storage medium for SMS channel testing configuration. The method first verifies user login information and assigns permissions, then extracts and filters channel information from a database based on the permissions, and presents the results in a paged manner. The user can input channel configuration information, and the database is updated after verification. The system then generates an associated configuration with the engine user based on the updated channel information. According to the channel and associated configuration selected by the user, a TCP / IP Socket communication session is established and a session identifier is obtained. The system receives the test SMS content input by the user, encapsulates it and the session identifier into a sending request, sends it through the communication session, and records the results. The present invention can centrally manage channel configuration information, provide an intuitive user interface, support flexible query and screening functions, and realize an automated test process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of SMS channel testing, and in particular to a SMS channel testing configuration method, device, equipment and storage medium. Background Art

[0002] With the continuous growth of SMS business volume, the stability and reliability of SMS channels have become an important challenge faced by operators and service providers. Traditional SMS channel testing methods often require manual configuration of relevant data in the database and simulation of the SMS sending process by writing complex database scripts. This method is not only time-consuming and labor-intensive, but also prone to errors.

[0003] In addition, because the SMS channel involves multiple data tables and complex associations, testers need to frequently switch between different database tables when configuring and testing the channel, which not only reduces work efficiency but also increases the risk of operational errors. At the same time, with the diversification of SMS services and the increase in personalized needs, higher requirements are also placed on the testing of SMS channels, which need to be able to flexibly adapt to different test scenarios and parameter configurations. Summary of the invention

[0004] The present invention provides a short message channel test configuration method, device, equipment and storage medium. The present invention can centrally manage channel configuration information, provide an intuitive user interface, support flexible query and screening functions, and realize an automated test process.

[0005] In a first aspect, the present invention provides a method for configuring a text message channel test, the method comprising:

[0006] Verify the login information input by the user, determine the user type according to the verification result, assign operation permissions based on the user type, and generate permission identification;

[0007] Extracting channel information from a database based on the permission identifier, filtering the channel information according to a query condition input by a user, and presenting the filtered results in a paged manner;

[0008] Receive channel configuration information input by a user, verify the legitimacy of the channel configuration information, update the verified channel configuration information to a database, and obtain updated channel information;

[0009] Based on the updated channel information, query the engine user table, generate association records between the channel and the engine user according to the query result, and form an association configuration;

[0010] According to the channel to be tested selected by the user and the associated configuration, a communication session based on TCP / IP Socket is established, a login request is sent through a predefined communication protocol, and a session identifier is obtained;

[0011] Receive the test SMS content input by the user, encapsulate the test SMS content and the session identifier into a sending request, send the sending request through the communication session, and record the sending result.

[0012] In a second aspect, the present invention provides a short message channel test configuration device, the short message channel test configuration device comprising:

[0013] A verification module, used to verify the login information input by the user, determine the user type according to the verification result, assign operation permissions based on the user type, and generate permission identification;

[0014] A screening module, used to extract channel information from the database based on the permission identifier, screen the channel information according to the query conditions input by the user, and present the screened results in a paged manner;

[0015] An updating module is used to receive channel configuration information input by a user, verify the legitimacy of the channel configuration information, and update the verified channel configuration information to a database to obtain updated channel information;

[0016] A query module, used to query the engine user table based on the updated channel information, generate an association record between the channel and the engine user according to the query result, and form an association configuration;

[0017] An establishment module is used to establish a communication session based on TCP / IPSocket according to the channel to be tested selected by the user and the associated configuration, send a login request through a predefined communication protocol, and obtain a session identifier;

[0018] The sending module is used to receive the test SMS content input by the user, encapsulate the test SMS content and the session identifier into a sending request, send the sending request through the communication session, and record the sending result.

[0019] The third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned SMS channel test configuration method.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned SMS channel test configuration method.

[0021] In the technical solution provided by the present invention, the time and complexity of manual operation are greatly reduced through centralized channel configuration management and automated test process, so that testers can complete test tasks more quickly. Strict data verification and security encryption mechanisms are adopted to reduce the error rate and data leakage risk in the test process, and improve the accuracy and credibility of the test results. The permission allocation mechanism based on user type ensures that users of different roles can only access functions and data within their authority, thereby enhancing the security and manageability of the system. Through paging display and dynamic filtering functions, a more intuitive and easy-to-use operation interface is provided, so that testers can more conveniently find and manage channel information. Through automated channel and engine user association configuration, as well as flexible SMS content segmentation and sending mechanism, it can adapt to various complex test requirements and business scenarios. Through detailed sending result records and statistical reports, rich data support is provided for testers, which helps to quickly locate problems and optimize channel performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0023] Figure 1 A schematic diagram of the steps of a method for configuring a short message channel test in an embodiment of the present invention;

[0024] Figure 2 It is a structural schematic diagram of a short message channel test configuration device in an embodiment of the present invention;

[0025] Figure 3 It is a schematic block diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] Embodiments of the present invention provide a method, device, equipment and storage medium for configuring a short message channel test. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the SMS channel test configuration method in the embodiment of the present invention includes:

[0028] Step S1: Verify the login information input by the user, determine the user type according to the verification result, assign operation permissions based on the user type, and generate permission identification;

[0029] It is understandable that the execution subject of the present invention may be a short message channel test configuration device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0030] Specifically, the user name, password and verification code input by the user are received, and these information constitute the user's basic login data. Among them, the verification code is designed to prevent malicious attacks or robot logins, and is usually presented in the form of an image. The verification code is image recognized, and the content in the image is extracted as a string, which is used in subsequent login verification to ensure the correctness of the verification code. The user name and password will be passed to the encryption module and encrypted using the MD5 algorithm. MD5 is a one-way hash function that performs an irreversible conversion on the input data to ensure the security of the user name and password during transmission and storage, and obtains the encrypted login information to avoid security issues caused by data interception during communication. Based on the encrypted login information, the user information table is queried to obtain the corresponding user record. The user name and the encrypted password are matched in the database. If a matching record is found, it indicates that the login information provided by the user is valid. The account status in the user record is checked to determine whether the account is in a normal state. The account status includes normal, disabled, locked and other states. Only when the account status is "normal" is the user allowed to continue the operation. The result of the status check will be used to determine whether the user can log in successfully. At the same time, a login verification mark is generated in combination with the matching result of the verification code. If the verification code is correctly recognized and the account status is normal, the login verification mark will be marked as successful, indicating that the user has successfully passed the login verification. Based on the login verification mark, the user type information is extracted from the user record, such as administrator, ordinary user, etc. According to the extracted user type information, the permission configuration table is queried to determine the specific operation permissions that the user has in the system. The permission configuration table stores the operation permission list corresponding to different types of users. These operation permissions include channel configuration, log viewing, user management and other functions. The queried operation permission list is converted into a binary permission code to generate a permission bitmap to represent all operations that the user can perform. The binary permission code efficiently represents the permission information, and marks specific permissions by setting and clearing bits, making the system more convenient and faster when making permission judgments. A unique session identifier is generated based on the user name and the permission bitmap. The session identifier is the credential for the user to interact with the system after successful login. It is used to identify the current user session and ensure the security and uniqueness of the session. The generated session identifier will be associated and mapped with the permission bitmap and stored in the permission cache to obtain the permission identifier.

[0031] Step S2: extracting channel information from the database based on the authority identifier, filtering the channel information according to the query conditions input by the user, and presenting the filtered results in a paging manner;

[0032] Specifically, the permission identifier is extracted from the permission cache, and the permission identifier is associated with the corresponding permission bitmap. By parsing the permission bitmap, the operation permissions that the user has in the system and the list of accessible channel fields are determined. The permission bitmap uses binary mode to store the user's operation permissions. After parsing, the specific permission items are mapped to the field access rights of the channel, such as channel code, downstream port, etc., so as to clearly limit the user to access only the fields within his or her permission range. The SELECT clause of the SQL query statement is constructed based on the list of channel fields accessible to the user. The SELECT clause selects the data of the corresponding field from the channel configuration table in the database. The query conditions entered by the user are received, and the query conditions include information such as channel code, operator type, and status. The query conditions entered by the user are parsed to ensure the correctness and completeness of the query conditions, and the input content is securely filtered to prevent security issues such as SQL injection. After parsing and filtering, the WHERE clause of the corresponding SQL query statement is generated to specify the specific conditions of the query. The generated SELECT clause and WHERE clause are combined to form a complete SQL query statement, which extracts the channel information that meets the conditions from the database according to the user's permissions and input conditions. After executing the database query operation, the original channel information set is obtained. The original channel information set is desensitized. Partially mask the sensitive fields, such as displaying some characters or replacing them with specific symbols, to ensure the privacy and security of the data, and obtain the desensitized channel information set. Sort the desensitized channel information set according to the user's needs. The user selects the sorting field and sorting method, such as ascending order by channel code or descending order by sending speed. Sort the desensitized channel information set according to the sorting field and sorting method selected by the user to obtain the sorted channel information set. After the sorting is completed, the total number of records in the channel information set is calculated, and then the total number of pages and the current page number are calculated according to the preset number of records displayed per page. Paging is to avoid loading too much data at one time when displaying on the front end, so as to improve the page loading speed and user experience. According to the current page number and the number of records displayed per page, the corresponding data subset is intercepted from the sorted channel information set to obtain the channel information list of the current page. The channel information list of the current page is converted into JSON format. JSON format is a lightweight data exchange format that is convenient for front-end parsing and display, and generates a data structure for front-end display. At the same time, other paging information, such as the total number of records, the total number of pages, and the current page number, are combined with the channel information list in JSON format to generate a complete paging data packet. The generated paging data packet is returned to the front end for presentation. The user browses the configuration information of the SMS channel in a paging manner on the page and performs operations such as query, sorting, and page turning as needed.

[0033] Step S3: receiving the channel configuration information input by the user, verifying the legitimacy of the channel configuration information, and updating the verified channel configuration information to the database to obtain updated channel information;

[0034] Specifically, the channel configuration information input by the user through the front-end interface is received, including configuration items such as channel code, upstream and downstream ports, and transmission speed. After the user submits the configuration, the received channel configuration information is parsed into a data structure in the form of a key-value pair, which is easy to process and traverse, where each key represents a configuration field name, and the corresponding value is the specific content entered by the user. The parsed data structure in the form of a key-value pair is traversed and the legality verification is performed on each field in turn. The legality verification is performed based on preset field verification rules, such as the format requirements of the channel code, the numerical range of the upstream and downstream ports, etc. By checking these fields one by one, it is ensured that each value entered by the user meets the requirements of the system, and the verification results of each field are recorded to form a field verification result list. Based on the field verification result list, the entire channel configuration information is verified as a whole to determine whether there are fields that do not meet the rules. If all fields pass the verification, the overall verification result flag will be marked as "passed", indicating that the configuration information is legal in format and range. If a field fails to pass the verification, the user is prompted to modify it according to the verification error. During the overall verification, the channel code field is checked for uniqueness to ensure that the channel code is unique in the system and avoid duplication and conflict. The channel configuration table in the database is queried to determine whether the same channel code already exists and obtain the uniqueness check result. If the uniqueness check also passes, the update operation is performed. Based on the channel configuration information, an SQL update statement is constructed to map all verified channel configuration items to the corresponding fields in the database. For example, if the user modifies the sending speed of the channel, the SQL update statement will include an update operation for the field. In order to ensure the security of the system, the SQL update statement is parameterized to prevent security risks such as SQL injection. At the same time, for some sensitive information, such as passwords or authentication keys, encryption is performed before updating to generate a secure SQL execution statement to ensure the security of sensitive data in the stored procedure. The constructed secure SQL execution statement is submitted to the database management system to perform the update operation. After the update operation is executed, the number of rows affected by the update operation is obtained, and the number of rows affected is used to determine whether the update has been successfully completed. If the number of affected rows is greater than 0, the update operation is successful, and an update status flag is generated to indicate success; if the number of affected rows is 0, it means that no records to be updated are found or the update is not successfully completed, and a corresponding failure flag is generated, and appropriate prompt information is returned to the user. Based on the update status flag, if the update is successful, re-query the database to obtain the latest channel configuration information to form an updated channel information object. Serialize the updated channel information object into JSON format, which is a lightweight data exchange format with good readability and easy front-end parsing. Generate an update result data packet, which includes the JSON representation of the updated channel information object and the update status flag, and return the data packet to the front-end for display.

[0035] Step S4: Based on the updated channel information, query the engine user table, generate the association record between the channel and the engine user according to the query result, and form an association configuration;

[0036] Specifically, the channel code, downlink number and sendable number segment information are extracted from the updated channel information. The channel code is used to uniquely identify an SMS channel. The downlink number is the number used by the channel in the process of receiving SMS. The sendable number segment indicates the range of numbers that SMS can be sent to. Based on this information, a query condition is constructed to perform a full table scan on the engine user table to filter out all engine user records that are currently in the "active" state. These users are eligible to participate in the channel binding, thereby forming a candidate engine user list. The candidate engine user list is traversed to extract the user ID and port number information of each engine user, which is used to describe the attribute set of the engine user. The channel code and the attribute set of the engine user are Cartesian producted to generate an initial association record set, which includes the combination of the channel and all possible engine users, thereby covering all potential binding relationships between the channel and the user. Each record in the initial association record set is screened, and a unique prefix identifier is generated by string concatenation of the channel downlink number and the engine user port number, which is used to uniquely identify the binding relationship between a channel and an engine user. The generated prefix identifier is matched with the sendable number segment to determine whether the binding relationship meets the channel's sending conditions. Only the records that are successfully matched are considered to be valid binding relationships, thereby filtering out valid association records. Priority values ​​are assigned to valid association records according to the preset priority strategy. Different channels have different priority requirements. For example, some channels give priority to emergency SMS, while others give priority to ordinary business SMS. By assigning a priority value to each record, the order of SMS sending and the channel usage strategy are controlled. Valid association records are inserted into the channel binding relationship table in batches, and their status is set to "active", which means that these binding relationships are used by the system in the subsequent SMS sending process, forming an updated association configuration. The updated association configuration is reindexed. The performance of data query is improved by reindexing, especially in the case of large amounts of data. The rebuilt index significantly improves the query speed of the database, reduces the system response time, and ensures that the results can be returned faster when the association records of the channel and the engine user are queried in the future. A correlation statistics report is generated based on the updated association configuration, including the number of currently associated engine users and the number segment range information covered by these users. The results of the operation, including the update status of the associated configuration and the generated statistical report, are returned to the front end for the administrator to review.

[0037] Step S5: Establish a communication session based on TCP / IP Socket according to the channel to be tested and the associated configuration selected by the user, send a login request through a predefined communication protocol, and obtain a session identifier;

[0038] Specifically, extract the IP address and port number information of the channel to be tested from the associated configuration, and construct the Socket connection parameters. Create a TCP Socket object based on the Socket connection parameters. When creating the Socket object, set a connection timeout, generally set to 10 seconds, to ensure that the system can get a response within a reasonable time when trying to establish a connection with the channel server, avoiding long waiting times that affect the system's performance and user experience. Once the Socket object is successfully created, the system begins to establish a network connection with the channel server. During the process of establishing a connection, detect the connection status to ensure that the Socket is successfully connected to the target server. In order to ensure the security of communication, a 32-byte random string is generated as a client identifier to uniquely identify the client's identity. At the same time, the client identifier is concatenated with the current timestamp to form session initialization data. Perform SHA-256 hash operation on the session initialization data to generate a session key. SHA-256 is a very strong hash algorithm. By performing hash calculation on the session initialization data, the generated session key is used for encryption and decryption of subsequent communication data to ensure that the data will not be tampered with or stolen during network transmission. Construct a login request data packet. The login request data packet consists of a request header and a request body. The request header contains a 4-byte total message length, which indicates the size of the entire data packet. It is followed by a 1-byte instruction ID, which identifies the type of request, such as a login request or heartbeat detection. It is followed by a 10-byte sequence number, which uniquely identifies the request and corresponds to the server response. The body of the login request contains 8 bytes of account information, indicating the client's account name for login, followed by a 16-byte encrypted password, which is encrypted to ensure security during transmission. Finally, it contains a 4-byte timestamp, which indicates the current time and is used to prevent replay attacks. The request header and the request body are combined and encrypted with AES-256 using the session key to generate a complete encrypted login request packet. The encrypted login request packet is sent to the channel server via a TCP Socket connection, and the response waiting timer is started at the same time. Once the encrypted login request packet is successfully sent, the system enters a waiting state, waiting for the channel server to return the login response data. After receiving the data returned by the server, the returned data is decrypted with AES-256 using the session key. The decrypted raw response data contains a 1-byte status code. The status code is used to determine whether the login is successful. If the status code indicates success, it means that the login process has been completed. The session identifier assigned by the server is extracted from the response data to identify the subsequent communication session, which is the credential for maintaining the session status between the client and the server. If the login fails, the cause of the failure is determined based on the error information in the status code, such as an incorrect account or password, or a connection timeout.In the event of a login failure, the Socket connection is immediately closed to release resources, and the corresponding error information is returned to the caller, prompting the user to take appropriate measures to repair or retry.

[0039] Step S6: receiving the test SMS content input by the user, encapsulating the test SMS content and the session identifier into a sending request, sending the sending request through the communication session, and recording the sending result.

[0040] Specifically, the test SMS content and receiving number input by the user are received. The test SMS content and receiving number are the basic inputs for the user to test the SMS channel function, ensuring that the test SMS can be correctly sent to the target recipient. After receiving this information, the test SMS content is converted to UTF-8 encoding and converted into a byte array to ensure that all characters can be correctly processed during network transmission and that information will not be lost or misunderstood due to encoding problems. After conversion to a byte array, the length of the byte array is calculated to determine whether the SMS content exceeds the preset SMS length threshold. According to the preset SMS length threshold, the SMS content length is checked. If the SMS content exceeds the standard SMS length (for example, more than 70 Chinese characters or 160 English characters), a segmentation flag is generated, indicating that the SMS needs to be segmented into multiple segments for sending. Based on the segmentation flag, the overlong SMS is segmented, the SMS content is segmented into multiple SMS segments with standard lengths, and each segment is composed of an SMS segment list. At the same time, in order to track the sending status of each SMS segment later, a unique message ID is assigned to each SMS segment, and these message IDs are associated with the corresponding SMS segment content to form a complete sending task queue. The sending task queue is used to manage all SMS fragments that need to be sent and their corresponding sending status, ensuring that each fragment can be processed and tracked independently. Construct a request data packet for sending SMS. The sending request data packet consists of a header and a body. Construct the header of the sending request. The header contains a 4-byte total message length, which is used to identify the size of the entire data packet. The second is a 1-byte instruction ID, which is used to distinguish the type of this request. For example, the instruction ID of the SMS request will be different from other types of requests. Then there is a 10-byte sequence number, which is used to uniquely identify the request and ensure that it can correctly correspond to the server's response in subsequent communications. Construct the body of the sending request. The body part contains multiple fields, including the receiving number, the length of the SMS content, the SMS content itself, and priority information. The receiving number is used to determine the target recipient of the SMS, the SMS content length is used to identify the size of the SMS content, so that the recipient can correctly parse it, and the SMS content is the test SMS information entered by the user. The priority information is used to determine the processing order when the sending task is busy. SMS with high priority will be sent first to ensure that some urgent information can reach the target in time. Combine the send request packet header, packet body and session identifier to ensure that the server can identify which session the request belongs to when it receives the request. Use the session key to encrypt the combined data with AES-256. AES-256 encrypts the send request packet using the session key to effectively prevent the data from being stolen or tampered with during transmission. After encryption is completed, a complete encrypted send request packet is generated and sent to the SMS channel server through the TCP Socket connection.At the same time, a sending timer is started to track the response time of this sending operation so as to handle it when the server response times out. When the server receives the sending request, it processes the request and returns the sending response data. After receiving the server's response, the system uses the previous session key to perform AES-256 decryption on the returned data. The decrypted data contains the sending status code and message ID. The sending status code is used to indicate whether the sending of this SMS fragment is successful. For example, the status code indicates different results such as successful sending, target number unreachable, and sending failure. The message ID is used to match this response with the previous sending request, so as to ensure that the system can accurately update the sending status of the corresponding SMS fragment. According to the parsed sending status code and message ID, the sending status of the corresponding SMS fragment in the sending task queue is updated. For example, if the status code indicates success, the SMS fragment is marked as "successfully sent". If the status code indicates failure, it is marked as "sending failed" and the specific failure reason is recorded. By continuously updating the sending task queue, the entire SMS sending process is tracked and managed to ensure that the status of each SMS fragment is up to date. Based on the update results of the sending task queue, a sending result report is generated, which contains information such as the sending status of each SMS fragment, the reason for failure, and the specific time of successful sending.

[0041] In the embodiment of the present invention, through centralized channel configuration management and automated test process, the time and complexity of manual operation are greatly reduced, so that testers can complete test tasks more quickly. Strict data verification and security encryption mechanisms are adopted to reduce the error rate and data leakage risk in the test process, and improve the accuracy and credibility of the test results. The permission allocation mechanism based on user type ensures that users of different roles can only access functions and data within their authority, thereby enhancing the security and manageability of the system. Through paging display and dynamic filtering functions, a more intuitive and easy-to-use operation interface is provided, so that testers can more conveniently find and manage channel information. Through automated channel and engine user association configuration, as well as flexible SMS content segmentation and sending mechanism, it can adapt to various complex test requirements and business scenarios. Through detailed sending result records and statistical reports, rich data support is provided for testers, which helps to quickly locate problems and optimize channel performance.

[0042] In a specific embodiment, the process of executing step S1 may specifically include the following steps:

[0043] Receive the user name, password and verification code input by the user, perform image recognition on the verification code to obtain the verification code string, and perform MD5 encryption on the user name and password to obtain the encrypted login information;

[0044] Based on the encrypted login information, the user information table is queried to obtain the corresponding user record, and the account status in the user record is checked to determine whether it is in a normal state, and the status check result is obtained;

[0045] Generate a login verification mark according to the status check result and the matching result of the verification code string, and extract user type information from the user record based on the login verification mark;

[0046] According to the user type information, query the permission configuration table, obtain the corresponding operation permission list, and convert the operation permission list into a binary permission code to generate a permission bitmap;

[0047] Based on the user name and the permission bitmap, a unique session identifier is generated, and the session identifier is associated and mapped with the permission bitmap and stored in the permission cache to obtain a permission identifier.

[0048] Specifically, the login information input by the user is received, including the user name, password and verification code. The verification code is usually presented in the form of an image, and the purpose is to prevent malicious automated attacks, such as brute force cracking. In order to extract the verification code content from the image, the image recognition technology is used to convert the verification code image into a string. The optical character recognition (OCR) technology is used to convert the verification code image into a set of characters. The user name and password are encrypted by MD5. MD5 is a one-way hash function used to convert an input of any length into a hash value of a fixed length to ensure that the password is not exposed in plain text during transmission and storage. By connecting the user name and password and performing MD5 encryption, a 128-bit hash value is generated, which is used to replace the original user name and password to match with the database, thereby increasing the security of the system. Based on the encrypted login information, the user information table is queried to obtain the corresponding user record. In this process, the user name and the encrypted password are matched from the user table through the database query operation. If the query is successful, it indicates that the user's identity information is valid. After finding the corresponding user record, the account status in the user record is checked to determine whether the account can be used normally. The account status field usually has multiple possible values, such as "normal", "locked", "disabled", etc. The user's login qualification is determined by checking whether the status of this field is "normal". If the account status is "normal", the status check result is passed, otherwise it is failed, prompting the user that his account is locked or disabled for security reasons. After obtaining the status check result, combined with the previous verification code matching result, a login verification flag is generated. The login verification flag is used to indicate whether the login is verified. The two key conditions are whether the user account status is normal and whether the verification code matches. If both conditions are met, the login verification flag is set to "passed" and the user continues to enter the system. After the login verification passes, the user type information is extracted from the user record, such as "administrator" or "ordinary user". The user type information is used to determine what kind of operation permissions the user has in the system. Administrators usually have more permissions, while ordinary users have limited permissions. According to the user type information, the permission configuration table is queried to obtain the operation permission list corresponding to the user. The permission configuration table stores all permission items corresponding to different user types, such as channel configuration, user management, log viewing, etc. By querying the permission configuration table, we can obtain the operation permission list, which contains all the operations performed by the user in the system. To facilitate subsequent permission management, we convert the operation permission list into a binary permission code and generate a permission bitmap. The permission bitmap is an efficient way to represent permissions, which uses 0 or 1 for each bit to identify whether the user has the corresponding permission. The permission list is efficiently encoded into a numerical value, which facilitates quick permission checks when the user performs an operation. A unique session identifier is created based on the user name and the generated permission bitmap.The session identifier is used to uniquely identify a login session during the interaction between the user and the system, ensuring that the user's operations are correctly recorded and tracked. A unique session identifier is generated by combining the user name, timestamp, and permission bitmap and performing a hash operation to ensure that each login session is unique and prevent duplication and conflict of session identifiers. The generated session identifier is associated and mapped with the permission bitmap and stored in the permission cache to generate the final permission identifier. The permission cache is used to store all ongoing user sessions and their corresponding permission information, so that when a user performs any operation, the system quickly obtains the user's permission information from the permission cache to determine whether the user has the right to perform the operation.

[0049] In a specific embodiment, the process of executing step S2 may specifically include the following steps:

[0050] Extract the permission bitmap corresponding to the permission identifier from the permission cache, parse the permission bitmap, and obtain a list of channel fields accessible to the user;

[0051] Construct the SELECT clause of the SQL query statement based on the channel field list and select the corresponding fields from the channel configuration table of the database;

[0052] Receive the query conditions entered by the user, parse and filter the query conditions, and generate the WHERE clause of the SQL query statement;

[0053] Combine the SELECT clause and the WHERE clause to form a complete SQL query statement, execute the database query operation, and obtain the original channel information set;

[0054] Perform data desensitization processing on the original channel information set, partially mask the sensitive fields, obtain the desensitized channel information set, receive the sorting field and sorting method selected by the user, sort the desensitized channel information set according to the sorting field and sorting method, and obtain the sorted channel information set;

[0055] Calculate the total number of records in the sorted channel information set, calculate the total number of pages and the current page number according to the preset number of records displayed per page, and based on the current page number and the number of records displayed per page, intercept the corresponding data subset from the sorted channel information set to form a channel information list for the current page;

[0056] Convert the channel information list of the current page into JSON format, generate a data structure for front-end display, and combine the data structure in JSON format, the total number of records, the total number of pages and the current page number to generate a paging data packet, which is returned to the front-end for presentation.

[0057] Specifically, the access permission cache obtains the permission bitmap corresponding to the permission identifier. The permission bitmap is a binary coded structure, each bit of which represents the user's permission for a certain field or operation in the system. The permission bitmap is parsed to determine whether the user has the right to access a specific field based on the state of each bit in the bitmap. Assume that the permission bitmap is represented by a variable Indicates that each of them (in From 1 to ) indicates that the user has The access rights of the fields. If , the user has access to the field; if , the user has no right to access the field. By parsing the entire permission bitmap, a channel field list containing user-accessible fields is obtained. , whose contents are all The field name of the channel. Based on the channel field list , build the SELECT clause of the SQL query statement to select the fields that the user has permission to access from the channel configuration table of the database. The basic form of the SELECT clause is to select all fields from the field list. Receive the query conditions entered by the user to filter the channel configuration information. The query conditions entered by the user include information such as channel code, status, and operator type. Parse and securely filter the query conditions. The purpose of parsing is to understand the conditions entered by the user and ensure that the query content conforms to the expected format. For example, the channel code can only contain letters and numbers, and the status can only be certain specific values. Security filtering is to prevent SQL injection attacks, which use malicious input to undermine the integrity of the database. Before generating the WHERE clause of the SQL query statement, check and clean the user input. Combine the previously constructed SELECT clause with the WHERE clause to form a complete SQL query statement. When executed, the query statement will select the field information that meets the conditions from the channel configuration table based on the conditions entered by the user. Execute this query statement through the database management system to obtain the original channel information set , contains all channel data that meet the user's query conditions. Perform data desensitization on the original data. Partially mask sensitive fields to ensure information security. For example, for an IP address field, only the first few digits are displayed, and the last few digits are replaced by "*". Assume is the original channel information set, and the desensitized channel information set is expressed as , some of the fields are masked. After the data is masked, the sorting field and sorting method selected by the user are received, and the masked channel information set is sorted according to the user's requirements. For example, the user chooses to sort in ascending order by channel code or in descending order by status. The sorting process is done by sorting the masked information set. Use the sorting function to get the sorted channel information set After sorting is completed, calculate the total number of records in the sorted channel information set , and display the number of records per page according to the preset Calculate the total number of pages and the current page number If the total number of records cannot be divided by the number of records displayed per page, the extra records need to be placed on a separate page. The page number selected by the user to view is used to determine the content of the page. Based on the current page number and the number of records displayed per page, the sorted channel information set Extract a subset of the data on the current page , contains all the channel information that the user sees on the current page. In order to facilitate the display of the front end, the channel information list of the current page is Convert to JSON format. JSON is a lightweight data exchange format with good readability and easy front-end parsing and display. The generated JSON format data structure contains all the data of the current page, and the fields and values ​​of each record. , Total Pages and the current page number Combined to generate paging data packets , which contains all the paging information required by the user. The paging data package is returned to the front end for presentation, and the user can conveniently browse the content of the current page in the front end page and view other records through the page turning function.

[0058] In a specific embodiment, the process of executing step S3 may specifically include the following steps:

[0059] Receive the channel configuration information input by the user through the front-end interface, parse the channel configuration information into a data structure in the form of key-value pairs, traverse the data structure in the form of key-value pairs, check the format and range of each field according to the preset field validation rules, and generate a field validation result list;

[0060] Based on the field verification result list, determine whether there are fields that do not meet the rules, obtain the overall verification result mark, and based on the overall verification result mark, perform a uniqueness check on the channel code field, query whether there is an identical channel code in the database, and obtain a uniqueness check result;

[0061] Based on the uniqueness check result, construct an SQL update statement, map the verified channel configuration information to the corresponding database field, parameterize the SQL update statement, encrypt sensitive information, and generate a secure SQL execution statement;

[0062] Submit the safe SQL execution statement to the database management system, execute the update operation, obtain the number of rows affected by the update operation, and determine whether the update operation is successful based on the number of rows affected, and generate an update status flag;

[0063] Based on the update status flag, the database is re-queried to obtain the latest channel information, an updated channel information object is formed, and the updated channel information object is serialized into JSON format to generate an update result data packet, which is returned to the front end for display.

[0064] Specifically, the channel configuration information entered by the user in the front-end interface is received, including the channel code, downstream port, status, transmission speed, etc. The received configuration information is parsed into a data structure in the form of a key-value pair, where each key corresponds to the name of a configuration field, such as "channel code", and the value is the specific content entered by the user, such as "channel_001". This data structure facilitates the system to independently process and verify the content of each field. The data structure in the form of a key-value pair is traversed, and each field is verified one by one. The purpose of verification is to ensure that the data entered by the user meets the field format and range requirements preset by the system. Each field has pre-defined validation rules, such as the "channel code" field can only contain letters and numbers, and the downstream port must be an integer between 1000 and 65535. By applying the corresponding validation rules to each field, a field validation result list is generated, in which each element represents the validation result of the corresponding field, such as whether the validation is passed and the specific reason if the validation is not passed. After obtaining the verification results of all fields, based on the field verification result list, it is determined whether there are fields that do not meet the rules. If all fields pass the verification, the overall verification result mark generated is "passed"; if any field fails the verification, the overall verification result mark is "failed", and the system prompts the user to modify the fields that do not meet the rules. In the case of overall verification passing, the channel code field is checked for uniqueness to ensure that the newly entered channel code is unique in the system. The uniqueness check is implemented by querying the channel configuration table in the database to check whether the value of the channel code field already exists. If the query result is empty, it means that the channel code is unique and the operation can continue. Otherwise, the system returns a prompt and requires the user to modify the channel code. In the uniqueness check, an SQL update statement is constructed based on the configuration information entered by the user. The SQL update statement is used to write the new channel configuration information into the database, and the corresponding fields are updated according to the user's input. For example, suppose the user modifies the channel code, downstream port, and transmission speed. In the SQL update statement, parameterization is used, that is, placeholders are used instead of specific values, which effectively prevents SQL injection attacks and enhances the security of the system. For some sensitive information, such as the authentication secret or password of the channel, it is encrypted when constructing the SQL statement to ensure that the sensitive data will not be exposed in the database in plain text during the storage process. After generating a secure SQL execution statement, the SQL statement is submitted to the database management system and the update operation is performed. The execution result of the update operation is usually returned in the form of the number of affected rows. Indicates the number of records affected in this update operation. By judging the number of affected rows, we can know whether the update operation is successful. , it means the update is successful, and an update status flag is generated as "successful". , it means that the update was not successful. After the update operation is successful, the database is re-queried based on the update status flag to obtain the latest channel configuration information, forming an updated channel information object, which contains all the latest configuration field values ​​that the user has just modified, ensuring that the data in the database is consistent with the user's expectations. In order to facilitate the display of the front-end system, the updated channel information object is serialized into JSON format. JSON is a lightweight data exchange format. The serialized JSON data structure contains all updated field information, such as channel code, downstream port, sending speed, etc. An update result data packet is generated, which contains the JSON representation of the updated channel information object and the update status flag. The data packet will be returned to the front-end for display, and users can see on the front-end page that the configuration changes they have made have taken effect, thereby enhancing the user experience and the real-time nature of the interaction.

[0065] In a specific embodiment, the process of executing step S4 may specifically include the following steps:

[0066] Extract the channel code, downlink number, and transmittable number segment information from the updated channel information, construct query conditions, and perform a full table scan on the engine user table based on the query conditions to filter out active engine user records and form a candidate engine user list;

[0067] Traverse the candidate engine user list, extract the user ID and port number information of each engine user, generate an engine user attribute set, and perform a Cartesian product operation on the channel code and the engine user attribute set to generate an initial association record set;

[0068] For each record in the initial association record set, perform string concatenation based on the channel downlink number and the engine user port number to generate a unique prefix identifier, and then perform pattern matching on the prefix identifier and the sendable number segment to determine whether the sending conditions are met and filter out valid association records;

[0069] Assign priorities to valid association records, assign priority values ​​to each record according to the preset priority strategy, and insert valid association records into the channel binding relationship table in batches, set the status to active, and form an updated association configuration;

[0070] Re-index the updated association configuration to optimize query performance, and generate an association statistics report based on the updated association configuration, including the number of associated engine users and the covered number segment range information, and return the operation results.

[0071] Specifically, key fields are extracted from the channel information, including the channel code, the downlink number, and the sendable number segment information. The channel code is used to uniquely identify a specific SMS channel, the downlink number is used as the number displayed to the recipient when sending SMS, and the sendable number segment information indicates the range of number segments that the channel is allowed to send. By extracting this information, the query conditions are constructed, and then the engine users that meet the conditions are filtered out from the engine user table. The query conditions usually include the channel code and the number segment information. Based on these conditions, the engine user table is fully scanned to filter out the engine user records with an active status. The final candidate engine user list contains all engine users that are eligible to be associated with the current channel. The candidate engine user list is traversed to extract the user ID and port number information of each engine user. This information is used to describe the attribute set of the engine user, where the user ID is used to uniquely identify each user, and the port number is used to distinguish different service channels of the user. In order to generate a binding relationship with the channel, the channel code and the attribute set of the engine user are Cartesian product operations. Cartesian product operations are a mathematical operation used to combine each element of two sets to generate a new set. Cartesian product operation is performed on the channel code set (including a single channel code) and the engine user attribute set (including user ID and port number) to generate the initial set of associated records. After generating the initial set of associated records, each record is processed to generate a unique prefix identifier. The prefix identifier is used to uniquely identify the binding relationship between the channel and the engine user, and to ensure that the sent SMS meets the requirements of a specific number segment. The prefix identifier is generated by string concatenation of the channel downlink number and the engine user port number. By concatenating this information, a unique prefix identifier is generated between each channel and the engine user. The generated prefix identifier is pattern matched with the sendable number segment to determine whether the binding relationship meets the sending conditions. Pattern matching is to ensure that the number segment in the prefix identifier is within the sendable number segment range and that the SMS can be sent smoothly. The associated records that meet the conditions will be retained to form a valid set of associated records. For valid associated records, a priority is assigned to each record. The purpose of priority assignment is to ensure that some channels can be processed first when there is a concurrent sending demand between multiple channels. Assign a value to each record according to the preset priority strategy. Through the priority strategy, resources are reasonably allocated to ensure that urgent information is processed first. Insert all valid association records into the channel binding relationship table in batches and set their status to "active". The purpose of the insertion operation is to permanently record the association relationship in the database so that it can be quickly retrieved and used in the subsequent SMS sending process. After the insertion is completed, these association records become the binding configuration between the updated channel and the engine user.In order to improve the performance of subsequent queries, the updated association configuration is reindexed to significantly improve the query speed, reduce the system response time, and ensure that the database can quickly find the target data when retrieving the association records between the channel and the engine user, avoiding the high overhead of full table scans. Generate an association statistics report based on the updated association configuration. The content of the association statistics report includes the number of associated engine users in the current system and the number range information covered by these users. The operation results and statistical reports are returned to the front end for display, so that the administrator can easily view and analyze the current configuration.

[0072] In a specific embodiment, the process of executing step S5 may specifically include the following steps:

[0073] Extract the IP address and port number information of the channel to be tested from the associated configuration and construct the Socket connection parameters;

[0074] Create a TCP Socket object based on the Socket connection parameters, set the connection timeout to 10 seconds, and establish a network connection with the channel server;

[0075] Generate a 32-byte random string as the client identifier, concatenate the client identifier with the current timestamp to form the session initialization data, and perform a SHA-256 hash operation on the session initialization data to obtain the session key;

[0076] Construct a login request packet header, including a 4-byte total message length, a 1-byte instruction ID, and a 10-byte sequence number, and assemble a login request packet body, including 8-byte account information, a 16-byte encrypted password, and a 4-byte timestamp;

[0077] Combine the request header and the request body, use the session key to perform AES-256 encryption, generate a complete encrypted login request packet, send the encrypted login request packet through the TCP Socket connection, and start the response waiting timer;

[0078] Receive the login response data returned by the server, decrypt it using the session key, parse out the 1-byte status code, and determine whether the login is successful based on the status code. If successful, extract the session identifier assigned by the server. If unsuccessful, close the Socket connection and return an error message.

[0079] Specifically, the IP address and port number information of the channel to be tested are extracted from the association configuration, and this information is used to establish a connection with the channel server. The IP address and port number of the channel are key parameters for the system to interact with the channel server. Only with the accurate address and port number can the client ensure that the data is sent to the correct server. The IP address and port number information extracted from the association configuration are used to construct the Socket connection parameters, which include the address and port of the target server. Based on the Socket connection parameters, a TCP Socket object is created to establish a network connection with the channel server. While creating the TCP Socket object, a connection timeout of 10 seconds is set, which means that if the connection to the server fails within 10 seconds, the system will abandon the connection attempt to avoid affecting other operations due to a long waiting time. By setting a reasonable timeout, it is ensured that the connection failure can be quickly handled in the case of unstable network or slow server response. Generate a 32-byte random string as the client identifier. The client identifier is a unique random value that ensures that each client can be uniquely identified during the login process. After the client identifier is generated, it is spliced ​​with the current timestamp to form the session initialization data. The timestamp is used to indicate the specific time of the session, thereby providing a time dimension identifier for the entire session. By combining the client identifier with the timestamp, duplicate session attacks can be effectively prevented and the uniqueness of each login request can be ensured. Perform a SHA-256 hash operation on the session initialization data to generate a session key. SHA-256 is a secure hash function that generates a 256-bit key for subsequent data encryption and decryption by performing an irreversible hash conversion on the input data. After generating the session key, construct a login request data packet. The data packet is divided into a header and a body. The header contains a total message length of 4 bytes. , used to indicate the data length of the entire message, ensuring that the receiver knows the amount of data that should be processed. Then there is a 1-byte instruction ID , used to identify the type of this request. For example, the instruction ID of a login request may be 0x01, followed by a 10-byte sequence number , which is used to uniquely identify this request and correspond to the server's response. The package body contains the specific information required for login, including 8 bytes of account information , used to indicate the identity of the client; 16-byte encrypted password , the password is encrypted to ensure security during transmission; and a 4-byte timestamp , used to indicate the time information of this request. After constructing the request header and body, they are combined to form a complete login request data packet. In order to ensure the security of data during transmission, a session key is used The entire login request data packet is encrypted with AES-256. AES-256 is a symmetric encryption algorithm that uses a session key for encryption to effectively prevent the request packet from being intercepted or tampered with during transmission. After encryption is completed, the encrypted login request data packet is sent to the channel server through the previously established TCP Socket connection. At the same time, a response waiting timer is started to monitor the server's response time to ensure that the response is received within a reasonable time and to prevent the system from waiting indefinitely for the server's response and affecting the execution of other tasks. After sending the login request, the system enters a waiting state, ready to receive the server's login response data. When the server returns the response data, the session key is used Perform AES-256 decryption on the returned data. The decrypted original response data contains a 1-byte status code. The status code is used to identify the result of the login request. For example, the status code 0x00 indicates a successful login, and 0x01 indicates an incorrect account or password. The status code is used to determine whether the login is successful. If the status code indicates a successful login, the session identifier assigned by the server is extracted from the response data. , used to identify subsequent communication sessions, and is the credential for maintaining the session state between the client and the server. If the status code indicates that the login failed, the system will immediately close the Socket connection, release related resources, and return an error message to prompt the user with possible error reasons, such as incorrect password or network connection problems.

[0080] In a specific embodiment, the process of executing step S6 may specifically include the following steps:

[0081] Receive the test SMS content and receiving number input by the user, perform UTF-8 encoding conversion on the test SMS content to obtain a byte array, calculate the length of the byte array, determine whether segmentation is required based on a preset SMS length threshold, and obtain a segmentation flag;

[0082] Based on the segmentation mark, the super long SMS is segmented to generate a list of SMS segments, and a unique message ID is assigned to each SMS segment. The message ID is associated with the content of the SMS segment to form a sending task queue.

[0083] Construct a send request packet header, including a 4-byte total message length, a 1-byte instruction ID, and a 10-byte sequence number, and assemble a send request packet body, including the recipient number, SMS content length, SMS content, and priority information;

[0084] Combine the send request packet header, packet body and session identifier, use the session key to perform AES-256 encryption, generate a complete encrypted send request packet, send the encrypted send request packet through the established TCP Socket connection, and start the send timer;

[0085] Receive the sending response data returned by the server, decrypt it using the session key, parse out the sending status code and message ID, and based on the sending status code and message ID, update the sending status of the corresponding SMS fragment in the sending task queue and generate a sending result report.

[0086] Specifically, receive the test SMS content and receiving number entered by the user. The SMS content entered by the user contains different characters such as Chinese, English, and symbols. Perform UTF-8 encoding conversion on the test SMS content and convert it into a byte array. UTF-8 is a variable-length encoding that encodes characters from different character sets to ensure the portability of data in different systems and network environments. After the encoding is completed, calculate the length of the byte array to determine the overall size of the SMS content. Assume that the length of the byte array is , according to the preset SMS length threshold Determine whether the SMS needs to be segmented. , the SMS needs to be segmented to ensure that each SMS segment meets the SMS sending protocol restrictions to avoid failure during the sending process due to the SMS being too long. Based on the segmentation flag, the overlong SMS is segmented to generate a list of SMS segments. The segmentation process is to divide the original SMS content into several small segments, and the length of each segment does not exceed the preset threshold. . Assume that the original SMS is divided into The contents of each segment are , a unique message ID is assigned to each SMS fragment to identify the uniqueness of the fragment during the sending and receiving process. For example, the message ID is generated by adding the fragment sequence number to the original SMS ID to ensure that each fragment has a different ID. The message ID and the SMS fragment content are associated to form a sending task queue. , where each element contains the fragment content and the corresponding message ID. After the sending task queue is generated, a data packet of the sending request is constructed for each SMS fragment. The data packet of the sending request contains a header and a body. The header contains the total message length of 4 bytes. , used to indicate the size of the entire data packet; 1-byte instruction ID , used to identify the type of request, for example, the instruction ID sent by SMS may be Ox02; and a 10-byte sequence number , used to uniquely identify this sending request. The package body contains the receiving number , which is the number of the SMS recipient specified by the user; the length of the SMS content , used to identify the number of bytes of the specific SMS content sent this time; SMS content That is, the text content of the current segment of the SMS; and priority information , used to determine the processing order when sending concurrent messages, for example, SMS messages with high priority will be sent first. After constructing the send request packet header and body, the packet header, body and session identifier are combined to form a complete send request data packet. In order to ensure the security of data during transmission, a session key is used. AES-256 is used to encrypt the sending request data packet. AES-256 is a very strong symmetric encryption algorithm. By using the session key to encrypt the request packet, it can effectively prevent the data from being intercepted or tampered with during transmission. After encryption is completed, the encrypted sending request data packet is sent to the channel server through the established TCP Socket connection, and a sending timer is started to monitor the server's response time to ensure that the system can receive the server's response within a reasonable time. After starting the timer, the system enters a waiting state, ready to receive the sending response data returned by the server. When the server receives the request and completes processing, it returns a response data packet to the client. After receiving the response data returned by the server, the system uses the session key Perform AES-256 decryption on the response data. The decrypted data contains the sending status code. and message ID . The sending status code is used to identify the result of the sending request. For example, the status code Ox00 indicates successful sending, 0x01 indicates that the target number is unreachable, and 0x02 indicates that the sending failed. The message ID is used to correspond this response to the specific SMS fragment in the sending task queue. According to the parsed message ID, the corresponding SMS fragment is found in the sending task queue, and its sending status is updated according to the status code. If the status code is success, mark the SMS fragment as "successfully sent". If the status code is failure, mark it as "sending failed" and record the specific reason for failure. After updating the status of all SMS fragments in the sending task queue, generate a sending result report. The sending result report contains information such as the sending status, failure reason, and specific time of successful sending of each SMS fragment, which is used to comprehensively track and record the entire SMS sending process.

[0087] Furthermore, it also includes a dynamic channel scoring and intelligent routing step, which includes: receiving a text message test request initiated by a user, extracting the target number and text message content in the request; filtering out an available channel list from the associated configuration according to the number segment information of the target number; extracting the historical sending data of each channel in the available channel list, including the success rate, response time and complaint rate; performing an initial scoring on each channel based on the historical sending data to obtain a basic scoring list; extracting the most recent fault record of each channel from the system log, and calculating the reliability coefficient according to the fault frequency and recovery time; multiplying the reliability coefficient by the basic score to obtain a revised channel score; allocating a content adaptation coefficient to each channel according to the length and type of the text message content; multiplying the content adaptation coefficient by the revised channel score to obtain a final channel score; sorting the available channels in descending order based on the final channel score, and selecting the channel with the highest score as the main sending channel; selecting the channel with the second highest score as the backup channel for fast switching when the main channel fails to send; encapsulating the test text message content and the target number into a sending request, and initiating the sending through the selected main channel; recording the detailed process and sending results of this channel selection for subsequent scoring optimization and strategy adjustment.

[0088] Specifically, after receiving the SMS test request from the user, the system immediately parses the segment information of the target number. The system maintains a real-time updated segment-operator mapping table, and quickly determines the operator and location of the target number through table lookup operations. Based on the parsing results, the system filters out a list of matching channels from the associated configuration database. The matching here not only considers the operator, but also the regional factors, such as giving priority to channels in the same province as the target number. For each filtered channel, the system extracts the sending data of the last 7 days from the performance log database. The system uses a time-weighted average algorithm to calculate various indicators, with recent data having a higher weight. The specific calculation formula is as follows: score = (0.5*success rate + 0.3*(1-normalized response time) + 0.2*(1-complaint rate))*100; where normalized response time = (response time-minimum response time) / (maximum response time-minimum response time); the system also introduces a dynamic reliability coefficient. It calculates the mean time between failures (MTBF) and mean time to repair (MTTR) of each channel by analyzing the fault log. The calculation formula of the reliability coefficient is: Reliability coefficient = MTBF / (MTBF+MTTR) Multiply the basic score by the reliability coefficient to get the revised score. In addition, the system also takes content adaptability into account. It analyzes the characteristics of the SMS content (such as length, whether it contains special characters, etc.), combined with the historical performance of each channel, and assigns a content adaptation coefficient (range 0.8-1.2) to each channel. Final score = revised score * content adaptation coefficient; the system sorts the channels according to the final score, selects the highest score as the main channel, and the second highest score as the backup channel. During the sending process, if the main channel fails to send, the system will immediately switch to the backup channel without re-scoring the process, thereby ensuring the timeliness of sending. After each sending, the system will update the real-time performance indicators of the channel and record a detailed log of the selection process. These data will be used to continuously optimize the scoring algorithm, such as dynamically adjusting the weights of various indicators. Construct a spatiotemporal data cube to record channel performance data in different time periods and geographical locations; calculate the user sentiment index of each channel based on user feedback and social media data; use a deep learning model to analyze the semantic features of SMS content and match it with the historical performance of each channel; obtain the billing information of each channel in real time, and calculate the dynamic price factor in combination with the preset cost control strategy; use a time series prediction model to estimate the load of each channel in the short term in the future; construct a self-organizing scoring network to optimize the scoring strategy through local interaction and global coordination; calculate the final score based on factors such as performance, reliability, content matching, user sentiment, cost efficiency and load balancing; use genetic algorithms to dynamically adjust the weights of each factor to adapt to different business scenarios and goals; select the optimal channel for SMS sending based on the final score; record the channel selection process and sending results for subsequent optimization.

[0089] Furthermore, it also includes a multi-dimensional stress testing step, which includes: receiving stress testing parameters set by the user, including the number of concurrent users, duration and target throughput; generating a virtual user session pool according to the stress testing parameters, with each virtual user corresponding to an independent test thread; randomly selecting a group of test numbers from a preset test number library to ensure coverage of different operators and regions; randomly generating a batch of test SMS contents based on a predefined SMS template library to simulate real business scenarios; combining virtual user sessions, test numbers and SMS contents to generate a complete test task list; starting a timer to gradually increase active test threads according to the set number of concurrent users; each test thread obtains a test task from the task list to execute an SMS sending operation; real-time monitoring of system resource usage, including CPU load, memory usage and network bandwidth; collecting the execution results of each test thread, including response time, success rate and error type; triggering the test end process when the test duration reaches the set value or the system resources reach the critical value; summarizing the execution results of all test threads and calculating overall performance indicators, including average response time, throughput and error rate; generating a detailed stress testing report, including performance curves, bottleneck analysis and optimization suggestions.

[0090] Specifically, the system first receives the stress test parameters set by the user through the web interface. In addition to the conventional number of concurrent users, duration and target throughput, the system also allows users to set more fine-grained parameters, such as user growth mode (linear / step / exponential), geographical distribution ratio, etc. Based on these parameters, the system uses coroutine technology to create a virtual user session pool. Each coroutine represents a virtual user. Compared with the traditional multi-threading method, coroutines can simulate a large number of concurrent users more efficiently. The system maintains a dynamic test number library, which contains real numbers of different operators across the country. Before the test starts, the system will intelligently select a group of test numbers from the number library according to the set geographical distribution ratio. The Markov chain model is used to generate SMS content. The system pre-trains a language model based on a large number of real SMS messages and can generate random SMS content that meets specific business scenarios. This ensures the authenticity and diversity of the test content. The system uses a task queue mechanism to manage test tasks. The main control program pushes the generated test tasks to a distributed message queue (such as RabbitMQ), and multiple working nodes obtain tasks from the queue and execute them. In order to accurately control the growth of the number of concurrent users, the system implements a token bucket algorithm. The master program adds tokens to the token bucket according to the preset growth curve. The working node can only start a new test thread after obtaining the token. When each test thread performs the SMS sending operation, it will record detailed performance indicators, including DNS resolution time, TCP connection time, first byte response time, etc. These micro indicators help to accurately locate performance bottlenecks. The system monitors server resource usage in real time by integrating open source monitoring tools (such as Prometheus). It not only monitors the test system itself, but also monitors the status of network devices through the SNMP protocol to comprehensively evaluate system performance. All test data is written to a distributed time series database (such as InfluxDB) in real time. The system sets multiple warning thresholds. When an anomaly is detected (such as a sudden increase in the error rate of a channel), an alarm will be triggered and the test strategy will be automatically adjusted. After the test, the system will perform in-depth data analysis. It uses clustering algorithms to identify performance anomalies, analyzes the periodic characteristics of performance data through Fourier transform, and uses machine learning algorithms to predict system performance under different loads. The system generates an interactive HTML5 report. The report contains multiple visual charts, and users can customize charts by dragging and dropping to conduct multi-dimensional data exploration. The system also provides an API interface that allows test results to be integrated into the continuous integration / continuous deployment (CI / CD) process to achieve automated performance monitoring.Use reinforcement learning algorithms to train virtual user agents to simulate the sending behavior patterns of real users; randomly inject network delays, server crashes, configuration errors and other failures during the test process; implement multi-level concurrency models at the network request level, session level and business process level; perform real-time sampling and desensitization of production environment traffic, and introduce real traffic characteristics into the test environment; use online learning algorithms to dynamically adjust load generation strategies based on real-time system responses; build system call link graphs to identify performance bottlenecks and critical paths; use graph neural network models to analyze the complex correlations between various performance indicators; apply unsupervised learning algorithms to automatically discover abnormal patterns from massive test data; use natural language generation technology to automatically generate human-readable test analysis reports; optimize and adjust the system based on test results, and update test strategies.

[0091] Furthermore, it also includes intelligent fault diagnosis and self-healing steps, which include: regularly checking the health status of all active channels and collecting real-time performance indicators of each channel; comparing the real-time performance indicators with the preset normal thresholds to identify abnormal channels; performing basic connectivity tests on abnormal channels, including PING tests and port reachability checks; if the basic connectivity test fails, marking the channel as a network fault, otherwise proceeding to the next step of diagnosis; sending a predefined test SMS to the abnormal channel and analyzing the returned error code and error description; querying the fault knowledge base based on the error information to match possible fault causes and solutions; automatically executing the repair script according to the matched solution, including resetting the connection, updating the configuration and other operations; after executing the repair operation, rechecking the channel status to verify whether the fault is resolved; if the fault still exists, upgrading the fault level and starting the backup channel switching process; marking the abnormal channel as maintenance status and temporarily removing it from the available channel list; generating a fault report to record the fault phenomenon, diagnosis process and processing results in detail; updating the fault knowledge base and adding newly discovered fault modes and solutions to the database.

[0092] Specifically, the system continuously monitors the status of all active channels through the heartbeat mechanism. Each channel has a dedicated monitoring process that sends heartbeat packets to the channel at a preset time interval (the default is 30 seconds). Heartbeat detection uses an adaptive timeout mechanism. The system dynamically adjusts the timeout threshold based on the historical response time of each channel. The calculation formula is: timeout threshold = average response time + 3*standard deviation; When an anomaly is detected, the system first performs network layer diagnosis. It uses the traceroute tool to analyze the network path from the test server to the target channel and identify possible network bottlenecks. If the network layer is normal, the system performs application layer diagnosis. It sends a series of predefined test SMS messages that cover different error scenarios (such as authentication failure, insufficient balance, content violation, etc.). The system maintains a decision tree model to map the acquired error information to specific fault types. This model is continuously optimized through machine learning algorithms to improve the accuracy of fault identification. For identified faults, the system queries the fault knowledge base. The knowledge base stores historical fault handling experience and uses a graph database for storage, which can quickly retrieve similar faults and solutions. The system automatically generates a repair script based on the fault type. These scripts are written in a domain-specific language (DSL) that can describe complex repair logic and can be understood and edited by non-technical personnel. When performing repair operations, the system uses a transaction mechanism to ensure the atomicity of the operation. Each repair step has a corresponding rollback operation. If an exception occurs during the repair process, the system can automatically roll back to the initial state. After the repair is completed, the system will conduct multiple rounds of verification tests to not only check whether the fault is resolved, but also evaluate whether the repair operation has caused new problems. If the automatic repair fails, the system will start the manual intervention process. It will generate a fault ticket containing all diagnostic information and notify relevant personnel through multiple channels (such as email, SMS, and instant messaging tools). The system also implements a feedback learning mechanism. The manual operations of the operation and maintenance personnel will be recorded, and the system will continuously improve its fault handling strategy by analyzing these operations. The system will generate detailed fault reports, including the root cause analysis (RCA) of the fault and preventive measures. These reports will be clustered regularly to identify frequent fault types and provide direction for system optimization.Combine log analysis, performance indicators and network traffic characteristics to build a multi-dimensional fault feature vector; use the Bayesian network model to infer the root cause and propagation path of the fault; build a domain knowledge graph to achieve semantic-based intelligent fault diagnosis; through the learning of different repair strategies, achieve meta-learning optimization to quickly adapt to new fault types; divide the system into multiple autonomous intelligent agents to complete complex repair tasks through collaboration; use digital twin technology to simulate the possible impact of the repair process before taking repair actions; use genetic programming technology to automatically generate and optimize repair strategies; design an intuitive visual interface to support experts to intervene at key decision points; acquire knowledge from new fault cases through continuous learning, and use knowledge distillation technology to compress and optimize the knowledge base; record the fault diagnosis and repair process for continuous system improvement.

[0093] Furthermore, it also includes an adaptive test strategy generation step, which includes: analyzing historical test data to identify typical failure modes and high-risk periods for each channel; generating a customized test case set for each channel based on the failure mode and high-risk period; setting a dynamic test frequency to increase the test frequency during high-risk periods and reduce the test frequency during low-risk periods; monitoring system resource usage and automatically adjusting the priority and execution time of test tasks according to the current load; recording the triggering reason for each test, including timed triggering, manual triggering or abnormal triggering; performing real-time analysis of test results to detect performance mutations or abnormal patterns; when an abnormality is detected, automatically generating a deep test task to perform targeted troubleshooting; dynamically adjusting the test parameters of each channel, such as the timeout threshold and the number of retries, according to the stability of the test results; regularly evaluating the effectiveness of the test strategy and calculating the fault prediction accuracy and test coverage; based on the evaluation results, automatically optimizing the test case set, removing inefficient cases, and adding new test scenarios; generating a test strategy report to display the strategy adjustment process and performance improvement effect; synchronizing the optimized test strategy to all test nodes to ensure the consistency and comprehensiveness of the test.

[0094] Specifically, the system first conducts in-depth mining of historical test data. It uses time series analysis algorithms (such as ARIMA models) to identify periodic failure modes and abnormal high-incidence periods for each channel. Based on the analysis results, the system generates an initial set of test cases for each channel. This set contains not only general test cases, but also specific test cases for the historical failures of the channel. The system implements a test case optimizer based on a genetic algorithm. It encodes each test case as a gene, continuously generates new test case combinations through crossover and mutation operations, and evaluates the effectiveness of each combination through a fitness function. The dynamic time warping (DTW) algorithm is used to set the test frequency. The system matches the time series of historical failures with the current time and increases the test frequency during the time period with a high matching degree. The system implements elastic test resource management by integrating open source container orchestration tools (such as Kubernetes). When the system load is low, more test tasks are automatically started; when the load is high, the priority of the test tasks is dynamically reduced. The triggering cause and context information of each test are recorded in detail. The system uses natural language processing technology to analyze these records and extract key information for subsequent strategy optimization. The system implements a real-time anomaly detection module. It uses a sliding window algorithm to calculate the moving average and standard deviation of each performance indicator. When an indicator exceeds the normal range (such as mean ± 3*standard deviation), the deep testing process is immediately triggered. The generation of deep testing tasks adopts a heuristic search algorithm. According to the current abnormal situation, the system selects the most relevant use cases from the test case library and generates new test scenarios through combination and mutation. The system continuously runs a test effectiveness evaluator in the background. It calculates indicators such as fault detection rate, execution time, and resource consumption for each test case. After comprehensive scoring, it regularly eliminates inefficient use cases and generates similar variants for efficient use cases. The global optimization of the test strategy adopts a reinforcement learning method. The system models the entire test process as a Markov decision process. Through continuous interaction with the environment, it continuously adjusts the strategy to maximize long-term benefits (such as the balance between fault detection rate and resource utilization efficiency). The system provides a visual strategy editor that allows experts to fine-tune the test strategy through a graphical interface. These manual adjustments will be recorded and used as additional reward signals for the reinforcement learning algorithm. The system implements a distributed strategy synchronization mechanism. The optimized test strategy is propagated to all test nodes through the gossip protocol, ensuring the policy consistency of the entire test cluster while improving the scalability and fault tolerance of the system.The test strategy is encoded into a gene sequence containing test cases, execution order, and parameter settings; the NSGA-III algorithm is used to simultaneously optimize multiple goals such as test coverage, execution time, and resource consumption; the symbiotic evolution of test cases and test strategies is achieved, and they promote each other and improve together; the fitness function is dynamically adjusted according to system changes and test results; the behavior tree model is used to describe complex test logic and improve the expressiveness of the test strategy; the idea of ​​ant colony algorithm is used to achieve the collaborative work of multiple test agents; the idea of ​​generative adversarial network is introduced to train the test generator and evaluator at the same time; automatic machine learning technology is used to automatically extract valuable features from historical test data; incremental learning and transfer learning are achieved to quickly adapt to new test requirements; SHAP technology is used to provide explainable analysis of test strategy decisions.

[0095] The above describes the SMS channel test configuration method in the embodiment of the present invention. The following describes the SMS channel test configuration device in the embodiment of the present invention. Figure 2 , an embodiment of the SMS channel test configuration device in the embodiment of the present invention includes:

[0096] The verification module is used to verify the login information input by the user, determine the user type according to the verification result, assign operation permissions based on the user type, and generate permission identification;

[0097] The filtering module is used to extract channel information from the database based on the permission identifier, filter the channel information according to the query conditions input by the user, and present the filtered results in a paged manner;

[0098] An update module is used to receive channel configuration information input by a user, verify the legitimacy of the channel configuration information, and update the verified channel configuration information to the database to obtain updated channel information;

[0099] A query module is used to query the engine user table based on the updated channel information, generate association records between the channel and the engine user according to the query results, and form an association configuration;

[0100] The establishment module is used to establish a communication session based on TCP / IP Socket according to the channel to be tested and the associated configuration selected by the user, send a login request through a predefined communication protocol, and obtain a session identifier;

[0101] The sending module is used to receive the test SMS content input by the user, encapsulate the test SMS content and the session identifier into a sending request, send the sending request through the communication session, and record the sending result.

[0102] Through the collaboration of the above components, centralized channel configuration management and automated testing processes, the time and complexity of manual operations are greatly reduced, allowing testers to complete testing tasks more quickly. Strict data verification and security encryption mechanisms are adopted to reduce the error rate and data leakage risks during the test process, and improve the accuracy and credibility of the test results. The permission allocation mechanism based on user type ensures that users of different roles can only access functions and data within their authority, enhancing the security and manageability of the system. Through paging display and dynamic filtering functions, a more intuitive and easy-to-use operation interface is provided, allowing testers to more conveniently find and manage channel information. Through automated channel and engine user association configuration, as well as flexible SMS content segmentation and sending mechanisms, it can adapt to various complex testing needs and business scenarios. Through detailed sending result records and statistical reports, it provides testers with rich data support, which helps to quickly locate problems and optimize channel performance.

[0103] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0104] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0105] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0106] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0109] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for configuring a short message channel test, characterized in that: The method comprises: Verify the login information input by the user, determine the user type according to the verification result, assign operation permissions based on the user type, and generate permission identification; Extracting channel information from a database based on the permission identifier, filtering the channel information according to a query condition input by a user, and presenting the filtered results in a paged manner; Receive channel configuration information input by a user, verify the legitimacy of the channel configuration information, update the verified channel configuration information to a database, and obtain updated channel information; Based on the updated channel information, query the engine user table, generate association records between the channel and the engine user according to the query result, and form an association configuration; According to the channel to be tested selected by the user and the associated configuration, a communication session based on TCP / IP Socket is established, a login request is sent through a predefined communication protocol, and a session identifier is obtained; Receive the test SMS content input by the user, encapsulate the test SMS content and the session identifier into a sending request, send the sending request through the communication session, and record the sending result.

2. The SMS channel test configuration method according to claim 1, characterized in that: The step of verifying the login information input by the user, determining the user type according to the verification result, assigning operation permissions based on the user type, and generating permission identification includes: Receive the user name, password and verification code input by the user, perform image recognition on the verification code to obtain a verification code string, and perform MD5 encryption on the user name and password to obtain encrypted login information; Based on the encrypted login information, query the user information table to obtain the corresponding user record, and check the account status in the user record to determine whether it is in a normal state, and obtain a status check result; Generate a login verification mark according to the status check result and the matching result of the verification code character string, and extract user type information from the user record based on the login verification mark; According to the user type information, query the permission configuration table to obtain the corresponding operation permission list, and convert the operation permission list into a binary permission code to generate a permission bitmap; Based on the user name and the permission bitmap, a unique session identifier is generated, and the session identifier is associated and mapped with the permission bitmap and stored in a permission cache to obtain a permission identifier.

3. The SMS channel test configuration method according to claim 2, characterized in that: The extracting channel information from the database based on the permission identifier, filtering the channel information according to the query condition input by the user, and presenting the filtered results in a paging manner, includes: Extracting a permission bitmap corresponding to the permission identifier from the permission cache, parsing the permission bitmap, and obtaining a list of channel fields accessible to the user; Constructing a SELECT clause of an SQL query statement based on the channel field list, and selecting corresponding fields from the channel configuration table of the database; Receive query conditions input by the user, parse and filter the query conditions, and generate a WHERE clause of an SQL query statement; Combine the SELECT clause and the WHERE clause to form a complete SQL query statement, execute a database query operation, and obtain the original channel information set; Performing data desensitization processing on the original channel information set, partially masking the sensitive fields to obtain a desensitized channel information set, receiving a sorting field and a sorting method selected by a user, and sorting the desensitized channel information set according to the sorting field and the sorting method to obtain a sorted channel information set; Calculating the total number of records in the sorted channel information set, calculating the total number of pages and the current page number according to the preset number of records displayed per page, and based on the current page number and the number of records displayed per page, intercepting a corresponding data subset from the sorted channel information set to form a channel information list for the current page; Convert the channel information list of the current page into JSON format, generate a data structure for front-end display, and combine the data structure in JSON format, the total number of records, the total number of pages and the current page number to generate a paging data packet, which is returned to the front-end for presentation.

4. The SMS channel test configuration method according to claim 3, characterized in that: The receiving of the channel configuration information input by the user, performing a validity verification on the channel configuration information, and updating the verified channel configuration information to the database to obtain the updated channel information includes: Receive channel configuration information input by the user through the front-end interface, parse the channel configuration information into a data structure in the form of key-value pairs, traverse the data structure in the form of key-value pairs, perform format and range checks on each field according to preset field validation rules, and generate a field validation result list; Based on the field verification result list, determine whether there are fields that do not comply with the rules, obtain an overall verification result flag, and perform a uniqueness check on the channel code field based on the overall verification result flag, query whether there is an identical channel code in the database, and obtain a uniqueness check result; Based on the uniqueness check result, construct an SQL update statement, map the verified channel configuration information to the corresponding database field, parameterize the SQL update statement, encrypt the sensitive information, and generate a secure SQL execution statement; Submit the secure SQL execution statement to the database management system, execute an update operation, obtain the number of rows affected by the update operation, determine whether the update operation is successful based on the number of rows affected, and generate an update status flag; Based on the update status flag, the database is requeried to obtain the latest channel information, an updated channel information object is formed, and the updated channel information object is serialized into JSON format, an update result data packet is generated, and returned to the front end for display.

5. The SMS channel test configuration method according to claim 1, characterized in that: The querying of the engine user table based on the updated channel information and generating the association record between the channel and the engine user according to the query result to form the association configuration includes: Extracting the channel code, downlink number and transmittable number segment information from the updated channel information, constructing a query condition, and based on the query condition, performing a full table scan on the engine user table, screening out active engine user records, and forming a candidate engine user list; Traversing the candidate engine user list, extracting the user ID and port number information of each engine user, generating an engine user attribute set, and performing a Cartesian product operation on the channel code and the engine user attribute set to generate an initial association record set; For each record in the initial association record set, string concatenation is performed based on the channel downlink number and the engine user port number to generate a unique prefix identifier, and the prefix identifier is pattern matched with the sendable number segment to determine whether the sending condition is met, and the valid association record is screened out; Assigning priorities to the valid association records, assigning priority values ​​to each record according to a preset priority strategy, and inserting the valid association records into the channel binding relationship table in batches, setting the status to active, and forming an updated association configuration; The updated association configuration is indexed and rebuilt to optimize query performance, and based on the updated association configuration, an association statistics report is generated, including the number of associated engine users and the covered number segment range information, and the operation result is returned.

6. The SMS channel test configuration method according to claim 1, characterized in that: The step of establishing a communication session based on a TCP / IP Socket according to the channel to be tested selected by the user and the associated configuration, sending a login request through a predefined communication protocol, and obtaining a session identifier includes: Extract the IP address and port number information of the channel to be tested from the associated configuration, and construct Socket connection parameters; Create a TCP Socket object based on the Socket connection parameters, set the connection timeout to 10 seconds, and establish a network connection with the channel server; Generate a 32-byte random string as a client identifier, concatenate the client identifier with the current timestamp to form session initialization data, and perform a SHA-256 hash operation on the session initialization data to obtain a session key; Construct a login request packet header, including a 4-byte total message length, a 1-byte instruction ID, and a 10-byte sequence number, and assemble a login request packet body, including 8-byte account information, a 16-byte encrypted password, and a 4-byte timestamp; Combine the request packet header and the request packet body, perform AES-256 encryption using the session key, generate a complete encrypted login request packet, send the encrypted login request packet through the TCP Socket connection, and start a response waiting timer; Receive the login response data returned by the server, decrypt it using the session key, parse out a 1-byte status code, and determine whether the login is successful based on the status code. If successful, extract the session identifier assigned by the server. If unsuccessful, close the Socket connection and return an error message.

7. The SMS channel test configuration method according to claim 1, characterized in that: The receiving of the test SMS content input by the user, encapsulating the test SMS content and the session identifier into a sending request, sending the sending request through the communication session, and recording the sending result, includes: Receive the test SMS content and the receiving number input by the user, perform UTF-8 encoding conversion on the test SMS content to obtain a byte array, calculate the length of the byte array, determine whether segmentation is required according to a preset SMS length threshold, and obtain a segmentation flag; Based on the segmentation mark, the super long SMS is segmented to generate a list of SMS segments, and a unique message ID is assigned to each SMS segment, and the message ID is associated with the content of the SMS segment to form a sending task queue; Construct a send request packet header, including a 4-byte total message length, a 1-byte instruction ID, and a 10-byte sequence number, and assemble a send request packet body, including the recipient number, SMS content length, SMS content, and priority information; The sending request packet header, packet body and session identifier are combined, and AES-256 encryption is performed using the session key to generate a complete encrypted sending request packet, and the encrypted sending request packet is sent through the established TCP Socket connection, and a sending timer is started; The sending response data returned by the receiving server is decrypted using the session key, the sending status code and the message ID are parsed, and according to the sending status code and the message ID, the sending status of the corresponding SMS fragment in the sending task queue is updated, and a sending result report is generated.

8. A short message channel test configuration device, characterized in that: Used to execute the SMS channel test configuration method according to any one of claims 1 to 7, the SMS channel test configuration device comprises: A verification module, used to verify the login information input by the user, determine the user type according to the verification result, assign operation permissions based on the user type, and generate permission identification; A screening module, used to extract channel information from the database based on the permission identifier, screen the channel information according to the query conditions input by the user, and present the screened results in a paging manner; An updating module is used to receive channel configuration information input by a user, verify the legitimacy of the channel configuration information, and update the verified channel configuration information to a database to obtain updated channel information; A query module, used to query the engine user table based on the updated channel information, generate an association record between the channel and the engine user according to the query result, and form an association configuration; An establishment module is used to establish a communication session based on TCP / IP Socket according to the channel to be tested selected by the user and the associated configuration, send a login request through a predefined communication protocol, and obtain a session identifier; The sending module is used to receive the test SMS content input by the user, encapsulate the test SMS content and the session identifier into a sending request, send the sending request through the communication session, and record the sending result.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the SMS channel test configuration method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is enabled to execute the SMS channel test configuration method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic test method and apparatus of short message service

    CN107948942A

  • Authority management method and device, computer readable medium and electronic equipment

    CN113612740A

Cited By

  • Early identification of optical transceiver failures

    US12665685B2

  • Early identification of optical transceiver failures

    US20240380498A1