Session message protocol verification method, device, storage medium and computer equipment

Through the automated session message protocol verification method, the problem of verification complexity in diverse front-end channels and application versions is solved, efficient and accurate protocol verification is achieved, and manual errors are reduced.

CN118827486BActive Publication Date: 2024-12-13GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411297086.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-13
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

The regression verification of session message protocols in the prior art is complex and error-prone, especially in diverse front-end channels and application versions, and manual mode is difficult to effectively verify.

Method used

By determining the customer service account and user account, assigning the session message protocol, establishing a session, and sending sample messages for verification, automatically converting and matching message fields to achieve verification, supporting retry and recording verification results.

Benefits of technology

It realizes automated session message protocol verification in different front-end channels and application versions, reducing the complexity and error rate of manual operations, and improving verification efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827486B_ABST
    Figure CN118827486B_ABST
Patent Text Reader

Abstract

In the session message protocol verification method, apparatus, storage medium and computer equipment provided in the present application, a customer service account is determined, and a user account of each customer service account in each application version in each front-end channel is determined; a session message protocol is assigned to each customer service account, and a session between each customer service account and the user account is established; for each customer service account, a sample message in the session message protocol corresponding to the customer service account is sent to the user account of the customer service account; for each user account, a target session message protocol of the sample message received by the user account and a target data format of the target session protocol are determined, a message field of the sample message is obtained, the message field of the sample message is converted to the target data format, and the converted message field is matched with the message field in the target session message protocol to obtain a verification result. In this way, the session message protocol is automatically verified, reducing the complexity and error rate of manual operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a session message protocol verification method, device, storage medium and computer equipment. Background Art

[0002] With the rapid development of artificial intelligence technology and its wide application in the field of online customer service, conversational systems are playing an increasingly important role in all walks of life. As the core component of conversational systems, message transmission and processing have become crucial.

[0003] Over time, conversational systems need to adapt to different front-end channels and application versions to meet the diverse needs of users. For example, on the PC and mobile terminals, users may use different applications to communicate with customer service; in different application versions, there may be differences before and after reconstruction. In order to ensure normal operation in these different situations, different protocols used by conversational messages are defined to meet different needs. Different front-end channels and application versions have applicable and inapplicable message protocols, so conversational message protocols need to be verified in each front-end channel and application version. However, due to the wide variety of protocols and the large number of application versions, the manual regression verification of conversational message protocols becomes complicated and error-prone. Summary of the invention

[0004] The purpose of the present application is to solve at least one of the above-mentioned technical defects, especially the technical defect that the regression verification of the session message protocol in the manual mode in the prior art becomes complicated and error-prone.

[0005] In a first aspect, the present application provides a session message protocol verification method, the method comprising:

[0006] Determine at least one customer service account, and determine for each of the customer service accounts, a user account corresponding to each application version in each front-end channel;

[0007] Assigning a session message protocol in the preset configuration protocol list to each of the customer service accounts, and establishing a session between each of the customer service accounts and the corresponding user account;

[0008] For each of the customer service accounts, send the example message in the session message protocol corresponding to the customer service account to the user account corresponding to the customer service account;

[0009] For each of the user accounts, determine the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol, obtain the message field of the sample message, convert the message field of the sample message into the target data format, match the converted message field with the message field in the target session message protocol, and obtain the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account.

[0010] In one embodiment, the step of determining at least one customer service account and determining the user account corresponding to each application version in each front-end channel for each customer service account includes:

[0011] Determine the number of session message protocol data in the preset configuration protocol list;

[0012] In each session message protocol data in the preset configuration protocol list, determining the number of applicable protocol versions and the number of non-applicable protocol versions corresponding to each session message protocol data;

[0013] Determine the total number of customer service accounts according to the number of session message protocol data in the preset configuration protocol list, and create customer service accounts corresponding to the total number of customer service accounts;

[0014] The number of user accounts is determined based on the total number of applicable protocol versions and the total number of non-applicable protocol versions corresponding to the preset configuration protocol list, as well as the number of session message protocol data in the preset configuration protocol list, and a corresponding user account is created for each of the application versions in each of the front-end channels for each of the customer service accounts based on the number of user accounts.

[0015] In one embodiment, the step of matching the converted message field with the message field in the target session message protocol to obtain a verification result of the target session message protocol in the front-end channel and application version corresponding to the user account includes:

[0016] Determine a first message field value corresponding to the converted message field, and determine a data type corresponding to the first message field value;

