CN110888889B - Data information updating method, device and equipment - Google Patents

Data information updating method, device and equipment Download PDF

Info

Publication number
CN110888889B
CN110888889B CN201810941366.7A CN201810941366A CN110888889B CN 110888889 B CN110888889 B CN 110888889B CN 201810941366 A CN201810941366 A CN 201810941366A CN 110888889 B CN110888889 B CN 110888889B
Authority
CN
China
Prior art keywords
data information
server
version number
client
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
CN201810941366.7A
Other languages
Chinese (zh)
Other versions
CN110888889A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810941366.7A priority Critical patent/CN110888889B/en
Publication of CN110888889A publication Critical patent/CN110888889A/en
Application granted granted Critical
Publication of CN110888889B publication Critical patent/CN110888889B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data information updating method, a device and equipment. The method comprises the following steps: receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client; comparing the first version number with a second version number of the data information maintained by the server, if the first version number and the second version number are consistent, determining a time length threshold value of the server responding to the query request, and sending a first query result to the client when the data information is not detected to be updated within the time length threshold value range so as to indicate that the data information is not updated. Therefore, when the server determines that the data information is not updated, the method determines the time threshold of response timeout of the query request, and avoids the problem that the server is overloaded and the stability of the system is affected.

Description

Data information updating method, device and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for updating data information.
Background
The local update refers to that the client reads the latest data information from the server and performs local adaptive update.
Currently, the client generally acquires the latest data information by periodically polling the server or restarting the client. The former has a difficult adjustment of the polling interval and the latter has a large impact on the client traffic.
Therefore, a more reliable data information update scheme is needed.
Disclosure of Invention
The embodiment of the specification provides a data information updating method, device and equipment, which are used for providing a reliable data information updating scheme.
The embodiment of the specification also provides a data information updating method, which comprises the following steps:
receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from a server;
if the first version number is consistent with the second version number of the data information maintained by the server, determining a time duration threshold value of the server responding to the query request;
and if the data information is not detected to be updated within the duration threshold range, sending a first query result to the client to indicate that the data information is not updated.
The embodiment of the specification also provides a data information updating method, which comprises the following steps:
A query request is sent to a server, wherein the query request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server, and when the server determines that the first version number is consistent with a second version number of the data information maintained by the server, a duration threshold value of the server responding to the query request is determined;
receiving a first query result returned by the server, wherein the first query result is returned by the server when the server does not detect that the data information is updated within the duration threshold range and is used for indicating that the data information is not updated; or,
and receiving a second query result returned by the server, wherein the second query result carries updated data information and is returned when the server detects that the data information is updated within the duration threshold range.
The embodiment of the present specification also provides a data information updating apparatus, including:
the receiving module is used for receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from the server;
The processing module is used for determining a time length threshold value of the server responding to the query request if the first version number is consistent with the second version number of the data information maintained by the server;
and the sending module is used for sending a first query result to the client to indicate that the data information is not updated if the data information is not detected to be updated within the duration threshold range.
The embodiment of the present specification also provides a data information updating apparatus, including:
a sending module, configured to send a query request to a server, where the query request carries a first version number of data information recorded by a client, and is configured to obtain latest data information from the server, so that when the server determines that the first version number is consistent with a second version number of data information maintained by the server, determine a duration threshold value of the server responding to the query request;
the receiving module is used for receiving a first query result returned by the server, wherein the first query result is returned by the server when the server does not detect that the data information is updated within the duration threshold range and is used for indicating that the data information is not updated; or receiving a second query result returned by the server, wherein the second query result carries updated data information and is returned when the server detects that the data information is updated within the duration threshold range.
The embodiment of the specification also provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from a server;
if the first version number is consistent with the second version number of the data information maintained by the server, determining a time duration threshold value of the server responding to the query request;
and if the data information is not detected to be updated within the duration threshold range, sending a first query result to the client to indicate that the data information is not updated.
The present specification embodiments also provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to:
receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from a server;
If the first version number is consistent with the second version number of the data information maintained by the server, determining a time duration threshold value of the server responding to the query request;
and if the data information is not detected to be updated within the duration threshold range, sending a first query result to the client to indicate that the data information is not updated.
The embodiment of the specification also provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
a query request is sent to a server, wherein the query request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server, and when the server determines that the first version number is consistent with a second version number of the data information maintained by the server, a duration threshold value of the server responding to the query request is determined;
receiving a first query result returned by the server, wherein the first query result is returned by the server when the server does not detect that the data information is updated within the duration threshold range and is used for indicating that the data information is not updated; or,
And receiving a second query result returned by the server, wherein the second query result carries updated data information and is returned when the server detects that the data information is updated within the duration threshold range.
The present specification embodiments also provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to:
a query request is sent to a server, wherein the query request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server, and when the server determines that the first version number is consistent with a second version number of the data information maintained by the server, a duration threshold value of the server responding to the query request is determined;
receiving a first query result returned by the server, wherein the first query result is returned by the server when the server does not detect that the data information is updated within the duration threshold range and is used for indicating that the data information is not updated; or,
And receiving a second query result returned by the server, wherein the second query result carries updated data information and is returned when the server detects that the data information is updated within the duration threshold range.
The above-mentioned at least one technical scheme that this description embodiment adopted can reach following beneficial effect:
determining whether the data information recorded by the client is the same by comparing the first version number of the data information recorded by the client with the second version number of the data information maintained by the server; if yes, the server determines a time length threshold value responding to the query request of the client, and if the data information is not updated within the time length threshold value range, a query result is sent to the client so as to inform the client that the data information is not updated. Compared with the prior art, when the data information is not updated, the server does not immediately respond to the query request, and the server records the query request and determines the time threshold of the response timeout of the query request of the client, so that the purposes of indirectly regulating the query rate of the client, reducing the load of the server and improving the stability of the system are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1a is a schematic diagram of an application scenario provided in the present specification;
fig. 1b is a schematic diagram of another application scenario provided in the present specification;
FIG. 1c is a schematic diagram illustrating interactions between a client, a host node, and a service node provided in the present disclosure;
fig. 2 is a flow chart of a method for updating metadata information of a cloud disk on a master node side according to an embodiment of the present disclosure;
fig. 3 is a flow chart of a method for updating metadata information of a cloud disk on a master node side according to another embodiment of the present disclosure;
fig. 4 is a flowchart of a cloud disc metadata information updating method provided by an embodiment of the present disclosure;
fig. 5 is a flowchart of a cloud disc metadata information updating method provided by another embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a cloud disc metadata information updating device on a master node side according to an embodiment of the present disclosure;
Fig. 7 is a schematic structural diagram of a cloud disc metadata information updating device on a client side according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to another embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
As stated in the background section, the polling time interval is difficult to adjust in a periodic polling server manner, and if the time interval is too large, there is a problem that acquired data information lags; if the time interval is too small, the problem that too many requests cause overload of the server exists; the mode of restarting the client needs to stop the data read-write link between the client and the server, and has great influence on the client service.
Taking a distributed storage system storing metadata information of a cloud disk as an example, the following is an exemplary description of 'local update' and defects thereof in the background art:
in a distributed block storage system, cloud disk metadata information (such as information of a cloud disk size, a partition, a corresponding service node and the like) is generally maintained by a master node. Before executing the read-write operation, the client side needs to request the master node to acquire metadata information and perform local adaptive update, and then searches the service node based on the metadata information and executes the read-write operation. When Rong Yunpan is expanded, metadata information maintained by the master node changes, but it is difficult for the client to synchronously update locally recorded cloud disk metadata information, so that read-write operations can be continuously performed based on the previous metadata information, and further read-write errors are caused.
Based on the above, the invention provides a data information updating method, which is characterized in that the version number of data information recorded by a client side is compared with the version number of data information maintained by a server, so that when the data information recorded by the client side is identical, a time length threshold responding to a query request of the client side is determined, and if the data information is not updated within the time length threshold, a query result is sent to the client side, so that the client side is informed that the data information is not updated. Therefore, when the data information is not updated, the server does not immediately respond to the query request, records the query request and determines the time threshold value of the query request, so that the purposes of indirectly regulating the query rate of the client, reducing the load of the main node and improving the stability of the system are achieved.
The following describes an application scenario of the present invention.
Referring to fig. 1a, an application scenario includes: server and a plurality of clients, wherein:
the client is used for sending a query request to the server, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from the server;
the server is used for responding to the query request and comparing the first version number with the second version number of the data information maintained by the server, and if the two version numbers are consistent, the duration threshold value of the server responding to the query request is determined; if the data information is not detected to be updated within the duration threshold range, a first query result is sent to the client to indicate that the data information is not updated; if the first version number is inconsistent with the second version number, or if the data information is detected to be updated within the duration threshold range, the updated data information is sent to the client so that the client can update the locally recorded data information.
The time threshold for responding to the query request may refer to a time length between a first time point and a second time point, where the time point when the server receives the query request is a first time point, and the time point when the server responds to the query request is a second time point; and the time point of responding to the query request defined by the protocol is taken as a first time point, the time point of actually responding to the query request by the server is taken as a second time point, and the time length between the first time point and the second time point can be also taken as a second time point.
Optionally, the implementation manner of determining the duration threshold of the server responding to the query request by the server may be:
the greater the load on the server, the greater the duration threshold for responding to the query request.
Based on this, as the server load fluctuates, the duration threshold in response to the query request also fluctuates, which may be several minutes or hours. Therefore, the load pressure of the server can be reduced, and when the data information is updated, the server can immediately respond to the query request to return the latest data information, so that the influence on the timely updating of the data information by the client is avoided.
Optionally, the first query result further carries the second version number, so that the client can update the version number of the locally recorded data information, and the second version number is carried in the next initiated query request.
Optionally, after receiving the response result returned by the server, the client initiates a next query request to the server.
Based on this, it can be ensured that the server records a query request from each client at almost any time, and further, when the data information is updated, updated data information can be timely transmitted to each client in response to the recorded query request.
In addition, for convenience of subsequent description, the server is exemplified as a master node of the distributed storage system, the data information is exemplified as metadata-cloud disk metadata information, and an application scenario corresponding to the example is described in detail below:
referring to fig. 1b, the application scenario of this example includes: the distributed storage system comprises a main node and a plurality of service nodes; the client side comprises a plurality of clients such as a client 1, a client 2, a … client n and the like, wherein:
the client is used for establishing connection with the distributed storage system so as to enable a user to read and write data;
the main node is a central module for managing and controlling the distributed storage service nodes in the distributed storage system;
and the service node is used for sharing and adapting the service of the client read-write request in the distributed storage system.
In connection with fig. 1c, the interaction process between the three can be:
the client sends a query request to the main node to request the latest cloud disk metadata information, and sends a read-write request to the designated service node based on the latest cloud disk metadata information;
when the master node determines that the cloud disk metadata information is updated, responding to the query request and sending the latest metadata information to the client;
The service node responds to the read-write request and provides data read-write service for the client.
The main node is a central module for managing and controlling service nodes in the distributed storage system; the service node is used for sharing and adapting the service of the user read-write request.
Yun Pan is a specialized internet storage tool, which is the product of internet cloud technology, and provides services for enterprises and individuals to store, read, download, etc. information through the internet.
Metadata, also called intermediate data and relay data, is data (data about data) describing data, mainly describing data attribute (property) information, and is used to support functions such as indicating storage location, history data, resource searching, file recording, etc. Metadata is an electronic catalog, and in order to achieve the purpose of cataloging, the contents or characteristics of data must be described and collected, so as to achieve the purpose of assisting in data retrieval.
The cloud disk metadata information is data describing data stored in the cloud disk.
The technical solutions provided by the embodiments corresponding to this example are described in detail below with reference to the accompanying drawings:
fig. 2 is a flow chart of a method for updating cloud disc metadata information on a master node side according to an embodiment of the present disclosure, referring to fig. 2, the method may be executed by the master node in fig. 1b or fig. 1c, and may specifically include the following steps:
Step 220, receiving a query request sent by a client, wherein the query request carries a first version number of cloud disk metadata information recorded by the client and is used for acquiring the latest cloud disk metadata information from the master node;
the version number of the cloud disc metadata information is used for distinguishing the metadata information after each update.
It will be appreciated that, in order to facilitate identification of changes in metadata information of a cloud disk, the master node updates the version number each time metadata information is updated. The implementation mode of the method can be as follows:
taking a value as a version number, and adding 1 to the value every time metadata information is updated, further, whether the cloud disc metadata information recorded by the client and the master node are consistent or not can be determined based on the version number, for example: the larger the value, the more the number of updates is accounted for.
Step 240, if the first version number is consistent with the second version number of the cloud disc metadata information maintained by the master node, determining a duration threshold value of the master node responding to the query request;
it is to be understood that if the version number is a numerical value, the numerical values of the first version number and the second version number can be compared, if the numerical values are the same, it is determined that the two numerical values are consistent, that is, the cloud disc metadata information recorded by the master node is the same as the cloud disc metadata information recorded by the client, and further it is determined that no new metadata information at the master node is returned to the client, further, in order to reduce the load pressure of the master node, the response to the query request may not be so timely, for example: a duration threshold for responding to the query request may be determined based on load information of the master node. The specific response mode can be as follows:
The current load information of the main node is firstly obtained from the load statistics module of the main node, and a time length threshold is calculated based on the load information, and the time length which is used as the time length for responding to the query request and is not exceeded can be several minutes or several hours.
The manner of determining the duration threshold may be: the larger the load of the master node, the larger the duration threshold for responding to the query request.
In this regard, it should be noted that how to obtain the load of the master node belongs to the prior art, and is not limited herein. In addition, a duration threshold for configuring a response timeout for a query request based on master node load is flexibly configurable, such as: the load is proportional to the duration threshold and is not limited herein.
Step 260, if the cloud disc metadata information is not detected to be updated within the duration threshold range, a first query result is sent to the client to indicate that the cloud disc metadata information is not updated.
It will be appreciated that based on the duration threshold determined in step 240, the master node detects whether the cloud disk metadata information is updated within the duration range.
If yes, go to step 260. The first query result carries the second version number, where the second version number is used for the client to determine whether the version of the cloud disc metadata information is updated, for example: and when the client compares the first version number with the second version number, determining that the cloud disk metadata information is not updated.
If not, namely, the cloud disc metadata information is detected to be updated within the duration threshold range, a second query result is sent to the client, and the second query result carries updated cloud disc metadata information so that the client can update the locally recorded cloud disc metadata information.
In order to reduce the amount of data to be transmitted between the master node and the client, further, the present embodiment further provides a scheme for transmitting metadata information of only a portion where update occurs, which specifically includes:
the cloud disc metadata information comprises a plurality of metadata information groups, wherein each metadata information group has a separate sub-version number; that is, when metadata information is updated, the master node needs to determine which metadata information groups all have been updated, and update the sub-version numbers of the metadata information groups that have been updated, and the version numbers of the entire metadata information.
Based on the sub version numbers, the master node records the sub version numbers of each metadata information group, of the client and the master node; determining a target metadata information group in each metadata information group, wherein the target metadata information group is a metadata information group with different sub-version numbers recorded by the client and the master node;
And the cloud disc metadata information carried by the second query result is metadata information of the target metadata information group, so that the client updates metadata information corresponding to the target metadata information group recorded locally.
As to how to divide the metadata information into a plurality of metadata information groups, the implementation is not limited herein, and it is preferable that the metadata information is divided into a group in a close logical relationship.
Optionally, after detecting that the cloud disc metadata information is updated, before sending the second query result to the client, the method further includes:
updating the second version number to obtain a third version number, for example: and adding 1 to the second version number to obtain a third version number. Correspondingly, the second query result also carries the third version number, so that the version number of the locally recorded cloud disk metadata information is updated by the client, namely the first version number locally recorded by the client is replaced by the third version number.
Synchronously, the sub-version number of the target metadata information set is updated, and the sub-version number is carried in the second query result so that the client can update the sub-version number of the locally recorded target metadata information set.
Optionally, an implementation manner of determining the duration threshold of the server responding to the query request may be:
a timer is set with the time point of receiving the query request as the start time (or with the time point of responding to the timeout as the start time), and the duration threshold as the end time. When the timer is triggered (times out), determining that a duration threshold is reached; when the timer is not triggered, it is determined that the duration threshold is not reached.
Or,
the master node updates the waiting response time length of the query request in real time and periodically, compares the magnitude relation between the waiting response time length and the time length threshold value, and if the waiting response time length is smaller than the waiting response time length, the waiting response time length is not up to the time length threshold value; if the former is equal to the latter, the specification reaches a duration threshold. The waiting response time length refers to the time length that the query request has waited for the server to respond by the current time point.
Therefore, in this embodiment, by comparing the version number of the cloud disc metadata information recorded by the client with the version number of the cloud disc metadata information maintained by the master node, it is determined whether the cloud disc metadata information recorded by the client and the cloud disc metadata information are the same; if yes, a time length threshold responding to the query request of the client is determined based on the load condition of the main node, and if the cloud disk metadata information is not updated within the time length threshold, a query result is sent to the client so as to inform the client that the cloud disk metadata information is not updated. Compared with the prior art, when the data information is not updated, the server does not immediately respond to the query request, the server records the query request and determines a response time threshold based on the load condition of the main node, the client query rate is indirectly regulated, the overload of the main node is reduced, the system stability is improved, and the pressure caused by the increase of the number of cloud disk users is easily responded.
Fig. 3 is a flow chart of a method for updating cloud disc metadata information on a master node side according to another embodiment of the present disclosure, referring to fig. 3, the method may be executed by the master node in fig. 1b or fig. 1c, and may specifically include the following steps:
step 302, receiving a query request sent by a client, wherein the query request carries a first version number of cloud disk metadata information recorded by the client;
step 304, whether the first version number is equal to the second version number maintained by the master node;
if yes, go to step 306;
that is, if the two are equal, it is indicated that the metadata information recorded by the master node and the client are the same, and the master node does not need to send new metadata information to the client. Thus, the query request may not have to be responded to in an urgent manner, taking into account the load pressure of the master node.
If not, go to step 316;
that is, if the two are different, it is indicated that the metadata information recorded by the master node and the metadata information recorded by the client are different, and since the version number of the metadata information recorded by the client is derived from the master node and the update thereof lags behind the version number of the master node, the case of the difference is generally that the first version number lags behind the second version number (or that is, the former is smaller than the latter, or that the update time corresponding to the first version number lags behind the update time of the second version number), so that the master node needs to send the metadata information recorded currently and the second version number to the client for the client to replace the metadata information recorded locally and the first version number with the metadata information sent by the master node and the second version number, respectively.
Step 306, determining a time length threshold for responding to the query request based on the load information of the master node;
step 308, waiting whether the response time length reaches a time length threshold value;
if yes, go to step 318; if not, go to step 310;
step 310, waiting for metadata information update;
step 312, whether the metadata information is updated;
if yes, go to step 314; if not, then 308 is performed;
step 314, updating the version number;
step 316, returning the latest metadata information and version number to the client;
step 318, returning a second version number to the client;
for steps 308-318, it is easy to understand that, after determining the timeout threshold for responding to the query request, the master node updates the waiting response time of the query request in real time and detects whether the metadata information is updated in real time; if the metadata information is detected to be updated before the waiting response time reaches the time threshold, updating the version number, and feeding the updated version number and metadata information back to the client for updating the version number and metadata information locally recorded by the client; if the metadata information is detected to be not updated in the time period when the waiting response time reaches the time threshold, feeding back the second version number recorded currently by the master node to the client, and determining that the metadata information is not required to be updated when the client compares the first version number with the second version number to be consistent.
Optionally, in order to reduce the amount of data to be transmitted between the master node and the client, further, this embodiment further provides a method for transmitting metadata information only of a portion where update occurs, which specifically includes the following steps:
the cloud disc metadata information comprises a plurality of metadata information groups, and each metadata information group has an independent sub-version number; that is, when metadata information is updated, the master node needs to determine which metadata information groups all have been updated, and update the sub-version numbers of the metadata information groups that have been updated, and the version numbers of the entire metadata information.
Based on the sub version numbers, the master node records the sub version numbers of each metadata information group, of the client and the master node; determining a target metadata information group in each metadata information group, wherein the target metadata information group is a metadata information group with different sub-version numbers recorded by the client and the master node;
the latest metadata information sent to the client is metadata information of the target metadata information group, so that the client can update metadata information corresponding to the target metadata information group recorded locally.
It can be seen that the following problems in the prior art can be solved based on the steps 302-318 in this embodiment:
Aiming at the problem of the load of the main node, the main node determines the overtime time for responding to the query request according to the self load condition so as to indirectly regulate and control the query per second (qps) of the client query, compared with the prior art of periodically polling the main node to acquire the latest metadata information, the method can avoid a great amount of idle work corresponding to frequent polling, reduce the load pressure of the main node, and further can easily cope with the pressure caused by the increase of the number of users sharing the cloud disk;
aiming at the problem of read-write service stability, the master node can set a response time threshold for the query request, so that the master node side can ensure that one query request exists for any client at almost any moment, and further can directly respond to the query request and timely inform the client when the cloud disk metadata information is updated. Compared with the prior art that the client-side reopens the cloud disk after the read-write errors, the service logic can be almost unaware, and smooth expansion of the cloud disk is achieved.
For the problem of easy operation and maintenance, the capacity expansion operation of the embodiment does not need to execute the command in two steps, but after the metadata information is successfully updated by the master node, the master node responds to the query request to automatically push the latest metadata information to the client.
Fig. 4 is a flowchart of a method for updating cloud disc metadata information on a client side according to an embodiment of the present disclosure, referring to fig. 4, the method may be executed by the client in fig. 1b or fig. 1c, and may specifically include the following steps:
step 402, a client sends a first query request to a master node, wherein the query request carries a first version number of cloud disk metadata information recorded by the client and is used for acquiring latest cloud disk metadata information from the master node, so that when the server determines that the first version number is consistent with a second version number of data information maintained by the server, a duration threshold responding to the query request is determined;
step 404, receiving a first query result sent by the master node, where the first query result is sent when the master node does not detect that cloud disc metadata information is updated within a predetermined duration threshold range, and is used to indicate that the cloud disc metadata information is not updated;
step 406, determining that cloud disc metadata information is not updated based on the first query result.
With respect to steps 402-406, it is readily understood that the client has a thread in the background for initiating a query request to the master node and waiting for the master node's response. After receiving the response, the client compares whether the metadata information recorded by the master node is different from the metadata information recorded by the local client based on the query result, and if so, the local recorded metadata information is updated. Based on this, subsequent read-write requests can access the latest service node. If the cloud disc metadata information is the same, the cloud disc metadata information is not updated. After receiving the response, the client side immediately initiates the next query request and repeats the process.
If the metadata information is not updated, carrying an original first version number in a next query request; if the metadata information is updated, the updated version number is carried in the next query request.
Accordingly, the master node also has a thread in the background for processing the query request. After receiving the inquiry request, checking whether the version number of the metadata information carried by the inquiry request is consistent with the version number of the metadata information locally recorded by the master node. If the metadata information is inconsistent with the metadata information, immediately responding to the query request and returning a query result, wherein the query result carries the latest metadata information and version numbers thereof; if so, a timer is started. Before the timeout, if the metadata information is updated (the version number is updated at this time), the query result is returned immediately in response to the query request, and the query result carries the latest metadata information and the version number thereof. When the overtime triggering is performed, a query result is returned in response to the query request, and the query result carries the version number.
Optionally, a second query result sent by the master node is received, where the second query result is sent when the master node detects that the cloud disc metadata information is updated within the duration threshold range, and the second query result carries updated cloud disc metadata information;
And updating the locally recorded cloud disc metadata information based on the second query result.
Optionally, the second query result further carries a third version number, where the third version number is obtained by updating the second version number when the master node detects that the cloud disc metadata information is updated;
wherein the method further comprises:
and updating the first version number to the third version number.
Optionally, the method further comprises:
receiving a third query result sent by the master node, wherein the second query result is sent by the master node when the first version number is inconsistent with the second version number, and the second query result carries cloud disc metadata information recorded by the second version number and the master node;
and based on the third query result, locally recorded cloud disc metadata information and version numbers of the cloud disc metadata information are updated.
Optionally, the cloud disc metadata information includes a plurality of metadata information groups; the cloud disc metadata information carried by the third query result is metadata information of a target metadata information group recorded by the main node, wherein the target metadata information group is a metadata information group with different sub-version numbers recorded by the client and the main node in the cloud disc metadata information;
Based on the third query result, updating the locally recorded cloud disk metadata information includes:
and updating the metadata information of the target metadata information group recorded locally based on the metadata information of the target metadata information group recorded by the master node.
Optionally, in order to make the master node side always have the query request initiated by the client, the method further includes: and after receiving the query result sent by the master node, sending a second query request to the master node, wherein the second query request carries the latest version number of the cloud disk metadata information recorded by the client.
Therefore, in this embodiment, by sending a query request to the master node, the version number of the cloud disk data information recorded by the master node client is notified, so that when the master node determines that the cloud disk metadata information recorded by the master node client and the cloud disk metadata information recorded by the master node client are the same, the master node determines a timeout duration threshold value in response to the query request based on the self-load condition, thereby reducing overload of the master node and improving system stability; in addition, in the embodiment, after receiving the query result of the master node, the client immediately initiates the next query request, so as to dynamically determine the query period of the client according to the self-load condition of the master node; in addition, the master node can immediately reply to the query result when the metadata information is updated, so that the client is not influenced to update the metadata information in time.
Fig. 5 is a flowchart of a method for updating cloud disc metadata information on a client side according to another embodiment of the present disclosure, referring to fig. 5, the method may be executed by the client in fig. 1b or fig. 1c, and may specifically include the following steps:
step 502, a first query request is sent to a master node, wherein the query request carries a first version number of cloud disk metadata information recorded by a client;
step 504, waiting for the main node to respond;
step 506, whether the metadata information is updated;
if yes, go to step 508; if not, go to step 512;
step 508, updating the locally recorded metadata information and version number;
step 510, initiating read-write access based on the latest metadata information;
step 512, initiating read-write access based on the locally recorded metadata information;
for steps 502-512, it is easy to understand that after waiting for the response of the master node, determining whether the metadata information is updated based on the query result, if yes, updating the locally recorded metadata information and version number thereof based on the latest metadata information and version number carried by the query result, and initiating read-write access to the service node based on the latest metadata information; if not, still initiating read-write access to the service node based on the locally recorded metadata information.
Therefore, in this embodiment, after the query request is initiated, the query result of the master node is waited, so that the master node side almost always maintains a query request in an unresponsive state, and further, when the metadata information is updated, the master node responds to the query request and timely notifies the client to update the metadata information and the version number thereof locally recorded by the client.
In addition, for simplicity of explanation, the above-described method embodiments are depicted as a series of acts, but it should be appreciated by those skilled in the art that the present embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will recognize that the embodiments described in the specification are all preferred embodiments, and that the actions involved are not necessarily required for the embodiments of the present invention.
Fig. 6 is a schematic structural diagram of a cloud disc metadata information updating device on a master node side according to an embodiment of the present disclosure, and referring to fig. 6, the device may be used as a part of the master node in fig. 1b or fig. 1c, and may specifically include: a receiving module 61, a processing module 62 and a transmitting module 63, wherein:
The receiving module 61 is configured to receive a query request sent by a client, where the query request carries a first version number of cloud disc metadata information recorded by the client, and is configured to obtain latest cloud disc metadata information from the master node;
a processing module 62, configured to determine a duration threshold for responding to the query request based on load information of the master node if the first version number is consistent with a second version number of cloud disk metadata information maintained by the master node;
and the sending module 63 is configured to send a first query result to the client if the cloud disc metadata information is not detected to be updated within the duration threshold range, so as to indicate that the cloud disc metadata information is not updated.
Optionally, the first query result carries the second version number, so that when the client compares that the first version number is consistent with the second version number, it is determined that cloud disc metadata information is not updated.
Optionally, the sending module 63 is further configured to:
if the cloud disc metadata information is detected to be updated within the duration threshold range, a second query result is sent to the client;
and the second query result carries updated cloud disc metadata information so that the client can update the locally recorded cloud disc metadata information.
Optionally, the apparatus further comprises:
the updating module is used for updating the second version number to obtain a third version number;
and the second query result also carries the third version number so as to update the version number of the locally recorded cloud disk metadata information of the client record.
Optionally, the sending module 63 is further configured to:
and if the first version number is inconsistent with the second version number, sending a third query result to the client, wherein the third query result carries the second version number and cloud disc metadata information recorded by the master node so that the client can update the locally recorded cloud disc metadata and the new version number of the cloud disc metadata.
Wherein the cloud disc metadata information includes a plurality of metadata information groups; correspondingly, the sending module 63 is specifically configured to obtain the sub-version numbers of each metadata information set recorded by the client and the master node if the first version number is inconsistent with the second version number; determining a target metadata information group in each metadata information group, wherein the target metadata information group is a metadata information group with different sub-version numbers recorded by the client and the master node;
And the cloud disc metadata information carried by the third query result is metadata information of the target metadata information group, so that the client updates metadata information corresponding to the target metadata information group recorded locally.
The processing module 62 is specifically configured to:
the larger the load of the master node, the larger the duration threshold value for responding to the query request.
Therefore, in this embodiment, by comparing the version number of the cloud disc metadata information recorded by the client with the version number of the cloud disc metadata information maintained by the master node, it is determined whether the cloud disc metadata information recorded by the client and the cloud disc metadata information are the same; if yes, a time length threshold responding to the query request of the client is determined based on the load condition of the main node, and if the cloud disk metadata information is not updated within the time length threshold, a query result is sent to the client so as to inform the client that the cloud disk metadata information is not updated. Compared with the prior art, when the data information is not updated, the server does not immediately respond to the query request, and the server records the query request and can determine a response time threshold based on the load condition, so that the client query rate is indirectly regulated, the overload of the main node is reduced, and the system stability is improved.
Fig. 7 is a schematic structural diagram of a cloud disc metadata information updating device on a client side according to an embodiment of the present disclosure, referring to fig. 7, the device may be used as a part of the client in fig. 1b or fig. 1c, and may specifically include: a transmitting module 71, a receiving module 72 and a determining module 73, wherein:
a sending module 71, configured to send a first query request to a master node, where the query request carries a first version number of cloud disc metadata information recorded by the client, and is configured to obtain, from the master node, latest cloud disc metadata information, so that when the master node determines that the first version number is consistent with a second version number of cloud disc metadata information maintained by the master node, determine a duration threshold of the master node responding to the first query request;
the receiving module 72 is configured to receive a first query result sent by the master node, where the first query result is sent when the master node does not detect that cloud disc metadata information is updated within a predetermined duration threshold range, and is used to indicate that the cloud disc metadata information is not updated;
a determining module 73, configured to determine that the cloud disc metadata information is not updated based on the first query result.
Optionally, the receiving module 72 is further configured to:
receiving a second query result sent by the master node, wherein the second query result is sent when the master node detects that the cloud disc metadata information is updated within the duration threshold range, and the second query result carries updated cloud disc metadata information;
and updating the locally recorded cloud disc metadata information based on the second query result.
The second query result also carries a third version number, wherein the third version number is obtained by updating the second version number when the master node detects that the cloud disk metadata information is updated;
correspondingly, the device further comprises:
and the updating module is used for updating the first version number into the third version number.
Optionally, the receiving module 72 is further configured to:
receiving a third query result sent by the master node, wherein the second query result is sent by the master node when the first version number is inconsistent with the second version number, and the second query result carries cloud disc metadata information recorded by the second version number and the master node; and based on the third query result, locally recorded cloud disc metadata information and version numbers of the cloud disc metadata information are updated.
Wherein the cloud disc metadata information includes a plurality of metadata information groups; the cloud disc metadata information carried by the third query result is metadata information of a target metadata information group recorded by the main node, wherein the target metadata information group is a metadata information group with different sub-version numbers recorded by the client and the main node in the cloud disc metadata information;
the receiving module 72 is specifically configured to:
and updating the metadata information of the target metadata information group recorded locally based on the metadata information of the target metadata information group recorded by the master node.
Optionally, the sending module 71 is further configured to:
and after receiving the query result sent by the master node, sending a second query request to the master node, wherein the second query request carries the latest version number of the cloud disk metadata information recorded by the client.
As can be seen, in this embodiment, by sending a query request to the master node, the version number of the cloud disk data information recorded by the master node client is notified, so that when the master node determines that the cloud disk metadata information recorded by the master node client and the cloud disk metadata information recorded by the master node client are the same, the duration threshold value for responding to the query request is determined based on the self-load condition, so that the overload of the master node is reduced, and the stability of the system is improved; in addition, in the embodiment, after receiving the query result of the master node, the client immediately initiates the next query request, so as to dynamically determine the query period of the client according to the self-load condition of the master node; in addition, the master node can immediately reply to the query result when the metadata information is updated, so that the client is not influenced to update the metadata information in time.
In addition, for the above-described apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference should be made to the description of the method embodiments for relevant points. Further, it should be noted that, among the respective components of the apparatus of the present application, the components thereof are logically divided according to functions to be realized, but the present application is not limited thereto, and the respective components may be re-divided or combined as necessary.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, and referring to fig. 8, the electronic device includes a processor, an internal bus, a network interface, a memory, and a nonvolatile memory, and may include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs the computer program to form the cloud disk metadata information updating device on a logic level. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present application, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
The network interface, processor and memory may be interconnected by a bus system. The bus may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 8, but not only one bus or type of bus.
The memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include read only memory and random access memory and provide instructions and data to the processor. The Memory may comprise a Random-Access Memory (RAM) or may further comprise a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory.
The processor is used for executing the program stored in the memory and specifically executing:
receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from a server;
If the first version number is consistent with the second version number of the data information maintained by the server, determining a time duration threshold value of the server responding to the query request;
if the data information is not detected to be updated within the duration threshold range, a first query result is sent to the client to indicate that the data information is not updated;
or,
the method comprises the steps that a master node receives a query request sent by a client, wherein the query request carries a first version number of cloud disc metadata information recorded by the client and is used for acquiring the latest cloud disc metadata information from the master node;
if the first version number is consistent with the second version number of the cloud disc metadata information maintained by the master node, determining a time threshold of the master node responding to the query request;
and if the cloud disc metadata information is not detected to be updated within the duration threshold range, sending a first query result to the client so as to indicate that the cloud disc metadata information is not updated.
The method performed by the cloud disk metadata information updating apparatus or manager (Master) node disclosed in the embodiment of fig. 6 of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The cloud disk metadata information updating device can also execute the method of fig. 2-3 and realize the method executed by the manager node.
Based on the same application, the embodiments of the present application also provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to execute the cloud disc metadata information updating method provided by the corresponding embodiments of fig. 2-3.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, and referring to fig. 9, the electronic device includes a processor, an internal bus, a network interface, a memory, and a nonvolatile memory, and may include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs the computer program to form the cloud disk metadata information updating device on a logic level. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present application, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
The network interface, processor and memory may be interconnected by a bus system. The bus may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in fig. 9, but not only one bus or one type of bus.
The memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include read only memory and random access memory and provide instructions and data to the processor. The Memory may comprise a Random-Access Memory (RAM) or may further comprise a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory.
The processor is used for executing the program stored in the memory and specifically executing:
a query request is sent to a server, wherein the query request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server, and when the server determines that the first version number is consistent with a second version number of the data information maintained by the server, a duration threshold value of the server responding to the query request is determined;
Receiving a first query result returned by the server, wherein the first query result is returned by the server when the server does not detect that the data information is updated within the duration threshold range and is used for indicating that the data information is not updated; or,
receiving a second query result returned by the server, wherein the second query result carries updated data information and is returned when the server detects that the data information is updated within the duration threshold range;
or,
a client sends a first query request to a master node, wherein the query request carries a first version number of cloud disk metadata information recorded by the client and is used for acquiring latest cloud disk metadata information from the master node, so that when the master node determines that the first version number is consistent with a second version number of the cloud disk metadata information maintained by the master node, the master node determines a duration threshold value for responding to the first query request;
receiving a first query result sent by the master node, wherein the first query result is sent by the master node when the master node does not detect that cloud disc metadata information is updated within a preset duration threshold range and is used for indicating that the cloud disc metadata information is not updated;
Determining that cloud disk metadata information is not updated based on the first query result;
and when the first version number is consistent with the second version number of the cloud disc metadata information maintained by the master node, determining based on the load information of the master node.
The method performed by the cloud disk metadata information updating apparatus or manager (Master) node disclosed in the embodiment of fig. 7 of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The cloud disk metadata information updating device can also execute the methods of fig. 4-5 and implement the methods executed by the manager node.
Based on the same application, the embodiments of the present application also provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to execute the cloud disc metadata information updating method provided by the embodiments corresponding to fig. 4 to 5.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (18)

