Instant messaging flow control method and device

By judging the user's login status and unread messages in the instant messaging system and combining it with Token verification, the instant messaging login process is optimized, solving the problem of ineffective cost control in existing technologies and achieving optimized management of traffic and resources.

CN120658697APending Publication Date: 2025-09-16XIANGYU HUIYU (SHANGHAI) INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510892198.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The existing technology fails to effectively control the cost of instant messaging, resulting in unnecessary traffic and resource occupation.

Method used

By determining whether the user is logging into the instant messaging account for the first time in the interactive request between the user and the server, if so, register the account. If not, determine whether to log in based on the unread messages. Combined with Token verification, the instant messaging login process is optimized.

Benefits of technology

This achieves effective control over instant messaging traffic, avoids unnecessary resource occupation, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658697A_ABST
    Figure CN120658697A_ABST
Patent Text Reader

Abstract

The invention provides an instant messaging flow control method and device, and solves the problem that the instant messaging cost is not effectively controlled in the prior art. Whether the instant messaging account needs to be logged in or not is controlled according to the related data information in the real-time communication request of the user, so that unnecessary flow use is avoided, unnecessary service resource occupation is reduced, and instant messaging cost is effectively controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for controlling flow of instant messaging. Background Art

[0002] Most mobile applications on the market require instant messaging (IM) functionality during communication interactions. However, due to the high development costs and specialized nature of IM software, these applications often rely on integrating third-party services to implement IM functionality. Third-party services often set pricing tiers based on the amount of system or service resources consumed by active users. Depending on the user's needs, many users may not need IM while using an IM application. Therefore, adjusting the login timing of IM accounts can avoid unnecessary usage of system or service resources by active users, thus saving costs. Summary of the Invention

[0003] The present invention provides an instant messaging traffic control method and device to solve the problem in the prior art that the instant messaging cost cannot be effectively controlled.

[0004] In a first aspect, the present invention provides a method for controlling the flow of instant messaging, which specifically includes the following steps:

[0005] Step S1: Start the user terminal and open the instant messaging interactive application of the user terminal; wherein the user terminal is used to send and receive messages, specifically including terminal devices such as mobile phones and computers, and network communication is carried out between the user terminal and the server terminal to carry the user's interactive requests and message receiving functions;

[0006] Step S2: generating a user interaction request through the instant messaging interaction application, and the messaging interaction application transmitting the user interaction request to the server;

[0007] Step S3: The server receives the user interaction request and determines whether instant messaging is required based on the user interaction request;

[0008] Step S4: When instant messaging is required, determining whether the user is logging into the instant messaging account for the first time based on the user interaction request;

[0009] Step S5: If this is the first time the user logs into the instant messaging account, register the instant messaging account; if this is at least the second time the user logs into the instant messaging account, directly log in to the instant messaging account;

[0010] Step S6: When the user does not need to implement instant messaging (i.e., when the user does not need to log in to the instant messaging account), the server-side interface is called in real time to determine whether the current user's communication interaction application account includes unread messages; if the current user's communication interaction application account has unread messages (i.e., the number of unread messages is greater than zero), the server-side interface is called to obtain the instant messaging account and password and log in to the current user's account; otherwise, the instant messaging account is not logged in.

[0011] Preferably, in step S2, the user interaction request includes data information such as the type of communication interaction application, the activity level of the communication interaction user, etc.

[0012] Preferably, in step S4, the server determines whether the user interaction request includes a Token corresponding to the current user account and password to determine whether it is the first time for the user to log in to the instant messaging account.

[0013] Preferably, in step S5, if the user logs in to the instant messaging account for at least the second time, the server receives the user interaction request and verifies the Token token corresponding to the current user account and password in the user interaction request. If the verification is successful, the current user's account and password are transmitted to (feedback to) the user end; if the verification fails, an error code is transmitted to the user end.

[0014] In a second aspect, the present invention further provides an instant messaging traffic control device, which specifically includes the following modules:

[0015] An initialization module is used to start the user terminal and open the instant messaging interactive application of the user terminal; wherein the user terminal is used to send and receive messages, specifically including terminal devices such as mobile phones and computers, and network communication is carried out between the user terminal and the server side to carry the user's interactive requests and message receiving functions;

