CN110750511A - Operation history restoration method and device, computer equipment and storage medium - Google Patents

Operation history restoration method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110750511A
CN110750511A CN201910841754.2A CN201910841754A CN110750511A CN 110750511 A CN110750511 A CN 110750511A CN 201910841754 A CN201910841754 A CN 201910841754A CN 110750511 A CN110750511 A CN 110750511A
Authority
CN
China
Prior art keywords
user
server
track data
client
state
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.)
Pending
Application number
CN201910841754.2A
Other languages
Chinese (zh)
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910841754.2A priority Critical patent/CN110750511A/en
Publication of CN110750511A publication Critical patent/CN110750511A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an operation history restoration method and device, computer equipment and a storage medium. The method comprises the following steps: if the operation that a user logs in the target application is detected, a login request message is sent to the server, and a response message returned by the server is received; if the user is a new user, recording and storing operation track data, and submitting the operation track data to the server; if the user is an old user, sending a user state request message to the server, and receiving a user state returned by the server; checking whether the operation track data is complete according to the user state; if the operation track data is incomplete, downloading the operation track data from the server; and if the operation track data is complete, recording and storing new operation track data generated by the user, and submitting the new operation track data to the server. The invention comprehensively utilizes the local cache of the client and the preset database of the server, and the user can recover data from the server after replacing the client hardware.

Description