1. A data information updating method, comprising:
receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from a server;
if the first version number is consistent with the second version number of the data information maintained by the server, determining a time duration threshold value of the server responding to the query request;
And if the data information is not detected to be updated within the duration threshold range, sending a first query result to the client to indicate that the data information is not updated.
2. The method of claim 1, wherein the first query result carries the second version number.
3. The method of claim 1, further comprising: if the data information is detected to be updated within the duration threshold range, a second query result is sent to the client;
and the second query result carries updated data information.
4. A method according to claim 3, wherein after detecting that the data information is updated, before sending a second query result to the client, the method further comprises:
updating the second version number to obtain a third version number;
wherein the second query result also carries the third version number.
5. The method of claim 1, further comprising:
and if the first version number is inconsistent with the second version number, sending a third query result to the client, wherein the third query result carries the second version number and the data information recorded by the server.
6. The method of claim 1, wherein determining a duration threshold for the server to respond to the query request comprises:
the greater the load on the server, the greater the duration threshold for responding to the query request.
7. The method according to any one of claims 1-6, wherein the server is a master node, and the data information is metadata, and is used for the client to find a corresponding service node and perform data reading and writing.
8. The method of claim 5, wherein the data information comprises a plurality of data information sets;
if the first version number is inconsistent with the second version number, the method further comprises:
acquiring the sub version numbers of each data information group recorded by the client and the server;
determining target data information groups in the data information groups, wherein the target data information groups are data information groups with different sub-version numbers recorded by the client and the server;
the data information carried by the third query result is the data information of the target data information group, so that the client can update the data information corresponding to the target data information group recorded locally.
9. A data information updating method, comprising:
a query request is sent to a server, wherein the query request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server, and when the server determines that the first version number is consistent with a second version number of the data information maintained by the server, a duration threshold value of the server responding to the query request is determined;
receiving a first query result returned by the server, wherein the first query result is returned by the server when the server does not detect that the data information is updated within the duration threshold range and is used for indicating that the data information is not updated; or,
and receiving a second query result returned by the server, wherein the second query result carries updated data information and is returned when the server detects that the data information is updated within the duration threshold range.
10. The method of claim 9, wherein the second query result further carries a third version number, the third version number being a version number of the updated data information; the method further comprises the steps of:
and updating the first version number of the data information recorded by the client to a third version number.
11. The method of claim 9, further comprising:
and receiving a third query result returned by the server, wherein the third query result carries the second version number and the data information recorded by the server, and is returned when the server determines that the first version number is inconsistent with the second version number.
12. The method of claim 9, further comprising:
and after receiving a response result returned by the server, initiating a next query request to the server.
13. The method according to any one of claims 9-12, wherein the server is a master node, and the data information is metadata, and is used for the client to find a corresponding service node and perform data reading and writing.
14. A data information updating apparatus comprising:
the receiving module is used for receiving a query request sent by a client, wherein the query request carries a first version number of data information recorded by the client and is used for acquiring the latest data information from a server;
the processing module is used for determining a time length threshold value of the server responding to the query request if the first version number is consistent with the second version number of the data information maintained by the server;
And the sending module is used for sending a first query result to the client to indicate that the data information is not updated if the data information is not detected to be updated within the duration threshold range.
15. A data information updating apparatus comprising:
a sending module, configured to send a query request to a server, where the query request carries a first version number of data information recorded by a client, and is configured to obtain latest data information from the server, so that when the server determines that the first version number is consistent with a second version number of data information maintained by the server, determine a duration threshold value of the server responding to the query request;
the receiving module is used for receiving a first query result returned by the server, wherein the first query result is returned by the server when the server does not detect that the data information is updated within the duration threshold range and is used for indicating that the data information is not updated; or,
and receiving a second query result returned by the server, wherein the second query result carries updated data information and is returned when the server detects that the data information is updated within the duration threshold range.
16. A data information updating system, comprising: at least one client and server, wherein:
the at least one client comprises the data information updating device of claim 15, and is used for initiating a query request for acquiring the latest data information to the server, wherein the query request carries a first version number of the data information recorded by the client;
the server includes the data information updating apparatus of claim 14, configured to determine a duration threshold for the server to respond to the query request when the first version number is determined to be consistent with a second version number of the data information maintained by the server; and if the data information is detected to be updated within the duration threshold range, the latest data information is sent to the client.
17. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any of claims 1-14.
18. A computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of any of claims 1-14.
CN201810941366.7A 2018-08-17 2018-08-17 Data information updating method, device and equipment Active CN110888889B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810941366.7A CN110888889B (en) 2018-08-17 2018-08-17 Data information updating method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810941366.7A CN110888889B (en) 2018-08-17 2018-08-17 Data information updating method, device and equipment