[0017] Determine a second message field value corresponding to a message field in the target session message protocol, and determine a data type corresponding to the second message field value;

[0018] If the data type corresponding to the first message field value is the same as the data type of the second message field value, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is verification passed; otherwise, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is verification failed.

[0019] In one embodiment, the method further comprises:

[0020] When a session is established between each customer service account and the corresponding user account, the session survival flag of each customer service account and each user account is refreshed at a first preset frequency to keep each customer service account and each user account logged in.

[0021] In one embodiment, the method further comprises:

[0022] The latest session message protocol is obtained at a second preset frequency, and the latest session message protocol is added to the preset configuration protocol list.

[0023] In one embodiment, the method further comprises:

[0024] For each of the user accounts, if the verification result corresponding to the user account is verification failure,

[0025] or,

[0026] For each customer service account, if the example message corresponding to the customer service account fails to be sent,

[0027] Then retry and record the number of retries until the number of retries reaches the corresponding preset value.

[0028] In one embodiment, the method further comprises:

[0029] For each of the user accounts, the protocol name of each target session message protocol corresponding to the user account, the verification result corresponding to each target session message protocol, and the generation time corresponding to each verification result are recorded in the preset session message protocol verification result list.

[0030] In a second aspect, the present application provides a session message protocol verification device, the device comprising:

[0031] An account determination module, used to determine at least one customer service account, and to determine for each of the customer service accounts, a user account corresponding to each application version in each front-end channel;

[0032] A session establishment module, used to assign a session message protocol in a preset configuration protocol list to each of the customer service accounts, and to establish a session between each of the customer service accounts and a corresponding user account;

[0033] A message sending module, used for sending, for each of the customer service accounts, the example message in the session message protocol corresponding to the customer service account to the user account corresponding to the customer service account;

[0034] The protocol verification module is used to determine, for each of the user accounts, the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol, and to obtain the message field of the sample message, convert the message field of the sample message into the target data format, match the converted message field with the message field in the target session message protocol, and obtain the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account.

[0035] In a third aspect, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the session message protocol verification method described in any of the above embodiments.

[0036] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;

[0037] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the session message protocol verification method described in any one of the above embodiments are performed.

[0038] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0039] In the session message protocol verification method, apparatus, storage medium and computer equipment provided in the present application, first, at least one customer service account is determined, and for each customer service account, a user account corresponding to each application version in each front-end channel is determined; then, the session message protocol in the preset configuration protocol list is assigned to each customer service account, and a session between each customer service account and the corresponding user account is established to ensure that each customer service account can use the assigned session message protocol to communicate with the corresponding user account in different front-end channels and application versions; then, for each customer service account, the sample message in the session message protocol corresponding to the customer service account is sent to the user account corresponding to the customer service account to simulate a real session scenario; finally, for each user account, the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol are determined, and the message field of the sample message is obtained, and the message field of the sample message is converted to the target data format, and the converted message field is matched with the message field in the target session message protocol, and the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is obtained, thereby realizing automatic verification of the session message protocol. In this way, the regression verification of the session message protocol can be automatically performed in different front-end channels and application versions, reducing the complexity and error rate of manual operations. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 A flow chart of a session message protocol verification method provided in an embodiment of the present application;

[0042] Figure 2 A schematic diagram of the steps for determining an account number provided in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of the steps of the target session message verification protocol provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of the structure of a session message protocol verification device provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In one embodiment, the present application provides a session message protocol verification method. The following embodiments are described by taking the method applied to a computer device as an example. It can be understood that the computer device can be any device with data processing functions, including but not limited to a single server, a server cluster, a personal laptop, a desktop computer, etc. Figure 1 As shown, the present application provides a session message protocol verification method, the method comprising:

[0048] S101: Determine at least one customer service account, and determine for each of the customer service accounts, a user account corresponding to each application version in each front-end channel.

[0049] Among them, user account refers to the user account registered in the conversation system, which is used to communicate with customer service. Customer service account refers to the customer service account registered in the conversation system, which is used to communicate with users. Conversation refers to the conversation process between the customer service account and the user account, which may include the transmission and processing of one or more messages. The conversation system enables communication between customer service and users by recording and managing conversations. Front-end channel refers to the platform or channel for users to communicate with customer service, such as web pages, mobile applications, social media, etc. Application version refers to the specific software version in the front-end channel.

[0050] In this step, the method for determining the customer service account can be selected according to the actual situation. For example, it can be registered in the test environment or pre-set. The method for determining the user account corresponding to each customer service account in each front-end channel for each application version can be selected according to the actual situation. For example, the front-end channel and application version to be verified by the session message protocol can be determined first, such as the test website, mobile application, etc.; then, the user accounts of different front-end channels and different application versions can be registered or pre-set in the test environment; then, each customer service account can be associated with the corresponding user account through a matching tool or script to ensure that each customer service account has user accounts for different front-end channels and different application versions. It can be understood that the user account corresponding to each application version of each customer service account in each front-end channel can be one or more.

[0051] In one example, a list of available customer service accounts may be determined first, wherein the customer service accounts included in the list may be registered in a customer service system or associated with specific front-end channels and application versions; then, a list of front-end channels and application versions supported in the session system may be determined, which may include websites, mobile applications, social media platforms, etc.; thereafter, the user account may be matched with the customer service account through the data association and matching functions of the customer service system.

[0052] S102: Allocate a session message protocol in the preset configuration protocol list to each of the customer service accounts, and establish a session between each of the customer service accounts and a corresponding user account.

[0053] The preset configuration protocol list refers to a pre-defined list of various session message protocol formats, which can be managed by technical personnel through the front-end interactive page. The session message protocol is used to describe the message format and specifications used for communication between the customer service account and the user account.

[0054] In this step, first, confirm that the required session message protocol is included in the preset configuration protocol list. Then, according to the preset configuration protocol list, each session message protocol is assigned to the corresponding customer service account. Among them, the allocation method can be determined according to the actual situation. For example, the session message protocol can be randomly assigned to the customer service account, or the session message protocol can be evenly assigned to the customer service account. The priority of the customer service account can also be determined, and the session message protocol can be assigned according to the priority of the customer service account. Further, a session message protocol can be assigned to only one customer service account, so that each customer service account is focused on verifying a session message protocol, and when any session message protocol verification result is wrong, the corresponding customer service account can be immediately located; a session message protocol can also be assigned to at least two customer service accounts to achieve redundancy and backup mechanism. If one of the customer service accounts has problems or is unavailable, other customer service accounts can still continue to verify the session message protocol to ensure the stability of verification; a customer service account can also correspond to multiple session message protocols to save resources.

[0055] The session between each customer service account and the corresponding user account can be established based on actual conditions. For example, when a user sends a request message to the session system, the corresponding customer service account is searched based on the user account information, and the message sent by the user account is routed to the corresponding customer service account to create a new session.

[0056] S103: For each of the customer service accounts, send the example message in the session message protocol corresponding to the customer service account to the user account corresponding to the customer service account.

[0057] The sample message refers to the specific message content written in the preset message protocol format, which can be virtual simulation data used to demonstrate and test the transmission and parsing of messages. The sample message contains various fields, parameters and values ​​to show how the message is used in actual communication. It can be understood that the sample message contains real or fictitious data and can simulate the situation in actual communication. Therefore, the session message protocol can be verified by parsing and processing the sample message to verify whether it is applicable to different application versions and front-end channels.

[0058] In this step, after the session between the customer service account and the user account is established, the customer service account can be triggered through a pre-written script or interface to obtain sample messages from the corresponding session message protocol and send the sample messages to the corresponding user accounts in sequence.

[0059] Furthermore, if a customer service account corresponds to multiple session message protocols, after obtaining a sample message of a session message protocol, the sample message can be immediately sent to the corresponding user account. After the sample message is successfully sent, the sample message of the next session message protocol is obtained and sent to the corresponding user account. For example, customer service account A corresponds to user account B, and corresponds to session message protocol C and session message protocol D. After customer service account A obtains the sample message of session message protocol C, it sends the sample message of session message protocol C to user account B. After the sending is successful, customer service account A continues to obtain the sample message of session message protocol D and sends the sample message to user account B.

[0060] In one example, when processing a session, the customer service account obtains the corresponding message protocol format, such as JSON (JavaScript Object Notation) format, XML (Extensible Markup Language) format, etc., according to the session message protocol. Based on the obtained message protocol format, the customer service account can use a predefined template or program generation tool to construct a sample message in the corresponding message protocol format and fill in specific data content. The customer service account sends the constructed sample message to the corresponding user account through a message delivery mechanism such as message push or email sending within the system.

