[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN105808767A - Data updating method and apparatus - Google Patents

Data updating method and apparatus Download PDF

Info

Publication number
CN105808767A
CN105808767A CN201610162645.4A CN201610162645A CN105808767A CN 105808767 A CN105808767 A CN 105808767A CN 201610162645 A CN201610162645 A CN 201610162645A CN 105808767 A CN105808767 A CN 105808767A
Authority
CN
China
Prior art keywords
data
user account
local cache
storage
predetermined registration
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
CN201610162645.4A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610162645.4A priority Critical patent/CN105808767A/en
Publication of CN105808767A publication Critical patent/CN105808767A/en
Pending legal-status Critical Current

Links

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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a data updating method and apparatus, and belongs to the technical field of a network. The method comprises the steps of: when detecting a preset operation in a preset page, judging whether a user account is logged in currently; when determining that the user account is not logged in currently, acquiring first article data which the preset operation aims at; and based on a type of the preset operation and the first article data, updating data stored in a local cache. By the data updating method and apparatus which are disclosed by the disclosure, a terminal can store article data of a user in the local cache when the user does not log in the user account, so that storage resources of a server do not need to be occupied, and a storage pressure of the server is reduced; and moreover, when the user executes the preset operation, only the terminal needs to update the data stored in the local cache, and the server does not need to update data stored in a database, so that the data updating operation of the server is simplified, and the data processing pressure of the server is reduced.

Description

Data-updating method and device
Technical field
It relates to networking technology area, particularly to a kind of data-updating method and device.
Background technology
In daily life; user often browses shopping website in the state being not logged in; that is to say; user often browses shopping website with the identity of anonymous; such as, when user browses webpage and attracted by the promotion message on this webpage, this user may click this promotion message; and then enter the shopping website of this promotion message, and browse with the identity of anonymous.Now, in order to be user-friendly to, shopping website allows user to perform to be added into article shopping cart and the operation deleted from shopping cart by article with the identity of anonymous, and the data in user's shopping cart are updated.
In correlation technique, when user accesses shopping website by user terminal first with the identity of anonymous, net purchase server can distribute a unique number for this user, ID (Identity as this user, identity number), and this ID is sent to user terminal, this ID can be stored in the local cache of browser by this user terminal.Afterwards, when this user terminal detects the operation adding article in shopping cart, product data corresponding for this operation and this ID can be sent to net purchase server, shopping cart information corresponding for this ID can be updated with this ID by this net purchase server based on this product data, wherein, corresponding for this ID shopping cart information is stored in the data base of this net purchase server.And when this user terminal detects the operation of login user account, this log-on message can be sent to net purchase server, namely shopping cart information corresponding for this ID in data base can be added in the shopping cart information that this user account is corresponding by this net purchase server.It addition, when this user terminal detects the operation that anonymous buys article, this operation information can be sent to this net purchase server, and namely this net purchase server can force this user to log in.
Summary of the invention
For overcoming Problems existing in correlation technique, the disclosure provides a kind of data-updating method counter device.
First aspect according to disclosure embodiment, it is provided that a kind of data-updating method, described method includes;
When predetermined registration operation being detected in the default page, it is judged that currently whether logged-in user account;
When determine currently be not logged in user account time, obtain the first product data that described predetermined registration operation is targeted;
Based on type and described first product data of described predetermined registration operation, the data of storage in local cache are updated.
In conjunction with the first aspect of disclosure embodiment, in the first possible implementation of above-mentioned first aspect, described method also includes:
When user account register being detected in the described default page, obtain the data of storage in the user account and described local cache currently logged in;
Based on the data of storage in the user account obtained and described local cache, logging request is sent to server, described logging request is used for indicating user account described in described server log, and the data of storage in described local cache is added in the data that described user account is corresponding.
In conjunction with the first aspect of disclosure embodiment, in the implementation that the second of above-mentioned first aspect is possible, described method also includes:
When user account register being detected in the described default page, sending logging request to server, described logging request is used for indicating user account described in described server log;
After described user account logins successfully, obtain the data of storage in described local cache;
Synchronization request is sent to described server, described synchronization request is carried the data of storage in described user account and described local cache, and described synchronization request is for indicating described server the data of storage in described local cache to be added in the data that described user account is corresponding.
In conjunction with the first aspect of disclosure embodiment, in the third possible implementation of above-mentioned first aspect, the described default page is the barter page.
The third possible implementation in conjunction with the first aspect of disclosure embodiment, in the 4th kind of possible implementation of above-mentioned first aspect, described predetermined registration operation includes article and adds operation or article deletion action, described article add operation and described article deletion action is applied in specified list, and described specified list includes shopping cart or the favorites list.
The 4th kind of possible implementation in conjunction with the first aspect of disclosure embodiment, in the 5th kind of possible implementation of above-mentioned first aspect, the data of storage in local cache are updated by the described type based on described predetermined registration operation and described first product data, including:
When described predetermined registration operation is the interpolation operation of described article, described first product data is added in the data of described local cache storage.
The 4th kind of possible implementation in conjunction with the first aspect of disclosure embodiment, in the 6th kind of possible implementation of above-mentioned first aspect, the data of storage in local cache are updated by the described type based on described predetermined registration operation and described first product data, including:
When described predetermined registration operation is described article deletion action, described first product data is deleted from the data of described local cache storage.
Second aspect according to disclosure embodiment, it is provided that a kind of data update apparatus, described device includes:
Judge module, for when detecting predetermined registration operation in the default page, it is judged that currently whether logged-in user account;
First acquisition module, for when determine currently be not logged in user account time, obtain the first product data that described predetermined registration operation is targeted;
More new module, is used for the type based on described predetermined registration operation and described first product data, and the data of storage in local cache are updated.
In conjunction with the second aspect of disclosure embodiment, in the first possible implementation of above-mentioned second aspect, described device also includes:
Second acquisition module, for when user account register being detected in the described default page, obtaining the data of storage in the user account and described local cache currently logged in;
First sending module, for based on the data of storage in the user account obtained and described local cache, logging request is sent to server, described logging request is used for indicating user account described in described server log, and the data of storage in described local cache is added in the data that described user account is corresponding.
In conjunction with the second aspect of disclosure embodiment, in the implementation that the second of above-mentioned second aspect is possible, described device also includes:
Second sending module, for when user account register being detected in the described default page, sending logging request to server, described logging request is used for indicating user account described in described server log;
3rd acquisition module, for, after described user account logins successfully, obtaining the data of storage in described local cache;
3rd sending module, for sending synchronization request to described server, described synchronization request is carried the data of storage in described user account and described local cache, and described synchronization request is for indicating described server the data of storage in described local cache to be added in the data that described user account is corresponding.
In conjunction with the second aspect of disclosure embodiment, in the third possible implementation of above-mentioned second aspect, the described default page is the barter page.
The third possible implementation in conjunction with the second aspect of disclosure embodiment, in the 4th kind of possible implementation of above-mentioned second aspect, described predetermined registration operation includes article and adds operation or article deletion action, described article add operation and described article deletion action is applied in specified list, and described specified list includes shopping cart or the favorites list.
In conjunction with the 4th kind of possible implementation of the second aspect of disclosure embodiment, in the 5th kind of possible implementation of above-mentioned second aspect, described more new module is used for:
When described predetermined registration operation is the interpolation operation of described article, described first product data is added in the data of described local cache storage.
In conjunction with the 4th kind of possible implementation of the second aspect of disclosure embodiment, in the 6th kind of possible implementation of above-mentioned second aspect, described more new module is used for:
When described predetermined registration operation is described article deletion action, described first product data is deleted from the data of described local cache storage.
The third aspect according to disclosure embodiment, it is provided that a kind of data update apparatus, described device includes:
Processor;
For storing the memorizer of described processor executable;
Wherein, described processor is used for:
When predetermined registration operation being detected in the default page, it is judged that currently whether logged-in user account;
When determine currently be not logged in user account time, obtain the first product data that described predetermined registration operation is targeted;
Based on type and described first product data of described predetermined registration operation, the data of storage in local cache are updated.
The technical scheme that disclosure embodiment provides can include following beneficial effect:
In the disclosed embodiments, when predetermined registration operation being detected in the default page, judge currently whether logged-in user account, when determine currently be not logged in user account time, obtain the first product data that this predetermined registration operation is targeted, and based on the type of this predetermined registration operation and this first product data, the data of storage in local cache are updated, so, terminal can when user be not logged in user account, the product data of this user is stored in local cache, from without the storage resource taking server, reduce the storage pressure of server, and, when this user performs predetermined registration operation, only need terminal that the data of local cache storage are updated, without server, the data of storage in data base are updated, the data simplifying server update operation, reduce the data processing pressure of server.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, the disclosure can not be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meets embodiments of the invention, and is used for explaining principles of the invention together with description.
Fig. 1 is the flow chart of a kind of data-updating method according to an exemplary embodiment;
Fig. 2 is the flow chart of a kind of data-updating method according to another exemplary embodiment;
Fig. 3 is the block diagram of a kind of data update apparatus according to an exemplary embodiment;
Fig. 4 is the block diagram of a kind of data update apparatus according to another exemplary embodiment;
Fig. 5 is the block diagram of a kind of data update apparatus according to further example embodiment;
Fig. 6 is the block diagram of a kind of data update apparatus according to further example embodiment.
Detailed description of the invention
Here in detail exemplary embodiment being illustrated, its example representation is in the accompanying drawings.When as explained below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the present invention.On the contrary, they only with in appended claims describe in detail, the present invention some in the example of consistent apparatus and method.
Before disclosure embodiment is carried out detailed explanation, first the application scenarios of disclosure embodiment is introduced.In correlation technique, when user browses shopping website with the state being not logged in user account, that is to say, when browsing shopping website with the identity of anonymous, in order to facilitate this user to use shopping cart, net purchase server when this user accesses shopping website first with the identity of anonymous, can distribute a unique number for this user, and by corresponding with this numbering for the shopping cart data of this user data base being stored in net purchase server.But, in said process, if after user accesses shopping website with the identity of anonymous, the buffer memory or this browser rs cache that remove browser lost efficacy, then when this user accesses this shopping website with the identity of anonymous again, this net purchase server will redistribute a numbering for this user.Therefore, the shopping cart data corresponding with the numbering of the upper sub-distribution of this user will can not be used to again, but remains stored in the data base of net purchase server, and if things go on like this, these type of data will greatly waste the storage resource of net purchase server.In order to avoid wasting the storage resource of net purchase server, disclosure embodiment provides a kind of data-updating method, can when user be to be not logged in the conditional access shopping website of user account, the shopping cart data of this user is stored in the local cache of terminal, thus avoiding occupying the storage resource of net purchase server.
Fig. 1 is the flow chart of a kind of data-updating method according to an exemplary embodiment, as it is shown in figure 1, this data-updating method is for, in terminal, comprising the following steps:
In a step 101, when predetermined registration operation being detected in the default page, it is judged that currently whether logged-in user account.
In a step 102, when determine currently be not logged in user account time, obtain the first product data that this predetermined registration operation is targeted.
In step 103, based on type and this first product data of this predetermined registration operation, the data of storage in local cache are updated.
In disclosure embodiment, by when predetermined registration operation being detected in the default page, judge currently whether logged-in user account, when determine currently be not logged in user account time, obtain the first product data that this predetermined registration operation is targeted, and based on the type of this predetermined registration operation and this first product data, the data of storage in local cache are updated, so, terminal can when user be not logged in user account, the product data of this user is stored in local cache, from without the storage resource taking server, reduce the storage pressure of server, and, when this user performs predetermined registration operation, only need terminal that the data of local cache storage are updated, without server, the data of storage in data base are updated, the data simplifying server update operation, reduce the data processing pressure of server.
In another embodiment of the disclosure, the method also includes:
When user account register being detected in this default page, obtain the data of storage in the user account and this local cache currently logged in;
Based on the data of storage in the user account obtained and this local cache, sending logging request to server, this logging request is used for indicating this user account of this server log, and the data of storage in this local cache is added in the data that this user account is corresponding.
In another embodiment of the disclosure, the method also includes:
When user account register being detected in this default page, sending logging request to server, this logging request is used for indicating this user account of this server log;
After this user account logins successfully, obtain the data of storage in this local cache;
Send synchronization request to this server, this synchronization request is carried the data of storage in this user account and this local cache, and this synchronization request is for indicating this server the data of storage in this local cache to be added in the data that this user account is corresponding.
In another embodiment of the disclosure, this default page is the barter page.
In another embodiment of the disclosure, this predetermined registration operation includes article and adds operation or article deletion action, and these article add operation and this article deletion action is applied in specified list, and this specified list includes shopping cart or the favorites list.
In another embodiment of the disclosure, based on the type of this predetermined registration operation and this first product data, the data of storage in local cache should be updated, including:
When this predetermined registration operation adds operation for these article, this first product data is added in the data of this local cache storage.
In another embodiment of the disclosure, based on the type of this predetermined registration operation and this first product data, the data of storage in local cache should be updated, including:
When this predetermined registration operation is this article deletion action, this first product data is deleted from the data of this local cache storage.
Above-mentioned all optional technical schemes, all can according to arbitrarily combining the alternative embodiment forming the disclosure, and this is no longer repeated by disclosure embodiment one by one.
Fig. 2 is the flow chart of a kind of data-updating method according to an exemplary embodiment, as in figure 2 it is shown, this data-updating method is for, in terminal, comprising the following steps:
In step 201, when terminal detects predetermined registration operation in the default page, it is judged that currently whether logged-in user account.
In disclosure embodiment, in order to the data that anonymous is corresponding are stored, predetermined registration operation can first be detected by this terminal in the default page of display, when predetermined registration operation being detected in this default page, it is judged that currently whether logged-in user account.
Wherein, this default page can be the barter page, and this barter page is used for carrying out barter, and e.g., this barter page can be the shopping page of shopping website.This predetermined registration operation can include article and add operation or article deletion action, these article add operation and this article deletion action is applied in specified list, this specified list can include shopping cart or the favorites list, and this favorites list can be the collection for accommodating articles, collection hurdle etc..Such as, this predetermined registration operation can be add the operation of article in shopping cart, delete the operation of article from shopping cart, add the operation of article or delete the operation etc. of article from collection in collection, and this is not limited by disclosure embodiment.
Wherein, in the process of this default page of terminal demonstration, it is possible to by this default page of browser display, it is also possible to showing this default page by related application, the display mode of this default page is not limited by the present embodiment.Such as, this terminal can when detecting the open command of browser, open browser and show browser page, when the open command to a certain shopping website being detected in this browser page, show the default page of this shopping website, or, this terminal when the open command of net purchase client being detected, can be opened this net purchase client and show the default page.Wherein, in the open command of this browser, browser, the open command of shopping website and the open command of net purchase client all can be triggered by user, user can be triggered by assigned operation, this assigned operation can include clicking operation, double click operation, slide etc., and this is not limited by disclosure embodiment.
It addition, the default page of this terminal demonstration can also include logentry, this logentry is used for login user account.Such as, this default page can show and includes input frame and log in the logentry of option, wherein, this input frame can include user account input frame and user cipher input frame, when terminal detects the selection instruction logging in option in this default page, can obtaining the user account in input frame and user cipher, and send logging request based on this user account and user cipher to server, this logging request is used for indicating this user account of this server log.The user account carried in this logging request and user cipher can be verified after receiving the logging request that this terminal sends by server.When the authentication succeeds, terminal can being allowed to log in this user account, this terminal may determine that now logged-in user account;When failing the authentication, will not allow for this terminal and log in this user account, this terminal may determine that and is now not logged in user account.It addition, when being not detected by the operation of login user account, this terminal can also be determined and is now not logged in user account.
In disclosure embodiment, when this terminal can detect predetermined registration operation in this default page, it is judged that currently whether logged-in user account.Wherein, this predetermined registration operation can be triggered by user, and when this default page is the barter page, this barter page can also include article details page and specified list details page, wherein, this specified list details page can be shopping cart details page or the favorites list details page etc., then user can trigger this predetermined registration operation in this article details page, can also triggering this predetermined registration operation in specified list details page, this is not limited by disclosure embodiment.Such as, this article details page can show the detail information of article and add shopping cart option, when user have selected the article of certain model and quantity, and after triggering the option adding shopping cart, namely this terminal can detect that predetermined registration operation, and then judges currently whether logged-in user account.
In step 202., when determine currently be not logged in user account time, obtain the first product data that this predetermined registration operation is targeted.
Wherein, this first product data can include the data such as the quantity of article, color, model, article details page link, and the data content of this first product data is not limited by the present embodiment.
And, when this predetermined registration operation is the operation adding article, targeted the first product data of this predetermined registration operation is the product data of added article, and when this predetermined registration operation is the operation deleting article, targeted the first product data of this predetermined registration operation is the product data of deleted article.
In step 203, based on type and this first product data of this predetermined registration operation, the data of storage in local cache are updated.
After terminal gets the first product data that this predetermined registration operation is targeted, it may be determined that the type of this predetermined registration operation, and then based on the type of this predetermined registration operation and this first product data, the data of storage in local cache are updated.
Wherein, this local cache can be other local cache of the local cache of browser, the local cache of client or this terminal, and this is not limited by disclosure embodiment.Such as, when showing this default page in a browser, this local cache can be the local cache of browser, and when showing this default page in the client, this local cache can be the local cache of client.And the data of storage can be product data in this local cache, this product data can include shopping cart data, the favorites list data etc., and this is not also limited by disclosure embodiment.
It addition, the difference of the type according to predetermined registration operation, the process that the data of storage in local cache are updated is also different, and this process can include implementations below:
In the first implementation, when this predetermined registration operation adds operation for these article, the process that the data of storage in local cache are updated is: this first product data be added in the data of this local cache storage.Such as, when this predetermined registration operation is the operation adding article in shopping cart, the first product data that this terminal can will be added, it is added in the shopping cart data in local cache.
Additionally; in practical application; when terminal first time detects predetermined registration operation in the default page; local cache does not generally also store data; and the predetermined registration operation that first time detects is generally the operation adding article; then when terminal first time detects predetermined registration operation in the default page; the process that the data of storage in local cache are updated is the process storing data in local cache; in subsequent process; according to targeted the first product data of the type of predetermined registration operation and predetermined registration operation, the data stored in local cache can be updated.
In the second implementation, when this predetermined registration operation is this article deletion action, the process that the data of storage in local cache are updated is: this first product data deleted from the data of this local cache storage.Such as, when this predetermined registration operation is the operation deleting article from shopping cart, the first product data that this terminal can will be deleted, the shopping cart data from this local cache is deleted.
It should be noted that, the present embodiment is concerned only with and the data corresponding with anonymous is stored with the form being temporarily stored in local cache, and and be not concerned with store time adopt mode, in practical application, to show this default page in a browser, this terminal can use the script of browser to be stored by user data in the local cache of browser, wherein, this script can be Javascript (literal translation formula script), VBScript (description script language), C# (OO programming language) etc., this is not limited by disclosure embodiment.It addition, this terminal can also utilize the cookie mechanism of browser, or data can be temporarily stored in the mode of this locality by other, are stored in the local cache of browser by user data, and this is not also limited by disclosure embodiment.
In disclosure embodiment, by the user data being not logged in user account is stored in local cache, when this terminal detects predetermined registration operation in this default page, can directly inquire about the data stored in local cache, perform this predetermined registration operation according to these data stored, and the data in local cache are updated.Wherein, this predetermined registration operation also includes the operation of inquiry article.That is to say, when the predetermined registration operation of the user being not logged in user account being detected, this terminal only needs to interact with the data in local cache, data are submitted to without to server, data in data base are updated according to the data of this submission without server, the data simplifying server update operation, reduce the data processing pressure of server.
In step 204, when user account register being detected in this default page, obtain the data of storage in the user account and this local cache currently logged in.
Wherein, this user account register can be triggered by user, and user can pass through the assigned operation of logentry is triggered, and this assigned operation can include input operation, clicking operation, double click operation, slide etc., and this is not limited by disclosure embodiment.
In step 205, based on the data of storage in the user account obtained and this local cache, logging request is sent to server.
Wherein, this logging request is used for indicating this user account of this server log, and the data of storage in this local cache is added in the data that this user account is corresponding.After then this server receives the logging request that this terminal sends, the data of storage in the user account and this local cache carried in this logging request can be obtained, and this user account is verified.When the authentication succeeds, this terminal can be allowed to log in this user account, and the data of storage in this local cache are added in the data that this user account is corresponding.And when failing the authentication, will not allow for this terminal and log in this user account, it is added in the data that this user account is corresponding without by the data of storage in this local cache.
It should be noted that, the present embodiment is only with when user account register being detected, send the data instance of storage in local cache to server to illustrate, and in practical application, this terminal can also determining any opportunity after user account logins successfully, sending the data of storage in this local cache to server, this is not limited by disclosure embodiment.
Such as, when this terminal can detect user account register in this default page, logging request is sent to server, this logging request is used for indicating this user account of this server log, after determining that this user account logins successfully, obtain the data of storage in this local cache, and send synchronization request to this server.Wherein, this synchronization request is carried the data of storage in this user account and this local cache, and this synchronization request is for indicating this server the data of storage in this local cache to be added in the data that this user account is corresponding.After then this server receives this synchronization request, according to the data of storage in the user account carried in this synchronization request and this local cache, the data of storage in this local cache can be added in the data that this user account is corresponding.
Additionally, in order to save the storage resource of local cache, this terminal can also based on the user account obtained and the data of storage in this local cache, after sending logging request to server, or, after sending synchronization request to server, by the data deletion of storage in this local cache, thus discharging occupied memory space in this local cache.
Further, sending in local cache in the process of the data of storage at terminal to server, in order to improve transmitting efficiency, this terminal may call upon batch interface, is sent the data syn-chronization stored in local cache to this server by this batch interface.
Such as, shopping page for browser, when terminal detects user account register in this shopping page, namely this terminal can read the local cache of this browser, obtain the shopping cart data of storage in local cache, and call batch interface, send batch to server and add shopping cart request, indicate this server to be synchronized to by the shopping cart data in this local cache in the shopping cart data that the user account of login is corresponding.
In disclosure embodiment, during by user account register being detected in the default page, the data of storage in local cache are sent to server, make the server can by the data of the data syn-chronization that stores in local cache to the user account logged in, if after then user accesses this default page, remove local cache or local cache lost efficacy, without the record having influence on server, thus ensure that the safety of data.And, when again detect in this default page predetermined registration operation and determine currently be not logged in user account time, this terminal will re-start data storage and data update.
It should be noted that the present embodiment is only that performing step 204-205 is that example illustrates with after step 203, and in actual applications, if being not detected by user account register after step 203, it is also possible to not performing step 204-205, this is not limited by disclosure embodiment.
nullIn sum,The method that the present embodiment provides,By when predetermined registration operation being detected in the default page,Judge currently whether logged-in user account,When determine currently be not logged in user account time,Obtain the first product data that this predetermined registration operation is targeted,And based on the type of this predetermined registration operation and this first product data,The data of storage in local cache are updated,Terminal can when user be not logged in user account,The product data of this user is stored in local cache,From without the storage resource taking server,Reduce the storage pressure of server,And,When this user performs predetermined registration operation,Only need terminal that the data of local cache storage are updated,Without server, the data of storage in data base are updated,The data simplifying server update operation,Reduce the data processing pressure of server.
Fig. 3 is a kind of data update apparatus block diagram according to an exemplary embodiment.With reference to Fig. 3, this device includes judge module 301, the first acquisition module 302 and more new module 303.
When this judge module 301 is configured as predetermined registration operation being detected in the default page, it is judged that currently whether logged-in user account;
This first acquisition module 302 is configured as determining when being currently not logged in user account, obtains the first product data that this predetermined registration operation is targeted;
This more new module 303 be configured to the type based on this predetermined registration operation and this first product data, the data of storage in local cache are updated.
The device that the present embodiment provides, by when predetermined registration operation being detected in the default page, judge currently whether logged-in user account, when determine currently be not logged in user account time, obtain the first product data that this predetermined registration operation is targeted, and based on the type of this predetermined registration operation and this first product data, the data of storage in local cache are updated, terminal can when user be not logged in user account, the product data of this user is stored in local cache, from without the storage resource taking server, reduce the storage pressure of server, and, when this user performs predetermined registration operation, only need terminal that the data of local cache storage are updated, without server, the data of storage in data base are updated, the data simplifying server update operation, reduce the data processing pressure of server.
With reference to Fig. 4, in another embodiment of the disclosure, this device also includes:
Second acquisition module 304, for when user account register being detected in this default page, obtaining the data of storage in the user account and this local cache currently logged in;
First sending module 305, for based on the data of storage in the user account obtained and this local cache, sending logging request to server, this logging request is used for indicating this user account of this server log, and the data of storage in this local cache is added in the data that this user account is corresponding.
With reference to Fig. 5, in another embodiment of the disclosure, this device also includes:
Second sending module 306, for when user account register being detected in this default page, sending logging request to server, this logging request is used for indicating this user account of this server log;
3rd acquisition module 307, for, after this user account logins successfully, obtaining the data of storage in this local cache;
3rd sending module 308, for sending synchronization request to this server, this synchronization request is carried the data of storage in this user account and this local cache, and this synchronization request is for indicating this server the data of storage in this local cache to be added in the data that this user account is corresponding.
In another embodiment of the disclosure, this default page is the barter page.
In another embodiment of the disclosure, this predetermined registration operation includes article and adds operation or article deletion action, and these article add operation and this article deletion action is applied in specified list, and this specified list includes shopping cart or the favorites list.
In another embodiment of the disclosure, this more new module 303 be used for:
When this predetermined registration operation adds operation for these article, this first product data is added in the data of this local cache storage.
In another embodiment of the disclosure, this more new module 303 be used for:
When this predetermined registration operation is this article deletion action, this first product data is deleted from the data of this local cache storage.
About the device in above-described embodiment, the concrete mode that wherein modules performs to operate has been described in detail in about the embodiment of the method, and explanation will be not set forth in detail herein.
Above-mentioned all optional technical schemes, all can according to arbitrarily combining the alternative embodiment forming the disclosure, and this is no longer repeated by disclosure embodiment one by one.
Fig. 6 is the block diagram of a kind of device 600 updated for data according to an exemplary embodiment.Such as, device 600 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, armarium, body-building equipment, personal digital assistant etc..
With reference to Fig. 6, device 600 can include following one or more assembly: processes assembly 602, memorizer 604, power supply module 606, multimedia groupware 608, audio-frequency assembly 610, the interface 612 of input/output (I/O), sensor cluster 614, and communications component 616.
Process assembly 602 and generally control the integrated operation of device 600, such as with display, call, data communication, the operation that camera operation and record operation are associated.Process assembly 602 and can include one or more processor 620 to perform instruction, to complete all or part of step of above-mentioned method.Additionally, process assembly 602 can include one or more module, it is simple to what process between assembly 602 and other assemblies is mutual.Such as, process assembly 602 and can include multi-media module, with facilitate multimedia groupware 608 and process between assembly 602 mutual.
Memorizer 604 is configured to store various types of data to support the operation at device 600.The example of these data includes any application program for operation on device 600 or the instruction of method, contact data, telephone book data, message, picture, video etc..Memorizer 604 can be realized by any kind of volatibility or non-volatile memory device or their combination, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, disk or CD.
The various assemblies that power supply module 606 is device 600 provide power supply.Power supply module 606 can include power-supply management system, one or more power supplys, and other generate, manage and distribute, with for device 600, the assembly that power supply is associated.
Multimedia groupware 608 includes the screen providing an output interface between described device 600 and user.In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen may be implemented as touch screen, to receive the input signal from user.Touch panel includes one or more touch sensor to sense the gesture on touch, slip and touch panel.Described touch sensor can not only sense the border of touch or sliding action, but also detects the persistent period relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 608 includes a front-facing camera and/or post-positioned pick-up head.When device 600 is in operator scheme, during such as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each front-facing camera and post-positioned pick-up head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 610 is configured to output and/or input audio signal.Such as, audio-frequency assembly 610 includes a mike (MIC), and when device 600 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike is configured to receive external audio signal.The audio signal received can be further stored at memorizer 604 or send via communications component 616.In certain embodiments, audio-frequency assembly 610 also includes a speaker, is used for exporting audio signal.
I/O interface 612 provides interface for processing between assembly 602 and peripheral interface module, above-mentioned peripheral interface module can be keyboard, puts striking wheel, button etc..These buttons may include but be not limited to: home button, volume button, startup button and locking press button.
Sensor cluster 614 includes one or more sensor, for providing the state estimation of various aspects for device 600.Such as, what sensor cluster 614 can detect device 600 opens/closed mode, the relative localization of assembly, such as described assembly is display and the keypad of device 600, the position change of all right detecting device 600 of sensor cluster 614 or 600 1 assemblies of device, the presence or absence that user contacts with device 600, the variations in temperature of device 600 orientation or acceleration/deceleration and device 600.Sensor cluster 614 can include proximity transducer, is configured to when not having any physical contact object near detection.Sensor cluster 614 can also include optical sensor, such as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor cluster 614 can also include acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 616 is configured to facilitate between device 600 and other equipment the communication of wired or wireless mode.Device 600 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communication component 616 receives the broadcast singal or the broadcast related information that manage system from external broadcasting via broadcast channel.In one exemplary embodiment, described communications component 616 also includes near-field communication (NFC) module, to promote junction service.Such as, can based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 600 can be realized by one or more application specific integrated circuits (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components, is used for performing said method.
In the exemplary embodiment, additionally providing a kind of non-transitory computer-readable recording medium including instruction, for instance include the memorizer 604 of instruction, above-mentioned instruction can have been performed said method by the processor 620 of device 600.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of mobile terminal so that mobile terminal is able to carry out a kind of data processing method, and described method includes:
When predetermined registration operation being detected in the default page, it is judged that currently whether logged-in user account;
When determine currently be not logged in user account time, obtain the first product data that this predetermined registration operation is targeted;
Based on type and this first product data of this predetermined registration operation, the data of storage in local cache are updated.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other embodiment of the present invention.The application is intended to any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed the general principle of the present invention and include the undocumented known general knowledge in the art of the disclosure or conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the present invention and spirit are pointed out by claim below.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and various amendment and change can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.

Claims (15)

1. a data-updating method, it is characterised in that described method includes:
When predetermined registration operation being detected in the default page, it is judged that currently whether logged-in user account;
When determine currently be not logged in user account time, obtain the first product data that described predetermined registration operation is targeted;
Based on type and described first product data of described predetermined registration operation, the data of storage in local cache are updated.
2. method according to claim 1, it is characterised in that described method also includes:
When user account register being detected in the described default page, obtain the data of storage in the user account and described local cache currently logged in;
Based on the data of storage in the user account obtained and described local cache, logging request is sent to server, described logging request is used for indicating user account described in described server log, and the data of storage in described local cache is added in the data that described user account is corresponding.
3. method according to claim 1, it is characterised in that described method also includes:
When user account register being detected in the described default page, sending logging request to server, described logging request is used for indicating user account described in described server log;
After described user account logins successfully, obtain the data of storage in described local cache;
Synchronization request is sent to described server, described synchronization request is carried the data of storage in described user account and described local cache, and described synchronization request is for indicating described server the data of storage in described local cache to be added in the data that described user account is corresponding.
4. method according to claim 1, it is characterised in that the described default page is the barter page.
5. method according to claim 4, it is characterized in that, described predetermined registration operation includes article and adds operation or article deletion action, and described article add operation and described article deletion action is applied in specified list, and described specified list includes shopping cart or the favorites list.
6. the data of storage in local cache are updated by method according to claim 5, it is characterised in that the described type based on described predetermined registration operation and described first product data, including:
When described predetermined registration operation is the interpolation operation of described article, described first product data is added in the data of described local cache storage.
7. the data of storage in local cache are updated by method according to claim 5, it is characterised in that the described type based on described predetermined registration operation and described first product data, including:
When described predetermined registration operation is described article deletion action, described first product data is deleted from the data of described local cache storage.
8. a data update apparatus, it is characterised in that described device includes:
Judge module, for when detecting predetermined registration operation in the default page, it is judged that currently whether logged-in user account;
First acquisition module, for when determine currently be not logged in user account time, obtain the first product data that described predetermined registration operation is targeted;
More new module, is used for the type based on described predetermined registration operation and described first product data, and the data of storage in local cache are updated.
9. device according to claim 8, it is characterised in that described device also includes:
Second acquisition module, for when user account register being detected in the described default page, obtaining the data of storage in the user account and described local cache currently logged in;
First sending module, for based on the data of storage in the user account obtained and described local cache, logging request is sent to server, described logging request is used for indicating user account described in described server log, and the data of storage in described local cache is added in the data that described user account is corresponding.
10. device according to claim 8, it is characterised in that described device also includes:
Second sending module, for when user account register being detected in the described default page, sending logging request to server, described logging request is used for indicating user account described in described server log;
3rd acquisition module, for, after described user account logins successfully, obtaining the data of storage in described local cache;
3rd sending module, for sending synchronization request to described server, described synchronization request is carried the data of storage in described user account and described local cache, and described synchronization request is for indicating described server the data of storage in described local cache to be added in the data that described user account is corresponding.
11. device according to claim 8, it is characterised in that the described default page is the barter page.
12. device according to claim 11, it is characterized in that, described predetermined registration operation includes article and adds operation or article deletion action, and described article add operation and described article deletion action is applied in specified list, and described specified list includes shopping cart or the favorites list.
13. device according to claim 12, it is characterised in that described more new module is used for:
When described predetermined registration operation is the interpolation operation of described article, described first product data is added in the data of described local cache storage.
14. device according to claim 12, it is characterised in that described more new module is used for:
When described predetermined registration operation is described article deletion action, described first product data is deleted from the data of described local cache storage.
15. a data update apparatus, it is characterised in that described device includes:
Processor;
For storing the memorizer of described processor executable;
Wherein, described processor is used for:
When predetermined registration operation being detected in the default page, it is judged that currently whether logged-in user account;
When determine currently be not logged in user account time, obtain the first product data that described predetermined registration operation is targeted;
Based on type and described first product data of described predetermined registration operation, the data of storage in local cache are updated.
CN201610162645.4A 2016-03-21 2016-03-21 Data updating method and apparatus Pending CN105808767A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610162645.4A CN105808767A (en) 2016-03-21 2016-03-21 Data updating method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610162645.4A CN105808767A (en) 2016-03-21 2016-03-21 Data updating method and apparatus

Publications (1)

Publication Number Publication Date
CN105808767A true CN105808767A (en) 2016-07-27

Family

ID=56454655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610162645.4A Pending CN105808767A (en) 2016-03-21 2016-03-21 Data updating method and apparatus

Country Status (1)

Country Link
CN (1) CN105808767A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665335A (en) * 2017-04-01 2018-10-16 北京京东尚科信息技术有限公司 The method for handling the shopping cart data of shopping website
CN110162543A (en) * 2019-05-29 2019-08-23 北京奇艺世纪科技有限公司 A kind of information query method and device
CN112202876A (en) * 2020-09-28 2021-01-08 北京金山云网络技术有限公司 Request processing method and device and electronic equipment
CN112561654A (en) * 2020-12-21 2021-03-26 杭州贝嘟科技有限公司 Commodity adding method and device, computer equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621737A (en) * 2008-06-30 2010-01-06 北京腾瑞万里科技有限公司 Data updating method and system
CN103095737A (en) * 2011-10-27 2013-05-08 阿里巴巴集团控股有限公司 Handling method and device of browsing information through network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621737A (en) * 2008-06-30 2010-01-06 北京腾瑞万里科技有限公司 Data updating method and system
CN103095737A (en) * 2011-10-27 2013-05-08 阿里巴巴集团控股有限公司 Handling method and device of browsing information through network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665335A (en) * 2017-04-01 2018-10-16 北京京东尚科信息技术有限公司 The method for handling the shopping cart data of shopping website
CN108665335B (en) * 2017-04-01 2021-09-14 北京京东尚科信息技术有限公司 Method for processing shopping cart data of shopping website
CN110162543A (en) * 2019-05-29 2019-08-23 北京奇艺世纪科技有限公司 A kind of information query method and device
CN112202876A (en) * 2020-09-28 2021-01-08 北京金山云网络技术有限公司 Request processing method and device and electronic equipment
CN112561654A (en) * 2020-12-21 2021-03-26 杭州贝嘟科技有限公司 Commodity adding method and device, computer equipment and readable storage medium
CN112561654B (en) * 2020-12-21 2024-06-14 杭州贝嘟科技有限公司 Commodity adding method, commodity adding device, computer equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN104159275B (en) Method for connecting network and device
EP3561691B1 (en) Method and apparatus for displaying webpage content
KR102282544B1 (en) Product display method and device
CN105847430A (en) Hybrid application page data access method and device
CN104079962A (en) Method and device for pushing recommendation information
CN104123341A (en) Method and device for downloading file and route device
CN106254467A (en) Sharing files method and device
US20170171321A1 (en) Methods and devices for managing accounts
CN104156401A (en) Webpage loading method, device and equipment
CN103916829A (en) Desktop message notifying method and device
CN104125162B (en) The access processing method and device of Internet resources
KR101852244B1 (en) Recommendation information acquisition method, terminal, server, program, and recording medium
CN104506443A (en) Router setting interface display method and device
CN104967683A (en) Message pushing method, terminal and server
CN106126685A (en) Page loading method and device
CN105677392A (en) Method and apparatus for recommending applications
CN105930536A (en) Method and device for creating indexes and method and device for jumping pages
CN103916468A (en) System upgrading method, terminal, server and upgrading system
CN105392141A (en) Device control method and device
CN105183493A (en) Display method and device of network information
CN104837178A (en) Network accessing method and device
CN105808767A (en) Data updating method and apparatus
CN109525652B (en) Information sharing method, device, equipment and storage medium
CN104111829A (en) Data storage method and device
CN104125267A (en) Account protection method, device and terminal equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160727

RJ01 Rejection of invention patent application after publication