Publications (2)

Publication Number Publication Date
CN110888889A CN110888889A (en) 2020-03-17
CN110888889B true CN110888889B (en) 2023-08-15

Family

ID=69744237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810941366.7A Active CN110888889B (en) 2018-08-17 2018-08-17 Data information updating method, device and equipment

Country Status (1)

Country Link
CN (1) CN110888889B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581239A (en) * 2020-04-10 2020-08-25 支付宝实验室(新加坡)有限公司 Cache refreshing method and electronic equipment
CN113704274B (en) * 2020-05-20 2024-03-19 中国移动通信集团福建有限公司 Data reading method and electronic equipment
CN113296687A (en) * 2020-06-10 2021-08-24 阿里巴巴集团控股有限公司 Data processing method, device, computing equipment and medium
CN111953653A (en) * 2020-07-07 2020-11-17 上海金仕达软件科技有限公司 Data transmission method, system and device
CN111913974B (en) * 2020-07-17 2023-10-27 青岛海信网络科技股份有限公司 Method and server for measuring point configuration of rail transit passenger information system
CN111865687B (en) * 2020-07-20 2023-05-30 上海万物新生环保科技集团有限公司 Service data updating method and device
CN112463259B (en) * 2020-12-18 2023-05-30 杭州搜车网科技有限公司 Configuration information generation method and device, electronic device and medium
CN114598559B (en) * 2021-07-22 2024-06-07 湖南亚信软件有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN116266842A (en) * 2021-12-16 2023-06-20 华为技术有限公司 Data system, data access method and device
CN114448803B (en) * 2022-01-29 2024-06-28 网宿科技股份有限公司 Configuration issuing method, electronic equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6560611B1 (en) * 1998-10-13 2003-05-06 Netarx, Inc. Method, apparatus, and article of manufacture for a network monitoring system
WO2011106087A1 (en) * 2010-02-23 2011-09-01 Thomson Licensing Method for processing auxilary information for topic generation
CN104123238A (en) * 2014-06-30 2014-10-29 海视云(北京)科技有限公司 Data storage method and device
CN104618498A (en) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 Data resource synchronizing method and server
CN105229633A (en) * 2013-03-13 2016-01-06 萨勒斯福斯通讯有限公司 For realizing system, method and apparatus disclosed in data upload, process and predicted query API
CN105302895A (en) * 2015-10-21 2016-02-03 浪潮通用软件有限公司 Data caching synchronization method, server and client side
CN105843895A (en) * 2016-03-22 2016-08-10 北京建飞无限科技有限公司 EhCache-based data querying and synchronizing method, device and system
CN107534584A (en) * 2015-02-27 2018-01-02 加拿大皇家银行 Coordination Treatment is carried out to data by networking computing resource
CN107608689A (en) * 2017-08-07 2018-01-19 阿里巴巴集团控股有限公司 The update method of application program, device and electronic equipment in client
CN107958018A (en) * 2017-10-17 2018-04-24 北京百度网讯科技有限公司 Data-updating method, device and computer-readable medium in caching
CN108234171A (en) * 2016-12-15 2018-06-29 腾讯科技(深圳)有限公司 A kind of data processing method, system and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6560611B1 (en) * 1998-10-13 2003-05-06 Netarx, Inc. Method, apparatus, and article of manufacture for a network monitoring system
WO2011106087A1 (en) * 2010-02-23 2011-09-01 Thomson Licensing Method for processing auxilary information for topic generation
CN105229633A (en) * 2013-03-13 2016-01-06 萨勒斯福斯通讯有限公司 For realizing system, method and apparatus disclosed in data upload, process and predicted query API
CN104123238A (en) * 2014-06-30 2014-10-29 海视云(北京)科技有限公司 Data storage method and device
CN104618498A (en) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 Data resource synchronizing method and server
CN107534584A (en) * 2015-02-27 2018-01-02 加拿大皇家银行 Coordination Treatment is carried out to data by networking computing resource
CN105302895A (en) * 2015-10-21 2016-02-03 浪潮通用软件有限公司 Data caching synchronization method, server and client side
CN105843895A (en) * 2016-03-22 2016-08-10 北京建飞无限科技有限公司 EhCache-based data querying and synchronizing method, device and system
CN108234171A (en) * 2016-12-15 2018-06-29 腾讯科技(深圳)有限公司 A kind of data processing method, system and device
CN107608689A (en) * 2017-08-07 2018-01-19 阿里巴巴集团控股有限公司 The update method of application program, device and electronic equipment in client
CN107958018A (en) * 2017-10-17 2018-04-24 北京百度网讯科技有限公司 Data-updating method, device and computer-readable medium in caching

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张叶春 等.数据库增量更新技术在基础测绘数据更新上的应用.《现代测绘》.2018,41-43. *