[0061] S104: For each of the user accounts, determine the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol, obtain the message field of the sample message, convert the message field of the sample message into the target data format, match the converted message field with the message field in the target session message protocol, and obtain the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account.

[0062] The target data format refers to the data format required by the target session message protocol, such as JSON and XML. The message field refers to the specific data content in the sample message, including various fields, parameters, and values. The verification result refers to the result obtained after matching and verifying the message field according to the target session message protocol, including information such as verification pass or verification fail.

[0063] It can be understood that the target session message protocol defines the specifications and conventions for exchanging messages between the communicating parties, while the target data format defines the specific encoding method of the message fields. Therefore, determining the target session message protocol and the target data format can ensure that the sample message can be correctly parsed and processed. The purpose of using message fields for matching is to verify whether the sample message complies with the specifications and requirements of the target session message protocol. For example, the integrity of the sample message can be verified to ensure that all required fields exist and are not missing; the correctness of the sample message can also be verified to compare whether the field values ​​comply with the expected range, format and data type; and whether the sample message complies with the version requirements of the target session message protocol.

[0064] In this step, the user account will receive one or more sample messages sent by the customer service account. Each sample message received may correspond to a different session message protocol. Therefore, the session message protocol verification can be performed on each sample message received by each user account in turn.

[0065] Specifically, each time a sample message is received from a customer service account, the corresponding target session message protocol is first determined based on the sample message, and then the target data format specified by the target session message protocol is determined. At the same time, the message field in the sample message is parsed, and the message field is converted according to the target data format. The converted message field is then matched with the message field in the target session protocol to obtain a verification result. It can be understood that the customer service account is a user account that sends sample messages of the same session message protocol to different front-end channels and different application versions. Therefore, through the user account, the applicability of the session message protocol in different front-end channels and different application versions can be verified.

[0066] In one example, the user account can determine the target session message protocol and data format based on the identification information in the sample message, such as the message type and message version, etc., wherein the identification information can be defined and agreed in the sample message. Afterwards, according to the target data format, the user account can use the corresponding parsing tool or programming language library to parse the sample message, wherein the parsing is to extract the fields in the sample message. Then, after parsing the sample message, the user account can obtain the message fields in the sample message. If the target data format is inconsistent with the data format of the sample message, the user account can convert the message fields, for example, convert the fields in the sample message to the field type and naming specifications required by the target data format. Afterwards, the user account matches the converted message fields with the fields defined in the target session message protocol to verify whether the message fields comply with the specifications and requirements of the target session message protocol. Finally, according to the matching result, the user account can obtain the verification result of the target session message protocol, wherein the verification result can determine whether the sample message complies with the specifications of the target session message protocol, and whether the message fields are complete and correct.

[0067] In another example, if the target session message protocol uses the JSON Schema format, the vcaProtalMsg message field can be parsed from the sample message, the field can be converted into the JSON Schema format after removing the slash, and then the converted vcarotalMsg message field can be matched with the message field in the JSON Schema format in the target session message protocol to obtain the final result.

[0068] In the above embodiment, first, at least one customer service account is determined, and for each customer service account, a user account corresponding to each application version in each front-end channel is determined; then, a session message protocol in a preset configuration protocol list is assigned to each customer service account, and a session is established between each customer service account and the corresponding user account, ensuring that each customer service account can use the assigned session message protocol to conduct conversational communication with the corresponding user account in different front-end channels and application versions; then, for each customer service account, the sample message in the session message protocol corresponding to the customer service account is sent to the user account corresponding to the customer service account, respectively, to simulate a real conversation scenario; finally, for each user account, the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol are determined, and the message field of the sample message is obtained, and the message field of the sample message is converted into the target data format, and the converted message field is matched with the message field in the target session message protocol, and the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is obtained, thereby realizing automatic verification of the session message protocol. In this way, the regression verification of the session message protocol can be automatically performed in different front-end channels and application versions, reducing the complexity and error rate of manual operations.

[0069] like Figure 2 As shown, in one embodiment, the step of determining at least one customer service account and determining a user account corresponding to each application version in each front-end channel for each customer service account includes:

[0070] S201: Determine the number of session message protocol data in the preset configuration protocol list;

[0071] S202: Determine, in each session message protocol data in the preset configuration protocol list, the number of applicable protocol versions and the number of inapplicable protocol versions corresponding to each session message protocol data;

[0072] S203: Determine the total number of customer service accounts according to the number of session message protocol data in the preset configuration protocol list, and create customer service accounts corresponding to the total number of customer service accounts;

[0073] S204: Determine the number of user accounts according to the total number of applicable protocol versions and the total number of non-applicable protocol versions corresponding to the preset configuration protocol list, and the number of session message protocol data in the preset configuration protocol list, and create a corresponding user account for each application version in each of the front-end channels for each customer service account according to the number of user accounts.

[0074] Specifically, according to the protocol data in the preset configuration protocol list, the total number of session message protocol data is counted. For each session message protocol data, it is necessary to analyze the number of applicable protocol versions and non-applicable protocol versions. For example, some protocols may only be applicable to specific application versions or specific front-end channels, while other protocols may be applicable to all versions and channels. The number of customer service accounts can be determined based on the number of session message protocol data in the preset configuration protocol list, and corresponding customer service accounts are created. Among them, for the purpose of saving resources, the number of customer service accounts can be less than or equal to the number of session message protocol data; and for the purpose of ensuring the stability of the verification process and improving the verification efficiency, the number of customer service accounts can also be greater than the number of session message protocol data.

[0075] The total number of user accounts that need to be created can be calculated based on the total number of applicable protocol versions and the total number of non-applicable protocol versions corresponding to the preset configuration protocol list, as well as the number of session message protocol data in the preset configuration protocol list. Among them, since it is necessary to use user accounts to verify the session message protocol in different application versions of different front-end channels, the number of user accounts must not be less than the total number of application versions corresponding to each front-end channel. Afterwards, based on the number of customer service accounts and the requirements of each front-end channel and application version, a corresponding number of user accounts are created for each customer service account in each application version in each front-end channel. This ensures that the customer service account can establish correct sessions with all user accounts and interact with messages in accordance with the requirements of the preset configuration protocol list. Customer service accounts and user accounts can be implemented through scripts or interfaces.

[0076] In an example, if the preset configuration protocol list has only one session message protocol data of the coupon card protocol as follows: the applicable versions of the coupon card protocol are app9.1, and the inapplicable versions are app8.9, pc, and wap, then the versions taken out are app9.1, app8.9, pc, and wap. Then, the number of user accounts can be the sum of the applicable versions and the inapplicable versions multiplied by the number of session message protocol data, that is, 4, and the number of customer service accounts can be the number of session message protocol data, that is, 1 customer service. In other words, 4 user accounts and 1 customer service account need to be created, and 1 customer service representative will receive 4 users.

[0077] In this embodiment, by presetting the number of session message protocol data items in the configuration protocol list, as well as applicable versions and inapplicable versions, the required number of user accounts and customer service accounts can be determined, thereby meeting the verification requirements of the session message protocol in different front-end channels and different application versions.

[0078] like Figure 3As shown, in one embodiment, the step of matching the converted message field with the message field in the target session message protocol to obtain the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account includes:

[0079] S301: Determine a first message field value corresponding to a converted message field, and determine a data type corresponding to the first message field value;

[0080] S302: Determine a second message field value corresponding to a message field in the target session message protocol, and determine a data type corresponding to the second message field value;

[0081] S303: If the data type corresponding to the first message field value is the same as the data type of the second message field value, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is verification passed; otherwise, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is verification failed.

[0082] Specifically, the converted message field is obtained, and the first message field value is extracted according to the definition and parsing rules of the message field, and its data type is determined according to the content and format of the first message field value. For example, if the first message field value is a pure numeric string, its data type can be determined to be an integer or a floating point number; if it is a text string, its data type is a string.

[0083] Obtain the relevant documents or specifications of the target session message protocol to find the corresponding message field in the target session message protocol, and determine the corresponding position and name of the message field in the target session message protocol. According to the parsing rules and definitions, map the first message field value to the message field in the target session message protocol, and extract the second message field value from the target session message protocol. Determine the data type of the second message field value based on its format and content. Compare the data types of the first message field value and the second message field value. If the data types of the two are the same, the verification passes. If the data types of the two are different, the verification fails.

[0084] In this embodiment, verifying whether the data type of the message field value matches helps determine whether the session message protocol can be correctly parsed and processed in the application version of the corresponding front-end channel, thereby verifying the application version of the front-end channel to which the session message protocol is applicable. At the same time, only verifying the data type can improve verification efficiency.

[0085] In one embodiment, the method further comprises:

[0086] When a session is established between each customer service account and the corresponding user account, the session survival flag of each customer service account and each user account is refreshed at a first preset frequency to keep each customer service account and each user account logged in.

