H5 page login method, device, electronic device and storage medium
By obtaining WeChat openId data and querying packets to send binding requests, the problem of low login efficiency of H5 pages is solved, and the fast and automatic login of H5 pages is achieved, improving the user experience.
Patent Information
- Application Number
- CN202210356829.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-04-06
AI Technical Summary
The existing H5 page login method is inefficient, and the binding relationship needs to be established through the openId of the official account, resulting in poor user experience.
Get WeChat openId data through the H5 page to determine whether to bind the WeChat official account. If it is not bound, query the grouping and send a binding request. After the verification is successful, a binding relationship is generated to achieve automatic login.
It improves the login efficiency of the H5 page, simplifies the user login process, and improves the user experience.
Smart Images

Figure CN114707129B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of process optimization, and in particular to an H5 page login method, device, electronic device and storage medium. Background Art
[0002] H5 refers to the fifth generation of HTML, and also refers to all digital products made with the H5 language. HTML is the abbreviation of "Hypertext Markup Language". Most of the web pages we see on the Internet are written in HTML. The browser can display the content of the web page by decoding HTML. It also constitutes the basis for the rise of the Internet. Unlike mini-programs, H5 can be used in any browser, while mini-programs can only be used in WeChat. The existing H5 login method is more cumbersome. Users need to be guided to follow the official account and use the openId of the official account to establish a new binding relationship. The login of the official account has a fixed threshold and uses the account and password login level. H5 pages usually require the use of quick login methods such as OTP, which leads to low login efficiency of H5 pages. Summary of the invention
[0003] The present invention provides an H5 page login method, device, electronic device and storage medium, the main purpose of which is to improve the login efficiency of the H5 page.
[0004] To achieve the above purpose, the present invention provides an H5 page login method, comprising:
[0005] Obtain WeChat openId data through the H5 page, and determine whether the H5 page is bound to a WeChat public account through the openId data;
[0006] If the H5 page is bound to the WeChat official account, obtain the binding user information corresponding to the WeChat official account, and log in to the H5 page through the binding user information;
[0007] If the H5 page is not bound to the WeChat official account, query the group of the H5 page in the WeChat official account to obtain the target group, and identify whether the target group is bound to the WeChat official account;
[0008] If the target group is bound to the WeChat public account, return to the step of obtaining the bound user information corresponding to the WeChat public account;
[0009] If the target group is not bound to the WeChat public account, a relationship binding request is sent to the WeChat public account through the target group, and the relationship binding request is verified using the WeChat public account. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated, so as to return to execute the step of obtaining the binding user information corresponding to the WeChat public account.
[0010] Optionally, judging whether the H5 page is bound to a WeChat public account by using the openId data includes:
[0011] Obtain the global credentials of the WeChat openId data, extract the authorization code of the WeChat public account, and verify the authorization code through the global credentials;
[0012] If the global credential successfully verifies the authorization code, the H5 page is bound to the WeChat public account; if the global credential fails to verify the authorization code, the H5 page is not bound to the WeChat public account.
[0013] Optionally, obtaining the bound user information corresponding to the WeChat public account includes:
[0014] Return to the login interface of the WeChat public account, and identify the user login information of the WeChat public account through the login interface;
[0015] According to the user login information, query the bound user information corresponding to the WeChat public account.
[0016] Optionally, querying the grouping of the H5 page in the WeChat public account to obtain the target grouping includes:
[0017] Obtain the identifier in the H5 page to obtain the page identifier;
[0018] Obtaining group information in the WeChat public account, extracting an identifier in the group information, and obtaining a group identifier;
[0019] The page identifier is matched with the group identifier. After the page identifier and the group identifier are successfully matched, the group corresponding to the group identifier is used as the target group of the H5 page.
[0020] Optionally, the page identifier is matched with the group identifier, including:
[0021] Performing vector conversion on the page identifier and the group identifier to obtain a page identifier vector and a group identifier vector, and calculating the matching degree between the page identifier vector and the group identifier vector using a pre-built matching model;
[0022] If the matching degree is greater than a preset matching degree, the page identification vector matches the group identification vector successfully;
[0023] If the matching degree is not greater than the preset matching degree, the page identification vector fails to match the group identification vector.
[0024] Optionally, sending a relationship binding request to the WeChat public account through the target group further includes:
[0025] Identify the network protocol of the target group and the WeChat public account, and obtain the network address and network port of the target group and the WeChat public account;
[0026] According to the network protocol, the network address and the network port, a transmission channel for the target group and the WeChat public account is constructed;
[0027] The relationship binding request is sent according to the transmission channel.
[0028] Optionally, the using the WeChat public account to verify the relationship binding request, the device includes:
[0029] Obtain the login method of the target group, and log in to the WeChat public account through the login method;
[0030] If the WeChat public account is successfully logged in, the relationship binding request is verified successfully;
[0031] If the WeChat public account login fails, the relationship binding request verification fails.
[0032] In order to solve the above problem, the present invention also provides an H5 page login device, the device comprising:
[0033] Data acquisition module, used to obtain WeChat openId data through H5 page;
[0034] A binding relationship identification module, used to determine whether the H5 page is bound to a WeChat public account through the openId data;
[0035] A page login execution module, used for obtaining the binding user information corresponding to the WeChat public account when the H5 page is bound to the WeChat public account, and executing the login to the H5 page through the binding user information;
[0036] A target group query module, used for querying the group of the H5 page in the WeChat public account when the H5 page is not bound to the WeChat public account, obtaining a target group, and identifying whether the target group is bound to the WeChat public account;
[0037] Return to the information acquisition module, used for returning to execute the step of acquiring the binding user information corresponding to the WeChat public account when the target group is bound to the WeChat public account;
[0038] The binding request verification module is used to send a relationship binding request to the WeChat public account through the target group when the target group is not bound to the WeChat public account, and use the WeChat public account to verify the relationship binding request. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated to return to execute the step of obtaining the binding user information corresponding to the WeChat public account.
[0039] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0040] at least one processor; and,
[0041] a memory communicatively connected to the at least one processor; wherein,
[0042] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to implement the H5 page login method described above.
[0043] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned H5 page login method.
[0044] It can be seen that the embodiment of the present invention first determines whether the H5 page is bound to the WeChat public account through the openId data, obtains the WeChat openId data to determine whether the H5 page follows the WeChat public account, provides a guarantee for the subsequent WeChat H5 login, so that WeChat H5 can log in, and obtains the binding user information corresponding to the WeChat public account. By obtaining the binding user information corresponding to the WeChat public account, the binding user information can be used to achieve fast login of the H5 page, thereby improving the login efficiency of the H5 page. Secondly, the embodiment of the present invention obtains the target group by querying the group of the H5 page in the WeChat public account, and queries the H5 page. 5 page in the WeChat public account, and obtain the target group. The binding relationship between the target group and the WeChat public account can be determined, which provides a guarantee for the automatic login of the H5 page, thereby sending a relationship binding request to the WeChat public account through the target group. Further, the embodiment of the present invention sends a relationship binding request to the WeChat public account through the target group to realize the subsequent relationship binding premise between the target group and the WeChat public account. When the verification of the relationship binding request is successful, the binding relationship between the target group and the WeChat public account can be generated, so as to facilitate the automatic login of the H5 page, so as to facilitate the login of the H5 page, and improve the login efficiency of the H5 page. Therefore, the H5 page login method, device, electronic device and storage medium provided by the embodiment of the present invention can improve the login efficiency of the H5 page. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A flowchart of an H5 page login method provided by an embodiment of the present invention;
[0046] Figure 2 A schematic diagram of a module of an H5 page login device provided by an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing an H5 page login method provided by an embodiment of the present invention.
[0048] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0050] The embodiment of the present invention provides an H5 page login method. The execution subject of the H5 page login method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the H5 page login method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0051] Reference Figure 1 FIG. 1 is a flow chart of an H5 page login method provided by an embodiment of the present invention. In the embodiment of the present invention, the H5 page login method includes the following steps S1-S6:
[0052] S1. Get WeChat openId data through H5 page.
[0053] In the embodiment of the present invention, the WeChat H5 is also called interactive H5, which is equivalent to PPT on WeChat and is mainly used as a carrier for brand communication and promotion. H5 refers to a web page with cool effects that is presented on a mobile terminal of a smart phone that can play Flash, such as various animations and interactions, and is used for playing advertisements and conducting marketing. The WeChat openId data refers to a unique identifier of an ordinary user in a public account, which is only valid for the current public account, and the basic user information is obtained through the openId data.
[0054] S2. Determine whether the H5 page is bound to a WeChat public account through the openId data.
[0055] The embodiment of the present invention obtains WeChat openId data to determine whether the H5 page follows the WeChat public account, thereby providing a guarantee for subsequent WeChat H5 login so that WeChat H5 can log in.
[0056] The official account refers to the application account applied for by developers or merchants on the WeChat public platform. Through the official account, merchants can achieve all-round communication and interaction with specific groups on the WeChat platform through text, pictures, voice, and video, forming a mainstream online and offline WeChat interactive marketing method.
[0057] As an embodiment of the present invention, determining whether the H5 page is bound to a WeChat public account through the openId data includes: obtaining the global credential of the WeChat openId data, and extracting the authorization code of the WeChat public account, and verifying the authorization code through the global credential. If the verification of the authorization code by the global credential is successful, the H5 page is bound to the WeChat public account; if the verification of the authorization code by the global credential fails, the H5 page is not bound to the WeChat public account.
[0058] Among them, the global credential is also called the global token, which refers to an encrypted digital credential, which refers to a string of numbers that mark the identity information of the communicating parties in Internet communication. The authorization code is also called the activation code. In order to make their software target specific groups of people, some software adds a password program to the software and also uses an activation code. Only when the correct password is entered can the software be used normally, just like locking the software with a lock, and only people with the key can use the software.
[0059] Furthermore, in an optional embodiment of the present invention, the acquisition of the WeChat openId data can be achieved through wx.login, the acquisition of the authorization code of the public account is achieved through a callback function, and the detection of the authorization code is achieved through a detection function, such as a checkSession function.
[0060] S3. If the H5 page is bound to the WeChat public account, obtain the binding user information corresponding to the WeChat public account, and log in to the H5 page through the binding user information.
[0061] The embodiment of the present invention obtains the bound user information corresponding to the WeChat public account, and uses the bound user information to realize quick login of the H5 page, thereby improving the login efficiency of the H5 page.
[0062] As an embodiment of the present invention, obtaining the bound user information corresponding to the WeChat public account includes: returning to the login interface of the WeChat public account, identifying the user login information of the WeChat public account through the login interface, and querying the bound user information corresponding to the WeChat public account based on the user login information.
[0063] Furthermore, in an optional embodiment of the present invention, the login interface refers to an interface in the WeChat public account that requires the user to provide an account and password security verification, which has the functions of controlling user permissions, recording user behavior, and protecting operational security. The login information refers to the account and password used by the user when registering the WeChat public account.
[0064] In an optional embodiment of the present invention, the identification of the login information is implemented through a MID function, and the acquisition of the bound user information is implemented through an extraction function, and the extraction function includes a left function.
[0065] Furthermore, in an optional embodiment of the present invention, after obtaining the bound user information corresponding to the WeChat public account, the H5 page login is performed through the bound user information, and there is no need to enter the login information to log in to the H5 page, thereby achieving quick login to the H5 page and improving the login efficiency of WeChat H5.
[0066] S4. If the H5 page is not bound to the WeChat public account, query the group of the H5 page in the WeChat public account to obtain a target group, and identify whether the target group is bound to the WeChat public account.
[0067] In the embodiment of the present invention, if the H5 page is not bound to the WeChat public account, the target group is obtained by querying the group of the H5 page in the WeChat public account, and the binding relationship between the target group and the WeChat public account can be determined, thereby providing a guarantee for automatic login of the H5 page.
[0068] As an embodiment of the present invention, the query of the grouping of the H5 page in the WeChat public account to obtain the target group includes: obtaining the identifier in the H5 page to obtain the page identifier, obtaining the group information in the WeChat public account, extracting the identifier in the group information to obtain the group identifier, matching the page identifier with the group identifier, and after the page identifier and the group identifier are successfully matched, using the group corresponding to the group identifier as the target group of the H5 page.
[0069] Furthermore, in an optional embodiment of the present invention, the identification is a mark, a symbol indicating a feature or indicating a certain feature, and has multiple meanings, basically referring to a mark, a symbol or a marker for marking and facilitating identification.
[0070] As an embodiment of the present invention, the page identifier and the group identifier are matched, including: performing vector conversion on the page identifier and the group identifier to obtain a page identifier vector and a group identifier vector, and using a pre-built matching model to calculate the matching degree between the page identifier vector and the group identifier vector; if the matching degree is greater than a preset matching degree, the page identifier vector and the group identifier vector are successfully matched; if the matching degree is not greater than the preset matching degree, the page identifier vector and the group identifier vector fail to match.
[0071] In an optional embodiment of the present invention, by converting the page identifier and the group identifier into vector form, the group of the H5 page in the WeChat public account can be easily queried to improve the accuracy of the H5 page query to which the group belongs, wherein the vector is a basic concept in multiple natural sciences such as mathematics, physics, and engineering science, and refers to a geometric object that has both size and direction and satisfies the parallelogram law. The preset matching degree can be 0.8, and can also be set according to the actual application scenario.
[0072] Furthermore, in an optional embodiment of the present invention, the vector conversion of the page identifier and the group identifier can be achieved through a matlab vector generation function, and the matching of the page identifier vector and the group identifier vector can be achieved through a similarity algorithm, including a cosine similarity algorithm.
[0073] S5. If the target group is bound to the WeChat public account, return to execute the step of obtaining the bound user information corresponding to the WeChat public account.
[0074] It should be understood that when the target group is bound to the WeChat public account, it means that the group page corresponding to the target group can be directly logged in to the WeChat public account, and the H5 page exists in the target group. Therefore, in the embodiment of the present invention, by returning to execute the step of obtaining the binding user information corresponding to the WeChat public account, the automatic login of the H5 page is realized, thereby improving the login efficiency of the H5 page.
[0075] S6. If the target group is not bound to the WeChat public account, a relationship binding request is sent to the WeChat public account through the target group, and the relationship binding request is verified using the WeChat public account. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated, so as to return to execute the step of obtaining the binding user information corresponding to the WeChat public account.
[0076] It should be understood that when the target group is not bound to the WeChat public account, it means that the group page corresponding to the target group cannot be directly logged into the WeChat public account, and the H5 page exists in the target group. Therefore, the embodiment of the present invention sends a relationship binding request to the WeChat public account through the target group to achieve the subsequent relationship binding premise between the target group and the WeChat public account. Among them, the relationship binding request refers to a request to establish a binding relationship between the target group and the WeChat public account.
[0077] As an embodiment of the present invention, sending a relationship binding request to the WeChat public account through the target group includes: identifying the network protocol of the target group and the WeChat public account, and obtaining the network address and network port of the target group and the WeChat public account; constructing a transmission channel between the target group and the WeChat public account according to the network protocol, the network address and the network port; and executing the sending of the relationship binding request according to the transmission channel.
[0078] Among them, the network protocol refers to a set of rules, standards or agreements established by the network protocol for data exchange in a computer network, such as the TCP protocol. The network address refers to the use of physical links in the computer field to connect isolated workstations or hosts together to form a data link, thereby achieving the purpose of resource sharing and communication, such as the IP address. The network port refers to the port number in the TCP / IP protocol, which ranges from 0 to 65535, such as port 80 for web browsing services, port 21 for FTP services, etc.
[0079] Furthermore, the embodiment of the present invention can verify the relationship binding request by using the WeChat public account to verify the relationship binding request, thereby realizing identity verification of the target group corresponding to the relationship binding request and ensuring the security and reliability of subsequent relationship binding.
[0080] As an embodiment of the present invention, the use of the WeChat public account to verify the relationship binding request includes: obtaining the login method of the target group, logging in to the WeChat public account through the login method, if the WeChat public account is successfully logged in, the relationship binding request verification is successful, if the WeChat public account login fails, the relationship binding request verification fails.
[0081] Furthermore, in the embodiment of the present invention, when the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account can be generated to facilitate automatic login of the H5 page.
[0082] Furthermore, in an optional embodiment of the present invention, after the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated, so as to return to execute the step of obtaining the binding user information corresponding to the WeChat public account and perform the H5 page login.
[0083] It can be seen that the embodiment of the present invention first determines whether the H5 page is bound to the WeChat public account through the openId data, obtains the WeChat openId data to determine whether the H5 page follows the WeChat public account, provides a guarantee for the subsequent WeChat H5 login, so that WeChat H5 can log in, and obtains the binding user information corresponding to the WeChat public account. By obtaining the binding user information corresponding to the WeChat public account, the binding user information can be used to achieve fast login of the H5 page, thereby improving the login efficiency of the H5 page. Secondly, the embodiment of the present invention obtains the target group by querying the group of the H5 page in the WeChat public account, and queries the H5 page. 5 page in the WeChat public account, and obtain the target group. The binding relationship between the target group and the WeChat public account can be determined, which provides a guarantee for the automatic login of the H5 page, thereby sending a relationship binding request to the WeChat public account through the target group. Further, the embodiment of the present invention sends a relationship binding request to the WeChat public account through the target group to realize the subsequent relationship binding premise between the target group and the WeChat public account. When the verification of the relationship binding request is successful, the binding relationship between the target group and the WeChat public account can be generated, so as to facilitate the automatic login of the H5 page, so as to facilitate the login of the H5 page, and improve the login efficiency of the H5 page. Therefore, a H5 page login method provided by an embodiment of the present invention can improve the login efficiency of the H5 page.
[0084] like Figure 2 The figure shows a functional module diagram of the H5 page login device of the present invention.
[0085] The H5 page login device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the H5 page login device can include an openId data acquisition module 101, a binding relationship identification module 102, a page login execution module 103, a target group query module 104, a return acquisition information module 105, and a binding request verification module 106. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.
[0086] In this embodiment, the functions of each module / unit are as follows:
[0087] The openId data acquisition module 101 is used to acquire WeChat openId data through the H5 page;
[0088] The binding relationship identification module 102 is used to determine whether the H5 page is bound to a WeChat public account through the openId data;
[0089] The page login execution module 103 is used to obtain the binding user information corresponding to the WeChat public account when the H5 page is bound to the WeChat public account, and execute the login to the H5 page through the binding user information;
[0090] The target group query module 104 is used to query the group of the H5 page in the WeChat public account when the H5 page is not bound to the WeChat public account, obtain the target group, and identify whether the target group is bound to the WeChat public account;
[0091] The return information acquisition module 105 is used to return to the step of acquiring the binding user information corresponding to the WeChat public account when the target group is bound to the WeChat public account;
[0092] The binding request verification module 106 is used to send a relationship binding request to the WeChat public account through the target group when the target group is not bound to the WeChat public account, and use the WeChat public account to verify the relationship binding request. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated to return to execute the step of obtaining the binding user information corresponding to the WeChat public account.
[0093] In detail, each module in the H5 page login device 100 in the embodiment of the present invention is used in the same manner as described above. Figure 1 The H5 page login method described in the above is the same technical means and can produce the same technical effects, so I will not go into details here.
[0094] like Figure 3 , which is a schematic diagram of the structure of an electronic device 1 for implementing the H5 page login method of the present invention.
[0095] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an H5 page login program.
[0096] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device 1, and uses various interfaces and lines to connect the various components of the entire electronic device 1, and executes or executes programs or modules stored in the memory 11 (for example, executing an H5 page login program, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0097] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the H5 page login program, etc., but also can be used to temporarily store data that has been output or is to be output.
[0098] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0099] The communication interface 13 is used for communication between the above-mentioned electronic device 1 and other devices, including a network interface and an employee interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices 1. The employee interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the employee interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual employee interface.
[0100] Figure 3 Only the electronic device 1 having components is shown, and those skilled in the art can understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0101] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0102] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.
[0103] The H5 page login program stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs. When running in the processor 10, the following method can be implemented:
[0104] Get WeChat openId data through H5 page;
[0105] Determine whether the H5 page is bound to a WeChat public account through the openId data;
[0106] If the H5 page is bound to the WeChat official account, obtain the binding user information corresponding to the WeChat official account, and log in to the H5 page through the binding user information;
[0107] If the H5 page is not bound to the WeChat official account, query the group of the H5 page in the WeChat official account to obtain the target group, and identify whether the target group is bound to the WeChat official account;
[0108] If the target group is bound to the WeChat public account, return to the step of obtaining the bound user information corresponding to the WeChat public account;
[0109] If the target group is not bound to the WeChat public account, a relationship binding request is sent to the WeChat public account through the target group, and the relationship binding request is verified using the WeChat public account. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated, so as to return to execute the step of obtaining the binding user information corresponding to the WeChat public account.
[0110] Specifically, the specific implementation method of the processor 10 for the above-mentioned computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0111] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0112] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of the electronic device 1, the following method can be implemented:
[0113] Get WeChat openId data through H5 page;
[0114] Determine whether the H5 page is bound to a WeChat public account through the openId data;
[0115] If the H5 page is bound to the WeChat official account, obtain the binding user information corresponding to the WeChat official account, and log in to the H5 page through the binding user information;
[0116] If the H5 page is not bound to the WeChat official account, query the group of the H5 page in the WeChat official account to obtain the target group, and identify whether the target group is bound to the WeChat official account;
[0117] If the target group is bound to the WeChat public account, return to the step of obtaining the bound user information corresponding to the WeChat public account;
[0118] If the target group is not bound to the WeChat public account, a relationship binding request is sent to the WeChat public account through the target group, and the relationship binding request is verified using the WeChat public account. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated, so as to return to execute the step of obtaining the binding user information corresponding to the WeChat public account.
[0119] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0120] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0122] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0123] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0124] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0125] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A H5 page login method, characterized in that: The method comprises: Get WeChat openId data through H5 page; Determine whether the H5 page is bound to a WeChat public account through the openId data; If the H5 page is bound to the WeChat official account, obtain the binding user information corresponding to the WeChat official account, and log in to the H5 page through the binding user information; If the H5 page is not bound to the WeChat official account, query the group of the H5 page in the WeChat official account to obtain the target group, and identify whether the target group is bound to the WeChat official account; If the target group is bound to the WeChat public account, return to the step of obtaining the bound user information corresponding to the WeChat public account; If the target group is not bound to the WeChat public account, a relationship binding request is sent to the WeChat public account through the target group, and the relationship binding request is verified by the WeChat public account. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated, so as to return to the step of obtaining the binding user information corresponding to the WeChat public account; The querying of the grouping of the H5 page in the WeChat official account to obtain the target grouping includes: obtaining the identifier in the H5 page to obtain the page identifier; obtaining the grouping information in the WeChat official account, extracting the identifier in the grouping information to obtain the group identifier; matching the page identifier with the group identifier, and after the page identifier and the group identifier are successfully matched, using the group corresponding to the group identifier as the target group of the H5 page; The sending of the relationship binding request to the WeChat public account through the target group includes: identifying the network protocol of the target group and the WeChat public account, and obtaining the network address and network port of the target group and the WeChat public account; constructing a transmission channel between the target group and the WeChat public account according to the network protocol, the network address and the network port; and executing the sending of the relationship binding request according to the transmission channel; The use of the WeChat public account to verify the relationship binding request includes: obtaining the login method of the target group corresponding to the relationship binding request, and logging in to the WeChat public account through the login method; if the WeChat public account is successfully logged in, the relationship binding request verification is successful; if the WeChat public account login fails, the relationship binding request verification fails.
2. The H5 page login method according to claim 1, characterized in that: The determining whether the H5 page is bound to a WeChat public account through the openId data includes: Obtain the global credentials of the WeChat openId data, extract the authorization code of the WeChat public account, and verify the authorization code through the global credentials; If the global credential successfully verifies the authorization code, the H5 page is bound to the WeChat public account; If the global credential fails to verify the authorization code, the H5 page is not bound to the WeChat public account.
3. The H5 page login method according to claim 1, characterized in that: The obtaining of the bound user information corresponding to the WeChat public account includes: Return to the login interface of the WeChat public account, and identify the user login information of the WeChat public account through the login interface; According to the user login information, query the bound user information corresponding to the WeChat public account.
4. The H5 page login method according to claim 1, characterized in that: The matching of the page identifier with the group identifier includes: Performing vector conversion on the page identifier and the group identifier to obtain a page identifier vector and a group identifier vector, and calculating the matching degree between the page identifier vector and the group identifier vector using a pre-built matching model; If the matching degree is greater than a preset matching degree, the page identification vector matches the group identification vector successfully; If the matching degree is not greater than the preset matching degree, the page identification vector fails to match the group identification vector.
5. An H5 page login device, used to implement the H5 page login method according to any one of claims 1 to 4, characterized in that: The device comprises: Data acquisition module, used to obtain WeChat openId data through H5 page; A binding relationship identification module, used to determine whether the H5 page is bound to a WeChat public account through the openId data; A page login execution module, used for obtaining the binding user information corresponding to the WeChat public account when the H5 page is bound to the WeChat public account, and executing the login to the H5 page through the binding user information; A target group query module, used for querying the group of the H5 page in the WeChat public account when the H5 page is not bound to the WeChat public account, obtaining a target group, and identifying whether the target group is bound to the WeChat public account; Return to the information acquisition module, which is used to return to the step of acquiring the binding user information corresponding to the WeChat public account when the target group is bound to the WeChat public account; The binding request verification module is used to send a relationship binding request to the WeChat public account through the target group when the target group is not bound to the WeChat public account, and use the WeChat public account to verify the relationship binding request. When the verification of the relationship binding request is successful, a binding relationship between the target group and the WeChat public account is generated to return to execute the step of obtaining the binding user information corresponding to the WeChat public account.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the H5 page login method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the H5 page login method as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
WeChat official account management method and device and electronic equipment
CN112632495A
Application login method and device, user terminal and storage medium
CN113645239A