CN111125142B - Data updating method and system - Google Patents

Data updating method and system Download PDF

Info

Publication number
CN111125142B
CN111125142B CN201911379986.7A CN201911379986A CN111125142B CN 111125142 B CN111125142 B CN 111125142B CN 201911379986 A CN201911379986 A CN 201911379986A CN 111125142 B CN111125142 B CN 111125142B
Authority
CN
China
Prior art keywords
application form
identification code
data
operation identification
updated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911379986.7A
Other languages
Chinese (zh)
Other versions
CN111125142A (en
Inventor
石磊
陶一凡
张文
初永光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shenrui Bolian Technology Co Ltd
Shenzhen Deepwise Bolian Technology Co Ltd
Original Assignee
Beijing Shenrui Bolian Technology Co Ltd
Shenzhen Deepwise Bolian Technology 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 Shenrui Bolian Technology Co Ltd, Shenzhen Deepwise Bolian Technology Co Ltd filed Critical Beijing Shenrui Bolian Technology Co Ltd
Priority to CN201911379986.7A priority Critical patent/CN111125142B/en
Publication of CN111125142A publication Critical patent/CN111125142A/en
Application granted granted Critical
Publication of CN111125142B publication Critical patent/CN111125142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data updating method and a system, wherein the data updating method is applied to a server side and comprises the following steps: receiving an operation identification code sent by a browser end; acquiring the latest operation identification code; acquiring data of a newly added application form and/or data of an updated application form based on the operation identification code and the latest operation identification code, wherein the operation identification code is related to the data of the application form; and returning the data of the newly added application form and the data of the updated application form to the browser end so that the browser end updates the data of the application form based on the data of the newly added application form and the data of the updated application form. According to the method and the device, the server side obtains the data of the newly added application form and the data of the updated application form based on the operation identification code and the latest operation identification code, and the data of the newly added application form and the data of the updated application form are returned to the browser side, so that the flow consumption of the server side and the browser side is reduced, the resource waste of the server side and the browser side is avoided, and the updating efficiency of the browser side is improved.

Description

Data updating method and system
Technical Field
The present application relates to the field of data updating technologies, and in particular, to a data updating method and system.
Background
With the development of network technology, the internet is taken as a huge information resource, and becomes the most convenient and quick way for people to acquire information. Typically, a user accesses the internet using a personal computer or a mobile device and accesses a web page through a browser installed in the personal computer or the mobile device, thereby obtaining desired information. However, no push service is generally provided for either the browser on the personal computer or the browser on the mobile device, and the data interaction between the server side and the browser side depends on the connection initiated by the browser side, so that the server side cannot actively send the data to the browser side, and thus cannot realize synchronous update of the data between the server side and the browser side.
In the prior art, a browser transmits a hypertext transfer protocol (Hyper Text Transport Protocol, HTTP) request to a server by a polling method to realize synchronous update of data between the server and the browser. However, after receiving the request, the server side returns all the current data sets to the browser side, and the browser side needs to update synchronously according to all the data sets each time, so that a large amount of traffic is consumed, and the updating efficiency is low.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a data updating method and system, which can return the data of a newly added application form and the data of an updated application form to a browser end, so that not only is the flow consumption of the server end and the browser end reduced, but also the resource waste of the server end and the browser end is avoided, and the updating efficiency of the browser end is improved.
In order to solve the above technical problems, an embodiment of the present application provides a data updating method, including:
receiving an operation identification code sent by a browser end;
acquiring the latest operation identification code;
acquiring data of a newly added application form and/or data of an updated application form based on the operation identification code and the latest operation identification code, wherein the operation identification code is related to the data of the application form;
and returning the data of the newly-added application form and the data of the updated application form to the browser end so that the browser end can update the data of the application form based on the data of the newly-added application form and the data of the updated application form.
In one embodiment, the obtaining the latest operation identification code includes:
obtaining a maximum value of an application form operation identification code, wherein the maximum value of the application form operation identification code refers to a value corresponding to the maximum value of the application form operation identification code, and the application form operation identification code is increased based on the times of operating the application form;
And taking the maximum value of the application form operation identification code as the latest operation identification code.
In one embodiment, the obtaining the latest operation identification code includes:
taking the application form operation identification code with the shortest application form operation time and the shortest current time interval as the latest operation identification code; wherein the current time is the time when the operation identification code is received.
In one embodiment, the obtaining the data of the newly added application form and/or the data of the updated application form based on the operation identifier code and the latest operation identifier code includes:
acquiring an application form identification code corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code;
acquiring an operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code, wherein the operation type comprises newly added operation and updated operation;
acquiring data of the newly added application form and/or data of the updated application form based on an application form identification code corresponding to an operation identification code greater than the operation identification code and less than or equal to the latest operation identification code and an operation type corresponding to the operation identification code greater than the operation identification code and less than or equal to the latest operation identification code;
Wherein, the data of the newly added application form comprises: the application form identification code of the newly-added application form, the state of the newly-added application form and the generation time of the newly-added application form, and the data of the updated application form comprise: the application form identification code of the update application form, the state of the update application form and the update time of the update application form.
In one embodiment, further comprising:
and returning the latest operation identification code to the browser end so that the browser end can update the operation identification code based on the latest operation identification code.
In one embodiment, before acquiring the data of the newly added application form and the data of the updated application form based on the operation identification code and the latest operation identification code, the method further includes:
acquiring data of an updated application form;
when the state of the application form in the updated data of the application form is newly increased, changing the state of the application form into update;
judging whether the state of the application form in the updated data of the application form changes or not;
if yes, correspondingly increasing the application form operation data associated with the application form; the application form operation data comprise application form operation identification codes, application form operation types, application form operation time and application form identification codes.
In one embodiment, further comprising:
and when the application form in the updated application form data does not have the application form operation data associated with the application form, the state of the application form is kept unchanged.
In a second aspect, an embodiment of the present application further provides a data updating method, where the method includes:
receiving a type identification code and an operation identification code sent by a browser end;
acquiring the latest operation identification code;
acquiring data of a newly added application form and/or data of an updated application form according to the type identification code, the operation identification code and the latest operation identification code, wherein the operation identification code is related to the data of the application form;
and returning the data of the newly-added application form and the data of the updated application form to the browser end so that the browser end can update the data of the application form based on the data of the newly-added application form and the data of the updated application form.
In a third aspect, an embodiment of the present application further provides a data updating method, where the method includes:
an operation identification code is sent to a server side, so that the server side obtains data of a newly added application form and/or data of an updated application form based on the operation identification code;
Receiving the data of the newly added application form and/or the data of the updated application form returned by the server side;
and adding the data of the newly added application form into a database of the local application form, and updating the state of the application form corresponding to the application form identification code in the database of the local application form based on the application form identification code in the data of the updated application form.
In a fourth aspect, an embodiment of the present application further provides a data update system, including a server side and a browser side;
the browser end sends an operation identification code to the server end;
the server side obtains the latest operation identification code; acquiring data of a new application form and/or data of an updated application form based on the latest operation code and the received operation identification code, and returning the data of the new application form and the data of the updated application form to the browser end; wherein the operation identification code is associated with the data of the application form;
the browser end adds the data of the newly added application form into a database of the local application form, and updates the state of the application form corresponding to the application form identification code in the database of the local application form based on the application form identification code in the data of the updated application form.
The data updating method and system provided by the embodiment of the application, wherein the data updating method is applied to a server side and specifically comprises the following steps: receiving an operation identification code sent by a browser end; acquiring the latest operation identification code; acquiring data of a newly added application form and/or data of an updated application form based on the operation identification code and the latest operation identification code, wherein the operation identification code is related to the data of the application form; and returning the data of the newly added application form and the data of the updated application form to the browser end so that the browser end performs data updating of the application form based on the data of the newly added application form and the data of the updated application form. According to the embodiment of the application, the server side obtains the data of the newly-added application form and/or the data of the updated application form based on the operation identification code and the latest operation identification code, and only the data of the newly-added application form and the data of the updated application form are returned to the browser side, so that the flow consumption of the server side and the browser side is reduced, the resource waste of the server side and the browser side is avoided, and the updating efficiency of the browser side is improved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for updating data according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for obtaining a latest operation identifier in a data update method according to an embodiment of the present application;
fig. 3 shows a flowchart of acquiring data of a newly added application form and updating data of the application form in a data updating method provided in an embodiment of the present application;
fig. 4 shows a flowchart of updating data of an application form at a server in a data updating method according to an embodiment of the present application;
FIG. 5 shows a flowchart of another data update method provided by an embodiment of the present application;
FIG. 6 shows a flow chart of yet another data update method provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of a data update system according to an embodiment of the present disclosure;
fig. 8 shows a flowchart of data updating performed by a data updating system according to an embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the accompanying drawings.
It should be understood that various modifications may be made to the embodiments of the application herein. Therefore, the above description should not be taken as limiting, but merely as exemplification of the embodiments. Other modifications within the scope and spirit of this application will occur to those skilled in the art.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment, given as a non-limiting example, with reference to the accompanying drawings.
It is also to be understood that, although the present application has been described with reference to some specific examples, a person skilled in the art will certainly be able to achieve many other equivalent forms of the present application, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The foregoing and other aspects, features, and advantages of the present application will become more apparent in light of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application with unnecessary or excessive detail. Therefore, specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the word "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments as per the application.
At present, the browser sends an HTTP request to the server in a polling mode, after the server receives the request, all current data sets are returned to the browser, and the browser needs to update synchronously according to all the data sets each time, so that a large amount of traffic is consumed, and the updating efficiency is low. In view of the above problems, the data updating method and system provided by the embodiments of the present application can return the data of the newly added application form and the data of the updated application form to the browser end, so that not only is the flow consumption of the server end and the browser end reduced, but also the resource waste of the server end and the browser end is avoided, and the updating efficiency of the browser end is improved.
For the sake of understanding the embodiments of the present application, a data updating method disclosed in the embodiments of the present application will be described in detail first. It is worth to describe that the application form in the embodiment of the application comprises a registration form, and the browser end and the server end corresponding to the doctor update data; the method also comprises the take-out list, wherein the browser end and the server end corresponding to the merchant perform data updating and the like, that is, any form of application list can perform data updating by using the data updating method provided by the embodiment of the application.
As shown in fig. 1, a flowchart of a data updating method provided in an embodiment of the present application is shown, where the data updating method is applied to a server, and specific steps are as follows:
s101, receiving an operation identification code sent by a browser end.
In a specific implementation, the browser sends an operation identifier to the server according to a preset period (set according to an application scene of the application form). When the browser end does not have the data of the application form, the operation identification code can be set to be 0; when the browser end has the data of the application form, the operation identification code is the latest operation identification code of the browser end, namely, the value corresponding to the operation identification code is the maximum value.
After receiving the operation identification code, the server side executes the subsequent step method.
S102, acquiring the latest operation identification code.
In a specific implementation, after receiving the operation identification code sent by the browser end, the server end obtains the latest operation identification code. The latest operation identification code can be stored in a database, and the database can be a database at the server side or an external database associated with the server side, and the data is stored by using the external database. In this embodiment, the latest operation identifier may be selected from the database at the server, and a specific selection manner is described in detail later, which is not described in detail herein.
In this embodiment, the database of the server may include a form identifier of each form, a state of the form, a generation time of the newly added form, and/or an update time of the updated form, a form operation identifier (an identifier corresponding to each form when an operation is performed on the form, where the size of the identifier increases with an increase in the number of times of operation on the form), a form operation type (a type of operation adopted when the form is operated), a form operation time (a time when the form is operated), and the like, where the form identifier, the state of the form, the generation time of the newly added form, or the update time of the updated form, and the form operation identifier of the same form are all associated, and the form operation identifier corresponds to the form operation type and the form operation time.
S103, based on the operation identification code and the latest operation identification code, acquiring data of a newly added application form and/or data of an updated application form, wherein the operation identification code is related to the data of the application form.
In this embodiment, the server terminal searches all operation identifiers greater than the operation identifier and less than or equal to the latest operation identifier based on the received operation identifier and the latest operation identifier obtained from the database, and checks operation types corresponding to all operation identifiers.
And then, based on the operation identification code and the latest operation identification code, acquiring data of a newly added application form and/or data of an updated application form, wherein in the embodiment, the operation identification code is related to the application form identification code, and the application form identification code is related to the data of the application form, so that the data of the newly added application form and/or the data of the updated application form can be further acquired according to the relation among the operation identification code, the application form identification code and the data of the application form. For example, searching the application form identification codes corresponding to the operation identification codes with the operation types of being the newly added operation identification codes in the range (more than the operation identification codes and less than or equal to the latest operation identification codes) in a database, and acquiring the data of all application forms corresponding to the application form identification codes as the data of the newly added application forms; similarly, the application form identification codes corresponding to the updated operation identification codes are searched in the database, and the data of all application forms corresponding to the application form identification codes are obtained as the data of the updated application forms. The data related to the application form identification code comprises the state of the application form, the generation time of the newly added application form, the update time of the updated application form and the like.
S104, returning the data of the newly-added application form and the data of the updated application form to the browser end so that the browser end can update the data of the application form based on the data of the newly-added application form and the data of the updated application form.
In specific implementation, after the server side obtains the latest operation identification code, the data of the newly-added application form and the data of the updated application form in the database, the data of the newly-added application form and the data of the updated application form are returned to the browser side.
After receiving the data of the newly-added application form and the data of the updated application form returned by the server, the browser end updates the data of the application form according to the data of the newly-added application form and the data of the updated application form. For example, the application form identification code of the newly added new application form, the state of the newly added new application form, the generation time of the newly added new application form, the update of the state of the original application form, the update time of the added original application form, and the like.
In addition, the server side returns the latest operation identification code to the browser side, and after receiving the latest operation identification code, the browser side updates the current operation identification code based on the latest operation identification code, namely, takes the latest operation identification code as the operation identification code sent to the server side next time.
It should be noted that, in step 103, the server may not distinguish between the data of the newly added application form and the data of the updated application form, and directly return the data of all the application forms acquired according to the operation identifier code and the latest operation identifier code to the browser end, and distinguish between the data of the newly added application form and the data of the updated application form through the browser end.
The server end in the embodiment of the application acquires the data of the newly-added application form and the data of the updated application form based on the operation identification code and the latest operation identification code, and then returns the latest operation identification code, the data of the newly-added application form and the data of the updated application form to the browser end.
Specifically, when the server side obtains the latest operation identifier from the database, the server side may obtain the latest operation identifier in the following two ways, as shown in fig. 2, which is a specific step of the first obtaining manner:
s201, acquiring a maximum value of an application form operation identification code, wherein the maximum value of the application form operation identification code refers to a value corresponding to the maximum value of the application form operation identification code, and the application form operation identification code is increased based on the times of operating the application form;
s202, taking the maximum value of the application form operation identification codes as the latest operation identification code.
In a specific implementation, when the data of the application form at the server side is changed, for example, the data of the application form is newly added and the data of the original application form is updated, the server side records the change, namely creates application form operation data, and the application form operation data comprises an application form operation identification code, an application form operation type, application form operation time, an application form identification code, a state before application form operation, a state after application form operation and the like. When creating the application form operation data, the server side defines the application form operation identification codes to be sequentially increased according to the sequence of the new addition or the update, for example, when the data of the application form is changed for the first time, the application form operation identification code in the application form operation data is 00001; when the data of the application form is changed for the second time, the application form operation identification code in the application form operation data is correspondingly changed into 00002, and the like. In this embodiment, the application form operation identifier may be binary or decimal, which is not limited herein.
Therefore, after the operation identification code sent by the browser end is received, the latest operation identification code is obtained, and the corresponding application form operation identification code can be changed for the last time according to the data of the application form to obtain the latest operation identification code, and specifically, the maximum value of the application form operation identification code obtained from the database is taken as the latest operation identification code.
The second acquisition mode is as follows: taking the application form operation identification code with the shortest application form operation time and the shortest current time interval as the latest operation identification code; wherein the current time is the time when the operation identification code was received.
As described above, the database includes the operation time (application form operation time) corresponding to each application form operation identification code, where the application form operation time is the system time corresponding to when the data of the application form at the server side changes.
Calculating the time interval between the operation time corresponding to each application form operation identification code and the current time, screening out the application form operation identification code with the shortest time interval between the operation time and the current time, namely, the application form operation identification code in the application form operation data created after the last change of the application form data (because the application form operation identification code is sequentially increased according to the sequence of newly added or updated application form operation identification codes defined, the time interval between the application form operation time corresponding to the application form operation identification code which is newly added or updated at the last time and the current time is shortest), and taking the application form operation identification code with the shortest time interval between the application form operation time and the current time as the latest operation identification code. Wherein the current time is the time when the operation identification code was received.
As shown in fig. 3, the method for obtaining data of a newly added application form and/or updating data of an application form based on the operation identifier and the latest operation identifier according to the embodiment of the present application includes the following specific steps:
s301, acquiring an application form identification code corresponding to an operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code;
s302, obtaining an operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code, wherein the operation type comprises newly added operation and updated operation type;
s303, acquiring data of the newly added application form and/or data of the updated application form based on the application form identification code corresponding to the operation identification code larger than the operation identification code and smaller than or equal to the latest operation identification code and the operation type corresponding to the operation identification code larger than the operation identification code and smaller than or equal to the latest operation identification code.
In a specific implementation, the operation identifier is the latest operation identifier of the browser, that is, the browser already has the operation identifier and the data of the application form identifier corresponding to the operation identifier.
After the server side obtains the latest operation identification code, the operation identification code is compared with the latest operation identification code, if the operation identification code is the same as the latest operation identification code, the server side determines that the data of the application form of the server side is unchanged, and the server side can generate an unexpired notification message to be returned to the browser side, can return the operation identification code to the browser side, and can not return any message or data.
If the operation identifier is different from the latest operation identifier (i.e. after the data of the server-side application form generates the change indicated by the operation identifier and generates the newly added application form operation identifier after other changes), the operation identifier greater than the operation identifier and less than or equal to the latest operation identifier is acquired.
After the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code is obtained, the application form identification code which is larger than the operation identification code and smaller than or equal to the operation identification code of the latest operation identification code is obtained based on the association relation between the application form operation identification code and the application form identification code; based on the association relation between the application form operation identification code and the operation type of the application form, the operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code is obtained; wherein the operation type comprises addition and update. The data of the newly-added application form comprises an application form identification code of the newly-added application form, a state of the newly-added application form and generation time of the newly-added application form, and the data of the updated application form comprises an application form identification code of the updated application form, a state of the updated application form and update time of the updated application form.
Before the data of the newly added application form and the data of the updated application form are acquired from the database according to the operation identification code and the latest operation identification code, the data of the application form and the operation data of the application form at the server side are updated according to the method shown in fig. 4, wherein the specific steps are as follows:
s401, acquiring data of an updated application form;
s402, changing the state of the application form into update when the state of the application form in the updated data of the application form is newly increased;
s403, judging whether the state of the application form in the updated data of the application form changes or not;
s404, if yes, correspondingly increasing the application form operation data associated with the application form; the application form operation data comprise application form operation identification codes, application form operation types, application form operation time and application form identification codes;
s405, when the application form in the updated application form data does not have the associated application form operation data, the state of the application form is kept unchanged.
In a specific implementation, the newly added application form is processed within a period of time, that is, the state of the data of the newly added application form is updated, and then the corresponding updated data of the application form is generated. The server side acquires the data of the updated application form, checks the state of the application form included in the data of the updated application form, and does not change the data of the application form when the state of the application form in the data of the updated application form is updated, namely, the application form is processed; when the state of the application form in the updated data of the application form is newly increased, that is, the newly increased application form is not processed, after the browser side receives the processing operation of the newly increased application form, the state is changed into the update, and the update is stored in the database.
Determining whether the state of the application form in the updated data of the application form in the database is successfully modified, and if so, newly adding the application form operation data; the application form operation data comprise application form operation identification codes, application form operation types, application form operation time and application form identification codes in updated application form data; the application form operation data characterizes the change of the application form data associated with the application form identification code. When the data of the application form in the database is modified, the connection between the server side and the database may be interrupted, or the server side is suddenly down, so that the data of the application form in the database is unchanged, and when the data of the updated application form is unchanged, the state of the data of the application form before the change is maintained.
After the updated data of the application form changes and the application form operation data is created, the application form operation data is stored in a database, and then whether the application form operation data exists in the database or not is checked, namely whether the application form operation data is successfully stored or not is checked. If the application form operation data exist in the database, determining that the state of the application form in the updated application form data changes, and naturally, not prompting; if the application form operation data does not exist in the database, the application form in the updated application form data keeps the state before changing.
In another embodiment, the data updating method provided in the present application may further perform data updating according to the method shown in fig. 5, which specifically includes the following steps:
s501, receiving a type identification code and an operation identification code sent by a browser end;
s502, acquiring the latest operation identification code;
s503, acquiring data of a newly added application form and/or data of an updated application form according to the type identification code, the operation identification code and the latest operation identification code, wherein the operation identification code is related to the data of the application form;
s504, returning the data of the newly added application form and the data of the updated application form to the browser end, so that the browser end updates the data of the application form based on the data of the newly added application form and the data of the updated application form.
In a specific implementation, the type identifier identifies the type of data that the browser end wants to update, for example, the doctor is located at the current browser end and is only concerned with the data of the stomatology, so that the browser end can be set to send the operation identifier to the server end and simultaneously send the type identifier corresponding to the stomatology.
The server receives the type identification code and the operation identification code, acquires the data of the newly-added application form and/or the data of the updated application form according to the type identification code, the operation identification code and the latest operation identification code after acquiring the latest operation identification code, and the browser end transmits the type identification code while transmitting the operation identification code, so that the server end can screen the data of the newly-added application form and/or the data of the updated application form associated with the stomatology from the data of the newly-added application form and/or the data of the updated application form and returns the data of the newly-added application form and/or the data of the updated application form to the browser end.
The browser end updates the data of the application form associated with the stomatology on the basis of the received data of the newly added application form and/or the data of the updated application form associated with the stomatology, so as to display the data of the application form associated with the stomatology to the stomatologist at the browser end.
In this embodiment, the browser end may send the type identifier and the operation identifier at the same time, so that the server end may send the data of the application form focused by the browser end more specifically, so as to improve the update efficiency of the browser end to a certain extent, and save resources of the server end and the browser end.
As shown in fig. 6, a flowchart of a data updating method provided in an embodiment of the present application is shown, where the data updating method is applied to a browser, and specific steps are as follows:
s601, sending an operation identification code to a server side so that the server side obtains data of a newly added application form and/or data of an updated application form based on the operation identification code;
s602, receiving data of the newly added application form and/or data of the updated application form returned by the server side;
s603, adding the data of the newly added application form into a database of the local application form, and updating the state of the application form corresponding to the application form identification code in the database of the local application form based on the application form identification code in the data of the updated application form.
In specific implementation, the browser end sends an operation identification code to the server end according to a preset period, and after receiving the operation identification code sent by the browser end, the server end obtains data of a newly added application form and/or data of an updated application form in a database of the server end and returns the data of the newly added application form and/or the data of the updated application form to the browser end.
The browser side receives the data of the newly-added application form returned by the server side and/or updates the data of the application form, and then adds the data of the newly-added application form into a database of a local application form (the database of the local application form is a database of the browser side); the method and the device have the advantages that the state of the application form corresponding to the application form identification code in the database of the local application form is updated based on the application form identification code in the data of the updated application form, so that the data of the application form of the server side and the data of the application form of the browser side are updated, the situation that all the data of the application form of the server side are returned to the browser side is avoided, the problem that the flow consumption is large and the updating efficiency is low due to the fact that the browser side updates the data of the application form based on all the data of the application form is solved, the consumption of the flow of the server side and the browser side is reduced, the resource waste of the server side and the browser side is avoided, and the updating efficiency of the browser side is improved.
The data updating method is correspondingly described below by taking an application form as a registration form as an example.
When the browser side opens the relevant page of the registration list for the first time, no registration list relevant data exist in a local registration list database of the browser side, and after the relevant webpage of the registration list is opened, the browser side generates an operation identification code (operation identification code 0) with the value of 0 and sends the operation identification code to the server side. After receiving the operation identification code 0 sent by the browser, the server side obtains the latest operation identification code, and if the latest operation identification code is 3, the server side returns the data of the registration form A corresponding to the operation identification code 1, the data of the registration form B corresponding to the operation identification code 2 and the data of the registration form A corresponding to the operation identification code 3 to the browser side. Here, when the browser side updates based on the received registration list data, the operation type of the registration list a corresponding to the operation identification code 1 is newly added, and the operation type of the registration list a corresponding to the operation identification code 3 is updated (including successful registration, unsuccessful registration, etc.), the data of the registration list a corresponding to the operation identification code 3 is directly displayed, and meanwhile, the data of the registration list B corresponding to the operation identification code 2 is displayed. And the browser end updates the current operation identification code according to the received latest operation identification code, and when the browser end requests the registration list data from the server end again, the operation identification code sent by the browser end is 3, namely the latest operation identification code returned by the server end after the last request.
The embodiment of the application also provides a data updating system, as shown in fig. 7, which comprises a server 701 and a browser 702;
the browser 702 sends an operation identification code to the server 701;
the server 701 receives the operation identifier code sent by the browser 702; acquiring the latest operation identification code; acquiring data of a newly added application form and/or data of an updated application form based on the operation identification code and the latest operation identification code, and returning the data of the newly added application form and the data of the updated application form to the browser 702; wherein the operation identification code is associated with the data of the application form;
the browser 702 adds the data of the newly added application form to a database of the local application form, and updates the state of the application form corresponding to the application form identifier code in the database of the local application form based on the application form identifier code in the data of the updated application form.
Fig. 8 is a flowchart of a method for updating data between a browser and a server according to an embodiment of the present application. Specifically, setting the browser end to have no data of any application form at present, namely clearing the orders, and setting operation_id to be 0; when the browser side requests data from the server side, the operation_id=0 is sent to the browser side; wherein operation_id represents the application form Operation identification code.
Operation_id=1, 2, 3, 4, 5, at this time, the latest application form Operation identification code in the screening application form Operation data is operation_id=5; the method comprises the steps of screening application form Operation data with operation_id in a (0, 5) interval and Operation type being newly added, inquiring and screening out the data of the application form, such as the state being the newly added order_id, the newly added time corresponding to the order_id, and the like, according to the order_id of the application form Operation data, so as to obtain the data new_order of the newly added application form, screening out the application form Operation data with operation_id in the (0, 5) interval and Operation type being updated, inquiring and screening out the order_id with the state being updated, the update time corresponding to the order_id, and the like, according to the order_id of the application form Operation data, so as to obtain the data modification_order of the updated application form, and returning new_operation_id (operation_id=5), new_order_order and modification_order to a browser end.
After receiving the new_operation_id (operation_id=5), the new_ordinates and the modification_ordinates, the browser side sets the original operation_id as the returned new_operation_id, namely, replaces the operation_id=0 with the operation_id=5, and sends the new_operation_id to the server side when the data is requested from the server side in the next round; adding new_orders in the returned result to the orders; according to the order_id, synchronizing the state in the modification_orders in the returned result to the data of the application form of the database orders of the local application form, thereby realizing the data updating of the server side and the browser side.
The computer program product of the method and apparatus for updating data provided in the embodiments of the present application includes a computer readable storage medium storing program codes, where the instructions included in the program codes may be used to execute the method in the foregoing method embodiment, and specific implementation may refer to the method embodiment and will not be described herein.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, and when the computer program on the storage medium is run, the method for updating the data can be executed, so that the flow consumption of the server side and the browser side can be reduced, the resource waste of the server side and the browser side is avoided, and the updating efficiency of the browser side is improved.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. The data updating method is applied to a server side and is characterized by comprising the following steps:
receiving an operation identification code sent by a browser end;
acquiring the latest operation identification code;
acquiring data of a newly added application form and/or data of an updated application form based on the operation identification code and the latest operation identification code, wherein the operation identification code is related to the data of the application form;
Returning the data of the newly added application form and the data of the updated application form to the browser end so that the browser end updates the data of the application form based on the data of the newly added application form and the data of the updated application form, wherein,
the step of obtaining the data of the newly added application form and/or the data of the updated application form based on the operation identification code and the latest operation identification code comprises the following steps:
acquiring an application form identification code corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code;
acquiring an operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code, wherein the operation type comprises newly added operation and updated operation;
acquiring data of the newly added application form and/or data of the updated application form based on an application form identification code corresponding to an operation identification code greater than the operation identification code and less than or equal to the latest operation identification code and an operation type corresponding to the operation identification code greater than the operation identification code and less than or equal to the latest operation identification code;
wherein, the data of the newly added application form comprises: the application form identification code of the newly-added application form, the state of the newly-added application form and the generation time of the newly-added application form, and the data of the updated application form comprise: the application form identification code of the update application form, the state of the update application form and the update time of the update application form.
2. The method for updating data according to claim 1, wherein the acquiring the latest operation identification code includes:
obtaining a maximum value of an application form operation identification code, wherein the maximum value of the application form operation identification code refers to a value corresponding to the maximum value of the application form operation identification code, and the application form operation identification code is increased based on the times of operating the application form;
and taking the maximum value of the application form operation identification code as the latest operation identification code.
3. The method of claim 1, wherein the obtaining the latest operation identification code comprises:
taking the application form operation identification code with the shortest application form operation time and the shortest current time interval as the latest operation identification code; wherein the current time is the time when the operation identification code is received.
4. The data updating method according to claim 1, characterized by further comprising:
and returning the latest operation identification code to the browser end so that the browser end can update the operation identification code based on the latest operation identification code.
5. The data updating method according to claim 1, characterized by further comprising, before acquiring the data of the newly added application form and the data of the updated application form based on the operation identification code and the latest operation identification code:
Acquiring data of an updated application form;
when the state of the application form in the updated data of the application form is newly increased, changing the state of the application form into update;
judging whether the state of the application form in the updated data of the application form changes or not;
if yes, correspondingly increasing the application form operation data associated with the application form; the application form operation data comprise application form operation identification codes, application form operation types, application form operation time and application form identification codes.
6. The data updating method according to claim 5, further comprising:
and when the application form in the updated application form data does not have the application form operation data associated with the application form, the state of the application form is kept unchanged.
7. The data updating method is applied to a server side and is characterized by comprising the following steps:
receiving a type identification code and an operation identification code sent by a browser end;
acquiring the latest operation identification code;
acquiring data of a newly added application form and/or data of an updated application form according to the type identification code, the operation identification code and the latest operation identification code, wherein the operation identification code is related to the data of the application form;
Returning the data of the newly added application form and the data of the updated application form to the browser end so that the browser end updates the data of the application form based on the data of the newly added application form and the data of the updated application form, wherein,
the step of obtaining the data of the newly added application form and/or the data of the updated application form according to the type identification code, the operation identification code and the latest operation identification code comprises the following steps:
acquiring an application form identification code corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code;
acquiring an operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code, wherein the operation type comprises newly added operation and updated operation;
acquiring data of the newly added application form and/or data of the updated application form according to the type identification code, an application form identification code corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code, and an operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code;
wherein, the data of the newly added application form comprises: the application form identification code of the newly-added application form, the state of the newly-added application form and the generation time of the newly-added application form, and the data of the updated application form comprise: the application form identification code of the update application form, the state of the update application form and the update time of the update application form.
8. The data updating method is applied to a browser end and is characterized by comprising the following steps:
an operation identification code is sent to a server side, so that the server side obtains data of a newly added application form and/or data of an updated application form based on the operation identification code;
receiving the data of the newly added application form and/or the data of the updated application form returned by the server side;
adding the data of the newly added application form into a database of a local application form, updating the state of the application form corresponding to the application form identification code in the database of the local application form based on the application form identification code in the data of the updated application form, wherein,
the step of obtaining the data of the newly added application form and/or the data of the updated application form based on the operation identification code comprises the following steps:
acquiring an application form identification code corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code;
acquiring an operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code, wherein the operation type comprises newly added operation and updated operation;
acquiring data of the newly added application form and/or data of the updated application form based on an application form identification code corresponding to an operation identification code greater than the operation identification code and less than or equal to the latest operation identification code and an operation type corresponding to the operation identification code greater than the operation identification code and less than or equal to the latest operation identification code;
Wherein, the data of the newly added application form comprises: the application form identification code of the newly-added application form, the state of the newly-added application form and the generation time of the newly-added application form, and the data of the updated application form comprise: the application form identification code of the update application form, the state of the update application form and the update time of the update application form.
9. A data updating system is characterized by comprising a server side and a browser side, wherein,
the browser end sends an operation identification code to the server end;
the server side acquires the latest operation identification code, acquires data of a newly-added application form and/or data of an updated application form based on the latest operation code and the received operation identification code, and returns the data of the newly-added application form and the data of the updated application form to the browser side; wherein the operation identification code is associated with the data of the application form;
the browser end adds the data of the newly added application form into a database of a local application form, updates the state of the application form corresponding to the application form identification code in the database of the local application form based on the application form identification code in the data of the updated application form, wherein,
The step of obtaining the data of the newly added application form and/or the data of the updated application form based on the operation identification code and the latest operation identification code comprises the following steps:
acquiring an application form identification code corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code;
acquiring an operation type corresponding to the operation identification code which is larger than the operation identification code and smaller than or equal to the latest operation identification code, wherein the operation type comprises newly added operation and updated operation;
acquiring data of the newly added application form and/or data of the updated application form based on an application form identification code corresponding to an operation identification code greater than the operation identification code and less than or equal to the latest operation identification code and an operation type corresponding to the operation identification code greater than the operation identification code and less than or equal to the latest operation identification code;
wherein, the data of the newly added application form comprises: the application form identification code of the newly-added application form, the state of the newly-added application form and the generation time of the newly-added application form, and the data of the updated application form comprise: the application form identification code of the update application form, the state of the update application form and the update time of the update application form.
CN201911379986.7A 2019-12-27 2019-12-27 Data updating method and system Active CN111125142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911379986.7A CN111125142B (en) 2019-12-27 2019-12-27 Data updating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911379986.7A CN111125142B (en) 2019-12-27 2019-12-27 Data updating method and system

Publications (2)

Publication Number Publication Date
CN111125142A CN111125142A (en) 2020-05-08
CN111125142B true CN111125142B (en) 2024-04-05

Family

ID=70504290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911379986.7A Active CN111125142B (en) 2019-12-27 2019-12-27 Data updating method and system

Country Status (1)

Country Link
CN (1) CN111125142B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311840A (en) * 2019-08-30 2021-02-02 北京字节跳动网络技术有限公司 Multi-terminal data synchronization method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6532463B1 (en) * 1998-12-01 2003-03-11 University Of Florida Web page accessing of data bases and mainframes
CN108846052A (en) * 2018-05-31 2018-11-20 郑州云海信息技术有限公司 A kind of browser caching data update method and relevant apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8954555B2 (en) * 2011-10-27 2015-02-10 International Business Machines Corporation Using push notifications to reduce open browser connections

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6532463B1 (en) * 1998-12-01 2003-03-11 University Of Florida Web page accessing of data bases and mainframes
CN108846052A (en) * 2018-05-31 2018-11-20 郑州云海信息技术有限公司 A kind of browser caching data update method and relevant apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周乐钦 ; 燕彩蓉 ; 苏厚勤 ; .基于Web-Socket协议的推送数据技术在监控***中的应用研究.计算机应用与软件.2013,(05),全文. *

Also Published As

Publication number Publication date
CN111125142A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
US10250526B2 (en) Method and apparatus for increasing subresource loading speed
US11038975B2 (en) Information pushing method and device
US10489476B2 (en) Methods and devices for preloading webpages
US9471646B2 (en) Method and server device for exchanging information items with a plurality of client entities
CN111221469B (en) Method, device and system for synchronizing cache data
JP2009545815A (en) Bidirectional multi-master synchronization via web syndication
CN102333092A (en) Network user identification method and application server
CN1996295A (en) Image forming apparatus and method to search for and print images on network
CN105468707A (en) Cache-based data processing method and device
CN102984278A (en) System and method for realizing browser data synchronization
CN110601978A (en) Flow distribution control method and device
JP2005530258A (en) System and method for resynchronization while refreshing a client device from a server
CN102882988A (en) Method, device and equipment for acquiring address information of resource information
CN111125142B (en) Data updating method and system
CN111176706A (en) Terminal upgrading method and device, electronic equipment and storage medium
CN110413684B (en) Database synchronization method, device and system
CN113761565B (en) Data desensitization method and device
CN106790635B (en) Cookie information management method and server
US10771578B2 (en) Webpage loading method and apparatus
CN112749172A (en) Data synchronization method and system between cache and database
CN114691703A (en) Data updating method and device, electronic equipment and storage medium
CN115563134A (en) Interaction method, interaction device, electronic equipment and computer readable medium
US11297019B2 (en) Message notification device, content management system, and non-transitory computer readable medium
CN112714092B (en) Registration login method, device and computer readable storage medium
CN111614750A (en) Data updating method, system, 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220321

Address after: 100080 zone a, 21 / F, block a, No. 8, Haidian Street, Haidian District, Beijing

Applicant after: BEIJING SHENRUI BOLIAN TECHNOLOGY Co.,Ltd.

Applicant after: SHENZHEN DEEPWISE BOLIAN TECHNOLOGY Co.,Ltd.

Address before: Unit 06 and 07, 23 / F, 523 Loushanguan Road, Changning District, Shanghai

Applicant before: SHANGHAI YIZHI MEDICAL TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant