Information processing method and device, nonvolatile storage medium and electronic equipment
By judging and managing the validity of the call token when receiving the call request from the target platform, the problem of not being able to continuously and stably send messages in the prior art is solved, and the technical effect of improving the success rate and stability of message transmission is achieved.
Patent Information
- Application Number
- CN202411917764.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, messages cannot be sent to third-party messaging platforms continuously and stably, resulting in the continuity and stability of message transmission being affected.
By receiving the call request from the target platform, we can determine whether there is a valid call token at present. If it does not exist, regenerate and set the validity period of the token to ensure that a valid token is used when sending the message.
It has achieved the improvement of the success rate and stability of sending messages to third-party information platforms, and avoided the risk of message sending caused by the early invalidation of old tokens.
Smart Images

Figure CN119766870A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to an information processing method, device, non-volatile storage medium and electronic device. Background Art
[0002] When sending order status information on other platforms to users through a third-party information platform, each time the status information is sent, the third-party platform interface needs to be called, and calling the third-party platform interface requires refreshing the token once. At this time, multiple requests may try to obtain a new token at the same time. If these requests successfully obtain new tokens in a short period of time, the old token will be refreshed multiple times, causing it to expire prematurely. This is a potential risk point for services that require continuity and stability, such as message sending.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide an information processing method, device, non-volatile storage medium and electronic device to at least solve the technical problem in the prior art that messages cannot be sent to a third-party message platform continuously and stably.
[0005] According to one aspect of an embodiment of the present invention, there is provided an information processing method, comprising: receiving a call request sent by a target platform, wherein the call request is used to call a third-party message platform to send notification information to a target object; in response to the call request, determining whether there is a target call token within the validity period; if there is no target call token within the validity period, regenerating the target call token and setting the validity period of the target call token; sending the target call token to the target platform, and receiving a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token; in response to the first message sending request, verifying the first call token to be verified, and if the verification passes, sending the notification message to the target object via the third-party message platform.
[0006] Optionally, before responding to the call request and determining whether there is a call token within the validity period, the method further includes: obtaining a target identity of the target object from the call request; matching the target identity with an identity included in a database, wherein the database includes a correspondence between the identity and a third-party platform account; and when the target identity successfully matches the identity included in the database, determining that the third-party platform account corresponding to the matched identity is the target account.
[0007] Optionally, if the verification passes, the notification message is sent to the target object through a third-party messaging platform, including: extracting keywords from the notification message; determining a business template for sending messages to the target object based on the keywords; and sending a notification message to the target account based on the business template.
[0008] Optionally, in response to the first message sending request, the first call token to be verified is verified, including: recording the time when the first message sending request is received, and verifying whether the time when the first message sending request is received is within the validity period of the first call token to be verified; if the time when the first message sending request is received is within the validity period of the first call token to be verified, determining that the verification is passed; if the time when the first message sending request is received is not within the validity period of the first call token to be verified, returning the result of the verification failure to the target platform.
[0009] Optionally, recording the moment when the first message sending request is received, and verifying whether the moment when the first message sending request is received is within the validity period of the first call token to be verified, including: recording the moment when the first message sending request is received; matching the first call token to be verified with the historically generated call token, and determining that the validity period of the matched call token is the validity period of the first call token to be verified; verifying whether the moment when the first message sending request is received is within the validity period of the first call token to be verified; or, reading the validity period of the current valid token; matching the current valid token with the first token to be verified, and if the current valid token matches the first token to be verified successfully, verifying whether the moment when the first message sending request is received is within the validity period of the current valid token; if the current valid token fails to match the first token to be verified, returning the verification failure result to the target platform.
[0010] Optionally, it also includes: in the case that there is currently a call token within the validity period, sending the call token that is currently within the validity period to the target platform, and receiving a second message sending request sent by the target platform, wherein the second message sending request includes a notification message and a second call token to be verified, and the second call token to be verified is determined by the target platform based on the call token that is currently within the validity period.
[0011] According to another aspect of an embodiment of the present invention, an information processing device is provided, including: a first receiving module, used to receive a call request sent by a target platform, wherein the call request is used to call a third-party message platform to send notification information to a target object; a judgment module, used to judge whether there is a call token within the validity period in response to the call request; a generation module, used to regenerate the target call token and set the validity period of the target call token when there is no target call token within the validity period; a second receiving module, used to send the target call token to the target platform, and receive a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token; a verification module, used to verify the first call token to be verified in response to the first message sending request, and when the verification passes, send the notification message to the target object through the third-party message platform.
[0012] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the information processing methods.
[0013] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the information processing methods.
[0014] According to yet another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above-mentioned information processing methods is implemented.
[0015] In an embodiment of the present invention, a call request sent by a target platform is received, wherein the call request is used to call a third-party message platform to send notification information to a target object; in response to the call request, it is determined whether there is a target call token within the validity period; if there is no target call token within the validity period, the target call token is regenerated and the validity period of the target call token is set; the target call token is sent to the target platform, and a first message sending request sent by the target platform is received, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token; in response to the first message sending request, the first call token to be verified is verified, and if the verification passes, the notification message is sent to the target object via the third-party message platform, thereby solving the technical problem in the prior art that messages cannot be sent to a third-party message platform in a continuous and stable manner, and achieving the technical effect of improving the success rate of sending messages to a third-party information platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 is a flow chart of an information processing method provided according to an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of an information processing device provided according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first", "second", etc. 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 of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "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.
[0022] According to an embodiment of the present invention, an embodiment of a method for information processing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0023] Figure 1 is a flowchart of an information processing method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0024] Step S102, receiving a call request sent by the target platform, wherein the call request is used to call a third-party messaging platform to send notification information to the target object;
[0025] In this step, the target platform generally refers to various e-commerce platforms or other service platforms. The target platform can send notification information such as order status updates, promotional activity notifications, logistics information, etc. to users through various channels. In order to manage and send messages more efficiently and professionally, the target platform can cooperate with a "third-party messaging platform" with powerful messaging capabilities, such as an existing payment platform or chat platform. When the various order statuses of the target platform change, the target platform will generate a call request and send the call request to the third-party messaging platform. After the interface of the third-party messaging platform receives this request, it will send the information in the request to the user's account on the third-party messaging platform, so that the user can promptly understand the changes in the order status of the target platform.
[0026] Step S104, in response to the call request, determining whether there is a target call token within the validity period;
[0027] In this step, when the target platform detects a change in order status or other situations that require notification to the user, it will send a call request to the third-party messaging platform, requesting that a template message be sent to the corresponding user. After receiving the call request, the third-party messaging platform will not immediately execute the message sending operation, but will first check whether there is a call token within the validity period in the current system. The call token is a temporary access credential used to identify and verify the legitimacy of subsequent API (application programming interface) calls.
[0028] In an optional embodiment, before responding to a call request and determining whether there is a call token within the validity period, it also includes: obtaining a target identity of the target object from the call request; matching the target identity with an identity included in a database, wherein the database includes a correspondence between the identity and a third-party platform account; and when the target identity successfully matches the identity included in the database, determining that the third-party platform account corresponding to the matched identity is the target account.
[0029] Optionally, when the target platform detects the need to send a message, it will send a call request to the third-party messaging platform. This request contains the identity information of the target object, that is, the identity information of the user receiving the message, which usually appears in the form of some kind of identity identifier (such as the user's mobile phone number). When the third-party messaging platform receives the call request, the third-party messaging platform will match the target identity identifier in the request with the identity identifier in the database. If the target identity identifier successfully matches an identity identifier in the database, this means that the user has bound the account registered in the target platform to the third-party message account. At this point, the system can determine that the third-party platform account in the database is the target account.
[0030] In an optional embodiment, if the verification is passed, the notification message is sent to the target object through a third-party messaging platform, including: extracting keywords from the notification message; determining a business template for sending a message to the target object based on the keywords; and sending a notification message to the target account based on the business template.
[0031] Optionally, when the message sending request is verified and ready to be sent, the third-party messaging platform will first parse and extract some key information from the notification message, which is usually called keywords. Keywords include order status, user personal information, etc. The third-party messaging platform predefines message templates for various business scenarios, each of which has its own specific format and keyword placeholders for filling in specific message content. The system determines the message template applicable to the current business scenario based on the keywords extracted from the notification message. For example, if the keyword indicates an order status update, the system will select the corresponding order status update template. Once the appropriate business template is determined, the system will use the format defined in the template to fill the extracted keywords into the template placeholders to generate specific message content. The assembled notification message is sent to the previously confirmed target account, that is, the user's bound account on the third-party messaging platform.
[0032] Step S106: if there is no target call token within the validity period, regenerate the target call token and set the validity period of the target call token;
[0033] In this step, if there is no valid call token, the third-party messaging platform will automatically regenerate a new call token and set its validity period. This validity period is usually to balance security and convenience. It should not be too short to cause frequent re-authentication, nor too long to increase the risk of abuse.
[0034] Step S108, sending the target call token to the target platform, and receiving a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token;
[0035] In this step, when the target platform needs to send a template message to the user, it will send a first message sending request to the third-party messaging platform. This request contains the content of the notification message to be sent, as well as a first to-be-verified call token. The first to-be-verified call token is generated by the target platform based on the target call token received previously, and is used for identity authentication and permission checking in this message sending request.
[0036] Step S110, in response to the first message sending request, the first to-be-verified calling token is verified, and if the verification passes, a notification message is sent to the target object through a third-party messaging platform.
[0037] In this step, after receiving the first message sending request, the third-party messaging platform needs to first verify the validity of the first to-be-verified call token, that is, check whether the token is within the validity period. If the verification of the first to-be-verified call token is successful, the third-party messaging platform will confirm that the target platform has the right to use its API (application programming interface) service to send messages. At this time, the platform will use the verified call token to send the message to the specified user based on the notification message content in the request. During the message sending process, the message content needs to be formatted according to the rules of the target platform to ensure that the message can be successfully sent through the template message system of the target platform.
[0038] In an optional embodiment, in response to a first message sending request, a first call token to be verified is verified, including: recording the time when the first message sending request is received, and verifying whether the time when the first message sending request is received is within the validity period of the first call token to be verified; if the time when the first message sending request is received is within the validity period of the first call token to be verified, determining that the verification is passed; if the time when the first message sending request is received is not within the validity period of the first call token to be verified, returning the result of the verification failure to the target platform.
[0039] Optionally, when the third-party messaging platform receives the first message sending request sent by the target platform, it will record the specific time when the request is received, and check whether the recorded reception time is within the validity period of the first call token to be verified. If it is verified that the time when the request is received is within the validity period of the call token, the system will consider the verification process to have passed, that is, the target platform has the right to use the API (application programming interface) of the third-party messaging platform at this moment to perform operations, including sending template messages. On the contrary, if the time when the request is received exceeds the validity period of the call token, the system will determine that the verification has failed, which means that the target platform does not have a legal token to call the API (application programming interface) at this time. In this case, the third-party messaging platform will return a verification failure result to the target platform, prompting the target platform to re-acquire a valid call token.
[0040] In an optional embodiment, the moment of receiving the first message sending request is recorded, and it is verified whether the moment of receiving the first message sending request is within the validity period of the first call token to be verified, including: recording the moment of receiving the first message sending request; matching the first call token to be verified with the historically generated call token, and determining that the validity period of the matched call token is the validity period of the first call token to be verified; verifying whether the moment of receiving the first message sending request is within the validity period of the first call token to be verified; or, reading the validity period of the current valid token; matching the current valid token with the first token to be verified, and if the current valid token matches the first token to be verified successfully, verifying whether the moment of receiving the first message sending request is within the validity period of the current valid token; and if the current valid token fails to match the first token to be verified, returning the verification failure result to the target platform.
[0041] Optionally, when the target platform sends a first message sending request to the third-party messaging platform, the platform will record the receiving time of the request after receiving the request to ensure that the call operation occurs in the correct time period. The third-party messaging platform will use the first to-be-verified call token to find out whether there is an associated, generated call token in its history. If the match is successful, the system will compare the request receiving time with the validity period of the call token to determine whether the request is within the validity period of the token. If it is within the validity period, the verification passes, otherwise the verification fails and corresponding measures need to be taken, such as re-acquiring the token. Alternatively, before making any message sending request, the third-party messaging platform will first read the validity period of a currently valid token. After receiving a message sending request, the third-party messaging platform will match the first to-be-verified token with the currently valid token to verify the legitimacy of the request. If the first to-be-verified token cannot match the currently valid token recorded in the system, it may be because the token is wrong, has been tampered with, or has never been authorized. In this case, the system will not continue to process the message sending request, but will return a "verification failed" result to the target platform to inform it that the request has not passed the verification. After receiving this result, the target platform can take appropriate measures, such as prompting the user to log in again for identity authentication, or recording the failed attempt for security analysis.
[0042] In an optional embodiment, the method further includes: in the case where there is currently a call token within the validity period, sending the call token that is currently within the validity period to the target platform, and receiving a second message sending request sent by the target platform, wherein the second message sending request includes a notification message and a second call token to be verified, and the second call token to be verified is determined by the target platform based on the call token that is currently within the validity period.
[0043] Optionally, when the target platform needs to send a message again, it will first check whether it already has a call token within the validity period. If so, the target platform will directly use this token as part of the second call token to be verified and send it to the third-party messaging platform together with the notification message. After receiving the second message sending request, the third-party messaging platform will verify whether this second call token to be verified matches the valid token it recorded before and whether it is still within the validity period. If the verification is successful, the third-party messaging platform will process the request to send the notification message; if the verification fails, it will notify the target platform that the token is invalid and may require the target platform to re-perform the identity authentication process to obtain a new call token.
[0044] The call request sent by the target platform is received through the above, wherein the call request is used to call a third-party message platform to send notification information to the target object; in response to the call request, it is determined whether there is a target call token within the validity period; if there is no target call token within the validity period, the target call token is regenerated and the validity period of the target call token is set; the target call token is sent to the target platform, and the first message sending request sent by the target platform is received, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the call token; in response to the first message sending request, the first call token to be verified is verified, and if the verification passes, the notification message is sent to the target object through the third-party message platform. The technical problem that the prior art cannot send messages to a third-party message platform in a continuous and stable manner is solved, and the technical effect of improving the success rate of sending messages to a third-party information platform is achieved.
[0045] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation manner.
[0046] Step S1, receiving a call request sent by a target platform, wherein the call request is used to call a third-party messaging platform to send notification information to a target object;
[0047] In this step, the target platform generally refers to various e-commerce platforms or other service platforms. The target platform can send notification information such as order status updates, promotional activity notifications, logistics information, etc. to users through various channels. In order to manage and send messages more efficiently and professionally, the target platform can cooperate with a "third-party messaging platform" with powerful messaging capabilities, such as an existing payment platform or chat platform. When the various order statuses of the target platform change, the target platform will generate a call request and send the call request to the third-party messaging platform. After the interface of the third-party messaging platform receives this request, it will send the information in the request to the user's account on the third-party messaging platform, so that the user can promptly understand the changes in the order status of the target platform.
[0048] Step S2, in response to the call request, determining whether there is a target call token within the validity period;
[0049] In this step, when the target platform detects a change in order status or other situations that require notification to the user, it will send a call request to the third-party messaging platform, requesting that a template message be sent to the corresponding user. After receiving the call request, the third-party messaging platform will not immediately execute the message sending operation, but will first check whether there is a call token within the validity period in the current system. The call token is a temporary access credential used to identify and verify the legitimacy of subsequent API (application programming interface) calls.
[0050] Step S21, before responding to the call request and determining whether there is a call token within the validity period, also includes: obtaining a target identity of the target object from the call request; matching the target identity with an identity included in a database, wherein the database includes a correspondence between the identity and a third-party platform account; and when the target identity successfully matches the identity included in the database, determining that the third-party platform account corresponding to the matched identity is the target account.
[0051] Optionally, when the target platform detects the need to send a message, it will send a call request to the third-party messaging platform. This request contains the identity information of the target object, that is, the identity information of the user receiving the message, which usually appears in the form of some kind of identity identifier (such as the user's mobile phone number). When the third-party messaging platform receives the call request, the third-party messaging platform will match the target identity identifier in the request with the identity identifier in the database. If the target identity identifier successfully matches an identity identifier in the database, this means that the user has bound the account registered in the target platform to the third-party message account. At this point, the system can determine that the third-party platform account in the database is the target account.
[0052] Step S22, if the verification passes, sends the notification message to the target object through the third-party messaging platform, including: extracting keywords from the notification message; determining a business template for sending messages to the target object based on the keywords; and sending the notification message to the target account based on the business template.
[0053] Optionally, when the message sending request is verified and ready to be sent, the third-party messaging platform will first parse and extract some key information from the notification message, which is usually called keywords. Keywords include order status, user personal information, etc. The third-party messaging platform predefines message templates for various business scenarios, each of which has its own specific format and keyword placeholders for filling in specific message content. The system determines the message template applicable to the current business scenario based on the keywords extracted from the notification message. For example, if the keyword indicates an order status update, the system will select the corresponding order status update template. Once the appropriate business template is determined, the system will use the format defined in the template to fill the extracted keywords into the template placeholders to generate specific message content. The assembled notification message is sent to the previously confirmed target account, that is, the user's bound account on the third-party messaging platform.
[0054] Step S3: if there is no target call token within the validity period, regenerate the target call token and set the validity period of the target call token;
[0055] In this step, if there is no valid call token, the third-party messaging platform will automatically regenerate a new call token and set its validity period. This validity period is usually to balance security and convenience. It should not be too short to cause frequent re-authentication, nor too long to increase the risk of abuse.
[0056] Step S4, sending the target call token to the target platform, and receiving a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token;
[0057] In this step, when the target platform needs to send a template message to the user, it will send a first message sending request to the third-party messaging platform. This request contains the content of the notification message to be sent, as well as a first to-be-verified call token. The first to-be-verified call token is generated by the target platform based on the target call token received previously, and is used for identity authentication and permission checking in this message sending request.
[0058] Step S5, in response to the first message sending request, verify the first to-be-verified calling token, and if the verification passes, send a notification message to the target object through a third-party messaging platform.
[0059] In this step, after receiving the first message sending request, the third-party messaging platform needs to first verify the validity of the first to-be-verified call token, that is, check whether the token is within the validity period. If the verification of the first to-be-verified call token is successful, the third-party messaging platform will confirm that the target platform has the right to use its API (application programming interface) to send messages. At this time, the platform will use the verified call token to send the message to the specified user based on the notification message content in the request. During the message sending process, the message content needs to be formatted according to the rules of the target platform to ensure that the message can be successfully sent through the template message system of the target platform.
[0060] Step S51, in response to the first message sending request, verifies the first call token to be verified, including: recording the time when the first message sending request is received, and verifying whether the time when the first message sending request is received is within the validity period of the first call token to be verified; if the time when the first message sending request is received is within the validity period of the first call token to be verified, determines that the verification is passed; if the time when the first message sending request is received is not within the validity period of the first call token to be verified, returns the result of verification failure to the target platform.
[0061] Optionally, when the third-party messaging platform receives the first message sending request sent by the target platform, it will record the specific time when the request is received, and check whether the recorded reception time is within the validity period of the first call token to be verified. If it is verified that the time when the request is received is within the validity period of the call token, the system will consider the verification process to have passed, that is, the target platform has the right to use the API ((application programming interface)) of the third-party messaging platform at this moment to perform operations, including sending template messages. On the contrary, if the time when the request is received exceeds the validity period of the call token, the system will determine that the verification has failed, which means that the target platform does not have a legal token to call the API (application programming interface) at this time. In this case, the third-party messaging platform will return a verification failure result to the target platform, prompting the target platform to re-acquire a valid call token.
[0062] Step S52, records the moment when the first message sending request is received, and verifies whether the moment when the first message sending request is received is within the validity period of the first call token to be verified, including: recording the moment when the first message sending request is received; matching the first call token to be verified with the historically generated call token, and determining that the validity period of the matched call token is the validity period of the first call token to be verified; verifying whether the moment when the first message sending request is received is within the validity period of the first call token to be verified; or, reading the validity period of the current valid token; matching the current valid token with the first token to be verified, and if the current valid token matches the first token to be verified successfully, verifies whether the moment when the first message sending request is received is within the validity period of the current valid token; if the current valid token fails to match the first token to be verified, returns the verification failure result to the target platform.
[0063] Optionally, when the target platform sends a first message sending request to the third-party messaging platform, the platform will record the receiving time of the request after receiving the request to ensure that the call operation occurs in the correct time period. The third-party messaging platform will use the first to-be-verified call token to find out whether there is an associated, generated call token in its history. If the match is successful, the system will compare the request receiving time with the validity period of the call token to determine whether the request is within the validity period of the token. If it is within the validity period, the verification passes, otherwise the verification fails and corresponding measures need to be taken, such as re-acquiring the token. Alternatively, before making any message sending request, the third-party messaging platform will first read the validity period of a currently valid token. After receiving a message sending request, the third-party messaging platform will match the first to-be-verified token with the currently valid token to verify the legitimacy of the request. If the first to-be-verified token cannot match the currently valid token recorded in the system, it may be because the token is wrong, has been tampered with, or has never been authorized. In this case, the system will not continue to process the message sending request, but will return a "verification failed" result to the target platform to inform it that the request has not passed the verification. After receiving this result, the target platform can take appropriate measures, such as prompting the user to log in again for identity authentication, or recording the failed attempt for security analysis.
[0064] Step S53, the method also includes: in the case that there is a call token that is currently within the validity period, sending the call token that is currently within the validity period to the target platform, and receiving a second message sending request sent by the target platform, wherein the second message sending request includes a notification message and a second call token to be verified, and the second call token to be verified is determined by the target platform based on the call token that is currently within the validity period.
[0065] Optionally, when the target platform needs to send a message again, it will first check whether it already has a call token within the validity period. If so, the target platform will directly use this token as part of the second call token to be verified and send it to the third-party messaging platform together with the notification message. After receiving the second message sending request, the third-party messaging platform will verify whether this second call token to be verified matches the valid token it recorded before and whether it is still within the validity period. If the verification is successful, the third-party messaging platform will process the request to send the notification message; if the verification fails, it will notify the target platform that the token is invalid and may require the target platform to re-perform the identity authentication process to obtain a new call token.
[0066] The above optional implementation achieves at least the following effects: solving the technical problem in the prior art that messages cannot be sent to a third-party message platform continuously and stably, and achieving the technical effect of improving the success rate of sending messages to a third-party information platform.
[0067] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0068] In this embodiment, an information processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0069] According to an embodiment of the present invention, there is also provided an apparatus embodiment for implementing the information processing method. Figure 2 is a schematic diagram of an information processing device according to an embodiment of the present invention. Figure 2 As shown, the above-mentioned information processing device includes a first receiving module 21, a judging module 22, a generating module 23, a second receiving module 24, and a checking module 25. The device is described below.
[0070] The first receiving module 21 is used to receive a call request sent by a target platform, wherein the call request is used to call a third-party messaging platform to send notification information to a target object;
[0071] The judgment module 22 is connected to the first receiving module 21 and is used to respond to the call request and judge whether there is a call token within the validity period.
[0072] The generating module 23 is connected to the judging module 22 and is used to regenerate the target calling token and set the validity period of the target calling token when there is no target calling token within the validity period.
[0073] The second receiving module 24 is connected to the generating module 23, and is used to send the target call token to the target platform, and receive a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token;
[0074] The verification module 25 is connected to the second receiving module 24, and is used to verify the first call token to be verified in response to the first message sending request, and if the verification passes, send a notification message to the target object through a third-party message platform.
[0075] In an information processing device provided by an embodiment of the present invention, a first receiving module is used to receive a call request sent by a target platform, wherein the call request is used to call a third-party message platform to send notification information to a target object; a judgment module is used to respond to the call request and judge whether there is a call token within the validity period; a generation module is used to regenerate the target call token and set the validity period of the target call token when there is no target call token within the validity period; a second receiving module is used to send the target call token to the target platform and receive a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token; a verification module is used to respond to the first message sending request and verify the first call token to be verified. If the verification passes, the notification message is sent to the target object through the third-party message platform. The technical problem that messages cannot be sent to a third-party message platform continuously and stably in the prior art is solved, and the technical effect of improving the success rate of sending messages to a third-party information platform is achieved.
[0076] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0077] It should be noted that the first receiving module 21, the judging module 22, the generating module 23, the second receiving module 24, and the checking module 25 correspond to steps S102 to S110 in the embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the modules as part of the device can be run in a computer terminal.
[0078] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.
[0079] The above-mentioned information processing device may also include a processor and a memory. The first receiving module 21, the judgment module 22, the generation module 23, the second receiving module 24, the verification module 25, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0080] The processor includes a kernel, which retrieves the corresponding program unit from the memory. There can be one or more kernels. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0081] An embodiment of the present invention provides a non-volatile storage medium on which a program is stored. When the program is executed by a processor, an information processing method is implemented.
[0082] like Figure 3 As shown, an embodiment of the present invention provides an electronic device, the electronic device 10 includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: the memory is used to store a computer program, wherein when the computer program is executed by the processor, the processor implements the above-mentioned information processing method. The device in this article may be a server, a PC, etc.
[0083] The invention also provides a computer program product which, when executed on a data processing device, is suitable for executing a program initializing the following method steps: computer instructions are used by a processor to execute the above-mentioned information processing method.
[0084] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0088] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0089] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0090] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0091] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0092] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0093] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. An information processing method, characterized in that: include: Receiving a call request sent by a target platform, wherein the call request is used to call a third-party messaging platform to send notification information to a target object; In response to the call request, determining whether there is a target call token within a validity period; If the target call token does not currently exist within the validity period, regenerate the target call token and set the validity period of the target call token; Sending the target call token to the target platform, and receiving a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token; In response to the first message sending request, the first to-be-verified calling token is verified, and if the verification passes, the notification message is sent to the target object through the third-party messaging platform.
2. The method according to claim 1, characterized in that: Before responding to the call request and determining whether there is a call token within the validity period, the method further includes: Obtaining a target identity of the target object from the call request; Matching the target identity with an identity included in a database, wherein the database includes a correspondence between the identity and the third-party platform account; In the case where the target identity successfully matches the identity included in the database, the third-party platform account corresponding to the matched identity is determined as the target account.
3. The method according to claim 2, characterized in that When the verification is passed, sending the notification message to the target object through the third-party message platform includes: Extracting keywords from the notification message; Determine, according to the keyword, a service template for sending a message to the target object; Based on the service template, the notification message is sent to the target account.
4. The method according to claim 1, characterized in that: The step of verifying the first to-be-verified call token in response to the first message sending request includes: Recording the time when the first message sending request is received, and verifying whether the time when the first message sending request is received is within the validity period of the first call token to be verified; If the moment of receiving the first message sending request is within the validity period of the first call token to be verified, it is determined that the verification is passed; if the moment of receiving the first message sending request is not within the validity period of the first call token to be verified, the result of the verification failure is returned to the target platform.
5. The method according to claim 4, characterized in that The recording of the time when the first message sending request is received, and verifying whether the time when the first message sending request is received is within the validity period of the first call token to be verified, includes: Recording the time of receiving the first message sending request; Matching the first call token to be verified with the call token generated historically, and determining that the validity period of the matched call token is the validity period of the first call token to be verified; verifying whether the moment of receiving the first message sending request is within the validity period of the first call token to be verified; Or, read the validity period of the current valid token; match the current valid token with the first token to be verified, and if the current valid token matches the first token to be verified successfully, verify whether the moment of receiving the first message sending request is within the validity period of the current valid token; if the current valid token fails to match the first token to be verified, return the verification failure result to the target platform.
6. The method according to claim 1, characterized in that Also includes: In the case that there is currently a call token within the validity period, the call token within the validity period is sent to the target platform, and a second message sending request sent by the target platform is received, wherein the second message sending request includes the notification message and a second call token to be verified, and the second call token to be verified is determined by the target platform based on the call token within the validity period.
7. An information processing device, characterized in that: include: A first receiving module is used to receive a call request sent by a target platform, wherein the call request is used to call a third-party messaging platform to send notification information to a target object; A determination module, used to determine whether there is a call token within the validity period in response to the call request; A generating module, configured to regenerate the target calling token and set the validity period of the target calling token when the target calling token within the validity period does not exist at present; A second receiving module is used to send the target call token to the target platform, and receive a first message sending request sent by the target platform, wherein the first message sending request includes a notification message and a first call token to be verified, and the first call token to be verified is determined by the target platform according to the target call token; A verification module is used to verify the first call token to be verified in response to the first message sending request, and if the verification passes, send the notification message to the target object through the third-party message platform.
8. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the information processing method described in any one of claims 1 to 6.
9. An electronic device, characterized in that: include: One or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method described in any one of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that: The computer instructions are executed by a processor to execute the information processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method of improving success rate of capacity call and open platform
CN103139168A
Third-party platform access method and device, electronic equipment and medium
CN114553433A
Message pushing system and method
CN118250647A