Operation history restoration method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of data cache management, in particular to an operation history restoration method and device, computer equipment and a storage medium.
Background
Currently, data interaction between a mobile client and a server relies heavily on caching data at the mobile client. This is advantageous in reducing the load on the server. However, with the popularization and rapid development of smart phones, the frequency of replacing the smart phones becomes frequent. When a user replaces the mobile phone, the whole amount of cache data stored in the mobile phone cannot be synchronously migrated to a new mobile phone, so that inconvenience is brought to the use.
For example, for some important APP applications such as banking, security investment, financing, online shopping, and the like, after a mobile phone is replaced, data cached on an old mobile phone and recorded with a user operation trajectory cannot be synchronously migrated to a new mobile phone, so that a user may need to perform operations such as real-name binding and face recognition again to use the APP normally, which is very inconvenient.
Meanwhile, the user needs to report the operation track to the server again through the client, so that repeated requests are caused, and server resources are wasted.
Disclosure of Invention
The embodiment of the invention provides an operation history restoration method, an operation history restoration device, computer equipment and a storage medium, and aims to solve the problem that server resources are wasted because user operation track data cannot be synchronously migrated and the operation track data cannot be repeatedly reported after client hardware is replaced at present.
An operation history restoration method comprises the following steps executed by a client:
if the operation that a user logs in a target application is detected, a login request message is sent to a server, and a response message returned by the server is received, wherein the response message contains identification information of whether the user is a new user for activating the target application for the first time;
if the identification information is that the user is the new user, recording and storing operation track data of the user, and submitting the operation track data to the server;
if the identification information is an old user who enters the target application again, sending a user state request message to the server and receiving the user state returned by the server;
checking whether the operation track data is complete according to the user state to obtain a checking result;
if the verification result is that the operation track data is incomplete, sending a track downloading request message to the server side, and downloading the operation track data from the server side;
and if the verification result is that the operation track data is complete, recording and storing new operation track data generated by the user, and submitting the new operation track data to the server.
An operation history restoration method comprises the following steps executed by a server side:
if a login request message which is sent by a client and aims at a target application is received, determining whether a user corresponding to a user identifier is a new user for activating the target application for the first time according to the user identifier contained in the login request message, and returning a response message containing identification information of whether the user is the new user for activating the target application for the first time to the client;
if receiving operation track data submitted by the client, storing the operation track data into a preset database;
determining a user state of the user according to a preset process node, and storing the user state into a preset database;
if a user state request message sent by the client is received, acquiring the user state from the preset database, and sending the user state to the client;
and if receiving a track downloading request message sent by the client, acquiring the operation track data from the preset database, and sending the operation track data to the client.
An operation history restoration apparatus includes a client including:
the verification module is used for sending a login request message to a server and receiving a response message returned by the server if the operation of logging in the target application by the user is detected, wherein the response message contains identification information of whether the user is a new user for activating the target application for the first time;
the first track storage module is used for recording and storing operation track data of the user and submitting the operation track data to the server if the identification information indicates that the user is the new user;
the state request module is used for sending a user state request message to the server and receiving the user state returned by the server if the identification information is that the user is an old user who reenters the target application;
the checking module is used for checking whether the operation track data is complete according to the user state to obtain a checking result;
a track downloading request module, configured to send a track downloading request message to the server and download the operation track data from the server if the verification result is that the operation track data is incomplete;
and the second track storage module is used for recording and storing new operation track data generated by the user and submitting the new operation track data to the server if the verification result is that the operation track data is complete.
An operation history restoring apparatus includes a server, the server including:
the response module is used for determining whether a user corresponding to a user identifier is a new user for activating the target application for the first time according to the user identifier contained in the login request message and returning a response message containing identification information of whether the user is the new user for activating the target application for the first time to the client side if the login request message for the target application sent by the client side is received;
the track data storage module is used for storing the operation track data into a preset database if the operation track data submitted by the client is received;
the state storage module is used for determining the user state of the user according to a preset process node and storing the user state into a preset database;
the state sending module is used for acquiring the user state from the preset database and sending the user state to the client if receiving a user state request message sent by the client;
and the track downloading module is used for acquiring the operation track data from the preset database and sending the operation track data to the client if receiving a track downloading request message sent by the client.
A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the computer program implements the steps performed by the client or the server in the operation history restoring method.
A computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps performed by the client or the server in the operation history restoring method.
In the operation history restoration method, the operation history restoration device, the computer equipment and the storage medium, the local cache of the client and the preset database of the server are comprehensively utilized, the operation track data of the user is stored, and the user state of each user is determined according to the flow node preset by the server; the user operation track data is protected by the client and the server, and can be quickly recovered from the server after the user replaces the client hardware, so that the use of the user is not influenced; meanwhile, as the user operation track data is stored in the client, the user can directly recover the data from the local client after entering the target application, the historical operation information does not need to be pulled from the server every time, the network transmission and request times are reduced, the burden of the server is lightened, and the server resources are saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram illustrating an application environment for operating a history reduction method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for operating history reduction according to an embodiment of the present invention;
FIG. 3 is a flowchart of step S20 in the operation history restoring method according to an embodiment of the present invention;
FIG. 4 is a flowchart of step S70 in the operation history restoring method according to an embodiment of the present invention;
FIG. 5 is a flowchart of step S80 in the operation history restoring method according to an embodiment of the present invention;
FIG. 6 is a flowchart of step S84 in the operation history restoring method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an operation history restoring apparatus according to an embodiment of the present invention;
FIG. 8 is another schematic diagram of an operating history restore apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a computer device in accordance with an embodiment of the present invention;
FIG. 10 is another schematic diagram of a computing device in accordance with an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The operation history restoration method provided by the application can be applied to an application environment shown in fig. 1, where the application environment includes a server and a client, where the server and the client are connected through a network, the network may be a wired network or a wireless network, the client specifically includes but is not limited to a personal computer, a notebook computer, a smart phone, a tablet computer, and a portable wearable device, and the server may be specifically implemented by an independent server or a server cluster formed by multiple servers.
The operation history restoration method in the embodiment of the invention specifically comprises the following steps executed by the client:
if the operation that a user logs in a target application is detected, a login request message is sent to a server, and a response message returned by the server is received, wherein the response message contains identification information of whether the user is a new user for activating the target application for the first time;
if the identification information is that the user is the new user, recording and storing operation track data of the user, and submitting the operation track data to the server;
if the identification information is an old user who enters the target application again, sending a user state request message to the server and receiving the user state returned by the server;
checking whether the operation track data is complete according to the user state to obtain a checking result;
if the verification result is that the operation track data is incomplete, sending a track downloading request message to the server side, and downloading the operation track data from the server side;
and if the verification result is that the operation track data is complete, recording and storing new operation track data generated by the user, and submitting the new operation track data to the server.
The operation history restoration method in the embodiment of the invention specifically comprises the following steps executed by the server side:
if a login request message which is sent by a client and aims at a target application is received, determining whether a user corresponding to a user identifier is a new user for activating the target application for the first time according to the user identifier contained in the login request message, and returning a response message containing identification information of whether the user is the new user for activating the target application for the first time to the client;
if receiving operation track data submitted by the client, storing the operation track data into a preset database;
determining a user state of the user according to a preset process node, and storing the user state into a preset database;
if a user state request message sent by the client is received, acquiring the user state from the preset database, and sending the user state to the client;
and if receiving a track downloading request message sent by the client, acquiring the operation track data from the preset database, and sending the operation track data to the client.
In an embodiment, as shown in fig. 2, an operation history restoring method is provided, which is described by taking the method as an example applied to the client and the server in fig. 1, and is detailed as follows:
s10: and if the client detects the operation of the user for logging in the target application, sending a login request message to the server, and receiving a response message returned by the server, wherein the response message contains identification information of whether the user is a new user for activating the target application for the first time.
The login request refers to a socket data request initiated from the client to the server after the user clicks to enter the target application and initiates a login operation. The login request message includes, but is not limited to, user identity information, a mobile phone number, and the like of the user to indicate the user identity.
Specifically, a User can fill in User information through a User Interface (UI) of the client, the client sends a login request message containing the User information to the server through an H5 layer, and then receives a response message returned by the server through an H5 layer. Wherein, the H5 layer is used for data interaction between the client and the user. H5, HTML5, is a new generation of HTML standard designed to support multimedia on mobile devices.
S20: if the server receives a login request message aiming at the target application sent by the client, determining whether a user corresponding to the user identification is a new user for activating the target application for the first time according to the user identification contained in the login request message, and returning a response message containing identification information of whether the user is the new user for activating the target application for the first time to the client.
Specifically, when the server receives a login request message sent by the client, the server queries user information in a preset database of the server according to a user identifier in the login request message to determine whether the user is a new user, and returns a response message containing the determination information to the client.
The preset database of the server is used for storing user information, and the user information includes but is not limited to user identification, user basic information, user state, operation track data of a user and the like. The user identifier is used for uniquely identifying the user in the target application, and may specifically be a user name of the user in the target application.
S30: and if the identification information is that the user is a new user, the client records and stores the operation track data of the user and submits the operation track data to the server.
Specifically, when the user is a new user, the client records a user operation track of the new user in the target application and generates operation track data, the operation track data is stored in the local client, and the operation track data is submitted to the server.
The user operation track refers to an important process operated by a user in a target application, and examples include but are not limited to user real-name card binding, face recognition, loan application, remote approval, payment, and the like.
The operation track data of the user is used for recording the operation track of the user, and particularly, the operation track data of the user can be a data structure in various forms, including but not limited to an array consisting of characters or numbers, a key value pair, a temporary file and the like. For example, if the user completes the real-name authentication step in the client, the identity information such as real-name Identification (ID) generated by the server is stored locally in the client in the form of a configuration file, so that the identity information is provided to the server for verification each time the client accesses the server.
The software stack on the client comprises a native layer, the native layer is divided into an ios system and an Andriod system, the native layer acquires operation track data of a user by utilizing an SDK library originally provided by intelligent equipment, and for example, the native layer based on Android is an Android SDK library provided by Google corporation; the native layer based on iOS is the iOS SDK library provided by apple inc.
Specifically, when the user is a new user who activates the target application for the first time, the function in the native layer of the client records the operation track data of the user in real time.
S40: and the server side receives the operation track data submitted by the client side, and stores the operation track data into a preset database.
Specifically, the server stores the operation trajectory data of the user in association with user identification information, user basic information and the like to form a user record.
S50: and the server determines the user state of the user according to the preset process node, and stores the user state into a preset database.
The user state is the position of the user operation reflected by the user operation track data in the preset response flow. Specifically, the user status may be represented by a data structure such as a preset character or number. For example, the characters A, B, C represent different user states, respectively.
The preset process nodes are related to the actual application process and are used for dividing the state of the user.
For example, if the user needs to complete the steps of real-name authentication, mobile phone number authentication, and face authentication in the target application to normally use the target application, the real-name authentication, the mobile phone number authentication, and the face authentication are three process nodes in a preset authentication process, and which process node the user completes corresponds to which user state. For example, if the user completes real-name authentication, and does not complete mobile phone number authentication and face authentication, the user state corresponds to a; if the user completes the real name authentication and the mobile phone number authentication, the user state corresponds to B; and if the user completes the authentication of all three process nodes, the user state corresponds to C.
The preset authentication process is not limited to real-name authentication, mobile phone number authentication, face recognition authentication and the like; it is understood that the method is not limited to the authentication process, and also includes, but is not limited to, various application scenarios including process nodes, such as an account opening process, a card binding process, and the like.
Specifically, the server side obtains information of a process node finished by the user, which is returned by the client side, determines the user state of the user according to the process node, and stores the user state and the user information in a preset database in a correlated manner.
S60: and if the identification information is an old user who enters the target application again, the client sends a user state request message to the server and receives the user state returned by the server.
Specifically, when the user is an old user who enters the target application again, the client sends a user state request message to the server, and the user state where the user is located is obtained from the server.
S70: and the server acquires the user state from the preset database and sends the user state to the client when receiving the user state request message sent by the client.
Specifically, when the server receives a user state request message sent by the client, the server acquires the user state from a preset database according to a user identifier in the user state request message, and returns the user state to the client. The user state sent by the server to the client is the user state determined by the server from the operation track data sent by the client at the latest time.
S80: and the client checks whether the operation track data is complete according to the user state to obtain a check result.
Specifically, after receiving the user state sent by the server, the client checks whether the user state in the local operation track data of the client is matched with the user state sent by the server, and if the user state in the local operation track data of the client is matched with the user state sent by the server, the check result is that the operation track data is complete; and if the user state in the local operation track data of the client is not matched with the user state sent by the server, the verification result is that the operation track data is incomplete.
S90: and if the verification result is that the operation track data is incomplete, the client sends a track downloading request message to the server, and the operation track data is downloaded from the server.
Specifically, if the client detects that the operation trace data stored locally at the client is incomplete, for example, the user replaces the client hardware or clears the data cached in the client by the target application, so that part or all of the operation trace data originally stored at the client is lost. The client initiates a download request to the server to obtain the operation track data.
Further, the client can submit the identity information of the user to the server through the H5 layer, and initiate a socket connection request to the server through a function of the native layer, and store the acquired operation track data to the local client.
The identity information of the user can be an identity card number, a name, a telephone number and the like of the user, and can uniquely identify the identity information of one user.
S100: and the server side acquires the operation track data from the preset database and sends the operation track data to the client side when receiving the track downloading request message sent by the client side.
And the downloading request message is a data connection request initiated from the client to the server when the local operation track data of the client is incomplete. The download request message at least comprises the user identification and the flag bit information of the download request. The flag bit information of the download request may be a character or a character string agreed in advance between the client and the server.
Specifically, when the server detects the flag bit information of the download request, the server queries and acquires the operation track data corresponding to the user from a preset database according to the user identifier, and sends the operation track data to the client.
S110: and if the verification result is that the operation track data is complete, the client records and stores new operation track data generated by the user and submits the new operation track data to the server.
Specifically, if the operation track data of the client is complete, the client does not need to send a download request to the server, records a new operation track generated by a user in real time through a function of a native layer to obtain new operation track data, stores the new operation track data in the client and submits the new operation track data to the server.
It should be noted that, after receiving the new operation trajectory data, the server continues to execute step S40 and step S50, that is, store the new operation trajectory data in the preset database, determine the user state of the user according to the preset process node, and store the user state in the preset database.
In the embodiment, the local cache of the client and the preset database of the server are comprehensively utilized, the operation track data of the users are stored, and the user state of each user is determined according to the preset flow node of the server, so that the operation track data of the users are protected by the client and the server, and can be quickly recovered from the server after the users replace the hardware of the client without influencing the use of the users; meanwhile, as the user operation track data is stored in the client, the user can directly recover the data from the local client after entering the target application, the historical operation information does not need to be pulled from the server every time, the network transmission and request times are reduced, the burden of the server is lightened, and the server resources are saved.
In an embodiment, as shown in fig. 3, in step S20, according to the user identifier included in the login request message, it is determined whether the user corresponding to the user identifier is a new user that activates the target application for the first time, and a response message including the identifier information is returned to the client, which specifically includes steps S21 to S23, which are detailed as follows:
s21: and the server side acquires the user identification from the login request message.
Specifically, the server obtains the user identifier of the user logging in the target application from the login request message.
S22: and the server side inquires whether the user identification exists from a preset database to obtain an inquiry result.
Specifically, the server side takes the user identifier as a query condition, queries whether the user identifier exists in a preset database, and if the user identifier is queried in the preset database, the query result is that the user identifier exists; and if the user identification is not inquired in the preset database, the inquiry result indicates that the user identification does not exist.
S23: if the query result is that the user identification does not exist, determining that the user is a new user for activating the target application for the first time, and sending a response message containing identification information of the user as the new user to the client; and if the query result is that the user identification exists, determining that the user is an old user who enters the target application again, and sending a response message containing identification information of the old user to the client.
Specifically, if the user identifier is not found in the preset database, the user who logs in the target application is a new user; if the user identification exists in the preset database, the user who logs in the target application is an old user; and the server packs the query result into a response message and sends the response message to the client.
In the embodiment, the server acquires the user identifier from the login request message, queries whether the user identifier exists in the preset database by taking the user identifier as a query condition, judges whether the user is a new user from the query result, sends the judgment result to the client, and judges whether the user is the new user by querying whether the user identifier exists.
In an embodiment, as shown in fig. 4, in step S70, the method obtains the user status from the preset database, and sends the user status to the client, specifically includes steps S71 to S72, which are detailed as follows:
s71: and the server side acquires the user identification from the user state request message.
Specifically, the server side obtains the user identification of the user logging in the target application from the user state request message.
S72: and inquiring the user state corresponding to the user identification from a preset database by taking the acquired user identification as an inquiry condition, and sending the inquired user state to the client.
Specifically, the server side takes the user identifier as a query condition, queries the user information of the user from a preset database, acquires the user state in the user information, and sends the user state to the client side.
In the embodiment, the server acquires the user identifier from the user state request message, queries the user state corresponding to the user identifier in a preset database by taking the user identifier as a query condition, and sends the queried user state to the server; the user state and the user identification are stored in the preset database in an associated mode, the corresponding user state can be rapidly inquired through the user identification, and the inquiry accuracy is improved.
In an embodiment, as shown in fig. 5, in step S80, the client checks whether the operation trajectory data is complete according to the user status to obtain a check result, which specifically includes steps S81 to S84, which are detailed as follows:
s81: and the client detects whether the operation track data exists or not to obtain a detection result.
Specifically, after the client acquires the user identifier of the user who logs in the target application, whether operation trajectory data matched with the user identifier of the user exists in cache data, stored in the client locally, of the target application is detected, and a detection result is obtained.
S82: and if the detection result is that the operation track data does not exist, the verification result is that the operation track data is incomplete.
Specifically, if it is detected that no operation trace data matched with the user identifier of the user exists in the cache data of the target application stored in the local client, the operation trace data is incomplete.
S83: and if the detection result is that the operation track data exists, the client acquires a state identification field in the operation track data, wherein the state identification field is used for identifying the current user state stored by the client.
Specifically, if it is detected that operation trajectory data matched with the user identifier of the user exists in cache data, stored locally at the client, of the target application, the current user state of the client is obtained from the operation trajectory data.
S84: and the client judges whether the state identification field is matched with the user state returned by the server to obtain a judgment result.
Specifically, after the client acquires the current user state of the client from the operation track data stored in the client, it is determined whether the current user state is consistent with the user state returned by the server, so as to determine whether the operation track data is complete.
S85: and if the judgment result is that the state identification field is matched with the user state returned by the server, the verification result is that the operation track data is complete, and if the judgment result is that the state identification field is not matched with the user state returned by the server, the verification result is that the operation track data is incomplete.
Specifically, if the state identification field is matched with the user state returned by the server, the current user state is consistent with the user state returned by the server, and the operation track data is determined to be complete; and if the state identification field is not matched with the user state returned by the server, the current user state is inconsistent with the user state returned by the server, and the incomplete operation track data is determined.
In this embodiment, the client detects whether local operation track data of the client exists, if the operation track data does not exist, the operation track data represents that the operation track data is incomplete, and if the operation track data exists, a state identification field in the operation track data is further acquired; and judging whether the state identification field is matched with the user state returned by the server side, if the state identification field is matched with the user state returned by the server side, the operation track data is complete, and if the state identification field is not matched with the user state returned by the server side, the operation track data is incomplete. Whether the operation track data of the client side is complete or not is judged by judging whether the operation track data of the client side exists or not and whether the operation track data of the client side is matched with the user state of the server side or not, and the judging efficiency and the judging result accuracy can be guaranteed.
Further, as shown in fig. 6, in step S84, the client determines whether the status identifier field matches the user status returned by the server, and obtains a determination result, which specifically includes steps S841 to S842, which are detailed as follows:
s841: and the client acquires the preset state identification field corresponding to the user state returned by the server according to the corresponding relation between the preset state identification field and the user state.
The corresponding relation between the preset state identification field and the user state is preset by the client according to the actual process node of the target application, and the corresponding relation is stored locally at the client. For example, the preset state identification field may be represented by a key-value pair { "status": "a" }, where the key name "status" represents a state; the key value "a" represents the step completed by the user, and there is a correspondence between a and the user state a.
Specifically, after the client acquires the user state returned by the server, the client locally searches for a preset state identification field corresponding to the user state. For example, if the user status returned by the server is a, the value of the key "status" in the preset status identifier field queried by the client is a.
S842: and if the state identification field is not consistent with the preset state identification field, the state identification field is not matched with the user state returned by the server.
Specifically, if the value of the key "status" of the status identification field in the local operation trajectory data obtained by the client is a, and the value of the key "status" of the preset status identification field corresponding to the user status returned by the server is also a, it represents that the status identification field is consistent with the preset status identification field, and it is determined that the status identification field is matched with the user status returned by the server; if the value of the key 'status' of the state identification field in the local operation track data acquired by the client is inconsistent with the value of the key 'status' of the preset state identification field corresponding to the user state returned by the server, the state identification field is represented to be inconsistent with the preset state identification field, and the state identification field is judged not to be matched with the user state returned by the server.
In the embodiment, according to the preset corresponding relationship between the preset state identification field and the user state, the preset state identification field corresponding to the user state of the server is searched, the preset state identification field is compared with the local state identification field of the client to determine whether the state identification is matched with the user state, the state identification field is expressed in a key value pair mode, different corresponding relationships are set for specific process nodes, and the method is more specific.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, an operation history restoring apparatus is provided, where the operation history restoring apparatus corresponds to the operation history restoring method executed by the client in the above embodiment one to one. As shown in fig. 7, the operation history restoring apparatus includes a verification module 71, a first track storage module 72, a status request module 73, a verification module 74, a track download request module 75, and a second track storage module 76. The functional modules are explained in detail as follows:
the verification module 71 is configured to send a login request message to the server and receive a response message returned by the server if an operation of logging in the target application by the user is detected, where the response message includes identification information of whether the user is a new user who activates the target application for the first time;
the first track storage module 72 is configured to record and store operation track data of the user and submit the operation track data to the server if the identification information indicates that the user is a new user;
the state request module 73 is configured to send a user state request message to the server and receive a user state returned by the server if the identification information is an old user who enters the target application again;
the checking module 74 is configured to check whether the operation trajectory data is complete according to the user state, so as to obtain a checking result;
a track download request module 75, configured to send a track download request message to the server if the verification result is that the operation track data is incomplete, and download the operation track data from the server;
and a second track storage module 76, configured to record and store new operation track data generated by the user if the operation track data is complete as a result of the verification, and submit the new operation track data to the server.
Further, the verification module 74 includes:
the detection submodule 741 is used for detecting whether the operation track data exist or not to obtain a detection result;
a first verification result sub-module 742, configured to determine that the operation track data is incomplete if the detection result indicates that the operation track data does not exist;
a field obtaining submodule 743, configured to obtain a state identification field in the operation trajectory data if the detection result is that the operation trajectory data exists, where the state identification field is used to identify a current user state stored by the client;
the judging submodule 744 is configured to judge whether the state identification field matches the user state returned by the server, so as to obtain a judgment result;
the second verification result sub-module 745 is configured to, if the determination result is that the state identification field matches the user state returned by the server, determine that the operation trajectory data is complete, and if the determination result is that the state identification field does not match the user state returned by the server, determine that the operation trajectory data is incomplete.
Further, the determining sub-module 744 includes:
a field obtaining unit 7441, configured to obtain, according to a corresponding relationship between the preset state identification field and the user state, the preset state identification field corresponding to the user state returned by the server;
the determination result unit 7442 is configured to determine that the status identification field matches the user status returned by the server if the status identification field is consistent with the preset status identification field, and determine that the status identification field does not match the user status returned by the server if the status identification field is inconsistent with the preset status identification field.
In an embodiment, an operation history restoring apparatus is provided, where the operation history restoring apparatus corresponds to the operation history restoring method executed by the server in the above embodiment one to one. As shown in fig. 8, the operation history restoration apparatus includes: a response module 81, a trajectory data storage module 82, a status storage module 83, a status sending module 84, and a trajectory download module 85. The functional modules are explained in detail as follows:
the response module 81 is configured to, if a login request message for a target application sent by a client is received, determine whether a user corresponding to a user identifier is a new user that activates the target application for the first time according to the user identifier included in the login request message, and return a response message including identification information of whether the user is a new user that activates the target application for the first time to the client;
the trajectory data storage module 82 is configured to store the operation trajectory data into a preset database if the operation trajectory data submitted by the client is received;
the state storage module 83 is configured to determine a user state of the user according to a preset process node, and store the user state in a preset database;
a status sending module 84, configured to, if a user status request message sent by the client is received, obtain a user status from a preset database, and send the user status to the client;
and the track downloading module 85 is configured to, if a track downloading request message sent by the client is received, obtain operation track data from a preset database, and send the operation track data to the client.
Further, the response module 81 includes:
a first identifier obtaining submodule 811, configured to obtain a user identifier from a login request message;
an identifier query submodule 812, configured to query whether a user identifier exists in a preset database, so as to obtain a query result;
the new user information response sub-module 813 is configured to determine that the user is a new user who activates the target application for the first time if the query result indicates that the user identifier does not exist, and send a response message including identifier information that the user is a new user to the client;
and the old user information response sub-module 814 is configured to determine that the user is an old user who enters the target application again if the query result indicates that the user identifier exists, and send a response message containing the identifier information that the user is an old user to the client.
Further, the status sending module 84 includes:
a second identifier obtaining submodule 841, configured to obtain a user identifier from the user status request message;
the status query sub-module 842 is configured to query, using the user identifier as a query condition, a user status corresponding to the user identifier from a preset database, and send the queried user status to the client.
For specific limitations of the operation history restoring apparatus, reference may be made to the above limitations of the operation history restoring method, which are not described herein again. The respective modules in the operation history restoration apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. 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 comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external server through a network connection. The computer program is executed by a processor to perform the steps of a client in an operational history restoration method.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database 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 comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the steps of a server in an operation history restoration method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the client or the server in the history restoring method according to the foregoing embodiments, such as the steps of the client or the server in steps S10 to S110 shown in fig. 2. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units of the operation history restoring apparatus in the above-described embodiment, such as the functions of the modules 71 to 76 shown in fig. 7 or the functions of the modules 81 to 85 shown in fig. 8. To avoid repetition, further description is omitted here.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement the operation history restoration method in the above method embodiment, or the computer program is executed by the processor to implement the functions of the modules/units in the operation history restoration apparatus in the above apparatus embodiment. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile 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), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An operation history restoration method is characterized by comprising the following steps executed by a client:
if the operation that a user logs in a target application is detected, a login request message is sent to a server, and a response message returned by the server is received, wherein the response message contains identification information of whether the user is a new user for activating the target application for the first time;
if the identification information is that the user is the new user, recording and storing operation track data of the user, and submitting the operation track data to the server;
if the identification information is an old user who enters the target application again, sending a user state request message to the server and receiving the user state returned by the server;
checking whether the operation track data is complete according to the user state to obtain a checking result;
if the verification result is that the operation track data is incomplete, sending a track downloading request message to the server side, and downloading the operation track data from the server side;
and if the verification result is that the operation track data is complete, recording and storing new operation track data generated by the user, and submitting the new operation track data to the server.
2. The operation history restoration method according to claim 1, wherein the verifying whether the operation trajectory data is complete according to the user state, and obtaining a verification result includes:
detecting whether the operation track data exist or not to obtain a detection result;
if the detection result indicates that the operation track data does not exist, the verification result indicates that the operation track data is incomplete;
if the detection result is that the operation track data exists, acquiring a state identification field in the operation track data, wherein the state identification field is used for identifying the current user state stored by the client;
judging whether the state identification field is matched with the user state returned by the server side or not to obtain a judgment result;
and if the judgment result is that the state identification field is matched with the user state returned by the server, the verification result is that the operation track data is complete, and if the judgment result is that the state identification field is not matched with the user state returned by the server, the verification result is that the operation track data is incomplete.
3. The operation history restoration method according to claim 2, wherein the determining whether the state identification field matches the user state returned by the server, and obtaining a determination result includes:
acquiring a preset state identification field corresponding to the user state returned by the server according to the corresponding relation between the preset state identification field and the user state;
if the state identification field is consistent with the preset state identification field, the judgment result is that the state identification field is matched with the user state returned by the server, and if the state identification field is inconsistent with the preset state identification field, the judgment result is that the state identification field is not matched with the user state returned by the server.
4. An operation history restoration method is characterized by comprising the following steps executed by a server side:
if a login request message which is sent by a client and aims at a target application is received, determining whether a user corresponding to a user identifier is a new user for activating the target application for the first time according to the user identifier contained in the login request message, and returning a response message containing identification information of whether the user is the new user for activating the target application for the first time to the client;
if receiving operation track data submitted by the client, storing the operation track data into a preset database;
determining a user state of the user according to a preset process node, and storing the user state into a preset database;
if a user state request message sent by the client is received, acquiring the user state from the preset database, and sending the user state to the client;
and if receiving a track downloading request message sent by the client, acquiring the operation track data from the preset database, and sending the operation track data to the client.
5. The operation history restoring method according to claim 4, wherein the determining, according to the user identifier included in the login request message, whether the user corresponding to the user identifier is a new user that activates the target application for the first time, and returning a response message including identification information of whether the user is a new user that activates the target application for the first time to the client comprises:
acquiring the user identification from the login request message;
inquiring whether the user identification exists from the preset database to obtain an inquiry result;
if the query result indicates that the user identifier does not exist, determining that the user is a new user for activating the target application for the first time, and sending a response message containing the identifier information of the user as the new user to the client;
and if the query result is that the user identifier exists, determining that the user is an old user who enters the target application again, and sending a response message containing the identifier information of the old user to the client.
6. The operation history restoration method according to claim 4, wherein the obtaining the user status from the preset database and sending the user status to the client includes:
acquiring a user identifier from the user state request message;
and inquiring the user state corresponding to the user identification from the preset database by taking the user identification as an inquiry condition, and sending the inquired user state to the client.
7. An operation history restoration apparatus, comprising a client, the client including:
the verification module is used for sending a login request message to a server and receiving a response message returned by the server if the operation of logging in the target application by the user is detected, wherein the response message contains identification information of whether the user is a new user for activating the target application for the first time;
the first track storage module is used for recording and storing operation track data of the user and submitting the operation track data to the server if the identification information indicates that the user is the new user;
the state request module is used for sending a user state request message to the server and receiving the user state returned by the server if the identification information is that the user is an old user who reenters the target application;
the checking module is used for checking whether the operation track data is complete according to the user state to obtain a checking result;
a track downloading request module, configured to send a track downloading request message to the server and download the operation track data from the server if the verification result is that the operation track data is incomplete;
and the second track storage module is used for recording and storing new operation track data generated by the user and submitting the new operation track data to the server if the verification result is that the operation track data is complete.
8. An operation history restoration apparatus, comprising a server, wherein the server comprises:
the response module is used for determining whether a user corresponding to a user identifier is a new user for activating the target application for the first time according to the user identifier contained in the login request message and returning a response message containing identification information of whether the user is the new user for activating the target application for the first time to the client side if the login request message for the target application sent by the client side is received;
the track data storage module is used for storing the operation track data into a preset database if the operation track data submitted by the client is received;
the state storage module is used for determining the user state of the user according to a preset process node and storing the user state into a preset database;
the state sending module is used for acquiring the user state from the preset database and sending the user state to the client if receiving a user state request message sent by the client;
and the track downloading module is used for acquiring the operation track data from the preset database and sending the operation track data to the client if receiving a track downloading request message sent by the client.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the operation history restoration method according to any one of claims 1 to 3 when executing the computer program or implements the steps of the operation history restoration method according to any one of claims 4 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the operation history restoration method according to any one of claims 1 to 3, or which, when being executed by a processor, implements the steps of the operation history restoration method according to any one of claims 4 to 6.
CN201910841754.2A 2019-09-06 2019-09-06 Operation history restoration method and device, computer equipment and storage medium Pending CN110750511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910841754.2A CN110750511A (en) 2019-09-06 2019-09-06 Operation history restoration method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910841754.2A CN110750511A (en) 2019-09-06 2019-09-06 Operation history restoration method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110750511A true CN110750511A (en) 2020-02-04

