CN111563005B - Cookie data processing method and device, computer equipment and storage medium - Google Patents

Cookie data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111563005B
CN111563005B CN202010255700.0A CN202010255700A CN111563005B CN 111563005 B CN111563005 B CN 111563005B CN 202010255700 A CN202010255700 A CN 202010255700A CN 111563005 B CN111563005 B CN 111563005B
Authority
CN
China
Prior art keywords
cookie
cookie data
data
target
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
Application number
CN202010255700.0A
Other languages
Chinese (zh)
Other versions
CN111563005A (en
Inventor
赵福龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN202010255700.0A priority Critical patent/CN111563005B/en
Publication of CN111563005A publication Critical patent/CN111563005A/en
Application granted granted Critical
Publication of CN111563005B publication Critical patent/CN111563005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a method, a device, computer equipment and a storage medium for processing Cookie data, wherein the method comprises the following steps: acquiring identification information of target Cookie data; reading target Cookie data from the Cookie pool according to the identification information, and locally storing the read target Cookie data; when detecting that the entry function of the application program cannot call the target Cookie data from the Cookie pool, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool. The method can avoid the loss of the Cookie data when the system has the Cookie data writing delay.

Description

Cookie data processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of Cookie technologies, and in particular, to a method and apparatus for processing Cookie data, a computer device, and a storage medium.
Background
In the field of APP (Application), there is a scene in which Cookie data is written. The written Cookie data contains a plurality of important Cookie data, and if the important Cookie data are lost, certain influence is caused on the operation of the APP. For example, the written Cookie data includes Cookie data of login information. If Cookie data of login information is lost, the user is not logged in after logging in the APP, and the user is reminded to log in again, so that user experience is affected.
The system of APP writes in Cookie data and has certain delay, and when Cookie data has not been written in by the system yet, the APP is exited, and the Cookie data can not be written in time, so that the Cookie data is lost after the APP is started next time, and the normal operation of the APP is affected.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a Cookie data processing method, apparatus, computer device, and storage medium capable of avoiding Cookie data loss when there is a Cookie data writing delay in a system.
A method for processing Cookie data, the method comprising: acquiring identification information of target Cookie data; reading target Cookie data from the Cookie pool according to the identification information, and locally storing the read target Cookie data; when detecting that the entry function of the application program cannot call the target Cookie data from the Cookie pool, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool.
In one embodiment, the storing the read target Cookie data locally includes: storing the read target Cookie data into a local hard disk file; reading target Cookie data from a local store, comprising: and reading the target Cookie data from the local hard disk file.
In one embodiment, the target Cookie data includes login Cookie data of the application program, and before the target Cookie data is read from the local storage when it is detected that the entry function of the application program cannot call the target Cookie data from the Cookie pool, the method further includes: determining that the application is already in a closed state; when detecting that the entry function of the application program cannot call the target Cookie data from the Cookie pool, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool to enable the entry function to read the target Cookie data from the Cookie pool, wherein the method comprises the following steps: when detecting that the entry function of the application program can not call the login Cookie data from the Cookie pool after the application program is started, the login Cookie data are read from the local storage, and the read login Cookie data are added to the Cookie pool, so that the entry function can read the login Cookie data from the Cookie pool.
In one embodiment, the method for processing Cookie data further includes: and sending a login request carrying login Cookie data to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, after sending a login request carrying login Cookie data to the server according to the entry function, the method further includes: receiving Cookie error prompt information sent by a server, wherein the server is used for carrying out data verification on login Cookie data and generating Cookie error prompt information when judging that the login Cookie data is wrong; and generating error warning information according to the Cookie error prompt information.
In one embodiment, the method for processing Cookie data further includes: when the entry function of the application program is called from the Cookie pool to the login Cookie data after the application program is started, a login request carrying the login Cookie data is sent to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, the method for processing Cookie data further includes: and receiving the Cookie data sent by the server side, and writing the Cookie data into a Cookie pool, wherein the Cookie data comprises target Cookie data.
A Cookie data processing apparatus, the apparatus comprising: the acquisition module is used for acquiring the identification information of the target Cookie data; the storage module is used for reading target Cookie data from the Cookie pool according to the identification information and locally storing the read target Cookie data; and the adding module is used for reading the target Cookie data from the local storage when detecting that the entry function of the application program can not call the target Cookie data from the Cookie pool, and adding the read target Cookie data to the Cookie pool so as to enable the entry function to read the target Cookie data from the Cookie pool.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the methods of the embodiments described above when the computer program is executed by the processor.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the embodiments described above.
According to the processing method, the processing device, the computer equipment and the storage medium of the Cookie data, the terminal acquires the identification information of the target Cookie data, reads the target Cookie data from the Cookie pool according to the identification information, carries out local storage on the read target Cookie data, reads the target Cookie data from the local storage when the fact that the target Cookie data cannot be called from the Cookie pool by the entry function of the application program is detected, and adds the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool. Therefore, when the system of the terminal has Cookie data writing delay and the entry function of the application program of the terminal cannot call the target Cookie data from the Cookie pool, the target Cookie data can be added back to the Cookie pool through local storage, so that the running problem of the application program caused by Cookie data loss in the Cookie pool is avoided.
Drawings
FIG. 1 is an application environment diagram of a method for Cookie data processing in one embodiment;
FIG. 2 is a flow chart of a method for processing Cookie data in one embodiment;
FIG. 3 is a flow chart of a method for processing Cookie data according to another embodiment;
FIG. 4 is a flow chart of a method of Cookie data processing in an implementation scenario;
FIG. 5 is a block diagram of a Cookie data processing device in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for processing the Cookie data is applied to an application environment shown in fig. 1. As shown in fig. 1, a web client, that is, an application program for rendering a web interface, is installed in the terminal 102. Server 104 provides data services for the web page clients in terminal 102 for the corresponding servers of the web page clients. Specifically, the web page client in the terminal 102 sends an HTTP request to the server 104. After the server 104 receives the HTTP request, the server 104 needs to record the user state in the web client, issue a Cookie data to the web client, and feed back the HTTP response carrying the Cookie data to the web client. The web client saves the Cookie data. When the web client requests the website again, the web client sends an HTTP request carrying Cookie data to the server 104, and the server 104 checks the Cookie data to identify the user state of the web client, so as to feed back an HTTP response to the web client.
However, the system of the terminal 102 has a certain delay when writing the Cookie data, so that when the Cookie data is not written by the system yet, the Cookie data is not written in time after exiting the webpage client, and the Cookie data is lost after the webpage client is started next time, thereby affecting the normal operation of the webpage client. The webpage client refers to an APP corresponding to a webpage. At this time, the terminal 102 processes the received Cookie data to avoid the Cookie data from being lost. Specifically, the terminal 102 obtains identification information of target Cookie data, reads the target Cookie data from a Cookie pool according to the identification information, locally stores the read target Cookie data, reads the target Cookie data from the local storage when detecting that an entry function of an application program cannot call the target Cookie data from the Cookie pool, and adds the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool. The terminal 102 may be a mobile electronic device, a desktop computer, a notebook computer, or the like.
In one embodiment, as shown in fig. 2, a method for processing Cookie data is provided, and the method is applied to the terminal 102 in fig. 1 for illustration, and includes the following steps:
s102, acquiring identification information of target Cookie data.
In this embodiment, an application program in the terminal and the server agree in advance to locally store some Cookie data sent by the server. Specifically, the terminal stores therein identification information of Cookie data associated with the application program. The identification information may be name information corresponding to the Cookie data, label information corresponding to the Cookie data, or the like. When the terminal needs to perform local storage of data on the target Cookie data, the identification information of the target Cookie data is read, so that the target Cookie data is identified through the identification information.
S104, reading target Cookie data from the Cookie pool according to the identification information, and locally storing the read target Cookie data.
In this embodiment, after receiving the Cookie data sent by the server, the terminal stores the Cookie data in the Cookie pool. When the application program needs to perform the file writing operation of the Cookie data, the corresponding Cookie data is read from the Cookie pool to perform the writing operation. The Cookie pool contains target Cookie data. And the terminal reads the target Cookie data from the Cookie pool according to the identification information and locally stores the read target Cookie data. The local storage may be to store the target Cookie data in the system memory and store the target Cookie data in the system memory to a hard disk file.
And S106, when detecting that the entry function of the application program can not call the target Cookie data from the Cookie pool, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool so that the entry function can read the target Cookie data from the Cookie pool.
In this embodiment, when there is a delay in the system of the terminal for writing the Cookie data into the file, if the Cookie data to be written in the Cookie pool is lost at this time, the writing of the Cookie data cannot be completed. For example, in NSHTTPCookie storage of the IOS system, the Cookie system has a certain delay in writing the file, which results in the loss of Cookie data when writing the file. Aiming at the problem, when detecting that the entry function of the application program can not call the target Cookie data from the Cookie pool, the terminal reads the target Cookie data from the local storage, and adds the read target Cookie data to the Cookie pool. At this time, the entry function of the application may read the target Cookie data from the Cookie pool to continue the write operation of the Cookie data. Wherein the entry function of the application may be a main function of the application. An entry function of an application is a function that is first called when the application is started, thereby starting to run the application.
According to the method for processing the Cookie data, the terminal acquires the identification information of the target Cookie data, reads the target Cookie data from the Cookie pool according to the identification information, locally stores the read target Cookie data, reads the target Cookie data from the local storage when detecting that the entry function of the application program cannot call the target Cookie data from the Cookie pool, and adds the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool. Therefore, when the system of the terminal has Cookie data writing delay and the entry function of the application program of the terminal cannot call the target Cookie data from the Cookie pool, the target Cookie data can be added back to the Cookie pool through local storage, so that the running problem of the application program caused by Cookie data loss in the Cookie pool is avoided.
In one embodiment, S104 includes: and storing the read target Cookie data into a local hard disk file. At this time, S106 includes: and reading the target Cookie data from the local hard disk file.
In this embodiment, when the terminal receives the Cookie data sent by the server through the interface, the Cookie data is stored in the Cookie pool. Further, according to the identification information of the target Cookie data, the target Cookie data is fished out of the Cookie pool, the target Cookie data is stored in the system memory, and the target Cookie data is synchronously written into the hard disk file of the terminal. Therefore, when the system problem occurs in the application program of the terminal and the data loss occurs in the target Cookie data writing file, the target Cookie data can be recovered by storing the target Cookie data into the local hard disk file in advance, and the recovered target Cookie data is added into the Cookie pool, so that an entry function of the application program can call the target Cookie data from the Cookie pool to perform writing operation of the target Cookie data.
In one embodiment, as shown in FIG. 3, the target Cookie data includes login Cookie data for the application. Prior to S106, further comprising:
s105, determining that the application program is in a closed state.
At this time, S106 includes:
s1062, when the entry function of the application program can not call the login Cookie data from the Cookie pool after the application program is started, the login Cookie data are read from the local storage, and the read login Cookie data are added to the Cookie pool, so that the entry function can read the login Cookie data from the Cookie pool.
In this embodiment, the target Cookie data includes login Cookie data of the application. The login Cookie data are Cookie data generated by the server according to account information and password information in a request sent by the terminal. Specifically, the terminal starts an application program, receives account information and password information input by a user, and sends a request containing the account information and the password information to the server. The server analyzes account information and password information from the received request, generates login Cookie data according to the account information and the password information, and feeds back the login Cookie data to the terminal. When the application program of the terminal is closed and the login Cookie data in the Cookie pool is lost and the application program is not as fast as the login Cookie data, after restarting the application program, the entry function of the application program cannot call the login Cookie data from the Cookie pool. At this time, the terminal may read the login Cookie data from the local storage, and add the read login Cookie data to the Cookie pool, so that the entry function reads the login Cookie data from the Cookie pool, thereby implementing that the application program of the terminal maintains the login state.
In one embodiment, after S1062, further includes: and sending a login request carrying login Cookie data to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In this embodiment, when the terminal starts an application program and executes an entry function, the entry Cookie data is called from the Cookie pool according to the entry function, so that the entry Cookie data is encapsulated into the entry request, and further the entry request carrying the entry Cookie data is sent to the server according to the entry function. The server checks the validity of the data according to the login Cookie data in the login request, so that the login state of the terminal application program is determined, and page login information is fed back to the terminal, so that the terminal can keep the user login state and display the page login information.
In an embodiment, after sending a login request carrying login Cookie data to the server according to the entry function, the method further includes: and receiving the Cookie error prompt information sent by the server, wherein the server is used for carrying out data verification on the login Cookie data and generating Cookie error prompt information when judging that the login Cookie data is wrong, and generating error warning information according to the Cookie error prompt information.
In this embodiment, since the application of the terminal has already been registered before, the server holds the registration state and the registration Cookie data. Therefore, the server of the server side can verify the validity of the Cookie through inquiring the user information on the login Cookie data sent by the terminal. When the verification is successful, the server is used as a server to feed back page login information to the terminal. If the server performs data verification on the login Cookie data sent by the terminal and judges that the login Cookie data is wrong, cookie error prompt information is generated, and the Cookie error prompt information is fed back to the terminal. After receiving the Cookie error prompt information sent by the server, the terminal generates error warning information according to the Cookie error prompt information so as to remind a user of the terminal of error occurrence of the login Cookie data, so that the user can perform manual inquiry to solve the problem of error of the login Cookie data.
In an embodiment, after S105, further includes: when the entry function of the application program is called from the Cookie pool to the login Cookie data after the application program is started, a login request carrying the login Cookie data is sent to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In this embodiment, after the application program of the terminal is closed, the application program is restarted, if the Cookie pool stores the login Cookie data at this time, the entry function of the application program can directly call the login Cookie data from the Cookie pool, and a login request carrying the login Cookie data is sent to the server according to the entry function, so that the server feeds back the page login information according to the login Cookie data. In this case, the terminal does not need to read the login Cookie data from the local storage and add the login Cookie data into the Cookie pool, so that the operation of the terminal is reduced, and the burden of the terminal is reduced.
In one embodiment, before S102, the method further includes: and receiving the Cookie data sent by the server side, and writing the Cookie data into a Cookie pool, wherein the Cookie data comprises target Cookie data.
In this embodiment, an application program of the terminal sends a request to the server, and the server distributes corresponding Cookie data according to the received request and feeds back the corresponding Cookie data to the terminal. And after receiving the Cookie data, the terminal stores the Cookie data into a Cookie pool. Wherein the Cookie data comprises target Cookie data. Therefore, the terminal can directly read the target Cookie data from the Cookie pool according to the identification information of the target Cookie data.
For the Cookie data processing method described in the foregoing embodiment, a specific implementation scenario is given below, so as to better understand a Cookie data processing method in the present application:
the specific implementation scenario herein is directed to a terminal of an IOS system, where the specific implementation procedure includes the following steps:
step 1: opening the APP, inputting an account number and a password, requesting a server interface, returning the existence of a writing Cookie operation by the server interface, and writing a login Cookie.
Step 2: and after the server interface returns, the Cookies relevant to login are fished out from the Cooike pool of the IOS system. The Cooike pool can be NSHTTPCookie storage. The related Cookie may be a Cookie of interest, such as a login Cookie.
Step 3: and saving the login Cookie into a system memory (NSUserDefault) and synchronously writing the login Cookie into a hard disk file.
Step 4: closing the APP, exiting the background application, and opening the App again (at this time, if the following step 5 is not performed, cookie loss is highly likely to occur).
Step 5: in an entry function (didfinishLaunchingWithoptions) after the APP is started, after the APP is opened, a method of the function is advanced, and a page is rendered in the method), whether a login Cookie exists or not is judged.
Step 6: if not, the last saved login Cookie is obtained from NSUserDefault.
Step 7: add login Cookie to the Cookie pool (nshttpcookie storage).
Step 8: the user information is queried, and the user information is queried successfully by checking the validity of the Cookie through the server side because the user information is logged in last time and the logged-in state and the logged Cookie exist.
Specifically, when the logged Cookie is a Cookie of interest, see also the flow chart of fig. 4, including the following steps:
step 1: and requesting a server interface, and returning the write Cookie operation by the server interface.
Step 2: after the interface returns, the Cookie needing attention is fished out from a Cookie pool (NSHTTPcookie storage) of the IOS system.
Step 3: the Cookie of interest is saved to system memory (NSUserDefault).
Step 4: the APP is closed (synonymous with APP), the background application is exited, and the APP is opened again.
Step 5: in an entry function (didfinish launchingwithoptions) after the app is started, it is determined whether or not there is a Cookie of interest.
Step 6: if not, the last stored Cookie is taken from NSUserDefault.
Step 7: the saved Cookie is added to a Cookie pool (NSHTTPcookie storage).
Step 8: and starting normal service processing, calling interfaces normally, and enabling all needed contents to exist in the Cookie.
After the client of the IOS system receives the operation of writing the Cookie at the server, the Cookie focused on is found out and then written into a local hard disk file, and when the client starts next time, whether the Cookie exists in the NSHTTPCookie storage or not is judged, if not, the Cookie is taken out from the file stored last time and added into the NSHTTPCookie storage. Therefore, the problem that the Cookies in the IOS system are automatically stored to avoid losing under the condition that the system writes the Cookies into the files is delayed is solved.
It should be understood that, although the steps in the flowchart are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or other steps.
The application also provides a Cookie data processing device, as shown in fig. 5, which comprises an acquisition module 10, a storage module 20 and an adding module 30. An obtaining module 10, configured to obtain identification information of the target Cookie data; the storage module 20 is configured to read target Cookie data from the Cookie pool according to the identification information, and store the read target Cookie data locally; and the adding module 30 is configured to, when it is detected that the entry function of the application cannot call the target Cookie data from the Cookie pool, read the target Cookie data from the local storage, and add the read target Cookie data to the Cookie pool, so that the entry function reads the target Cookie data from the Cookie pool.
In one embodiment, the storage module 20 is specifically configured to store the read target Cookie data into a local hard disk file; at this time, the adding module 30 is specifically further configured to read the target Cookie data from the local hard disk file.
In one embodiment, the target Cookie data includes login Cookie data for the application. At this time, a Cookie data processing apparatus further includes a determining module (not shown in fig. 5) for determining that the application is already in a closed state. The adding module 30 is specifically configured to, when it is detected that the entry function of the application program cannot call the login Cookie data from the Cookie pool after the application program is started, read the login Cookie data from the local storage, and add the read login Cookie data to the Cookie pool, so that the entry function reads the login Cookie data from the Cookie pool.
In one embodiment, the Cookie data processing device further includes a first sending module (not shown in fig. 5), where the first sending module is configured to send a login request carrying login Cookie data to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, the Cookie data processing device further includes a first receiving module and a generating module (not shown in fig. 5). The first receiving module is used for receiving the Cookie error prompt information sent by the server, and the server is used for carrying out data verification on the login Cookie data and generating the Cookie error prompt information when judging that the login Cookie data is wrong. The generation module is used for generating error warning information according to the Cookie error prompt information.
In one embodiment, the Cookie data processing device further includes a second sending module (not shown in fig. 5), where the second sending module is configured to send a login request carrying login Cookie data to the server according to the entry function when the entry function of the application program is called from the Cookie pool to login Cookie data after the application program is started is detected, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, the Cookie data processing device further includes a second receiving module (not shown in fig. 5), where the second receiving module is configured to receive Cookie data sent by the server, and write the Cookie data into the Cookie pool, where the Cookie data includes target Cookie data.
For specific limitation of the Cookie data processing apparatus, reference may be made to the limitation of the Cookie data processing method hereinabove, and no further description is given here. The modules in the Cookie data processing device may be all or partially implemented by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of processing Cookie data. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program: acquiring identification information of target Cookie data; reading target Cookie data from the Cookie pool according to the identification information, and locally storing the read target Cookie data; when detecting that the entry function of the application program cannot call the target Cookie data from the Cookie pool, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool.
In one embodiment, when the processor executes the computer program to implement the step of locally storing the read target Cookie data, the following steps are specifically implemented: and storing the read target Cookie data into a local hard disk file. At this time, when the processor executes the computer program to implement the above step of reading the target Cookie data from the local storage, the following steps are specifically implemented: and reading the target Cookie data from the local hard disk file.
In one embodiment, the target Cookie data includes login Cookie data for the application. When the processor executes the computer program to realize the step of locally storing the read target Cookie data, the following steps are specifically realized: and storing the read target Cookie data into a local hard disk file. At this time, the processor when executing the computer program also implements the following steps: it is determined that the application is already in a closed state. The processor executes the computer program to realize the steps that when the fact that the entry function of the application program cannot call the target Cookie data from the Cookie pool is detected, the target Cookie data is read from the local storage, the read target Cookie data is added to the Cookie pool, and when the entry function reads the target Cookie data from the Cookie pool, the following steps are specifically realized: when detecting that the entry function of the application program can not call the login Cookie data from the Cookie pool after the application program is started, the login Cookie data are read from the local storage, and the read login Cookie data are added to the Cookie pool, so that the entry function can read the login Cookie data from the Cookie pool.
In one embodiment, the processor when executing the computer program further performs the steps of: and sending a login request carrying login Cookie data to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, the processor when executing the computer program further performs the steps of: and receiving the Cookie error prompt information sent by the server, wherein the server is used for carrying out data verification on the login Cookie data and generating Cookie error prompt information when judging that the login Cookie data is wrong, and generating error warning information according to the Cookie error prompt information.
In one embodiment, the processor when executing the computer program further performs the steps of: when the entry function of the application program is called from the Cookie pool to the login Cookie data after the application program is started, a login request carrying the login Cookie data is sent to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, the processor when executing the computer program further performs the steps of: and receiving the Cookie data sent by the server side, and writing the Cookie data into a Cookie pool, wherein the Cookie data comprises target Cookie data.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring identification information of target Cookie data; reading target Cookie data from the Cookie pool according to the identification information, and locally storing the read target Cookie data; when detecting that the entry function of the application program cannot call the target Cookie data from the Cookie pool, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool.
In one embodiment, when the computer program is executed by the processor to implement the above-mentioned step of locally storing the read target Cookie data, the following steps are specifically implemented: and storing the read target Cookie data into a local hard disk file. At this time, when the computer program is executed by the processor to implement the above step of reading the target Cookie data from the local storage, the following steps are specifically implemented: and reading the target Cookie data from the local hard disk file.
In one embodiment, the target Cookie data includes login Cookie data for the application. When the computer program is executed by the processor to realize the step of locally storing the read target Cookie data, the following steps are specifically realized: and storing the read target Cookie data into a local hard disk file. At this time, the computer program when executed by the processor also implements the steps of: it is determined that the application is already in a closed state. The computer program is executed by the processor to realize the steps that when the entry function of the application program is detected to be unable to call the target Cookie data from the Cookie pool, the target Cookie data is read from the local storage, the read target Cookie data is added to the Cookie pool, so that the entry function reads the target Cookie data from the Cookie pool, the following steps are specifically realized: when detecting that the entry function of the application program can not call the login Cookie data from the Cookie pool after the application program is started, the login Cookie data are read from the local storage, and the read login Cookie data are added to the Cookie pool, so that the entry function can read the login Cookie data from the Cookie pool.
In one embodiment, the computer program when executed by the processor further performs the steps of: and sending a login request carrying login Cookie data to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, the computer program when executed by the processor further performs the steps of: and receiving the Cookie error prompt information sent by the server, wherein the server is used for carrying out data verification on the login Cookie data and generating Cookie error prompt information when judging that the login Cookie data is wrong, and generating error warning information according to the Cookie error prompt information.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the entry function of the application program is called from the Cookie pool to the login Cookie data after the application program is started, a login request carrying the login Cookie data is sent to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
In one embodiment, the computer program when executed by the processor further performs the steps of: and receiving the Cookie data sent by the server side, and writing the Cookie data into a Cookie pool, wherein the Cookie data comprises target Cookie data.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (9)

