CN112069488B - Application registration method and related device in communication program - Google Patents
Application registration method and related device in communication program Download PDFInfo
- Publication number
- CN112069488B CN112069488B CN202010733170.6A CN202010733170A CN112069488B CN 112069488 B CN112069488 B CN 112069488B CN 202010733170 A CN202010733170 A CN 202010733170A CN 112069488 B CN112069488 B CN 112069488B
- Authority
- CN
- China
- Prior art keywords
- communication
- user
- unique identifier
- application
- identifier
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/44—Program or device authentication
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本申请涉及计算机技术领域,特别是涉及在通信程序中的应用登录方法及其相关装置。The present application relates to the field of computer technology, in particular to an application registration method in a communication program and related devices.
背景技术Background technique
目前市场上开发在对各通信程序中应用的登录方式主要有两种:其一为通信程序授权登录;其二为验证应用用户信息的登录。目前验证应用用户信息的登录方案中可能存在着应用登录出错的情况。At present, there are mainly two login methods developed in the market for application in various communication programs: one is the authorization login of the communication program; the other is the login of the verification application user information. In the current login solution for verifying application user information, there may be errors in application login.
发明内容Contents of the invention
本申请提供在通信程序中的应用登录方法及其相关装置,以解决应用登录出错的问题。This application provides an application registration method and related devices in a communication program to solve the problem of application registration errors.
为解决上述问题,本申请提供一种在通信程序中的应用登录方法,该方法包括:In order to solve the above problems, the present application provides an application login method in a communication program, the method comprising:
接收用户端在通信程序中的应用登录请求;Receive an application login request from the client in the communication program;
根据应用登录请求向通信程序的服务端请求获取用户唯一标识,在已存数据中查询获取通信唯一标识;According to the application login request, request the server of the communication program to obtain the user's unique identifier, and query the stored data to obtain the unique communication identifier;
判断确定用户唯一标识与通信唯一标识不一致,则将已存数据中的通信唯一标识更新为用户唯一标识;If it is determined that the user unique identifier is inconsistent with the communication unique identifier, then the communication unique identifier in the stored data is updated to the user unique identifier;
将通信唯一标识返回给用户端,使得用户端利用通信唯一标识实现应用登录。The unique communication identifier is returned to the user terminal, so that the user terminal implements application login by using the unique communication identifier.
其中,登录请求包括应用登录信息和通信用户信息;根据应用登录请求向通信程序的服务端请求获取用户唯一标识,在已存数据中查询获取通信唯一标识,包括:Among them, the login request includes application login information and communication user information; according to the application login request, request the server of the communication program to obtain the unique user identifier, and query the stored data to obtain the unique communication identifier, including:
向通信程序的服务端请求与通信用户信息对应的用户唯一标识;Request the unique user identification corresponding to the communication user information from the server of the communication program;
在已存数据中查询获取与应用登录信息对应的通信唯一标识。Query the stored data to obtain the communication unique identifier corresponding to the application login information.
其中,将通信唯一标识返回给用户端,使得用户端利用通信唯一标识实现应用登录,包括:Wherein, the communication unique identifier is returned to the user terminal, so that the user terminal uses the communication unique identifier to realize application login, including:
将通信唯一标识处理为加密信息串返回给用户端,使得用户端利用加密信息串实现应用登录。The communication unique identifier is processed into an encrypted information string and returned to the user end, so that the user end uses the encrypted information string to realize application login.
其中,使得用户端利用加密信息串实现应用登录,包括:Among them, making the user end use the encrypted information string to realize the application login, including:
接收用户端在登录支付时发送的加密信息串;Receive the encrypted information string sent by the client when logging in for payment;
对加密信息串进行解密获得加密信息串中的通信唯一标识;Decrypt the encrypted information string to obtain the unique communication identifier in the encrypted information string;
比较确定加密信息串中的通信唯一标识与已存数据中的通信唯一标识一致,进行登录支付。Compare and confirm that the communication unique identifier in the encrypted information string is consistent with the communication unique identifier in the stored data, and perform login payment.
其中,比较确定加密信息串中的通信唯一标识与已存数据中的通信唯一标识不一致,拒绝登录。Among them, it is determined by comparison that the unique communication identifier in the encrypted information string is inconsistent with the unique communication identifier in the stored data, and the login is refused.
其中,将通信唯一标识处理为加密信息串返回给用户端,包括:Among them, the communication unique identifier is processed into an encrypted information string and returned to the client, including:
将通信唯一标识和系统唯一标识处理为加密信息串返回给用户端。The communication unique identifier and the system unique identifier are processed into encrypted information strings and returned to the client.
其中,对加密信息串进行解密获得加密信息串中的通信唯一标识,包括:对加密信息进行解密获得加密信息串中的通信唯一标识和系统唯一标识;基于系统唯一标识确定用户端的应用用户信息;Wherein, decrypting the encrypted information string to obtain the unique communication identifier in the encrypted information string includes: decrypting the encrypted information to obtain the unique communication identifier and the unique system identifier in the encrypted information string; determining the application user information of the client based on the unique system identifier;
比较确定加密信息串中的通信唯一标识与已存数据中的通信唯一标识一致,之前包括:在已存数据中查询获取与应用用户信息对应的通信唯一标识;比较加密信息串中的通信唯一标识与应用用户信息对应的通信唯一标识是否一致。Compare and confirm that the unique communication identifier in the encrypted information string is consistent with the unique communication identifier in the stored data. Previously, it includes: querying the stored data to obtain the unique communication identifier corresponding to the application user information; comparing the unique communication identifier in the encrypted information string Whether the communication unique identifier corresponding to the application user information is consistent.
其中,进行登录支付,包括:Among them, the login payment includes:
向通信程序服务端获取通信程序支付数据包;Obtain the communication program payment packet from the communication program server;
将通信程序支付数据包发送给用户端,以让用户端利用通信程序支付数据包进行支付。Sending the communication program payment data package to the user terminal, so that the user terminal makes payment by using the communication program payment data package.
为解决上述问题,本申请还提供一种电子设备,该电子设备包括相互耦接的存储器和处理器,存储器用于存储程序指令,处理器用于执行程序指令以实现上述任一项的方法。In order to solve the above problems, the present application also provides an electronic device, which includes a memory and a processor coupled to each other, the memory is used to store program instructions, and the processor is used to execute the program instructions to implement any one of the above methods.
为解决上述问题,本申请还提供一种计算机可读存储介质,该计算机可读存储介质包括存储有能够实现上述任一项的方法的程序文件。In order to solve the above problems, the present application also provides a computer-readable storage medium, which includes a program file storing a method capable of implementing any one of the above-mentioned methods.
本申请的方法是:接收用户端在通信程序中的应用登录请求后,在基于应用登录请求从通信程序的服务端中获取的用户唯一标识和基于应用登录请求从已存数据中查询获取的通信唯一标识不一致时,将已存数据中的通信唯一标识更新为用户唯一标识,并将通信唯一标识返回给应用端,以让用户端利用接收到的通信唯一标识实现应用登录,使得已存数据中的通信唯一标识可以实时更新,从而使应用登录不会出错。The method of the present application is: after receiving the application login request of the user terminal in the communication program, the unique user identifier obtained from the server of the communication program based on the application login request and the communication query obtained from the stored data based on the application login request When the unique identifiers are inconsistent, update the communication unique identifier in the stored data to the user unique identifier, and return the communication unique identifier to the application side, so that the user terminal can use the received communication unique identifier to realize the application login, so that the stored data The unique identification of the communication can be updated in real time, so that the application login will not be wrong.
附图说明Description of drawings
为了更清楚地说明本申请实施方式中的技术方案,下面将对实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施方式,对本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the application. Those of ordinary skill in the art can also obtain other drawings based on these drawings without any creative effort.
图1是本申请在通信程序中的应用登录方法第一实施方式的流程示意图;FIG. 1 is a schematic flowchart of the first embodiment of the application login method in the communication program of the present application;
图2是本申请在通信程序中的应用登录方法第二实施方式的流程示意图;FIG. 2 is a schematic flow diagram of the second embodiment of the application login method in the communication program of the present application;
图3是本申请在通信程序中的应用登录方法一实施方式的交互示意图;FIG. 3 is an interactive schematic diagram of an embodiment of the application login method in the communication program of the present application;
图4是本申请电子设备一实施方式的结构示意图;FIG. 4 is a schematic structural diagram of an embodiment of the electronic device of the present application;
图5是本申请计算机可读存储介质一实施方式的结构示意图。FIG. 5 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application.
具体实施方式Detailed ways
为使本领域的技术人员更好地理解本申请的技术方案,下面结合附图和具体实施方式对本申请所提供的在通信程序中的应用登录方法及其相关装置做进一步详细描述。In order to enable those skilled in the art to better understand the technical solutions of the present application, the application login method in the communication program and related devices provided by the present application will be further described in detail below with reference to the drawings and specific implementation methods.
具体请参阅图1,图1是本申请在通信程序中的应用登录方法第一实施方式的流程示意图。其中,本实施方式在通信程序中的应用登录方法可以是由应用服务端执行的。本实施方式在通信程序中的应用登录方法包括以下步骤。Please refer to FIG. 1 for details. FIG. 1 is a schematic flowchart of a first embodiment of an application login method in a communication program of the present application. Wherein, the application login method in the communication program of this embodiment may be performed by the application server. The application registration method in the communication program of this embodiment includes the following steps.
S101:接收用户端在通信程序中的应用登录请求。S101: Receive an application login request from a user terminal in a communication program.
其中,本申请的“通信程序”可以是指微信、微博、钉钉、百度、或QQ等支持第三方应用登录的程序。Wherein, the "communication program" in this application may refer to programs that support third-party application login, such as WeChat, Weibo, DingTalk, Baidu, or QQ.
可以理解的是,本申请的“应用”是指在本申请的“通信程序”支持的第三方应用。例如,“应用”可以是可在微信程序上运行的美的商城或各种小程序。It can be understood that the "application" in this application refers to the third-party application supported by the "communication program" in this application. For example, an "application" can be Midea Mall or various mini programs that can run on the WeChat program.
用户端在通信程序中向应用服务端提出应用登录请求,这样应用服务端就可以接收到用户端在通信程序中的应用登录请求。The user terminal sends an application login request to the application server in the communication program, so that the application server can receive the application login request of the user terminal in the communication program.
S102:根据应用登录请求向通信程序服务端请求获取用户唯一标识,在已存数据中查询获取通信唯一标识。S102: According to the application login request, request the communication program server to obtain the unique user identifier, and query the stored data to obtain the unique communication identifier.
可以理解的是,用户唯一标识是指用户端此次请求登录应用的通信程序账号对应的标识。It can be understood that the unique user identifier refers to the identifier corresponding to the communication program account that the client requests to log in to the application this time.
而已存数据中的通信唯一标识是指已存数据中记载的用户端前一次请求登录应用的通信程序账号对应的标识,或指已存数据中记载的用户端之前常用的请求登录应用的通信程序账号对应的标识,或指已存数据中记载的与应用登录请求中用户的联系信息绑定的通信程序标识,当然不限于此。The communication unique identifier in the stored data refers to the identification corresponding to the account of the communication program that the client requested to log in to the application last time recorded in the stored data, or refers to the communication program that the client used to request to log in to the application recorded in the stored data. The identifier corresponding to the account, or the identifier of the communication program recorded in the stored data and bound to the user's contact information in the application login request, is of course not limited thereto.
可以理解的是,因为“应用”可以是在“通信程序”上登录的第三方应用,所以应用服务端和通信程序服务端一般不同,但是不能排除同一服务端同时作为“通信程序”的服务端和“应用”的服务端的情况。在通信程序服务端和应用服务端相同时,应用服务端需要基于应用登录请求从服务端作为通信程序服务端记载的内容中获取用户唯一标识,并从服务端作为应用服务端记载的内容中获取通信唯一标识。It is understandable that since the "application" can be a third-party application logged on the "communication program", the application server and the communication program server are generally different, but it cannot be ruled out that the same server is also the server of the "communication program" and the server side of the "application". When the communication program server and the application server are the same, the application server needs to obtain the unique user ID from the content recorded by the server as the communication program server based on the application login request, and obtain the unique user ID from the content recorded by the server as the application server Communication unique identifier.
S103:判断确定用户唯一标识与通信唯一标识不一致,则将已存数据中的通信唯一标识更新为用户唯一标识。S103: Judging that the unique user identifier is inconsistent with the unique communication identifier, updating the unique communication identifier in the stored data to the unique user identifier.
本申请在授权用户端的应用登录请求之前,需要判断用户唯一标识与通信唯一标识是否一致,以此判断用户端当前请求登录应用的通信程序账户与已存数据中记载的用户端之前请求登录应用的通信程序账户是否相同。在用户唯一标识与通信唯一标识不一致时,会将已存数据中的通信唯一标识更新为用户唯一标识。Before authorizing the user's application login request, this application needs to determine whether the user's unique identifier is consistent with the communication unique identifier, so as to determine whether the communication program account that the user is currently requesting to log in to the application is the same as that recorded in the stored data. Whether the communication program accounts are the same. When the unique identifier of the user is inconsistent with the unique identifier of the communication, the unique identifier of the communication in the stored data will be updated with the unique identifier of the user.
S104:将通信唯一标识返回给用户端,使得用户端利用通信唯一标识实现应用登录。S104: Return the unique communication identifier to the user end, so that the user end implements application login by using the unique communication identifier.
在一实现场景中,将通信唯一标识返回给用户端,用户端在通信程序中已经可以实现应用登录,即相当于用户端利用与其发出的应用登录请求对应的用户唯一标识完成应用。In an implementation scenario, the communication unique identifier is returned to the client, and the client can already log in the application in the communication program, that is, the client uses the unique user identifier corresponding to the application login request sent by the client to complete the application.
在另一实现场景中,将通信唯一标识返回给用户端,用户端可以在通信程序中的应用界面响应一些操作时将通信唯一标识发送给应用服务端,然后应用服务端会对从用户端接收到的通信唯一标识进行验证,以判断用户端的相关操作和/或应用登录是否有效。In another implementation scenario, the unique communication ID is returned to the client, and the user can send the unique communication ID to the application server when the application interface in the communication program responds to some operations, and then the application server will The unique identifier of the received communication is verified to determine whether the relevant operation and/or application login of the user terminal is valid.
进一步地,为了保证数据的安全性,可以将加密处理后的通信唯一标识返回给客户端。并且用户端需要将通信唯一标识发送给应用服务端时,也可以将从应用服务端接收到的加密处理后的通信唯一标识重新发送给应用服务端,既保证应用服务端能够得到通信唯一标识,又保证数据的安全性。Further, in order to ensure data security, the encrypted communication unique identifier may be returned to the client. And when the client needs to send the communication unique identifier to the application server, it can also resend the encrypted communication unique identifier received from the application server to the application server, which not only ensures that the application server can obtain the unique communication identifier, It also ensures data security.
在本实施方式中,接收用户端在通信程序中的应用登录请求后,在基于应用登录请求从通信程序的服务端中获取的用户唯一标识和基于应用登录请求从已存数据中查询获取的通信唯一标识不一致时,将已存数据中的通信唯一标识更新为用户唯一标识,并将通信唯一标识返回给应用端,以让用户端利用接收到的通信唯一标识实现应用登录,使得已存数据中的通信唯一标识可以实时更新,从而使应用登录不会出错。In this embodiment, after receiving the application login request of the user terminal in the communication program, the unique user identifier obtained from the server of the communication program based on the application login request and the communication query obtained from the stored data based on the application login request When the unique identifiers are inconsistent, update the communication unique identifier in the stored data to the user unique identifier, and return the communication unique identifier to the application side, so that the user terminal can use the received communication unique identifier to realize the application login, so that the stored data The unique identification of the communication can be updated in real time, so that the application login will not be wrong.
具体请参阅图2,图2是本申请在通信程序中的应用登录方法第二实施方式的流程示意图。本实施方式在通信程序中的应用登录方法包括以下步骤。Please refer to FIG. 2 for details. FIG. 2 is a schematic flowchart of a second embodiment of an application login method in a communication program of the present application. The application registration method in the communication program of this embodiment includes the following steps.
S201:接收用户端在通信程序中的应用登录请求。S201: Receive an application login request from a user terminal in a communication program.
其中,应用登录请求包括应用登录信息和通信用户信息。Wherein, the application login request includes application login information and communication user information.
通信用户信息可以包括通信程序用户码。例如,通信用户信息包括用户的微信账号。Communication user information may include a communication program user code. For example, the communication user information includes the user's WeChat account.
应用登录信息可以包括应用用户名称或用户联系方式。其中,应用登录名称具有唯一性,以保证不同用户的应用登录名称不相同,从而避免用户登录出错。应用用户名称可以由汉字、数字和/或符号等组成。用户联系方式可以为用户的手机号码、邮箱账号或QQ账号等。App login information can include app username or user contact information. Wherein, the application login name is unique, so as to ensure that the application login names of different users are different, so as to avoid user login errors. App usernames can be composed of Chinese characters, numbers and/or symbols, etc. The user's contact information can be the user's mobile phone number, email account or QQ account, etc.
进一步地,应用登录信息还可以包括验证码,这样应用服务端可以判断用户端传输的应用登录请求中的验证码与应用服务端发送给用户端的验证码是否相同,若相同,完成验证码的验证,进入步骤S202;若不相同,可以不授权用户端的应用登录请求,还可以通过用户端向用户提示“验证码出错”。Furthermore, the application login information can also include a verification code, so that the application server can determine whether the verification code in the application login request transmitted by the user terminal is the same as the verification code sent by the application server to the user terminal, and if they are the same, complete the verification of the verification code , enter step S202; if not the same, the application login request of the user end may not be authorized, and the user may be prompted "the verification code is wrong" through the user end.
S202:向通信程序服务端请求与通信用户信息对应的用户唯一标识。S202: Request the unique user identification corresponding to the communication user information from the communication program server.
通信程序服务端可以存储有通信用户信息与用户唯一标识的对应关系,从而应用服务端向通信程序服务端发送获取用户唯一标识的请求时,其中获取用户唯一标识请求包含通信用户信息,通信程序服务端可以通过通信用户信息查找到与通信用户信息对应的用户唯一标识,通信程序服务端会将与通信用户信息对应的用户唯一标识发送给应用服务端,使用通信用户信息向通信程序服务端请求与通信用户信息对应的用户唯一标识,这样应用服务端就能向通信程序服务端请求到与通信用户信息对应的用户唯一标识。The communication program server can store the corresponding relationship between the communication user information and the user's unique identifier, so that when the application server sends a request for obtaining the user's unique identifier to the communication program server, the request for obtaining the user's unique identifier includes the communication user information, and the communication program service The terminal can find out the unique user identification corresponding to the communication user information through the communication user information, and the communication program server will send the user unique identification corresponding to the communication user information to the application server, and use the communication user information to request the communication program server to communicate with the communication program server. The user unique identifier corresponding to the communication user information, so that the application server can request the communication program server for the user unique identifier corresponding to the communication user information.
S203:在已存数据中查询获取与应用登录信息对应的通信唯一标识。S203: Query and obtain the unique communication identifier corresponding to the application login information in the stored data.
可以理解的是,已存数据中存储有应用登录信息的至少部分数据与通信唯一标识的对应关系,这样应用服务端在获取到应用登录请求后,可以通过应用登录信息在已存数据中查询获取与应用登录信息对应的通信唯一标识。It can be understood that the corresponding relationship between at least part of the data of the application login information and the unique communication identifier is stored in the stored data, so that after the application server obtains the application login request, it can query and obtain the application login information in the stored data. The communication unique identifier corresponding to the application login information.
S204:判断用户唯一标识与通信唯一标识是否一致。S204: Determine whether the unique user identifier is consistent with the unique communication identifier.
在一实现方式中,通过判断用户唯一标识与通信唯一标识是否相同来判断用户唯一标识与通信唯一标识是否一致;在用户唯一标识与通信唯一标识相同时,确认用户唯一标识与通信唯一标识一致;在用户唯一标识与通信唯一标识不相同时,确认用户唯一标识与通信唯一标识不一致。In an implementation manner, it is determined whether the unique user identifier is consistent with the unique communication identifier by judging whether the unique identifier of the user is the same as the unique identifier of the communication; when the unique identifier of the user is the same as the unique identifier of the communication, it is confirmed that the unique identifier of the user is consistent with the unique identifier of the communication; When the unique user ID is different from the unique communication ID, confirm that the unique user ID is inconsistent with the unique communication ID.
在另一实现方式中,通过判断用户唯一标识与通信唯一标识的相似度是否超过阈值来判断用户唯一标识与通信唯一标识是否一致;在用户唯一标识与通信唯一标识相似度超过阈值时,确认用户唯一标识与通信唯一标识一致;在用户唯一标识与通信唯一标识不超过阈值时,确认用户唯一标识与通信唯一标识不一致。In another implementation, by judging whether the similarity between the unique user identifier and the unique communication identifier exceeds a threshold, it is judged whether the unique user identifier is consistent with the unique communication identifier; when the similarity between the unique user identifier and the unique communication identifier exceeds the threshold, confirm that the user The unique identifier is consistent with the unique communication identifier; when the unique identifier of the user and the unique identifier of the communication do not exceed the threshold, it is confirmed that the unique identifier of the user is inconsistent with the unique identifier of the communication.
在又一实现方式中,去除用户唯一标识与通信唯一标识中代表存储位置和/或获取时间的内容,判断经过去除处理的用户唯一标识和通信唯一标识是否相同;在经过去除处理的用户唯一标识和通信唯一标识相同时,确认用户唯一标识与通信唯一标识一致;在经过去除处理的用户唯一标识和通信唯一标识不相同时,确认用户唯一标识与通信唯一标识不一致。In yet another implementation, the content representing the storage location and/or acquisition time in the unique user identifier and the unique communication identifier is removed, and it is judged whether the removed unique user identifier and the unique communication identifier are the same; When it is the same as the communication unique identifier, confirm that the user unique identifier is consistent with the communication unique identifier; when the removed user unique identifier is different from the communication unique identifier, confirm that the user unique identifier is inconsistent with the communication unique identifier.
进一步地,在用户唯一标识与通信唯一标识一致时,进入步骤S206;在用户唯一标识与通信唯一标识不一致时,进入步骤S205。Further, when the unique user identifier is consistent with the unique communication identifier, go to step S206; when the unique user identifier is inconsistent with the unique communication identifier, go to step S205.
S205:将已存数据中的通信唯一标识更新为用户唯一标识。S205: Update the unique communication identifier in the stored data to the unique user identifier.
S206:将通信唯一标识处理为加密信息串返回给用户端。S206: Process the unique communication identifier into an encrypted information string and return it to the client.
在一实现方式中,可以对通信唯一标识进行加密处理,得到加密信息串,将得到的加密信息串返回给用户端。In an implementation manner, the unique communication identifier may be encrypted to obtain an encrypted information string, and the obtained encrypted information string may be returned to the client.
在另一实现方式中,还可以将通信唯一标识和系统唯一标识组成字符串,对字符串进行加密处理,得到加密信息串,将得到的加密信息串返回客户端,即将对通信唯一标识和系统唯一标识处理得到的加密信息串返回给用户端。可以理解的是,可以在步骤S206之前,基于应用登录请求中的应用登录信息从已存数据中查询获取到与应用登录信息对应的系统唯一标识。In another implementation, the unique communication identifier and the system unique identifier can also be combined into a character string, and the character string is encrypted to obtain an encrypted information string, and the obtained encrypted information string is returned to the client, that is, the unique communication identifier and the system The encrypted information string obtained through unique identification processing is returned to the client. It can be understood that before step S206, based on the application login information in the application login request, the system unique identifier corresponding to the application login information can be obtained from stored data.
可以理解的是,可以以任意加密方法对通信唯一标识进行加密,或者对通信唯一标识和系统唯一标识进行加密。例如可以以非对称加密方法对通信唯一标识进行加密。It can be understood that the unique communication identifier can be encrypted by any encryption method, or the unique communication identifier and the unique system identifier can be encrypted. For example, the communication unique identifier may be encrypted by an asymmetric encryption method.
S207:接收用户端在登录支付时发送的加密信息串。S207: Receive the encrypted information string sent by the user terminal when logging in for payment.
用户端在后续登录支付时,会向应用服务端发送加密信息串,从而应用服务端会接收到用户端在登录支付时发送的加密信息串。When the user terminal subsequently logs in for payment, it will send an encrypted information string to the application server, so that the application server will receive the encrypted information string sent by the user terminal when logging in for payment.
S208:对加密信息串进行解密获得加密信息串中的通信唯一标识。S208: Decrypt the encrypted information string to obtain the unique communication identifier in the encrypted information string.
对加密信息进行解密可以获得加密信息串中的通信唯一标识,以便应用服务端可以利用通信唯一标识验证登录支付是否有效。Decrypting the encrypted information can obtain the unique communication identifier in the encrypted information string, so that the application server can use the unique communication identifier to verify whether the login payment is valid.
可选地,对加密信息进行解密还可以获得加密信息串中的系统唯一标识。Optionally, decrypting the encrypted information can also obtain the system unique identifier in the encrypted information string.
S209:比较加密信息串中的通信唯一标识与已存数据中的通信唯一标识是否一致。S209: Compare whether the unique communication identifier in the encrypted information string is consistent with the unique communication identifier in the stored data.
可选地,在步骤S209之前,可以基于系统唯一标识确定用户端的应用用户信息,接着在已存数据中查询获取与应用用户信息对应的通信唯一标识,进而比较加密信息串中的通信唯一标识与应用用户信息对应的通信唯一标识是否一致。可以理解的是,应用用户信息可以包括应用用户名称或用户联系方式。Optionally, before step S209, the application user information of the client terminal can be determined based on the system unique identifier, and then the unique communication identifier corresponding to the application user information can be queried in the stored data, and then the unique communication identifier in the encrypted information string can be compared with Whether the unique communication identifier corresponding to the application user information is consistent. It can be understood that the application user information may include the application user name or user contact information.
在用户唯一标识与通信唯一标识一致时,进入步骤S210;在用户唯一标识与通信唯一标识不一致时,进入步骤S211。When the unique user ID is consistent with the unique communication ID, go to step S210; when the unique user ID is inconsistent with the unique communication ID, go to step S211.
S210:进行登录支付。S210: Perform login payment.
应用服务端确定加密信息串中的通信唯一标识与已存数据中的通信唯一标识一致,即相当于验证用户端的登录支付操作有效,从而应用服务端需要进行登录支付过程的一些操作,以使用户端可以完成登录支付操作。The application server determines that the unique communication identifier in the encrypted information string is consistent with the unique communication identifier in the stored data, which is equivalent to verifying that the login payment operation of the user terminal is valid, so the application server needs to perform some operations in the login payment process so that the user The terminal can complete the login payment operation.
例如,应用服务端在确认加密信息串中的通信唯一标识与已存数据中的通信唯一标识一致时,需要将通信程序支付数据包发送给用户端,以使用户端可以基于获取到的支付数据包完成登录支付。For example, when the application server confirms that the unique communication identifier in the encrypted information string is consistent with the unique communication identifier in the stored data, it needs to send the communication program payment data packet to the client, so that the client can The package completes the login payment.
进一步地,在将通信程序支付数据包发送给用户端之前,应用服务端需要向通信程序服务端获取通信程序支付数据包。Further, before sending the communication program payment data package to the user terminal, the application server needs to obtain the communication program payment data package from the communication program server.
S211:拒绝登录。S211: Deny login.
应用服务端确定加密信息串中的通信唯一标识与已存数据中的通信唯一标识不一致,拒绝用户端的通信程序中应用登录,即让用户端的通信程序中应用退出登录。The application server determines that the unique communication identifier in the encrypted information string is inconsistent with the unique communication identifier in the stored data, and rejects the application login in the communication program of the client, that is, allows the application in the communication program of the client to log out.
请参阅图3,图3为本申请在通信程序中应用登录方法第一实施方式的交互示意图。可以理解的是,本实施方式在通信程序中应用登录的交互方法通过由用户端、应用服务端和通信程序服务端构成的应用登录系统实现的。本实施方式中在通信程序中应用登录方法可以包括以下步骤。Please refer to FIG. 3 . FIG. 3 is an interactive schematic diagram of the first embodiment of the login method applied in the communication program of the present application. It can be understood that the interactive method for application login in the communication program in this embodiment is realized through the application login system composed of the client, the application server and the communication program server. In this embodiment, applying the login method in the communication program may include the following steps.
301、用户端获取应用登录信息。301. The client acquires application login information.
在一实现方式中,用户端获取应用用户名称和密码,其中,应用用户名称和密码可以组成应用登录信息。In an implementation manner, the client acquires an application user name and password, where the application user name and password may form application login information.
在另一实现方式中,用户端获取用户联系方式;基于用户联系方式向用户发送验证码;获取用户输入的验证码,其中,用户联系方式和验证码可以构成应用登录信息。In another implementation, the client obtains the user's contact information; sends a verification code to the user based on the user's contact information; obtains the verification code input by the user, wherein the user's contact information and the verification code may constitute application login information.
在又一实现方式中,用户端获取用户联系方式和密码,其中,用户联系方式和密码可以构成应用登录信息。In yet another implementation manner, the user end obtains the user's contact information and password, wherein the user's contact information and password may constitute application login information.
302、用户端将应用登录信息和通信用户信息发送给应用服务端。302. The client sends the application login information and communication user information to the application server.
303、应用服务端向通信程序服务端请求与通信用户信息对应的用户唯一标识。303. The application server requests the communication program server for a user unique identifier corresponding to the communication user information.
304、应用服务端在其已存数据中查询获取与应用登录信息对应的通信唯一标识。304. The application server queries its stored data to obtain the communication unique identifier corresponding to the application login information.
305、判断用户唯一标识与通信唯一标识是否一致。305. Determine whether the unique user identifier is consistent with the unique communication identifier.
在用户唯一标识与通信唯一标识不一致时,进入步骤306;在用户唯一标识与通信唯一标识一致时,进入步骤307。When the unique user identifier is inconsistent with the unique communication identifier, go to step 306; when the unique user identifier is consistent with the unique communication identifier, go to step 307.
306、将已存数据中的通信唯一标识更新为用户唯一标识。306. Update the unique communication identifier in the stored data to the unique user identifier.
完成步骤306后,进入步骤307。After completing step 306, go to step 307.
307、将通信唯一标识和系统唯一标识处理为加密信息串返回给用户端。307. Process the unique communication identifier and the unique system identifier into an encrypted information string and return it to the client.
308、用户端在登录支付时发送加密信息串给应用服务端。308. The client sends the encrypted information string to the application server when logging in for payment.
309、应用服务端对加密信息串进行解密获得加密信息串中的通信唯一标识和系统唯一标识。309. The application server decrypts the encrypted information string to obtain the communication unique identifier and the system unique identifier in the encrypted information string.
310、应用服务端基于系统唯一标识确定用户端的应用用户信息。310. The application server determines the application user information of the client based on the system unique identifier.
311、应用服务端在已存数据中查询获取与应用用户信息对应的通信唯一标识。311. The application server queries the stored data to obtain the unique communication identifier corresponding to the application user information.
312、应用服务端判断加密信息串中的通信唯一标识与已存数据中的通信唯一标识是否一致。312. The application server judges whether the unique communication identifier in the encrypted information string is consistent with the unique communication identifier in the stored data.
可以理解的是,步骤312中的已存数据中的通信唯一标识可以为步骤311查询获取到的与应用用户信息对应的通信唯一标识。It can be understood that the unique communication identifier in the stored data in step 312 may be the unique communication identifier corresponding to the application user information acquired in step 311 .
在用户唯一标识与通信唯一标识不一致时,进入步骤313;在用户唯一标识与通信唯一标识一致时,进入步骤314。When the unique user ID is inconsistent with the unique communication ID, go to step 313; when the unique user ID is consistent with the unique communication ID, go to step 314.
313、拒绝登录。313. Login is refused.
314、向通信程序服务端获取通信程序支付数据包。314. Obtain the communication program payment data packet from the communication program server.
315、将通信程序支付数据包发送给用户端。315. Send the communication program payment data packet to the client.
316、用户端利用通信程序支付数据包进行支付。316. The user terminal uses the communication program payment data package to perform payment.
下面为更好说明本申请在通信程序中的应用登录方法,提供以下在通信程序中的应用登录实施例来示例性说明:In order to better illustrate the application login method in the communication program of the present application, the following example of application login in the communication program is provided as an example:
A、用户端先前在以微信码A登录的微信程序中登录美的商城账户C,且美的商城服务端中已存数据的通信唯一标识与微信码A相对应。A. The user terminal has previously logged into the Midea Mall account C in the WeChat program logged in with the WeChat code A, and the unique communication identifier of the data stored in the Midea Mall server corresponds to the WeChat code A.
B、用户端当前在以微信码B登录的微信程序向美的商城服务端发送账户C的应用登录请求。美的商城服务端基于应用登录请求向微信服务端获取微信码B对应的用户唯一标识,因为用户端先前在以微信码A登录的微信程序中登录美的商城账户C,所以美的商城服务端从自身已存数据中获取到应用登录信息对应的通信唯一标识与微信码A相对应,从而美的商场服务端通过比较可以确定用户唯一标识与已存数据中的通信唯一标识是不一致的,此时美的商场服务端可以将已存数据中的通信唯一标识更新为与微信码B对应的用户唯一标识,并更新后的通信唯一标识返回给用户端。B. The client is currently using the WeChat program logged in with WeChat code B to send an application login request for account C to the Midea Mall server. The Midea Mall server obtains the unique user ID corresponding to WeChat code B from the WeChat server based on the application login request. The communication unique identifier corresponding to the application login information obtained in the stored data corresponds to the WeChat code A, so that the Midea mall server can determine that the user unique identifier is inconsistent with the communication unique identifier in the stored data. At this time, the Midea mall service The terminal can update the unique communication identifier in the stored data to the user unique identifier corresponding to WeChat code B, and return the updated unique communication identifier to the user terminal.
C、用户端在以微信码A登录的微信程序中以账户C登录的美的商城中进行支付操作时,向美的商城服务端请求微信支付数据包时会附带与微信码A对应的通信唯一标识。因为通过步骤B已经将美的商城服务端的已存数据中与账户C对应的通信唯一标识更新为与微信码B对应的通信唯一标识,美的商城服务端可以判定自身已存数据中账户C对应的通信唯一标识和从用户端接收的通信唯一标识不一致,此时美的商城服务端返回退出登录,从而使得用户端在以微信码A登录的微信程序中美的商城的账户C自动退出登录。C. When the client performs payment operations in the Midea Mall logged in with account C in the WeChat program logged in with WeChat code A, the unique communication identifier corresponding to WeChat code A will be attached when requesting the WeChat payment data package from the Midea mall server. Because the unique communication identifier corresponding to account C in the stored data of the Midea mall server has been updated to the unique communication identifier corresponding to WeChat code B through step B, the Midea mall server can determine the communication corresponding to account C in its own stored data The unique identifier is inconsistent with the unique identifier of the communication received from the user terminal. At this time, the Midea Mall server returns to logout, so that the user terminal automatically logs out of account C of Midea Mall in the WeChat program logged in with WeChat code A.
D、用户端在以微信码B登录的微信程序中以账户C登录的美的商城中进行支付操作时,向美的商城服务端请求微信支付数据包时会附带与微信码B对应的通信唯一标识。因为通过步骤B已经将美的商城服务端的已存数据中与账户C对应的通信唯一标识更新为与微信码B对应的通信唯一标识,美的商城服务端可以判定自身已存数据中账户C对应的通信唯一标识和从用户端接收的通信唯一标识一致,此时美的商城服务端可以将微信支付数据包发送给用户端,以让用户端可以利用微信支付数据包完成支付操作。这样通过应用服务端对应用服务端中的通信唯一标识进行检测更新,应用服务端中已存数据中的通信唯一标识被实时更新为用户端最新登录应用使用的通信用户信息对应的微信唯一标识,已过期的登录账号会自动退出,大大增加了系统的可靠安全性,及操作的便捷性,并且提高了用户端上以不同的通信程序账号切换登录同一应用账号操作的便捷性。D. When the client performs payment operations in the Midea Mall logged in with account C in the WeChat program logged in with WeChat code B, the unique communication identifier corresponding to WeChat code B will be attached when requesting the WeChat payment data package from the Midea mall server. Because the unique communication identifier corresponding to account C in the stored data of the Midea mall server has been updated to the unique communication identifier corresponding to WeChat code B through step B, the Midea mall server can determine the communication corresponding to account C in its own stored data The unique identifier is consistent with the unique identifier of the communication received from the client. At this time, the Midea Mall server can send the WeChat payment data packet to the client, so that the client can use the WeChat payment packet to complete the payment operation. In this way, the unique communication identifier in the application server is detected and updated through the application server, and the unique communication identifier in the stored data in the application server is updated in real time to the WeChat unique identifier corresponding to the communication user information used by the user's latest login application. The expired login account will automatically log out, which greatly increases the reliability and security of the system and the convenience of operation, and improves the convenience of switching and logging in to the same application account with different communication program accounts on the user end.
请参阅图4,图4是本申请电子设备一实施方式的结构示意图。本电子设备10包括相互耦接的存储器11和处理器12,存储器11用于存储程序指令,处理器12用于执行程序指令以实现上述任一实施方式的方法。Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an implementation manner of an electronic device of the present application. The
上述在通信程序中的应用登录方法的逻辑过程以程序文件呈现,在程序文件方面,若其作为独立的软件产品销售或使用时,其可存储在计算机可读存储介质中,因而本申请提出一种计算机可读存储介质。请参阅图5,图5是本申请计算机可读存储介质一实施方式的结构示意图,本实施方式计算机可读存储介质20中存储有能够实现上述的方法的程序文件21。The logic process of the above-mentioned application registration method in the communication program is presented as a program file. In terms of the program file, if it is sold or used as an independent software product, it can be stored in a computer-readable storage medium. Therefore, this application proposes a A computer readable storage medium. Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application. In this embodiment, the computer-
该计算机可读存储介质20具体可以为U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory,)、磁碟或者光盘等可以存储程序文件的介质,或者也可以为存储有该程序文件的服务器,该服务器可将存储的程序文件发送给其他设备运行,或者也可以自运行该存储的程序文件。该计算机可读存储介质20从物理实体上来看,可以为多个实体的组合,例如多个服务器、服务器加存储器、或存储器加移动硬盘等多种组合方式。The computer-
以上仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only the implementation mode of this application, and does not limit the scope of patents of this application. Any equivalent structure or equivalent process conversion made by using the contents of this application specification and drawings, or directly or indirectly used in other related technical fields, All are included in the scope of patent protection of the present application in the same way.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010733170.6A CN112069488B (en) | 2020-07-27 | 2020-07-27 | Application registration method and related device in communication program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010733170.6A CN112069488B (en) | 2020-07-27 | 2020-07-27 | Application registration method and related device in communication program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112069488A CN112069488A (en) | 2020-12-11 |
CN112069488B true CN112069488B (en) | 2023-05-16 |
Family
ID=73656250
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010733170.6A Expired - Fee Related CN112069488B (en) | 2020-07-27 | 2020-07-27 | Application registration method and related device in communication program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112069488B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108322461A (en) * | 2018-01-31 | 2018-07-24 | 百度在线网络技术(北京)有限公司 | Method, system, device, equipment and the medium of application program automated log on |
CN110225035A (en) * | 2019-06-11 | 2019-09-10 | 深圳市微付充科技有限公司 | The binding of third party's account and login method, server, terminal and device |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080005119A1 (en) * | 2006-06-29 | 2008-01-03 | Fernandez Christopher L | Remotely updating a user status on a presence server |
CN104468493B (en) * | 2013-09-25 | 2018-12-11 | 腾讯科技(深圳)有限公司 | The method and system of web page are logged in network communication |
US9432358B2 (en) * | 2013-10-31 | 2016-08-30 | Tencent Technology (Shenzhen) Company Limited | System and method of authenticating user account login request messages |
CN105187431B (en) * | 2015-09-17 | 2019-02-12 | 网易(杭州)网络有限公司 | Login method, server, client and the communication system of third-party application |
CN106131079B (en) * | 2016-08-29 | 2020-08-11 | 腾讯科技(北京)有限公司 | Authentication method, system and proxy server |
CN106383741B (en) * | 2016-09-13 | 2019-12-10 | 宇龙计算机通信科技(深圳)有限公司 | application processing method and mobile device |
CN109246076B (en) * | 2018-08-01 | 2022-11-04 | 北京奇虎科技有限公司 | Method and device for single sign-on to multiple systems |
CN109347797A (en) * | 2018-09-12 | 2019-02-15 | 深圳点猫科技有限公司 | A kind of third-party application login method and electronic equipment based on educational system |
CN109635528A (en) * | 2018-10-31 | 2019-04-16 | 武汉艺果互动科技股份有限公司 | A kind of wechat small routine user log-in method, equipment and storage equipment |
-
2020
- 2020-07-27 CN CN202010733170.6A patent/CN112069488B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108322461A (en) * | 2018-01-31 | 2018-07-24 | 百度在线网络技术(北京)有限公司 | Method, system, device, equipment and the medium of application program automated log on |
CN110225035A (en) * | 2019-06-11 | 2019-09-10 | 深圳市微付充科技有限公司 | The binding of third party's account and login method, server, terminal and device |
Also Published As
Publication number | Publication date |
---|---|
CN112069488A (en) | 2020-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104967604B (en) | Login method and system | |
CN103249045B (en) | A kind of methods, devices and systems of identification | |
CN103875211B (en) | An Internet account management method, manager, server and system | |
EP3691215A1 (en) | Access token management method, terminal and server | |
CN102710640B (en) | Authorization requesting method, device and system | |
WO2019218747A1 (en) | Third party authorized login method and system | |
CN109462601B (en) | Multi-platform access method and device based on eSIM | |
CN104901925A (en) | End-user identity authentication method, device and system and terminal device | |
CN102217280B (en) | User service authentication method, system and server | |
CN110232265A (en) | Dual-identity authentication method, apparatus and system | |
CN105681259A (en) | Open authorization method and apparatus and open platform | |
CN104202162A (en) | System for login based on mobile phone and login method | |
CN105162802B (en) | Portal authentication method and certificate server | |
CN106161475B (en) | Method and device for realizing user authentication | |
CN104767614B (en) | A kind of information authentication method and device | |
CN114338078B (en) | A CS client login method and device | |
CN109460647B (en) | Multi-device secure login method | |
CN109936579A (en) | Single sign-on method, device, equipment and computer readable storage medium | |
CN112261011A (en) | Cloud desktop authentication method based on two-dimensional code recognition | |
US9680814B2 (en) | Method, device, and system for registering terminal application | |
CN104580237A (en) | Method for logging into website, server used in method for logging into website, client terminal used in method for logging into website and peripheral used in method for logging into website | |
CN105592072A (en) | Method for obtaining login certification in intelligent terminal, intelligent terminal and operation system thereof | |
CN105790945B (en) | An authentication method, device and system for realizing unique user identity authentication | |
WO2018099407A1 (en) | Account authentication login method and device | |
CN107819579A (en) | A kind of processing method, server and the computer-readable recording medium of user's request |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 230601 floor 2, building G2, 198 Pearl Road, hi tech Zone, Hefei, Anhui. Patentee after: Hefei Meizhi Intelligent Technology Co.,Ltd. Country or region after: China Address before: 2nd Floor, Building G2, No. 198 Mingzhu Avenue, High tech Zone, Hefei City, Anhui Province Patentee before: Hefei Midea Intelligent Technology Co.,Ltd. Country or region before: China |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20230516 |