Also Published As

Publication number Publication date
CN110888889A (en) 2020-03-17

Similar Documents

Publication Publication Date Title
CN110888889B (en) Data information updating method, device and equipment
EP3221795B1 (en) Service addressing in distributed environment
US20180365085A1 (en) Method and apparatus for monitoring client applications
US10171620B2 (en) Non-transitory computer-readable recording medium having stored therein control program, control apparatus and control method
CN107168775B (en) Method and device for automatically processing suspension affairs
US10754368B1 (en) Method and system for load balancing backup resources
CN114064780A (en) Session information processing method, system, device, storage medium and electronic equipment
CN115587118A (en) Task data dimension table association processing method and device and electronic equipment
CN111614701B (en) Distributed cluster and container state switching method and device
JP7429792B2 (en) Data transmission methods, terminals and computer-readable storage media
CN114285903B (en) Request processing method, device and system and electronic equipment
CN115562933A (en) Processing method and device of operation monitoring data, storage medium and electronic equipment
CN110769017A (en) Data request processing method and device, storage medium and processor
CN111208949B (en) Method for determining data rollback time period in distributed storage system
CN113760854A (en) Method for identifying data in HDFS memory and related equipment
TW201828087A (en) Service node switching method and device for distributed storage system providing logical judgment and data statistics to enhance service availability
CN114510495B (en) Database service data consistency processing method and system
CN112732757B (en) Method, system, device, equipment and storage medium for processing degraded data
CN112543213B (en) Data processing method and device
EP4170518A1 (en) Distributed transaction processing method, terminal and computer readable storage medium
CN114297273A (en) Data extraction method and device
CN113760855A (en) Data storage method and device, electronic equipment and storage medium
CN118349552A (en) Data processing method, processing device, electronic equipment and storage medium
CN118677953A (en) Data processing method and device based on double machine rooms and double activities, computer equipment and medium
CN118282860A (en) File acquisition method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant