CN111258602B - Information updating method and device - Google Patents
Information updating method and device Download PDFInfo
- Publication number
- CN111258602B CN111258602B CN202010026856.1A CN202010026856A CN111258602B CN 111258602 B CN111258602 B CN 111258602B CN 202010026856 A CN202010026856 A CN 202010026856A CN 111258602 B CN111258602 B CN 111258602B
- Authority
- CN
- China
- Prior art keywords
- time
- host
- updating
- information
- login
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the disclosure discloses an information updating method and device. One embodiment of the method comprises the following steps: acquiring the creation moment of an initial login credential based on the initial login credential, wherein the initial login credential is a group of character strings used for representing the login state of a user; and judging whether the time difference between the creation time and the current time meets the updating condition, and updating the creation time in response to the time difference between the creation time and the current time meeting the updating condition. According to the embodiment, the login information of the user can not expire, so that the user can keep a login state when logging in, frequent and repeated login operation of the user is reduced, and user experience is improved.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to the technical field of information processing, and particularly relates to an information updating method and device.
Background
The applet is an application which can be used without downloading and installing, can run in different application environments (namely hosts), and needs to solve the problem of how to keep and synchronize the login states of users when the applet is applied to different hosts.
In the existing solution, after the applet uses the web browser application program (i.e. the first App) to log in, the login state information of the user is recorded at the corresponding website server, i.e. session, the session can record the corresponding failure time of the user login, and as no login refreshing mechanism is guaranteed, once the failure time exceeds the login failure time, the first App can prompt the user to log in again, so that the user needs to log in again at intervals; the applet will record the session of the user at the second App vendor server after logging in some instant messaging application program (i.e. the second App), the session will also record the expiration time corresponding to the user login, and the session can only ensure the login state of the user corresponding to the second App, and cannot ensure synchronization and refreshing of the user login states across hosts.
Disclosure of Invention
The embodiment of the disclosure provides an information updating method and device.
In a first aspect, an embodiment of the present disclosure provides an information updating method, applied to a server, where the method includes: acquiring the creation moment of an initial login credential based on the initial login credential, wherein the initial login credential is a group of character strings used for representing the login state of a user; and judging whether the time difference between the creation time and the current time meets the updating condition, and updating the creation time in response to the time difference between the creation time and the current time meeting the updating condition.
In some embodiments, determining whether the time difference between the creation time and the current time satisfies an update condition, and updating the creation time in response to the time difference between the creation time and the current time satisfying the update condition includes: judging whether the time difference between the creation time and the current time is larger than the update time of the initial login credential or not, and whether the time difference between the creation time and the current time is smaller than the effective time of the initial login credential or not, wherein the update time is used for representing the time interval for updating the initial login credential, and the effective time is used for representing the time for allowing a user to keep a login state; and updating the creation time in response to the time difference between the creation time and the current time being greater than the update time and the time difference between the creation time and the current time being less than the effective time.
In some embodiments, after determining whether the time difference between the creation time and the current time satisfies the update condition, in response to the time difference between the creation time and the current time satisfying the update condition, the method further comprises: and updating the expiration time of the initial login credential, wherein the expiration time is used for representing the starting time point when the user changes from the login state to the non-login state.
In some embodiments, obtaining the creation time of the initial login credentials based on the initial login credentials includes: analyzing an update request data packet sent by a client for updating an initial login credential to obtain the initial login credential and a host name; decrypting the initial login credential to obtain the creation time of the initial login credential, user login information and a host ID, wherein the host ID is used for representing the identity of a host of the program running environment.
In some embodiments, after determining whether the time difference between the creation time and the current time satisfies the update condition, in response to the time difference between the creation time and the current time satisfying the update condition, the method further comprises: encrypting the creation time, the user login information and the host ID by using an encryption algorithm according to the updated creation time, and generating an updated login credential; and sending the updated login credentials to the client.
In some embodiments, after the creation time of the initial login credentials is obtained based on the initial login credentials, the method further comprises: according to the host name, matching host information corresponding to the host name in a database; content analysis is carried out on the host information, and a host number in the host information is extracted; judging whether the host number in the host information is the same as the host ID according to the host ID obtained by decryption; and in response to the host number in the host information being the same as the host ID, continuing to execute subsequent work.
In some embodiments, after determining whether the host number in the host information is the same as the host ID based on the decrypted host ID, the method further includes: and responding to the fact that the host number in the host information is different from the host ID, and sending an illegal message of the initial login credential to the client.
In some embodiments, the method further comprises: and sending the initial login credential to the client in response to the time difference between the creation time and the current time not meeting the update condition.
In a second aspect, embodiments of the present disclosure provide an information updating method, applied to a client, including: receiving user login operation, and responding to the operation of triggering an update request, wherein the user login operation accords with the preset operation of triggering the update request, and the update request is a request for updating the current user login credentials; and responding to the received login credentials corresponding to the update request returned by the server, and storing the login credentials returned by the server locally.
In some embodiments, the method further comprises: and responding to the received message returned by the server side and indicating that the current user login credentials are illegal, and displaying the message to the user.
In a third aspect, an embodiment of the present disclosure provides an information updating apparatus, including: an acquisition unit configured to acquire a creation timing of an initial login credential based on the initial login credential, wherein the initial login credential is a set of character strings for characterizing a user login state; and an updating unit configured to determine whether a time difference between the creation time and the current time satisfies an updating condition, and update the creation time in response to the time difference between the creation time and the current time satisfying the updating condition.
In some embodiments, the update unit comprises: the judging module is configured to judge whether the time difference between the creation time and the current time is larger than the updating time length of the initial login credential or not, and whether the time difference between the creation time and the current time is smaller than the effective time length of the initial login credential or not, wherein the updating time length is used for representing the time interval for updating the initial login credential, and the effective time length is used for representing the time length for allowing a user to keep a login state; and the updating module is configured to update the creation time in response to the time difference between the creation time and the current time being greater than the updating time length and the time difference between the creation time and the current time being less than the effective time length.
In some embodiments, the apparatus further comprises: and a second updating unit configured to update a time of expiration of the initial login credential, wherein the time of expiration is used to characterize a starting point in time when the user changes from the login state to the non-login state.
In some embodiments, the acquisition unit comprises: the analysis module is configured to analyze an update request data packet sent by the client for updating the initial login credentials to obtain the initial login credentials and a host name; the decryption module is configured to decrypt the initial login credential to obtain the creation time of the initial login credential, user login information and a host ID, wherein the host ID is used for representing the identity of a host of the program running environment.
In some embodiments, the apparatus further comprises: the encryption unit is configured to encrypt the creation time, the user login information and the host ID by using an encryption algorithm according to the updated creation time, and generate an updated login credential; and the sending unit is configured to send the updated login credentials to the client.
In some embodiments, the apparatus further comprises: a host matching unit configured to match host information corresponding to the host name in the database according to the host name; the information analysis unit is configured to analyze the content of the host information and extract the host number in the host information; a host verification unit configured to determine whether the host number and the host ID in the host information are the same, based on the decrypted host ID; and a result execution unit configured to continue to execute the subsequent work in response to the host number in the host information being the same as the host ID.
In some embodiments, the apparatus further comprises: and a message transmitting unit configured to transmit a message of illegitimate initial login credentials to the client in response to the host number in the host information being different from the host ID.
In some embodiments, the apparatus further comprises: and the feedback unit is configured to send the initial login credential to the client in response to the time difference between the creation time and the current time being not greater than the update time length.
In a fourth aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a fifth aspect, embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
According to the information updating method and device provided by the embodiment of the disclosure, whether the time difference between the creation time and the current time meets the updating condition is judged, and the creation time is updated in response to the fact that the time difference between the creation time and the current time meets the updating condition, so that login information of a user is not outdated, the user is enabled to keep a login state when logging in, frequent and repeated login operation of the user is reduced, and user experience is improved.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of an information update method applied to a server according to the present disclosure;
FIG. 3 is a schematic diagram of an application scenario of an information update method applied to a server according to the present disclosure;
FIG. 4 is a flow chart of another embodiment of an information update method applied to a server according to the present disclosure;
FIG. 5 is a flow chart of yet another embodiment of an information update method applied to a server according to the present disclosure;
FIG. 6 is a flow chart of yet another embodiment of an information update method applied to a server according to the present disclosure;
FIG. 7 is a flow chart of one embodiment of an information update method applied to a client according to the present disclosure;
FIG. 8 is a schematic diagram of a structure of one embodiment of an information updating apparatus according to the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which an information updating method or information updating apparatus of embodiments of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, pick-up class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and transmitting an update request, including but not limited to smartphones, tablet computers, electronic book readers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. It may be implemented as a plurality of software or software modules, for example, for providing distributed services, or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, such as a server providing support for update requests of the terminal devices 101, 102, 103. The server may perform processing such as determining the received data such as the update request, and feed back the processing result (for example, the update result) to the terminal device.
It should be noted that, the information updating method provided by the embodiment of the present disclosure is generally executed by the server 105, and the corresponding information updating device is generally disposed in the server 105.
The server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules, for example, for providing distributed services, or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of an information update method applied to a server according to the present disclosure is shown. The information updating method comprises the following steps:
In this embodiment, after receiving a request sent by a client to update an initial login credential, an execution body (for example, a server shown in fig. 1) of the information updating method obtains time information, that is, creation time, when the initial login credential is created based on the initial login credential, where the initial login credential may be a set of strings used to characterize a user login state, and the initial login credential may be user login information generated after the user has successfully logged in last time. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connection, wiFi connection, bluetooth connection, wiMAX connection, zigbee connection, UWB (ultra wideband) connection, and other now known or later developed wireless connection.
In this embodiment, the execution body determines a time difference between the creation time of the initial login credential and the current time, determines whether the time difference satisfies an update condition, and updates the creation time if the time difference satisfies the update condition.
For example, when the executing body judges whether the time difference between the creation time and the current time of the initial login credential exceeds the update time, if the time difference exceeds the update time, the creation time of the initial login credential is delayed backwards by a preset time.
It should be noted that the above updating method is a well-known technology widely studied and applied at present, and will not be described herein.
With continued reference to fig. 3, fig. 3 is a schematic diagram 300 of an application scenario of the information updating method applied to the server according to the present embodiment. The user enters login information via applet client 301, for example: the applet client 301 sends a login request data packet to the applet server 302 through the host application according to login information input by a user, generates an initial login credential 303 after the applet server 302 receives the login request data packet, acquires the creation time of the initial login credential based on the initial login credential, judges whether the time difference between the creation time and the current time meets the update condition, and updates the creation time of the initial login credential if the time difference between the creation time and the current time meets the update condition.
According to the information updating method applied to the server provided by the embodiment of the invention, whether the time difference between the creation time and the current time meets the updating condition is judged, and the creation time is updated in response to the fact that the time difference between the creation time and the current time meets the updating condition, so that the login information of the user is not outdated, the login state of the user is kept when the user logs in, frequent and repeated login operation of the user is reduced, and the user experience is improved.
With continued reference to fig. 4, a flow 400 of another embodiment of an information update method applied to a server according to the present disclosure is shown. The information updating method comprises the following steps:
In this embodiment, the executing body determines a time difference between a creation time and a current time of the initial login credential, and determines whether the time difference is between an update time of the initial login credential and an effective time of the initial login credential, that is, the time difference is greater than the update time of the initial login credential and less than the effective time of the initial login credential, where the update time is used to characterize a time interval for updating the initial login credential, and the effective time is used to characterize a time for allowing the user to maintain a login state.
In step 403, the creation time is updated in response to the time difference between the creation time and the current time being greater than the update time period and the time difference between the creation time and the current time being less than the effective time period.
In this embodiment, when the executing body determines that the time difference between the creation time and the current time of the initial login credential is between the update time of the initial login credential and the effective time of the initial login credential, the creation time is updated.
For example, when the executing body determines that the time difference between the creation time and the current time of the initial login credential is between the update time of the initial login credential and the effective time of the initial login credential, the creation time of the initial login credential is delayed by a fixed time according to a preset fixed time.
In this embodiment, the specific operation of step 401 is substantially the same as that of step 201 in the embodiment shown in fig. 2, and will not be described here again.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the information updating process 400 in this embodiment, by determining whether the time difference between the creation time and the current time is greater than the update duration of the initial login credential, and whether the time difference between the creation time and the current time is less than the effective duration of the initial login credential, and in response to the time difference between the creation time and the current time being greater than the update duration and the time difference between the creation time and the current time being less than the effective duration, updates the creation time, because the update of the creation time is performed under a certain condition, rather than the update performed for each login, frequent data changes on the server and the client caused by the information update are reduced, and system performance is improved while ensuring the user login state.
With further reference to fig. 5, a flow of yet another embodiment of an information update method applied to a server is shown. The flow 500 of the information updating method includes the following steps:
In this embodiment, an execution body of the method analyzes an update request packet sent by a received client for updating an initial login credential to obtain the initial login credential and a host name, where the initial login credential is a mabpass generated by a user in a login process.
In this embodiment, the execution body decrypts the mabguss generated by the user during the login process to obtain the creation time of the initial login credential, the user login information and the host ID, where the host ID is used to characterize the identity of the host in the program running environment, and the user login information may be a user login account.
In this embodiment, the execution body encrypts the updated creation time, the user login information and the host ID by using a preset encryption algorithm, and generates a new login credential, that is, an updated login credential.
And step 505, the updated login credentials are sent to the client.
In this embodiment, the executing entity sends the new login credentials generated in step 504 to the client that sent the login request, so that the client stores the encrypted information locally, and takes the login credentials to prove the legal identity of the user each time the user requests to login.
In some optional implementations of the present embodiment, after determining whether the time difference between the creation time and the current time satisfies the update condition, and in response to the time difference between the creation time and the current time satisfying the update condition, updating the creation time, the method further includes: and updating the expiration time of the initial login credential, wherein the expiration time is used for representing the starting time point when the user changes from the login state to the non-login state.
In some optional implementations of the present embodiment, updating the creation time and the expiration time of the initial login credentials includes: updating the creation time to be the current time; and updating the failure time to a time point after extending the effective time from the updated creation time to the rear according to the updated creation time and the preset effective time.
In this embodiment, the specific operation of step 503 is substantially the same as that of step 202 in the embodiment shown in fig. 2, and will not be described here again.
It should be noted that the encryption and decryption methods are widely known techniques for research and application at present, and are not described herein.
As can be seen from fig. 5, compared with the embodiment corresponding to fig. 2, the information updating process 500 in this embodiment obtains the creation time of the initial login credential, the user login information and the host ID by decrypting the initial login credential, encrypts the creation time, the user login information and the host ID according to the updated creation time by using an encryption algorithm, generates an updated login credential, and sends the updated login credential to the client, and increases the verification of the host dimension in the user login process, so that the user only needs to use the account of the user dimension to log in once when logging in different host applications, does not need to log in the host account again, and realizes that the same user can log in unified on different host platforms.
With further reference to fig. 6, a flow of yet another embodiment of an information update method applied to a server is shown. The flow 600 of the information updating method includes the steps of:
and step 601, analyzing an update request data packet sent by the client for updating the initial login credentials to obtain the initial login credentials and the host name.
In this embodiment, the execution subject of the method queries the database for host information corresponding to the host name.
In step 604, content analysis is performed on the host information, and a host number in the host information is extracted.
In this embodiment, after the execution subject parses the queried host content, the host number in the host information is extracted.
In this embodiment, the execution subject compares the host number in the extracted host information with the host ID after decrypting the initial login credential, and confirms whether the host number is identical to the host ID.
In step 606, in response to the host number in the host information being the same as the host ID, subsequent operations continue to be performed.
In this embodiment, if the executing body determines that the host number in the host information is the same as the host ID, the subsequent operation is continued, otherwise, an error message is returned. The validity of the host ID is determined by comparing the host number in the extracted host information with the host ID after decrypting the initial login credentials, so that the server is prevented from being deceived by professionals maliciously forging the request parameters and forging the initial login credentials in the cookie.
In some optional implementations of this embodiment, after determining whether the host number in the host information is the same as the host ID according to the decrypted host ID, the method further includes: and responding to the fact that the host number in the host information is different from the host ID, and sending an illegal message of the initial login credential to the client.
In step 607, it is determined whether the time difference between the creation time and the current time satisfies the update condition, and the creation time is updated in response to the time difference between the creation time and the current time satisfying the update condition.
In some optional implementations of the present embodiment, the method further includes: and sending the initial login credential to the client in response to the time difference between the creation time and the current time not meeting the update condition.
In this embodiment, when the executing body determines that the time difference between the creation time and the current time of the initial login credential does not meet the update condition, it indicates that the login has not yet reached the update time limit requirement, and returns the initial login credential to the client.
In this embodiment, the specific operations of steps 601, 602 and 607 are substantially the same as those of steps 501, 502 and 503 in the embodiment shown in fig. 5, and will not be described here.
As can be seen from fig. 6, compared with the embodiment corresponding to fig. 2, the flow 600 of information update in this embodiment matches host information corresponding to host names in a database according to host names, analyzes the content of the host information, extracts host numbers in the host information, determines whether the host numbers in the host information are identical to the host IDs according to the host IDs obtained by decryption, continues to execute subsequent operations in response to the host numbers in the host information being identical to the host IDs, determines validity of the host IDs, eliminates counterfeit login requests, and ensures authenticity and reliability of login data.
With further reference to fig. 7, a flow of one embodiment of an information update method applied to a client is shown. The flow 700 of the information update method includes the steps of:
In this embodiment, the user sends an update request for the current user login credential to an execution body (e.g., a terminal device shown in fig. 1) of the information update method in each login operation, and when the execution body determines that the user login operation meets a preset operation for triggering the update request, the update request is sent to the server, where the current user login credential is the initial login credential.
In step 702, in response to receiving the login credential returned by the server and corresponding to the update request, the login credential returned by the server is stored locally.
In this embodiment, when the executing body receives the updated login credentials returned by the server, the updated login credentials are stored locally, so that each time the user requests to login, the login credentials are taken to prove the legal identity of the user.
In some optional implementations of the present embodiment, the method further includes: and responding to the received message returned by the server side and indicating that the current user login credentials are illegal, and displaying the message to the user.
According to the information updating method applied to the client provided by the embodiment of the invention, through receiving the user login operation, responding to the operation of triggering the update request which is met by the user login operation, sending the update request to the server, responding to the login credential which is returned by the server and corresponds to the update request, and storing the login credential returned by the server locally, so that the user login credential of the client is updated at regular intervals, the login information of the user is always kept not to expire, the login state of the user is kept when the user logs in, frequent and repeated login operation of the user is reduced, and the user experience is improved.
With further reference to fig. 8, as an implementation of the method shown in fig. 2 to 6, the present disclosure provides an embodiment of an information updating apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 8, the information updating apparatus 800 of the present embodiment includes: the acquisition unit 801 updates the unit 802. Wherein the obtaining unit 801 is configured to obtain a creation time of an initial login credential based on the initial login credential, where the initial login credential is a set of character strings for characterizing a login state of a user; an updating unit 802 configured to determine whether a time difference between the creation time and the current time satisfies an update condition, and update the creation time in response to the time difference between the creation time and the current time satisfying the update condition.
In this embodiment, the specific processes of the obtaining unit 801 and the updating unit 802 of the login device 800 and the technical effects thereof may refer to the descriptions related to the steps 201 to 202 in the corresponding embodiment of fig. 2, and are not described herein again.
In some optional implementations of the present embodiment, the updating unit includes: the judging module is configured to judge whether the time difference between the creation time and the current time is larger than the updating time length of the initial login credential or not, and whether the time difference between the creation time and the current time is smaller than the effective time length of the initial login credential or not, wherein the updating time length is used for representing the time interval for updating the initial login credential, and the effective time length is used for representing the time length for allowing a user to keep a login state; and the updating module is configured to update the creation time in response to the time difference between the creation time and the current time being greater than the updating time length and the time difference between the creation time and the current time being less than the effective time length.
In some optional implementations of this embodiment, the apparatus further includes: and a second updating unit configured to update a time of expiration of the initial login credential, wherein the time of expiration is used to characterize a starting point in time when the user changes from the login state to the non-login state.
In some optional implementations of the present embodiment, the acquiring unit includes: the analysis module is configured to analyze an update request data packet sent by the client for updating the initial login credentials to obtain the initial login credentials and a host name; the decryption module is configured to decrypt the initial login credential to obtain the creation time of the initial login credential, user login information and a host ID, wherein the host ID is used for representing the identity of a host of the program running environment.
In some optional implementations of this embodiment, the apparatus further includes: the encryption unit is configured to encrypt the creation time, the user login information and the host ID by using an encryption algorithm according to the updated creation time, and generate an updated login credential; and the sending unit is configured to send the updated login credentials to the client.
In some optional implementations of this embodiment, the apparatus further includes: a host matching unit configured to match host information corresponding to the host name in the database according to the host name; the information analysis unit is configured to analyze the content of the host information and extract the host number in the host information; a host verification unit configured to determine whether the host number and the host ID in the host information are the same, based on the decrypted host ID; and a result execution unit configured to continue to execute the subsequent work in response to the host number in the host information being the same as the host ID.
In some optional implementations of this embodiment, the apparatus further includes: and a message transmitting unit configured to transmit a message of illegitimate initial login credentials to the client in response to the host number in the host information being different from the host ID.
In some optional implementations of this embodiment, the apparatus further includes: and the feedback unit is configured to send the initial login credential to the client in response to the time difference between the creation time and the current time being not greater than the update time length.
Referring now to fig. 9, a schematic diagram of an electronic device (e.g., server in fig. 1) 900 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), car terminals (e.g., car navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The server illustrated in fig. 9 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 may include a processing means (e.g., a central processor, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data necessary for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the electronic device 900 to communicate wirelessly or by wire with other devices to exchange data. While fig. 9 shows an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 9 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that, the computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring the creation moment of an initial login credential based on the initial login credential, wherein the initial login credential is a group of character strings used for representing the login state of a user; and judging whether the time difference between the creation time and the current time meets the updating condition, and updating the creation time in response to the time difference between the creation time and the current time meeting the updating condition.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes an acquisition unit and an update unit. The names of these units do not constitute a limitation on the unit itself in some cases, for example, the acquisition unit may also be described as "a unit that acquires the creation time of the initial login credential based on the initial login credential".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.
Claims (16)
1. An information updating method applied to an applet server, the method comprising:
acquiring the creation moment of an initial login credential based on the initial login credential, wherein the initial login credential is a group of character strings used for representing the login state of a user, and the initial login credential is generated after responding to receiving a login request data packet sent by an applet client through a host application of the applet;
the obtaining the creation time of the initial login credential based on the initial login credential includes: analyzing an update request data packet sent by a client for updating an initial login credential to obtain the initial login credential and a host name; decrypting the initial login credential to obtain the creation time of the initial login credential, user login information and a host ID, wherein the host ID is used for representing the identity of a host of a program running environment; and
The method further comprises the steps of: according to the host name, matching host information corresponding to the host name in a database;
content analysis is carried out on the host information, and a host number in the host information is extracted;
judging whether the host number in the host information is the same as the host ID according to the host ID obtained by decryption;
and judging whether the time difference between the creation time and the current time meets an updating condition or not according to the fact that the host number in the host information is the same as the host ID, and updating the creation time according to the fact that the time difference between the creation time and the current time meets the updating condition.
2. The information updating method according to claim 1, wherein the determining whether the time difference between the creation time and the current time satisfies an update condition, and updating the creation time in response to the time difference between the creation time and the current time satisfying the update condition, comprises:
judging whether the time difference between the creation time and the current time is larger than the updating time length of the initial login credential or not, and whether the time difference between the creation time and the current time is smaller than the effective time length of the initial login credential or not, wherein the updating time length is used for representing the time interval for updating the initial login credential, and the effective time length is used for representing the time length for allowing a user to keep a login state;
And updating the creation time in response to the time difference between the creation time and the current time being greater than the update time and the time difference between the creation time and the current time being less than the effective time.
3. The information updating method according to claim 1, wherein after determining whether or not the time difference between the creation time and the current time satisfies an update condition, in response to the time difference between the creation time and the current time satisfying an update condition, the method further comprises:
and updating the invalidation time of the initial login credential, wherein the invalidation time is used for representing the starting time point of the user changing from the login state to the non-login state.
4. The information updating method according to claim 1, wherein after the determining whether the time difference between the creation time and the current time satisfies an update condition, the method further comprises, in response to the time difference between the creation time and the current time satisfying an update condition, updating the creation time:
encrypting the creation time, the user login information and the host ID by using an encryption algorithm according to the updated creation time, and generating an updated login credential;
And sending the updated login credentials to a client.
5. The information updating method according to claim 1, after said judging whether the host number in the host information is the same as the host ID based on the decrypted host ID, the method further comprising:
and responding to the fact that the host number in the host information is different from the host ID, and sending the illegal message of the initial login credential to the client.
6. The information updating method according to claim 1, wherein the method further comprises:
and transmitting the initial login credential to the client in response to the time difference between the creation time and the current time not meeting the update condition.
7. An information updating method applied to an applet client, the method comprising:
receiving a user login operation, and responding to the operation of triggering an update request, wherein the user login operation accords with a preset operation for triggering the update request, and the update request is a request for updating a current user login credential, and the server is an applet server which is used for executing the method according to any one of claims 1-6;
and responding to the received login credentials corresponding to the update request returned by the server, and storing the login credentials returned by the server locally.
8. The information updating method according to claim 7, the method further comprising:
and responding to the received message returned by the server side and indicating that the current user login credentials are illegal, and displaying the message to the user.
9. An information updating device is applied to an applet server and comprises:
an acquisition unit configured to acquire a creation time of an initial login credential based on the initial login credential, wherein the initial login credential is a set of character strings for characterizing a user login state, and the initial login credential is generated after responding to receiving a login request data packet sent by an applet client through a host application of the applet;
wherein the acquisition unit includes: the analysis module is configured to analyze an update request data packet sent by the client for updating the initial login credentials to obtain the initial login credentials and the host name; the decryption module is configured to decrypt the initial login credential to obtain the creation time of the initial login credential, user login information and a host ID, wherein the host ID is used for representing the identity of a host of a program running environment; and
the apparatus further comprises: a host matching unit configured to match host information corresponding to the host name in a database according to the host name;
An information analysis unit configured to perform content analysis on the host information and extract a host number in the host information;
a host verification unit configured to determine whether a host number in the host information is the same as the host ID based on the decrypted host ID;
and an updating unit configured to determine whether a time difference between the creation time and the current time satisfies an updating condition in response to the host number in the host information being the same as the host ID, and update the creation time in response to the time difference between the creation time and the current time satisfying the updating condition.
10. The information updating apparatus according to claim 9, wherein the updating unit includes:
the judging module is configured to judge whether the time difference between the creation time and the current time is larger than the updating time length of the initial login credential or not, and whether the time difference between the creation time and the current time is smaller than the effective time length of the initial login credential or not, wherein the updating time length is used for representing the time interval for updating the initial login credential, and the effective time length is used for representing the time length for allowing a user to keep a login state;
and the updating module is configured to update the creation time in response to the time difference between the creation time and the current time being greater than the updating duration and the time difference between the creation time and the current time being less than the effective duration.
11. The information updating apparatus according to claim 9, wherein the apparatus further comprises:
and a second updating unit configured to update a failure time of the initial login credential, wherein the failure time is used for representing a starting time point when the user changes from the login state to the non-login state.
12. The information updating apparatus according to claim 9, wherein the apparatus further comprises:
an encryption unit configured to encrypt the creation time, the user login information, and the host ID by using an encryption algorithm according to the updated creation time, and generate an updated login credential;
and the sending unit is configured to send the updated login credentials to the client.
13. The information updating apparatus according to claim 9, wherein the apparatus further comprises:
and a message sending unit configured to send the message of the illegal initial login credential to the client in response to the host number in the host information being different from the host ID.
14. The information updating apparatus according to claim 10, wherein the apparatus further comprises:
and the feedback unit is configured to send the initial login credential to the client in response to the time difference between the creation time and the current time being not greater than the update time.
15. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
16. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010026856.1A CN111258602B (en) | 2020-01-10 | 2020-01-10 | Information updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010026856.1A CN111258602B (en) | 2020-01-10 | 2020-01-10 | Information updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111258602A CN111258602A (en) | 2020-06-09 |
CN111258602B true CN111258602B (en) | 2023-06-30 |
Family
ID=70946856
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010026856.1A Active CN111258602B (en) | 2020-01-10 | 2020-01-10 | Information updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111258602B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114531471A (en) * | 2020-11-09 | 2022-05-24 | 航天信息股份有限公司 | Login state maintenance method, device, equipment and medium |
CN112667987A (en) * | 2020-12-30 | 2021-04-16 | 江苏达科信息科技有限公司 | Big data access authorization method, device and storage medium |
CN113391858A (en) * | 2021-07-12 | 2021-09-14 | 苏州达家迎信息技术有限公司 | Page loading method and device in client, computer equipment and medium |
CN113422784B (en) * | 2021-07-12 | 2023-03-24 | 苏州达家迎信息技术有限公司 | Login certificate updating method and device, computer equipment and storage medium |
CN113542256B (en) * | 2021-07-12 | 2023-08-22 | 苏州达家迎信息技术有限公司 | Method, device, equipment and storage medium for updating login credentials in client |
CN114124382B (en) * | 2021-12-01 | 2024-04-09 | 深圳市闪剪智能科技有限公司 | Credential updating method, system, device and storage medium |
CN114679302B (en) * | 2022-03-01 | 2024-05-10 | 中信百信银行股份有限公司 | Method, device, equipment and storage medium for docking single sign-on system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1906604A (en) * | 2003-12-19 | 2007-01-31 | 微软公司 | Routing of resource information in a network |
CN108062221A (en) * | 2017-12-11 | 2018-05-22 | 网易(杭州)网络有限公司 | Processing method, device, storage medium and the processor of Software Development Kit |
CN108900559A (en) * | 2018-09-26 | 2018-11-27 | 平安普惠企业管理有限公司 | Management method, device, computer equipment and the storage medium of logging on authentication |
CN109118160A (en) * | 2018-06-26 | 2019-01-01 | 腾讯科技(深圳)有限公司 | A kind of information sharing method, device, terminal device and medium |
CN109831456A (en) * | 2019-03-14 | 2019-05-31 | 腾讯科技(深圳)有限公司 | Information push method, device, equipment and storage medium |
CN109995755A (en) * | 2019-02-20 | 2019-07-09 | 深圳点猫科技有限公司 | A kind of control method and device of the logging state based on small routine framework |
CN110362986A (en) * | 2019-07-17 | 2019-10-22 | 福州福昕网络技术有限责任公司 | A kind of wechat small routine automatic logging method and storage equipment |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105323222B (en) * | 2014-07-11 | 2018-08-24 | 博雅网络游戏开发(深圳)有限公司 | Login validation method and system |
WO2016049870A1 (en) * | 2014-09-30 | 2016-04-07 | 宇龙计算机通信科技(深圳)有限公司 | Method and system for generating dynamic login credential |
CN104519050B (en) * | 2014-11-14 | 2019-03-12 | 百度在线网络技术(北京)有限公司 | Login method and login system |
US10063571B2 (en) * | 2016-01-04 | 2018-08-28 | Microsoft Technology Licensing, Llc | Systems and methods for the detection of advanced attackers using client side honeytokens |
CN106982239B (en) * | 2016-01-18 | 2020-01-17 | 中国移动通信集团公司 | Multi-electronic channel life reporting method and device |
CN107786528B (en) * | 2016-08-31 | 2020-09-22 | 阿里巴巴集团控股有限公司 | Application login method and device and communication system |
CN106790183A (en) * | 2016-12-30 | 2017-05-31 | 广州华多网络科技有限公司 | Logging on authentication method of calibration, device |
CN109284603B (en) * | 2017-07-20 | 2022-07-01 | 腾讯科技(深圳)有限公司 | Configuration data processing method and device and storage medium |
CN108322461B (en) * | 2018-01-31 | 2020-10-27 | 百度在线网络技术(北京)有限公司 | Method, system, device, equipment and medium for automatically logging in application program |
CN109270850A (en) * | 2018-12-13 | 2019-01-25 | 桂林电子科技大学 | A kind of intelligent household management system and method based on Internet of Things |
-
2020
- 2020-01-10 CN CN202010026856.1A patent/CN111258602B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1906604A (en) * | 2003-12-19 | 2007-01-31 | 微软公司 | Routing of resource information in a network |
CN108062221A (en) * | 2017-12-11 | 2018-05-22 | 网易(杭州)网络有限公司 | Processing method, device, storage medium and the processor of Software Development Kit |
CN109118160A (en) * | 2018-06-26 | 2019-01-01 | 腾讯科技(深圳)有限公司 | A kind of information sharing method, device, terminal device and medium |
CN108900559A (en) * | 2018-09-26 | 2018-11-27 | 平安普惠企业管理有限公司 | Management method, device, computer equipment and the storage medium of logging on authentication |
CN109995755A (en) * | 2019-02-20 | 2019-07-09 | 深圳点猫科技有限公司 | A kind of control method and device of the logging state based on small routine framework |
CN109831456A (en) * | 2019-03-14 | 2019-05-31 | 腾讯科技(深圳)有限公司 | Information push method, device, equipment and storage medium |
CN110362986A (en) * | 2019-07-17 | 2019-10-22 | 福州福昕网络技术有限责任公司 | A kind of wechat small routine automatic logging method and storage equipment |
Non-Patent Citations (3)
Title |
---|
Morgen E. Peck等.Blockchains: How they work and why they'll change the world.《IEEE Spectrum》.2017,26 - 35. * |
基于ThinkPHP+微信小程序的校园社团云平台的设计与实现;章春梅 等;《电脑知识与技术》;78-81 * |
微信公众号图文系统的设计与实现;董陈晨;《中国优秀硕士学位论文全文数据库 信息科技辑》;I138-657 * |
Also Published As
Publication number | Publication date |
---|---|
CN111258602A (en) | 2020-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111258602B (en) | Information updating method and device | |
US9875363B2 (en) | Use of generic (browser) encryption API to do key exchange (for media files and player) | |
CN111199037B (en) | Login method, system and device | |
US20180124023A1 (en) | Method, system and apparatus for storing website private key plaintext | |
CN109639819B (en) | File transmission method, client, server and system | |
CN110377440B (en) | Information processing method and device | |
CN113424188B (en) | Protecting browser COOKIE | |
CN112866385B (en) | Interface calling method and device, electronic equipment and storage medium | |
CN108923925B (en) | Data storage method and device applied to block chain | |
CN113271296A (en) | Login authority management method and device | |
CN110705985B (en) | Method and apparatus for storing information | |
CN110083786B (en) | Link verification method and device | |
CN112560003A (en) | User authority management method and device | |
CN114584381A (en) | Security authentication method and device based on gateway, electronic equipment and storage medium | |
CN110855655B (en) | Information verification method, device, equipment and storage medium | |
KR102608325B1 (en) | Protect the integrity of communications on client devices | |
CN114598549B (en) | Customer SSL certificate verification method and device | |
CN113079085B (en) | Business service interaction method, business service interaction device, business service interaction equipment and storage medium | |
CN113824675B (en) | Method and device for managing login state | |
CN114202332A (en) | Digital currency wallet management method, device and system | |
JP7098065B1 (en) | Preventing data manipulation and protecting user privacy in telecommunications network measurements | |
CN111897620A (en) | Interaction method and device and electronic equipment | |
CN111786936A (en) | Method and device for authentication | |
CN111752625A (en) | Method and device for interface mock | |
CN113420331B (en) | Method and device for managing file downloading permission |
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 |