1. A method for processing Cookie data, the method comprising:
acquiring identification information of target Cookie data;
reading the target Cookie data from a Cookie pool according to the identification information, and locally storing the read target Cookie data;
when detecting that the target Cookie data cannot be called from the Cookie pool by an entry function of an application program, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool so that the entry function reads the target Cookie data from the Cookie pool;
the target Cookie data comprises login Cookie data of the application program, and when detecting that an entry function of the application program can not call the target Cookie data from the Cookie pool, before reading the target Cookie data from the local storage, the method further comprises: determining that the application is already in a closed state;
when detecting that the entry function of the application program cannot call the target Cookie data from the Cookie pool, reading the target Cookie data from the local storage, and adding the read target Cookie data to the Cookie pool, so that the entry function reads the target Cookie data from the Cookie pool, including:
when detecting that the entry function of the application program cannot call the login Cookie data from the Cookie pool after the application program is started, reading the login Cookie data from the local storage, and adding the read login Cookie data to the Cookie pool so that the entry function can read the login Cookie data from the Cookie pool.
2. The method of claim 1, wherein the locally storing the read target Cookie data comprises: storing the read target Cookie data into a local hard disk file;
the reading the target Cookie data from the local storage includes: and reading the target Cookie data from the local hard disk file.
3. The method according to claim 1, wherein the method further comprises:
and sending a login request carrying the login Cookie data to a server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
4. The method of claim 3, further comprising, after the sending, according to the entry function, a login request carrying the login Cookie data to the server, the steps of:
receiving Cookie error prompt information sent by the server, wherein the server is used for carrying out data verification on the login Cookie data and generating the Cookie error prompt information when judging that the login Cookie data is wrong;
and generating error warning information according to the Cookie error prompt information.
5. A method according to claim 3, characterized in that the method further comprises:
when detecting that the entry function of the application program is called from the Cookie pool to the login Cookie data after the application program is started, sending a login request carrying the login Cookie data to the server according to the entry function, so that the server feeds back page login information according to the login Cookie data.
6. A method according to claim 3, characterized in that the method further comprises:
and receiving the Cookie data sent by the server, and writing the Cookie data into a Cookie pool, wherein the Cookie data comprises the target Cookie data.
7. A Cookie data processing device, the device comprising:
the acquisition module is used for acquiring the identification information of the target Cookie data;
the storage module is used for reading the target Cookie data from the Cookie pool according to the identification information and locally storing the read target Cookie data;
an adding module, configured to, when it is detected that an entry function of an application cannot call the target Cookie data from the Cookie pool, read the target Cookie data from the local storage, and add the read target Cookie data to the Cookie pool, so that the entry function reads the target Cookie data from the Cookie pool; the target Cookie data comprises login Cookie data of the application program, and when detecting that an entry function of the application program can not call the target Cookie data from the Cookie pool, before reading the target Cookie data from the local storage, the method further comprises: determining that the application is already in a closed state; when detecting that the entry function of the application program cannot call the login Cookie data from the Cookie pool after the application program is started, reading the login Cookie data from the local storage, and adding the read login Cookie data to the Cookie pool so that the entry function can read the login Cookie data from the Cookie pool.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 6 when the computer program is executed by the processor.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202010255700.0A 2020-04-02 2020-04-02 Cookie data processing method and device, computer equipment and storage medium Active CN111563005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010255700.0A CN111563005B (en) 2020-04-02 2020-04-02 Cookie data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010255700.0A CN111563005B (en) 2020-04-02 2020-04-02 Cookie data processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111563005A CN111563005A (en) 2020-08-21
CN111563005B true CN111563005B (en) 2023-05-19