[0087] Specifically, in order to keep the customer service account and the user account logged in, the session survival flags of the customer service account and the user account can be continuously refreshed at a first preset frequency by setting a scheduled task or the like.

[0088] In one example, a timer is set in the customer service account and the user account respectively, and the time interval of the timer is set to a first preset frequency, such as 5 minutes or 10 minutes. After the session is established, the customer service account and the user account respectively start the timer and start timing. When the timer time reaches the set time interval, the customer service account and the user account send a request to the server to refresh the survival flag of the session. After receiving the request, the server updates the survival flag of the session and returns a confirmation message to the customer service account and the user account, indicating that the survival flag has been successfully refreshed. After receiving the confirmation message from the server, the customer service account and the user account restart the timer and start timing the next time interval.

[0089] In this embodiment, by periodically refreshing the session survival flag, the customer service account and the user account are ensured to remain logged in, avoiding unexpected situations caused by either account being offline during the session message protocol verification process, and ensuring the stability of the session message protocol verification.

[0090] In one embodiment, the method further comprises:

[0091] The latest session message protocol is obtained at a second preset frequency, and the latest session message protocol is added to the preset configuration protocol list.

[0092] In one example, a timer is started, and the time interval of the timer is set to a second preset frequency, such as 24 hours or 12 hours. When the timer reaches the set time interval, a request is sent to the server to request the latest session message protocol. After receiving the request, the server returns the latest session message protocol to add the latest session message protocol to the preset configuration protocol list and updates the processing logic corresponding to the protocol. If the session message is currently being processed, the new protocol is used for processing after the current processing is completed.

[0093] In this embodiment, by setting the second preset frequency to obtain the latest session message protocol, it is possible to ensure that the preset configuration protocol list remains up to date, and the protocol can be flexibly updated and expanded to meet different business needs. At the same time, the time interval of the timer can be adjusted according to actual conditions to meet actual needs.

[0094] In one embodiment, the method further comprises:

[0095] For each of the user accounts, if the verification result corresponding to the user account is verification failure,

[0096] or,

[0097] For each customer service account, if the example message corresponding to the customer service account fails to be sent,

[0098] Then retry and record the number of retries until the number of retries reaches the corresponding preset value.

[0099] Specifically, during the interaction between the customer service account and the user account, due to network or server problems, the user account may fail to verify the session message protocol, or the customer service account may fail to send a sample message to the corresponding user account. Therefore, when the user account fails to verify or the customer service account fails to send a sample message, you can try again within the preset value range.

[0100] For user accounts, when verification fails, retries are started, and the current number of retries is recorded at each retry. According to the preset retry limit, it is determined whether the current number of retries is less than the preset value. If it is less than the preset value, a retry operation is performed, and the corresponding session message protocol of the user account is re-adopted for verification, and when the retry succeeds, the verification result is updated, and the retry ends. If the number of retries reaches the preset value, the original verification result is maintained, and the retry ends. Similarly, for customer service accounts, when sending fails, retries are started, and the current number of retries is recorded at each retry. According to the preset retry limit, it is determined whether the current number of retries is less than the preset value. If it is less than the preset value, a retry operation is performed, and the corresponding session message protocol of the user account is re-adopted for verification, and when the retry succeeds, the retry ends. If the number of retries reaches the preset value, the retry ends.

[0101] In this embodiment, by automatically retrying, the cost of manual intervention can be reduced, and the user account and customer service account can be quickly restored to a normal verification state.

[0102] In one embodiment, the method further comprises:

[0103] For each of the user accounts, the protocol name of each target session message protocol corresponding to the user account, the verification result corresponding to each target session message protocol, and the generation time corresponding to each verification result are recorded in the preset session message protocol verification result list.

[0104] Specifically, first, a data structure can be designed to store the verification result of the target session message protocol corresponding to each user account, for example, a database table or a memory data structure can be used, wherein the data structure needs to include fields such as the user account, the protocol name of the target session message protocol, the verification result, and the generation time. When the user account is verified, the verification result and the generation time are recorded in the corresponding data structure.

[0105] Furthermore, when the verification result needs to be queried, the corresponding record is found from the preset session message protocol verification result list according to the user account, and the protocol name, verification result, and generation time of the target session message protocol are obtained. If the verification result needs to be updated, such as the new verification result after a retry operation, the record in the preset session message protocol verification result list can be updated through the corresponding logic. If these verification results need to be stored for a long time, the data can be persisted in the database.

[0106] In this embodiment, the verification results of each session message protocol in different channels and different application versions are saved, which can facilitate subsequent query and statistics.

[0107] The following describes the session message protocol verification device provided by the embodiment of the present application. The session message protocol verification device described below and the session message protocol verification method described above can be referred to in correspondence with each other. Figure 4 As shown, the present application provides a session message protocol verification device, the device comprising:

[0108] An account determination module 401 is used to determine at least one customer service account, and to determine for each of the customer service accounts, a user account corresponding to each application version in each front-end channel;

[0109] The session establishment module 402 is used to assign the session message protocol in the preset configuration protocol list to each of the customer service accounts, and establish a session between each of the customer service accounts and the corresponding user account;

[0110] The message sending module 403 is used to send, for each of the customer service accounts, the example message in the session message protocol corresponding to the customer service account to the user account corresponding to the customer service account;

[0111] The protocol verification module 404 is used to determine, for each of the user accounts, the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol, and to obtain the message field of the sample message, convert the message field of the sample message into the target data format, match the converted message field with the message field in the target session message protocol, and obtain the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account.

[0112] In one embodiment, the account determination module 401 includes:

[0113] A data number determination unit, used to determine the number of session message protocol data in the preset configuration protocol list;

[0114] A version number determination unit, configured to determine, in each session message protocol data in the preset configuration protocol list, the number of applicable protocol versions and the number of non-applicable protocol versions corresponding to each session message protocol data;

[0115] A customer service account creation unit, configured to determine the total number of customer service accounts according to the number of session message protocol data in the preset configuration protocol list, and create customer service accounts corresponding to the total number of customer service accounts;

[0116] The user account creation unit is used to determine the number of user accounts according to the total number of applicable protocol versions and the total number of non-applicable protocol versions corresponding to the preset configuration protocol list, and the number of session message protocol data in the preset configuration protocol list, and create a corresponding user account for each application version in each of the front-end channels for each customer service account according to the number of user accounts.

[0117] In one embodiment, the protocol verification module 404 includes:

[0118] A first data type determining unit, configured to determine a first message field value corresponding to the converted message field, and determine a data type corresponding to the first message field value;

[0119] A second data type determining unit, configured to determine a second message field value corresponding to a message field in the target session message protocol, and determine a data type corresponding to the second message field value;

[0120] The protocol verification unit is used to verify that if the data type corresponding to the first message field value is the same as the data type of the second message field value, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is passed; otherwise, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is failed.

[0121] In one embodiment, the apparatus further comprises:

[0122] The session survival flag refreshing module is used to refresh the session survival flag of each customer service account and each user account at a first preset frequency when a session is established between each customer service account and the corresponding user account, so that each customer service account and each user account remain logged in.

[0123] In one embodiment, the apparatus further comprises:

[0124] The latest session message protocol acquisition module is used to acquire the latest session message protocol at a second preset frequency and add the latest session message protocol to the preset configuration protocol list.

[0125] In one embodiment, the apparatus further comprises:

[0126] The retry module is used for, for each of the user accounts, if the verification result corresponding to the user account is verification failure,

[0127] or,

[0128] For each customer service account, if the example message corresponding to the customer service account fails to be sent,

[0129] Then retry and record the number of retries until the number of retries reaches the corresponding preset value.

[0130] In one embodiment, the apparatus further comprises:

[0131] The recording module is used to record, for each user account, the protocol name of each target session message protocol corresponding to the user account, the verification result corresponding to each target session message protocol, and the generation time corresponding to each verification result in a preset session message protocol verification result list.

[0132] In one embodiment, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the session message protocol verification method as described in any one of the above embodiments.

[0133] In one embodiment, the present application also provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the session message protocol verification method as described in any one of the above embodiments.

[0134] Indicatively, Figure 5 As shown, Figure 5 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 500 may be provided as a server. Figure 5The computer device 500 includes a processing component 502, which further includes one or more processors, and a memory resource represented by a memory 501, for storing instructions that can be executed by the processing component 502, such as an application. The application stored in the memory 501 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 502 is configured to execute instructions to perform the session message protocol verification method of any of the above embodiments.

[0135] The computer device 500 may further include a power supply component 503 configured to perform power management of the computer device 500, a wired or wireless network interface 504 configured to connect the computer device 500 to a network, and an input / output (I / O) interface 505. The computer device 500 may operate based on an operating system stored in the memory 501, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.

[0136] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0137] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, "one", "one", "said", "the" and "it" may also include plural forms, unless the context clearly indicates another way. A plurality refers to at least two cases, such as 2, 3, 5 or 8, etc. "And / or" includes any and all combinations of the relevant listed items.

[0138] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0139] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A session message protocol verification method, characterized in that: The method comprises: Determine at least one customer service account, and determine for each of the customer service accounts, a user account corresponding to each application version in each front-end channel; Assigning a session message protocol in the preset configuration protocol list to each of the customer service accounts, and establishing a session between each of the customer service accounts and the corresponding user account; For each of the customer service accounts, send the example message in the session message protocol corresponding to the customer service account to the user account corresponding to the customer service account; For each of the user accounts, determine the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol, obtain the message field of the sample message, convert the message field of the sample message into the target data format, match the converted message field with the message field in the target session message protocol, and obtain the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account.

2. The session message protocol verification method according to claim 1, characterized in that: The step of determining at least one customer service account and determining, for each of the customer service accounts, a user account corresponding to each application version in each front-end channel includes: Determine the number of session message protocol data in the preset configuration protocol list; In each session message protocol data in the preset configuration protocol list, determining the number of applicable protocol versions and the number of non-applicable protocol versions corresponding to each session message protocol data; Determine the total number of customer service accounts according to the number of session message protocol data in the preset configuration protocol list, and create customer service accounts corresponding to the total number of customer service accounts; The number of user accounts is determined based on the total number of applicable protocol versions and the total number of non-applicable protocol versions corresponding to the preset configuration protocol list, as well as the number of session message protocol data in the preset configuration protocol list, and a corresponding user account is created for each of the application versions in each of the front-end channels for each of the customer service accounts based on the number of user accounts.

3. The session message protocol verification method according to claim 1, characterized in that: The step of matching the converted message field with the message field in the target session message protocol to obtain a verification result of the target session message protocol in the front-end channel and application version corresponding to the user account includes: Determine a first message field value corresponding to the converted message field, and determine a data type corresponding to the first message field value; Determine a second message field value corresponding to a message field in the target session message protocol, and determine a data type corresponding to the second message field value; If the data type corresponding to the first message field value is the same as the data type of the second message field value, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is verification passed; otherwise, the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account is verification failed.

4. The session message protocol verification method according to any one of claims 1 to 3, characterized in that: The method further comprises: When a session is established between each customer service account and the corresponding user account, the session survival flag of each customer service account and each user account is refreshed at a first preset frequency to keep each customer service account and each user account logged in.

5. The session message protocol verification method according to any one of claims 1 to 3, characterized in that: The method further comprises: The latest session message protocol is obtained at a second preset frequency, and the latest session message protocol is added to the preset configuration protocol list.

6. The session message protocol verification method according to any one of claims 1 to 3, characterized in that: The method further comprises: For each of the user accounts, if the verification result corresponding to the user account is verification failure, or, For each customer service account, if the example message corresponding to the customer service account fails to be sent, Then retry and record the number of retries until the number of retries reaches the corresponding preset value.

7. The session message protocol verification method according to any one of claims 1 to 3, characterized in that: The method further comprises: For each of the user accounts, the protocol name of each target session message protocol corresponding to the user account, the verification result corresponding to each target session message protocol, and the generation time corresponding to each verification result are recorded in the preset session message protocol verification result list.

8. A session message protocol verification device, characterized in that: The device comprises: An account determination module, used to determine at least one customer service account, and to determine for each of the customer service accounts, a user account corresponding to each application version in each front-end channel; A session establishment module, used to assign a session message protocol in a preset configuration protocol list to each of the customer service accounts, and to establish a session between each of the customer service accounts and a corresponding user account; A message sending module, used for sending, for each of the customer service accounts, the example message in the session message protocol corresponding to the customer service account to the user account corresponding to the customer service account; The protocol verification module is used to determine, for each of the user accounts, the target session message protocol corresponding to the sample message received by the user account and the target data format used by the target session protocol, and to obtain the message field of the sample message, convert the message field of the sample message into the target data format, match the converted message field with the message field in the target session message protocol, and obtain the verification result of the target session message protocol in the front-end channel and application version corresponding to the user account.

9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the session message protocol verification method as described in any one of claims 1 to 7.

10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the session message protocol verification method according to any one of claims 1 to 7 are performed.