[0016] An interaction request transmission module, configured to generate a user interaction request through the instant messaging interaction application, and the instant messaging interaction application transmits the user interaction request to a server;

[0017] a first instant messaging judgment module, configured to receive the user interaction request through the server and judge whether instant messaging is required based on the user interaction request;

[0018] The second instant messaging judgment module is used to judge whether the user is logging into the instant messaging account for the first time through the user interaction request when instant messaging is required;

[0019] The first instant messaging processing module is configured to register an instant messaging account when the user logs into the instant messaging account for the first time, and directly log into the instant messaging account if the user logs into the instant messaging account for at least the second time;

[0020] The second processing module of instant messaging is used to determine whether the current user's communication interaction application account includes unread messages by calling the server-side interface in real time when the user does not need to implement instant messaging; if the current user's communication interaction application account has unread messages, the server-side interface is called to obtain the instant messaging account and password and log in the current user's account; otherwise, the instant messaging account is not logged in.

[0021] Preferably, in the interaction request transmission module, the user interaction request includes data information such as the type of communication interaction application, the activity level of the communication interaction user, etc.

[0022] Preferably, in the second determination module of the instant messaging, the server determines whether the user is logging into the instant messaging account for the first time by checking whether the user interaction request includes a Token corresponding to the current user account and password.

[0023] Preferably, in the first processing module of instant messaging, if the user logs in to the instant messaging account for at least the second time, the server receives the user interaction request and verifies the Token token corresponding to the current user account and password in the user interaction request. If the verification is successful, the current user's account and password are transmitted to the user end; if the verification fails, an error code is transmitted to the user end.

[0024] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an instant messaging traffic control method as described in any one of the first aspects of the present application.

[0025] In a fourth aspect, the present invention further provides an electronic device comprising: a memory storing a computer program; and a processor communicatively connected to the memory for executing an instant messaging traffic control method described in any one of the first aspects of the present application when the computer program is called.

[0026] Compared with the prior art, the present invention has the following obvious outstanding substantial features and significant advantages:

[0027] The present invention provides an instant messaging traffic control method and device, addressing the existing problem of ineffective control of instant messaging costs. By controlling whether an instant messaging account requires login based on relevant data information in a user's real-time messaging request, unnecessary traffic usage is avoided, unnecessary service resource usage is reduced, and effective control of instant messaging costs is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings, which constitute part of the present invention, are provided to provide a further understanding of the present invention. 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 accompanying drawings:

[0029] Figure 1 This is a flow chart of a method for controlling flow of instant messaging according to a preferred embodiment of the present invention.

[0030] Figure 2 It is a structural diagram of a flow control device for instant messaging according to a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0031] The present invention provides a method and apparatus for controlling the flow of instant messaging. To make the objectives, technical solutions, and effects of the present invention more clear and explicit, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention.

[0032] It should be noted that the terms "first," "second," and the like in the specification and claims of the present invention and the accompanying 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 terms used in this manner are interchangeable under appropriate circumstances. In addition, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatuses.

[0033] Example 1:

[0034] like Figure 1 As shown, the instant messaging traffic control method described in this embodiment specifically includes the following steps:

[0035] Step S1: Start the client and open the instant messaging (IM) interactive application on the client. The client is used to send and receive messages and specifically includes terminal devices such as mobile phones and computers. The client and the server communicate over the network to carry user interaction requests and message reception functions.

[0036] Among them, the instant messaging interactive application is not limited to typical application software such as chat and social networking (such as mainstream IM applications such as WeChat, QQ, DingTalk, etc.). In fact, it has been widely used in all aspects of daily life. Community applications such as Weibo and Zhihu: They use IM technology to realize point-to-point chats such as user private messages; live broadcast / short video applications such as Douyin and Kuaishou: They use IM technology to realize real-time interaction with anchors; smart home IoT applications such as Mijia: Use IM technology to achieve real-time control, remote monitoring, etc.; Shared home communication applications such as Didi and Uber: Use IM technology to achieve location sharing; Online education applications: Use IM technology to realize online whiteboards. In summary, IM technology is needed in all scenarios that require real-time interaction and high real-time performance, such as chat, live broadcast, online customer service, and the Internet of Things.

[0037] Step S2: The instant messaging application generates a user interaction request, which is then transmitted to the server. The user interaction request includes information such as the type of messaging application and the daily active user (DAU, a statistical indicator used to reflect the operational status of websites and internet applications).

[0038] Step S3, the server receives the user interaction request and determines whether instant messaging is needed based on the user interaction request. For example, if you are informed in advance that you need to wait for message notification (i.e., a message is pushed to the instant messaging interaction application) or that you need to interact immediately (i.e., the user actively sends a message through the instant messaging interaction application), you need to perform an instant messaging judgment operation. Based on the instant messaging interaction application type (such as WeChat) and user behavior (such as sending a one-to-one chat message) in the user interaction request, the judgment result is that instant messaging is needed. If you send a circle of friends in WeChat, you do not need to communicate instantly, that is, you do not need to log in to the instant messaging account later.

[0039] Step S4: When instant messaging is required, the server determines whether this is the first time the user logs into the instant messaging account based on the user interaction request. Specifically, the server determines whether the user logs into the instant messaging account for the first time by checking whether the user interaction request includes a token corresponding to the current user account and password.

[0040] Among them, Token token in the field of information technology usually refers to a digital identifier used for identity authentication. It can be a randomly generated string or encryption module, representing the authorization information of a user, device or session. Token token is generated on the server side as a token for the user side to make a request. When the user logs in for the first time on the user side, the server side will generate a Token token dedicated to the current user for the current request (corresponding to this embodiment, that is, the login instant messaging account password) after receiving the user request sent by the user side, and then feedback it to the user side. When the current user needs to repeat the current request later, the request generated by the user side only needs to bring this Token token to request data from the server side, and the user account and password need to be brought again. The purpose of the Token token is to reduce the pressure on the server, reduce the frequent queries to the database, and make the server more robust.

[0041] Step S5: If this is the first time the user logs into the instant messaging account, the user registers the instant messaging account; if this is at least the second time the user logs into the instant messaging account, the user directly logs into the instant messaging account.

[0042] Specifically, if the user logs in to the instant messaging account for at least the second time, the server receives the user interaction request and verifies the Token token corresponding to the current user account and password in the user interaction request. If the verification is successful, the current user's account and password are transmitted to the user end. If the verification fails, an error code is transmitted to the user end.

[0043] Step S6: When the user does not need to implement instant messaging, the server-side interface is called in real time to determine whether the current user's communication interaction application account includes unread messages; if the current user's communication interaction application account has unread messages, the server-side interface is called to obtain the instant messaging account and password and log in to the current user's account; otherwise, the instant messaging account is not logged in.

[0044] Example 2:

[0045] like Figure 2 As shown, the instant messaging flow control device described in this embodiment specifically includes the following modules:

[0046] The initialization module is used to start the user terminal and open the instant messaging interactive application of the user terminal; wherein, the user terminal is used to send and receive messages, specifically including terminal devices such as mobile phones and computers, and network communication is carried out between the user terminal and the server terminal to carry the user's interactive requests and message receiving functions.

[0047] The interaction request transmission module is used to generate a user interaction request through the instant messaging interaction application, and the communication interaction application transmits the user interaction request to the server. The user interaction request includes data information such as the type of communication interaction application and the activity level of the communication interaction user.

[0048] The first instant messaging judgment module is configured to receive the user interaction request through the server and judge whether instant messaging is required based on the user interaction request.

[0049] The second instant messaging determination module is configured to determine, when instant messaging is required, whether this is the first time the user has logged into the instant messaging account based on the user interaction request. The server determines whether this is the first time the user has logged into the instant messaging account by determining whether the user interaction request includes a token corresponding to the current user account and password.

[0050] The first instant messaging processing module is configured to register an instant messaging account when the user logs into the instant messaging account for the first time, and directly log into the instant messaging account if the user logs into the instant messaging account for at least the second time.

[0051] Among them, if the user logs in to the instant messaging account for at least the second time, the server receives the user interaction request and verifies the Token token corresponding to the current user account and password in the user interaction request. If the verification is successful, the current user's account and password are transmitted to the user end. If the verification fails, an error code is transmitted to the user end.

[0052] The second processing module of instant messaging is used to determine whether the current user's communication interaction application account includes unread messages by calling the server-side interface in real time when the user does not need to implement instant messaging; if the current user's communication interaction application account has unread messages, the server-side interface is called to obtain the instant messaging account and password and log in the current user's account; otherwise, the instant messaging account is not logged in.

[0053] While the specific embodiments of the present invention have been described in detail above, these are merely exemplary and the present invention is not limited thereto. For those skilled in the art, any equivalent modifications and substitutions to the present invention are also within the scope of the present invention. Therefore, any equivalent changes and modifications made without departing from the spirit and scope of the present invention are intended to be encompassed within the scope of the present invention.

Claims

1. A method for controlling the flow of instant messaging, characterized in that: The specific steps include: Step S1: Start the user terminal and open the instant messaging interactive application of the user terminal; wherein the user terminal is used to send and receive messages, specifically including terminal devices such as mobile phones and computers, and network communication is carried out between the user terminal and the server terminal to carry the user's interactive requests and message receiving functions; Step S2: generating a user interaction request through the instant messaging interaction application, and the messaging interaction application transmitting the user interaction request to the server; Step S3: The server receives the user interaction request and determines whether instant messaging is required based on the user interaction request; Step S4: When instant messaging is required, determining whether the user is logging into the instant messaging account for the first time based on the user interaction request; Step S5: If this is the first time the user logs into the instant messaging account, register the instant messaging account; if this is at least the second time the user logs into the instant messaging account, directly log in to the instant messaging account; Step S6: When the user does not need to implement instant messaging, the server-side interface is called in real time to determine whether the current user's communication interaction application account includes unread messages; if the current user's communication interaction application account has unread messages, the server-side interface is called to obtain the instant messaging account and password and log in to the current user's account; otherwise, the instant messaging account is not logged in.

2. The method for controlling the flow of instant messaging according to claim 1, wherein: In step S2, the user interaction request includes data information such as the type of communication interaction application and the activity level of the communication interaction user.

3. The method for controlling the flow of instant messaging according to claim 1, wherein: In step S4, the server determines whether the user interaction request includes a Token corresponding to the current user account and password to determine whether it is the first time for the user to log in to the instant messaging account.

4. The method for controlling the flow of instant messaging according to claim 1, wherein: In step S5, if the user logs in to the instant messaging account for at least the second time, the server receives the user interaction request and verifies the Token token corresponding to the current user account and password in the user interaction request. If the verification is successful, the current user's account and password are transmitted to the user end. If the verification fails, an error code is transmitted to the user end.

5. A flow control device for instant messaging, characterized in that: Specifically, it includes the following modules: An initialization module is used to start the user terminal and open the instant messaging interactive application of the user terminal; wherein the user terminal is used to send and receive messages, specifically including terminal devices such as mobile phones and computers, and network communication is carried out between the user terminal and the server side to carry the user's interactive requests and message receiving functions; An interaction request transmission module, configured to generate a user interaction request through the instant messaging interaction application, and the instant messaging interaction application transmits the user interaction request to a server; a first instant messaging judgment module, configured to receive the user interaction request through the server and judge whether instant messaging is required based on the user interaction request; The second instant messaging judgment module is used to judge whether the user is logging into the instant messaging account for the first time through the user interaction request when instant messaging is required; The first instant messaging processing module is configured to register an instant messaging account when the user logs into the instant messaging account for the first time, and directly log into the instant messaging account if the user logs into the instant messaging account for at least the second time; The second processing module of instant messaging is used to determine whether the current user's communication interaction application account includes unread messages by calling the server-side interface in real time when the user does not need to implement instant messaging; if the current user's communication interaction application account has unread messages, the server-side interface is called to obtain the instant messaging account and password and log in the current user's account; otherwise, the instant messaging account is not logged in.

6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the instant messaging traffic control method according to any one of claims 1 to 4 is implemented.

7. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for controlling the flow of instant messaging according to any one of claims 1 to 4 is implemented.