Family

ID=72070420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010255700.0A Active CN111563005B (en) 2020-04-02 2020-04-02 Cookie data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111563005B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533447A (en) * 2013-10-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and device for accessing website page
CN106603713A (en) * 2016-12-29 2017-04-26 深圳Tcl新技术有限公司 Session management method and system
WO2019184135A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Application login method and apparatus, and computer device and storage medium
CN110633432A (en) * 2019-08-19 2019-12-31 深圳汇商通盈科技有限公司 Method, device, terminal equipment and medium for acquiring data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533447A (en) * 2013-10-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and device for accessing website page
CN106603713A (en) * 2016-12-29 2017-04-26 深圳Tcl新技术有限公司 Session management method and system
WO2019184135A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Application login method and apparatus, and computer device and storage medium
CN110633432A (en) * 2019-08-19 2019-12-31 深圳汇商通盈科技有限公司 Method, device, terminal equipment and medium for acquiring data

Also Published As

Publication number Publication date
CN111563005A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
US10263910B2 (en) Resource calling for hybrid applications
CN112637346A (en) Proxy method, device, proxy server and storage medium
CN110908778B (en) Task deployment method, system and storage medium
CN109144487B (en) Method, device, computer equipment and storage medium for developing business of parts
CN109413153B (en) Data crawling method and device, computer equipment and storage medium
CN110727935B (en) Single sign-on method, system, computer device and storage medium
CN109190067B (en) Browser input box display method and device, computer equipment and storage medium
CN111859224A (en) Server rendering method and device based on node server and computer equipment
CN108418797B (en) Webpage access method and device, computer equipment and storage medium
CN110727698A (en) Database access method and device, computer equipment and storage medium
CN111382425B (en) Application installation management method under multi-signature mechanism, intelligent terminal and storage medium
CN112965955B (en) Data migration method, device, computer equipment and storage medium
CN111131208B (en) Third-party service application login method and device, computer equipment and storage medium
CN111563005B (en) Cookie data processing method and device, computer equipment and storage medium
CN116010926A (en) Login authentication method, login authentication device, computer equipment and storage medium
CN111026988A (en) Page loading method, device and system and computer equipment
CN110879757B (en) Restarting method and device for abnormal operation of client and computer equipment
CN111177624B (en) Website front-end and back-end communication method, device, computer equipment and storage medium
CN114048169A (en) Document access method, device, server and storage medium
CN112783866A (en) Data reading method and device, computer equipment and storage medium
CN113568652A (en) Application system processing method and device, computer equipment and storage medium
CN110933034A (en) Login method and device based on digital fingerprints
CN111104327A (en) Solid state disk control software testing method, device and system and computer equipment
CN111008131B (en) Automated testing method, apparatus, computer device and storage medium

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