Family

ID=69276053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910841754.2A Pending CN110750511A (en) 2019-09-06 2019-09-06 Operation history restoration method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110750511A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113077302A (en) * 2021-03-12 2021-07-06 深圳市智莱科技股份有限公司 Processing method, system, equipment and storage medium of power transformation cabinet

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656951A (en) * 2009-09-17 2010-02-24 李平 Cellphone, cellphone information backup system and method
US20100070764A1 (en) * 2008-09-16 2010-03-18 Hitachi Software Engineering Co., Ltd. Transfer data management system for internet backup
US20150358413A1 (en) * 2014-06-09 2015-12-10 International Business Machines Corporation Saving and restoring a state of a web application
CN105988897A (en) * 2015-02-12 2016-10-05 广东欧珀移动通信有限公司 Recovery method and device of backup data of mobile terminal
CN106776137A (en) * 2016-12-15 2017-05-31 济南浪潮高新科技投资发展有限公司 A kind of user's logging data backup and restoration methods
CN107682397A (en) * 2017-08-28 2018-02-09 平安科技(深圳)有限公司 Customer resources acquisition methods, device, terminal device and storage medium
JP6342035B1 (en) * 2017-04-17 2018-06-13 ヤフー株式会社 Recovery device, recovery method, and recovery program
CN108551443A (en) * 2018-03-30 2018-09-18 平安科技(深圳)有限公司 A kind of application login method, device, terminal device and storage medium
CN109729170A (en) * 2019-01-09 2019-05-07 武汉巨正环保科技有限公司 A kind of cloud computing data backup of new algorithm and restoring method
CN110209557A (en) * 2019-03-16 2019-09-06 平安科技(深圳)有限公司 User's operation records restoring method, device, equipment and readable storage medium storing program for executing

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100070764A1 (en) * 2008-09-16 2010-03-18 Hitachi Software Engineering Co., Ltd. Transfer data management system for internet backup
CN101656951A (en) * 2009-09-17 2010-02-24 李平 Cellphone, cellphone information backup system and method
US20150358413A1 (en) * 2014-06-09 2015-12-10 International Business Machines Corporation Saving and restoring a state of a web application
CN105988897A (en) * 2015-02-12 2016-10-05 广东欧珀移动通信有限公司 Recovery method and device of backup data of mobile terminal
CN106776137A (en) * 2016-12-15 2017-05-31 济南浪潮高新科技投资发展有限公司 A kind of user's logging data backup and restoration methods
JP6342035B1 (en) * 2017-04-17 2018-06-13 ヤフー株式会社 Recovery device, recovery method, and recovery program
CN107682397A (en) * 2017-08-28 2018-02-09 平安科技(深圳)有限公司 Customer resources acquisition methods, device, terminal device and storage medium
CN108551443A (en) * 2018-03-30 2018-09-18 平安科技(深圳)有限公司 A kind of application login method, device, terminal device and storage medium
CN109729170A (en) * 2019-01-09 2019-05-07 武汉巨正环保科技有限公司 A kind of cloud computing data backup of new algorithm and restoring method
CN110209557A (en) * 2019-03-16 2019-09-06 平安科技(深圳)有限公司 User's operation records restoring method, device, equipment and readable storage medium storing program for executing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113077302A (en) * 2021-03-12 2021-07-06 深圳市智莱科技股份有限公司 Processing method, system, equipment and storage medium of power transformation cabinet
CN113077302B (en) * 2021-03-12 2024-01-23 深圳市智莱科技股份有限公司 Processing method, system, equipment and storage medium of battery exchange cabinet

Similar Documents

Publication Publication Date Title
CN110647438B (en) Event monitoring method and device, computer equipment and storage medium
CN108573371B (en) Data approval method, device, computer equipment and storage medium
CN108074177B (en) Data reconciliation method, system and computer-readable storage medium
EP3493057A1 (en) Method and apparatus for awakening application by means of mobile browser
CN108829838B (en) Batch processing method of account information and server
CN110602169B (en) Service calling method and device, computer equipment and storage medium
CN108959384B (en) Webpage data acquisition method and device, computer equipment and storage medium
CN108572986B (en) Data updating method and node equipment
CN109361628B (en) Message assembling method and device, computer equipment and storage medium
CN109413153B (en) Data crawling method and device, computer equipment and storage medium
CN110083384B (en) Application programming interface creating method and device
CN110908778A (en) Task deployment method, system and storage medium
CN110659938A (en) Method and device for determining promotion channel, computer equipment and storage medium
CN112860778A (en) Database management method, device, equipment and medium for desktop application program
CN111177121A (en) Order data feedback method and device, computer equipment and storage medium
CN108595280B (en) Interface adaptation method and device, computer equipment and storage medium
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
CN110795171A (en) Service data processing method and device, computer equipment and storage medium
CN112181423A (en) Project construction method and device based on configuration file, computer equipment and medium
CN109544265B (en) Electronic lock information processing method, electronic device and storage medium
CN112507010B (en) Service data processing method and device, computer equipment and storage medium
CN114003432A (en) Parameter checking method and device, computer equipment and storage medium
CN108133026B (en) Multi-data processing method, system and storage medium
CN110750511A (en) Operation history restoration method and device, computer equipment and storage medium
CN111328068B (en) Card writing method and device, computer equipment 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