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

Data information updating method, device and equipment Download PDF

Info

Publication number
CN110888889A
CN110888889A CN201810941366.7A CN201810941366A CN110888889A CN 110888889 A CN110888889 A CN 110888889A CN 201810941366 A CN201810941366 A CN 201810941366A CN 110888889 A CN110888889 A CN 110888889A
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.)
Granted
Application number
CN201810941366.7A
Other languages
Chinese (zh)
Other versions
CN110888889B (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

Images

Abstract

The application discloses a data information updating method, a data information updating device and data information updating equipment. The method comprises the following steps: receiving an inquiry request sent by a client, wherein the inquiry request carries a first version number of data information recorded by the client; and 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 server determines the response overtime duration threshold of the query request, and the problem that the server is overloaded and the stability of the system is affected is solved.

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 updating means that the client reads the latest data information from the server and performs local adaptive updating.
Currently, the client generally obtains the latest data information by periodically polling the server or restarting the client. The former has a difficult adjustment of the polling time interval, and the latter has a large impact on the client traffic.
Therefore, a more reliable data information update scheme is required.
Disclosure of Invention
The embodiment of the specification provides a data information updating method, a data information updating device and data information updating equipment, which are used for providing a reliable data information updating scheme.
An embodiment of the present specification further provides a data information updating method, including:
receiving an inquiry request sent by a client, wherein the inquiry 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 a second version number of the data information maintained by the server, determining a time length threshold value of the server responding to the query request;
and if the data information is not detected to be updated within the time threshold range, sending a first query result to the client to indicate that the data information is not updated.
An embodiment of the present specification further provides a data information updating method, including:
sending an inquiry request to a server, wherein the inquiry request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server so as to determine a time length threshold value of the server responding to the inquiry request when the server determines that the first version number is consistent with a second version number of the data information maintained by the server;
receiving a first query result returned by the server, wherein the first query result is returned when the server does not detect that the data information is updated within the time length threshold range and is used for indicating that the data information is not updated; alternatively, the first and second electrodes may be,
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 time length threshold range.
An embodiment of the present specification further provides a data information updating apparatus, including:
the receiving module is used for receiving an inquiry request sent by a client, wherein the inquiry 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 a 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.
An embodiment of the present specification further provides a data information updating apparatus, including:
the sending module is used for sending an inquiry request to a server, wherein the inquiry request carries a first version number of data information recorded by a client, and is used for obtaining latest data information from the server so as to determine a time length threshold value of the server for responding to the inquiry request when the server determines that the first version number is consistent with a second version number of the data information maintained by the server;
the receiving module is used for receiving a first query result returned by the server, wherein the first query result is returned 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 time length threshold range.
An embodiment of the present specification further provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving an inquiry request sent by a client, wherein the inquiry 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 a second version number of the data information maintained by the server, determining a time length threshold value of the server responding to the query request;
and if the data information is not detected to be updated within the time 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 including a plurality of application programs, cause the electronic device to perform operations comprising:
receiving an inquiry request sent by a client, wherein the inquiry 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 a second version number of the data information maintained by the server, determining a time length threshold value of the server responding to the query request;
and if the data information is not detected to be updated within the time threshold range, sending a first query result to the client to indicate that the data information is not updated.
An embodiment of the present specification further provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
sending an inquiry request to a server, wherein the inquiry request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server so as to determine a time length threshold value of the server responding to the inquiry request when the server determines that the first version number is consistent with a second version number of the data information maintained by the server;
receiving a first query result returned by the server, wherein the first query result is returned when the server does not detect that the data information is updated within the time length threshold range and is used for indicating that the data information is not updated; alternatively, the first and second electrodes may be,
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 time length 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 including a plurality of application programs, cause the electronic device to perform operations comprising:
sending an inquiry request to a server, wherein the inquiry request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server so as to determine a time length threshold value of the server responding to the inquiry request when the server determines that the first version number is consistent with a second version number of the data information maintained by the server;
receiving a first query result returned by the server, wherein the first query result is returned when the server does not detect that the data information is updated within the time length threshold range and is used for indicating that the data information is not updated; alternatively, the first and second electrodes may be,
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 time length threshold range.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
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 to determine whether the data information recorded by the client and the server is the same; if yes, the server determines a duration threshold value for responding to the query request of the client, and further sends a query result to the client if the data information is not updated within the duration threshold value range so as to inform the client that the data information is not updated. Compared with the prior art, the method and the system have the advantages that when the data information is not updated, the server does not respond to the query request immediately, and the server records the query request and determines the timeout duration threshold of the response of the query request of the client, so that the aims of indirectly regulating and controlling the query rate of the client, reducing the load of the server and improving the stability of the system are fulfilled.
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 application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1a is a schematic diagram of an application scenario provided herein;
FIG. 1b is a schematic diagram of another application scenario provided herein;
FIG. 1c is a schematic diagram of the interaction of a client, a master node, and a service node provided in the present specification;
fig. 2 is a schematic flowchart of a method for updating metadata information of a cloud disk at a master node side according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a method for updating metadata information of a cloud disk according to another embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a method for updating cloud disk metadata information at a client side according to an embodiment of the present specification;
fig. 5 is a flowchart illustrating a method for updating cloud disk metadata information at a client side according to another embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a cloud disk metadata information updating apparatus on a master node side according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a cloud disk metadata information updating apparatus on a client side according to an embodiment of the present specification;
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 described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As stated in the background section, the periodic polling of the server means that the polling time interval is difficult to adjust, and if the time interval is too large, there is a problem that the acquired data information is delayed; if the time interval is too small, the problem that too many requests result in heavy server load exists; the manner of restarting the client needs to stop the data read-write link between the client and the server, which has a large influence on the service of the client.
Taking a distributed storage system for storing cloud disk metadata information as an example, the following is an exemplary description of 'local update' and its defects in the background art:
in a distributed block storage system, a host node typically maintains cloud disk metadata information (e.g., information about cloud disk size, partitions, and corresponding service nodes). Before executing read-write operation, the client needs to request the main node to acquire metadata information and perform local adaptive updating, and then finds out a service node based on the metadata information and executes the read-write operation. When the cloud disk is expanded, the metadata information maintained by the main node changes, but the client is difficult to update the locally recorded cloud disk metadata information synchronously, so that the read-write operation can be continued based on the previous metadata information, and further, read-write errors can be caused.
Based on the above, the present invention provides a data information updating method, wherein a time length threshold responding to a query request of a client is determined by comparing a version number of data information recorded by the client with a version number of data information maintained by a server, when it is determined that the data information recorded by the client and the data information recorded by the server are the same, and if the data information is not updated within the time length threshold, a query result is sent to the client to notify the client 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, and records the query request and determines the time threshold for responding to the query request, so that the aims of indirectly regulating and controlling the query rate of the client, reducing the load of the main node and improving the stability of the system are fulfilled.
The following exemplifies an application scenario of the present invention.
Referring to fig. 1a, an application scenario includes: a 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 the query request and comparing the first version number with a second version number of the data information maintained by the server, and if the first version number and the second version number are consistent, the time length threshold value of the server responding to the query request is determined; if the data information is not detected to be updated within the time threshold range, sending a first query result to the client to indicate that the data information is not updated; and if the first version number is not consistent with the second version number, or if the data information is detected to be updated within the time length threshold range, sending the updated data information to the client so that the client can update the locally recorded data information.
The time length threshold value for responding to the query request may refer to a time point at which the server receives the query request as a first time point, a time point at which the server responds to the query request as a second time point, and a time length between the first time point and the second time point; the time point for responding to the query request specified by the protocol is a first time point, the time point for the server to actually respond to the query request is a second time point, and the time length between the first time point and the second time point can also be referred to.
Optionally, the implementation manner of the server determining the time threshold for the server to respond to the query request may be:
the greater the load on the server, the greater the threshold of duration for responding to query requests.
Based on this, as the server load fluctuates, the time threshold for responding 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 immediately responds to the query request to return the latest data information, so that the influence on the client to update the data information in time is avoided.
Optionally, the first query result further carries the second version number, so that the client updates the version number of the locally recorded data information, and carries the second version number in a next query request.
Optionally, after receiving the response result returned by the server, the client initiates a next query request to the server.
Based on the method, the server can be ensured to record the query request from each client at almost any time, and furthermore, when the data information is updated, the updated data information can be timely sent to each client in response to the recorded query request.
In addition, for convenience of subsequent description, a server is exemplified as a master node of the distributed storage system, data information is exemplified as metadata-cloud disk metadata information, and an application scenario corresponding to this example is described in detail below:
referring to fig. 1b, the exemplary application scenario 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 that a user can 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 receiving the service of the read-write request of the client in the distributed storage system.
With reference to fig. 1c, the interaction process between the three may be:
the client sends a query request to the host node to request the latest cloud disk metadata information, and sends a read-write request to a specified service node based on the latest cloud disk metadata information;
when determining that the metadata information of the cloud disk is updated, the main node responds to the query request and sends the latest metadata information to the client;
and the service node responds to the read-write request to provide 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 receiving the service of the read-write request of the user.
The cloud disk is a professional internet storage tool, is a product of internet cloud technology, and provides services such as storage, reading and downloading of information for enterprises and individuals through the internet.
Metadata, also called intermediate data and relay data, is data describing data (data about data), and is mainly information describing data property (property) for supporting functions such as indicating storage location, history data, resource search, file record, and the like. Metadata is an electronic catalog, and in order to achieve the purpose of creating a catalog, the contents or features of data must be described and collected, so as to achieve the purpose of assisting 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 the example are described in detail below with reference to the accompanying drawings:
fig. 2 is a schematic flowchart of a method for updating metadata information of a cloud disk on a master node side according to an embodiment of the present specification, and referring to fig. 2, the method may be executed by the master node in fig. 1b or fig. 1c, and specifically may include the following steps:
step 220, receiving an inquiry request sent by a client, wherein the inquiry request carries a first version number of the cloud disk metadata information recorded by the client and is used for acquiring the latest cloud disk metadata information from the main node;
the version number of the cloud disk metadata information is used for distinguishing the metadata information after each update.
It is understood that, in order to identify the change condition of the metadata information of the cloud disk, the host node updates the version number each time the metadata information is updated. The implementation mode can be as follows:
taking a value as the version number, and adding 1 to the value every time the metadata information is updated, further, whether the metadata information recorded by the client and the host node are consistent can be determined based on the version number, for example: the larger the value, the larger the number of updates.
Step 240, if the first version number is consistent with a second version number of the cloud disk metadata information maintained by the master node, determining a time length threshold value of the master node for responding to the query request;
it should be understood that, if the version number is a numerical value, the numerical values of the first version number and the second version number may be compared, and if the numerical values are the same, it is determined that the two are the same, which indicates that the cloud disk metadata information recorded by the master node is the same as the cloud disk metadata information recorded by the client, and it is further determined that no new metadata information is returned to the client at the master node, further, in order to reduce the load pressure of the master node, the response to the query request may not be as timely, for example: a time duration threshold for responding to the query request may be determined based on load information of the master node. The specific response mode may be:
the current load information of the main node is firstly obtained from the main node load statistical module, and a time length threshold value is calculated based on the load information, and the time length which is used as the time length that the response time of the query request cannot exceed is possibly several minutes or hours.
The method for determining the duration threshold may be as follows: the larger the load of the master node, the larger the time 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, configuring a response timeout duration threshold for the query request based on the master node load is flexibly configurable, for example: the load is proportional to the duration threshold, and is not limited herein.
Step 260, if it is not detected that the cloud disk metadata information is updated within the duration threshold range, sending a first query result to the client to indicate that the cloud disk metadata information is not updated.
It is understood 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.
If yes, go to step 260. The first query result carries the second version number, where the second version number is used by the client to determine whether the version of the cloud disk metadata information is updated, for example: and when the client compares that the first version number is consistent with the second version number, the client determines that the cloud disk metadata information is not updated.
If not, namely that the cloud disk metadata information is detected to be updated within the time length threshold range, sending a second query result to the client, wherein the second query result carries the updated cloud disk metadata information, so that the client can update the locally recorded cloud disk metadata information.
In order to reduce the amount of data that needs to be transmitted between the master node and the client, further, the embodiment further provides a scheme for transmitting only the updated part of the metadata information, which specifically includes:
the cloud disk metadata information comprises a plurality of metadata information groups, and each metadata information group has an independent sub-version number; that is, when the metadata information is updated, the master node needs to determine which metadata information groups are updated, and update the sub-version number of the updated metadata information group and the overall version number of the metadata information.
Based on the above, the main node obtains the client and records the sub-version number of each metadata information group; 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 main node;
and the cloud disk metadata information carried by the second query result is the metadata information of the target metadata information group, so that the client can update locally recorded metadata information corresponding to the target metadata information group.
As to how to divide the metadata information into a plurality of metadata information groups, the implementation manner is not limited here, and it is preferable that the metadata information with close logical relationship is divided into one group.
Optionally, when it is detected that the cloud disk metadata information is updated and before the second query result is sent 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 client can be updated to record the version number of the locally recorded cloud disk metadata information, that is, the local first version number of the client is replaced by the third version number.
And synchronously updating the sub-version number of the target metadata information group, and carrying the sub-version number in a second query result so as to update the locally recorded sub-version number of the target metadata information group by the client.
Optionally, the implementation manner of determining the time threshold for the server to respond to the query request may be:
a timer is set with the time point of receiving the inquiry request as the starting time (or the time point of responding overtime as the starting time) and the time threshold as the ending time. When the timer is triggered (overtime), determining that a duration threshold is reached; when the timer is not triggered, it is determined that the duration threshold has not been reached.
Alternatively, the first and second electrodes may be,
the main node updates the waiting response time length of the query request periodically in real time, compares the size relationship between the waiting response time length and the time length threshold value, and if the former is smaller than the latter, the main node does not reach the time length threshold value; if the former is equal to the latter, it is said that the duration threshold is reached. The response waiting duration refers to the length of time that the query request has been waiting for the response of the server by the current time point.
As can be seen, in the embodiment, the version number of the cloud disk metadata information recorded by the client is compared with the version number of the cloud disk metadata information maintained by the host node to determine whether the cloud disk metadata information recorded by the client is the same; and if the cloud disk metadata information is not updated within the time length threshold range, sending an inquiry result to the client to inform the client that the cloud disk metadata information is not updated. Compared with the prior art, the method and the system have the advantages that when the data information is not updated, the server does not respond to the query request immediately, the server records the query request and determines the response time threshold based on the load condition of the main node, the query rate of the client is indirectly regulated and controlled, 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 schematic flowchart of a method for updating metadata information of a cloud disk on a master node side according to another embodiment of the present specification, referring to fig. 3, where the method may be executed by the master node in fig. 1b or fig. 1c, and specifically includes the following steps:
step 302, receiving an inquiry request sent by a client, wherein the inquiry 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 a second version number maintained by the main node or not;
if yes, go to step 306;
that is, if the two are equal, it means that the metadata information recorded by the master node and the client is the same, and the master node does not need to transmit new metadata information to the client. Thus, taking into account the load stress of the master node, there may be no need to respond to the query request urgently.
If not, go to step 316;
that is, if the two are not equal, it indicates that the metadata information recorded by the master node and 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 inequality is generally that the first version number lags behind the second version number (or the former is smaller than the latter, or the update time corresponding to the first version number lags behind the update time of the second version number), therefore, the master node needs to transmit the currently recorded metadata information and the second version number to the client, so that the client replaces the locally recorded metadata information and the first version number with the metadata information and the second version number transmitted by the master node, respectively.
Step 306, determining a time length threshold value for responding to the query request based on the load information of the main node;
step 308, whether the waiting response time reaches a time threshold value or not;
if yes, go to step 318; if not, go to step 310;
step 310, waiting for updating of metadata information;
step 312, whether the metadata information is updated or not;
if yes, go to step 314; if not, go to 308;
step 314, updating the version number;
step 316, returning the latest metadata information and version number to the client;
step 318, returning the second version number to the client;
for steps 308 to 318, it is understood that, after determining the timeout threshold for responding to the query request, the master node updates the response waiting duration 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 back the updated version number and the updated metadata information to the client so as to update the locally recorded version number and the metadata information of the client; and if the metadata information is not updated within the time period when the waiting response time reaches the time threshold, feeding back a second version number currently recorded by the main node to the client so as to ensure that the metadata information does not need to be updated when the client compares that the first version number is consistent with the second version number.
Optionally, in order to reduce the amount of data that needs to be transmitted between the master node and the client, further, the embodiment further provides a method for transmitting only the updated part of the metadata information, which specifically includes:
the cloud disk metadata information comprises a plurality of metadata information groups, and each metadata information group has an independent sub-version number; that is, when the metadata information is updated, the master node needs to determine which metadata information groups are updated, and update the sub-version number of the updated metadata information group and the overall version number of the metadata information.
Based on the above, the main node obtains the client and records the sub-version number of each metadata information group; 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 main node;
the latest metadata information sent to the client is the metadata information of the target metadata information group, so that the client can update the locally recorded metadata information corresponding to the target metadata information group.
It can be seen that the present embodiment, based on the above steps 302-318, can solve the following problems occurring in the prior art:
aiming at the load problem of the main node, the main node determines the timeout time for responding to the query request according to the load condition of the main node so as to indirectly regulate and control the query rate per second (qps) of the client query, and compared with the prior art of periodically polling the main node to obtain the latest metadata information, the method can avoid a large amount of useless work corresponding to frequent polling, reduce the load pressure of the main node, and further easily cope with the pressure caused when the number of users sharing the cloud disk increases;
aiming at the problem of stability of read-write service, because the main node can set a response time length threshold value for the query request, the main node side can ensure that one query request exists at any client at almost any time, and further, when the cloud disk metadata information is updated, the main node side can directly respond to the query request and timely inform the client. Compared with the prior art that the cloud disk is opened again after the client side waits for the error in reading and writing, 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 this embodiment does not need to execute the command in two steps, but after the host node successfully updates the metadata information, the host node responds to the query request to automatically push the latest metadata information to the client.
Fig. 4 is a schematic flowchart of a method for updating cloud disk metadata information at a client side according to an embodiment of the present specification, and referring to fig. 4, the method may be executed by the client in fig. 1b or fig. 1c, and specifically includes 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 time length threshold value for 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 the cloud disk metadata information is updated within a predetermined time threshold range, and is used to indicate that the cloud disk metadata information is not updated;
and 406, determining that the cloud disk metadata information is not updated based on the first query result.
With respect to steps 402-406, it will be appreciated that the client has a thread in the background for initiating query requests to the host node and waiting for responses from the host node. After receiving the response, the client compares whether the metadata information recorded by the main node is different from the metadata information recorded locally by the client based on the query result, and if so, the metadata information recorded locally is updated. Based on this, the subsequent read-write request can access the latest service node. If the data is the same, the cloud disk metadata information is not updated. After receiving the response, the client immediately initiates the next query request, and repeats the above process.
If the metadata information is not updated, the next query request carries the original first version number; and if the metadata information is updated, carrying the updated version number in the next query request.
Accordingly, the host node also has a thread in the background for processing query requests. And after receiving the query request, checking whether the version number of the metadata information carried by the query request is consistent with the version number of the metadata information locally recorded by the main node. If not, immediately responding to the query request and returning a query result, wherein the query result carries the latest metadata information and the version number thereof; if so, a timer is started. Before timeout, if the metadata information is updated (at the moment, the version number is also updated), an inquiry result is returned immediately in response to the inquiry request, and the inquiry result carries the latest metadata information and the version number thereof. When the overtime is triggered, the 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 disk metadata information is updated within the time threshold range, and the second query result carries the updated cloud disk metadata information;
and updating locally recorded cloud disk 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 host node detects that the cloud disk 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 the second version number and cloud disk metadata information recorded by the master node;
and updating the locally recorded cloud disk metadata information and the version number of the cloud disk metadata information based on the third query result.
Optionally, the cloud disk metadata information includes a plurality of metadata information groups; the cloud disk metadata information carried by the third query result is metadata information of a target metadata information group recorded by the main node, and 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 disk metadata information;
wherein updating locally recorded cloud disk metadata information based on the third query result comprises:
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 enable the master node side to always have a query request initiated by the client, the method further includes: and after receiving the query result sent by the main node, sending a second query request to the main node, wherein the second query request carries the latest version number of the cloud disk metadata information recorded by the client.
It can be seen that, in this embodiment, by sending an inquiry request to the master node, the master node notifies the client of the version number of the cloud disk data information recorded by the master node, so that the master node determines, based on its own load condition, a time-out threshold value for responding to the inquiry request when determining that the cloud disk metadata information recorded by the master node and the cloud disk metadata information are the same, so as to reduce overload of the master node and improve system stability; in addition, in this 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; moreover, the main node can immediately reply the query result when the metadata information is updated, so that the client cannot be influenced to update the metadata information in time.
Fig. 5 is a schematic flowchart of a method for updating cloud disk metadata information at a client side according to another embodiment of the present disclosure, and referring to fig. 5, the method may be executed by the client in fig. 1b or fig. 1c, and specifically includes the following steps:
step 502, sending a first query request 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 response of the master node;
step 506, whether the metadata information is updated or not;
if yes, go to step 508; if not, go to step 512;
step 508, updating the metadata information and version number of the local record;
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 to 512, it is understood that after the response of the master node is waited, whether the metadata information is updated is determined based on the query result, if yes, the metadata information and the version number thereof recorded locally are updated based on the latest metadata information and the version number thereof carried by the query result, and read-write access is initiated to the service node based on the latest metadata information; if not, read-write access is still initiated to the service node based on the locally recorded metadata information.
It can be seen that, in the embodiment, after the query request is initiated, the query result of the master node is waited, so that a query request in an unresponsive state is almost always kept on the master node side, and further, when the metadata information is updated, the master node responds to the query request and notifies the client in time, so as 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 described as a series of acts or combinations, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts or steps described, as some steps may be performed in other orders or simultaneously according to the present invention. Furthermore, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Fig. 6 is a schematic structural diagram of a cloud disk metadata information updating apparatus on a master node side according to an embodiment of this specification, and referring to fig. 6, the apparatus may be a part of the master node in fig. 1b or fig. 1c, and specifically may include: a receiving module 61, a processing module 62 and a transmitting module 63, wherein:
a receiving module 61, configured to receive an inquiry request sent by a client, where the inquiry request carries a first version number of cloud disk metadata information recorded by the client, and is used to obtain latest cloud disk metadata information from the master node;
a processing module 62, configured to determine, based on the load information of the host node, a time length threshold for responding to the query request if the first version number is consistent with a second version number of the cloud disk metadata information maintained by the host node;
a sending module 63, configured to send a first query result to the client if it is not detected that the cloud disk metadata information is updated within the duration threshold range, so as to indicate that the cloud disk metadata information is not updated.
Optionally, the first query result carries the second version number, so that the client determines that the cloud disk metadata information is not updated when comparing that the first version number is consistent with the second version number.
Optionally, the sending module 63 is further configured to:
if the cloud disk metadata information is detected to be updated within the time threshold range, sending a second query result to the client;
and the second query result carries updated cloud disk metadata information so that the client can update locally recorded cloud disk 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 client to record the version number of the locally recorded cloud disk metadata information.
Optionally, the sending module 63 is further configured to:
and if the first version number is not consistent 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 cloud disk metadata information recorded by the main node, so that the client can update the locally recorded cloud disk metadata new and the new version number of the cloud disk metadata.
Wherein the cloud disk metadata information includes a plurality of metadata information groups; correspondingly, the sending module 63 is specifically configured to, if the first version number is not consistent with the second version number, obtain a sub-version number of each metadata information group recorded by the client and the host 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 main node;
and the cloud disk metadata information carried by the third query result is the metadata information of the target metadata information group, so that the client can update locally recorded metadata information corresponding to the target metadata information group.
The processing module 62 is specifically configured to:
the larger the load of the master node is, the larger the time threshold for responding to the query request is.
As can be seen, in the embodiment, the version number of the cloud disk metadata information recorded by the client is compared with the version number of the cloud disk metadata information maintained by the host node to determine whether the cloud disk metadata information recorded by the client is the same; and if the cloud disk metadata information is not updated within the time length threshold range, sending an inquiry result to the client to inform the client that the cloud disk metadata information is not updated. Compared with the prior art, the method and the system have the advantages that when the data information is not updated, the server does not respond to the query request immediately, the server records the query request and can determine the response time threshold based on the load condition, the query rate of the client side is indirectly regulated and controlled, the overload of the main node is reduced, and the system stability is improved.
Fig. 7 is a schematic structural diagram of a cloud disk metadata information updating apparatus on a client side according to an embodiment of the present disclosure, referring to fig. 7, where the apparatus may be a part of the client in fig. 1b or fig. 1c, and specifically includes: a sending 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 disk metadata information recorded by the client, and is used to obtain 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 cloud disk metadata information maintained by the master node, a time length threshold for the master node to respond to the first query request is determined;
a receiving module 72, 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 the cloud disk metadata information is updated within a threshold range of a predetermined time length, and is used to indicate that the cloud disk metadata information is not updated;
a determining module 73, configured to determine that the cloud disk 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, where the second query result is sent when the master node detects that the cloud disk metadata information is updated within the time threshold range, and the second query result carries the updated cloud disk metadata information;
and updating locally recorded cloud disk metadata information based on the second query result.
The second query result also carries a third version number, and the third version number is obtained by updating the second version number when the host 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 the second version number and cloud disk metadata information recorded by the master node; and updating the locally recorded cloud disk metadata information and the version number of the cloud disk metadata information based on the third query result.
Wherein the cloud disk metadata information includes a plurality of metadata information groups; the cloud disk metadata information carried by the third query result is metadata information of a target metadata information group recorded by the main node, and 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 disk metadata information;
the receiving module 72 is specifically configured to:
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 main node, sending a second query request to the main node, wherein the second query request carries the latest version number of the cloud disk metadata information recorded by the client.
It can be seen that, in this embodiment, an inquiry request is sent to a master node to notify the master node of the version number of cloud disk data information recorded by a client, so that the master node determines a time threshold for responding to the inquiry request based on its own load condition when determining that cloud disk metadata information recorded by the master node and the cloud disk metadata information are the same, thereby reducing the overload of the master node and improving the system stability; in addition, in this 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; moreover, the main node can immediately reply the query result when the metadata information is updated, so that the client cannot be influenced to update the metadata information in time.
In addition, as for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment. Further, it should be noted that, among the respective components of the apparatus of the present invention, the components thereof are logically divided according to the functions to be realized, but the present invention is not limited thereto, and the respective components may be newly divided or combined as necessary.
Fig. 8 is a schematic structural diagram of an electronic device provided in 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 non-volatile memory, and may also include hardware required by other services. The processor reads a corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the cloud disk metadata information updating device on a logic level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
The network interface, the processor and the memory may be interconnected by a bus system. The bus may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
The memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. The Memory may include a Random-Access Memory (RAM) and may also include 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 an inquiry request sent by a client, wherein the inquiry 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 a second version number of the data information maintained by the server, determining a time length threshold value of the server responding to the query request;
if the data information is not detected to be updated within the time threshold range, sending a first query result to the client to indicate that the data information is not updated;
alternatively, the first and second electrodes may be,
the method comprises the steps that a main node receives an inquiry request sent by a client, wherein the inquiry 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 main node;
if the first version number is consistent with a second version number of the cloud disk metadata information maintained by the main node, determining a time length threshold value of the main node responding to the query request;
and if the cloud disk metadata information is not detected to be updated within the time threshold range, sending a first query result to the client to indicate that the cloud disk metadata information is not updated.
The method performed by the cloud disk metadata information updating apparatus or manager (Master) node according to the embodiment shown in fig. 6 of the present application may be applied to 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 instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed 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 directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The cloud disk metadata information updating apparatus may also perform the methods of fig. 2-3 and implement the methods performed by the administrator node.
Based on the same invention creation, the embodiment of the present application further provides a computer readable storage medium storing one or more programs, which when executed by an electronic device including a plurality of application programs, cause the electronic device to execute the cloud disk metadata information updating method provided by the corresponding embodiment of fig. 2 to 3.
Fig. 9 is a schematic structural diagram of an electronic device provided in 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 non-volatile memory, and may also include hardware required by other services. The processor reads a corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the cloud disk metadata information updating device on a logic level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
The network interface, the processor and the memory may be interconnected by a bus system. The bus may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
The memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. The Memory may include a Random-Access Memory (RAM) and may also include 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:
sending an inquiry request to a server, wherein the inquiry request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server so as to determine a time length threshold value of the server responding to the inquiry request when the server determines that the first version number is consistent with a second version number of the data information maintained by the server;
receiving a first query result returned by the server, wherein the first query result is returned when the server does not detect that the data information is updated within the time length threshold range and is used for indicating that the data information is not updated; alternatively, the first and second electrodes may be,
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 time length threshold range;
alternatively, the first and second electrodes may be,
the method comprises the steps that a client sends a first query request to a main node, wherein the query request carries a first version number of cloud disk metadata information recorded by the client and is used for obtaining latest cloud disk metadata information from the main node so that when the main node determines that the first version number is consistent with a second version number of the cloud disk metadata information maintained by the main node, a time length threshold value of the main node responding to the first query request is determined;
receiving a first query result sent by the master node, wherein the first query result is sent when the master node does not detect that the cloud disk metadata information is updated within a preset time threshold range and is used for indicating that the cloud disk metadata information is not updated;
determining that the cloud disk metadata information is not updated based on the first query result;
and when the first version number is consistent with a second version number of the cloud disk metadata information maintained by the main node, the time length threshold is determined based on the load information of the main node.
The method performed by the cloud disk metadata information updating apparatus or manager (Master) node according to the embodiment of fig. 7 of the present application may be applied to 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 instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed 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 directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The cloud disk metadata information updating apparatus may also perform the methods of fig. 4-5 and implement the methods performed by the administrator node.
Based on the same inventive creation, the present application also provides a computer-readable storage medium storing one or more programs, which when executed by an electronic device including a plurality of application programs, cause the electronic device to execute the cloud disk metadata information updating method provided by the corresponding embodiment of fig. 4-5.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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 may also be possible or may be advantageous.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, 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 above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (18)

1. A data information updating method comprises the following steps:
receiving an inquiry request sent by a client, wherein the inquiry 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 a second version number of the data information maintained by the server, determining a time length threshold value of the server responding to the query request;
and if the data information is not detected to be updated within the time 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 time length threshold value range, sending a second query result to the client;
and the second query result carries updated data information.
4. The method of claim 3, wherein, after detecting that the data information is updated, prior to sending a second query result to the client, the method further comprises:
updating the second version number to obtain a third version number;
and 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 not consistent 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 threshold length of time for which the server responds to the query request comprises:
the larger the load of the server, the larger the time threshold for responding to the query request.
7. The method according to any one of claims 1 to 6, wherein the server is a master node, and the data information is metadata and is used for the client to find out a corresponding service node and perform data reading and writing.
8. The method of claim 7, wherein the data information comprises a plurality of data information sets;
if the first version number is not consistent with the second version number, the method further comprises:
acquiring the sub-version numbers of all data information groups recorded by the client and the server;
determining a target data information group in each data information group, wherein the target data information group is a data information group with different sub-version numbers recorded by the client and the server;
and 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 locally recorded data information corresponding to the target data information group.
9. A data information updating method comprises the following steps:
sending an inquiry request to a server, wherein the inquiry request carries a first version number of data information recorded by a client and is used for acquiring latest data information from the server so as to determine a time length threshold value of the server responding to the inquiry request when the server determines that the first version number is consistent with a second version number of the data information maintained by the server;
receiving a first query result returned by the server, wherein the first query result is returned when the server does not detect that the data information is updated within the time length threshold range and is used for indicating that the data information is not updated; alternatively, the first and second electrodes may be,
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 time length threshold range.
10. The method of claim 9, wherein the second query result further carries a third version number, and the third version number is a version number of the updated data information; the method further comprises the following steps:
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 data information recorded by the server, and is returned when the first version number is determined to be inconsistent with the second version number for the server.
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 to 12, wherein the server is a master node, and the data information is metadata and is used for the client to find out a corresponding service node and perform data reading and writing.
14. A data information updating apparatus comprising:
the receiving module is used for receiving an inquiry request sent by a client, wherein the inquiry 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 a 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:
the sending module is used for sending an inquiry request to a server, wherein the inquiry request carries a first version number of data information recorded by a client, and is used for obtaining latest data information from the server so as to determine a time length threshold value of the server responding to the inquiry request when the server determines that the first version number is consistent with a second version number of the data information maintained by the server;
the receiving module is used for receiving a first query result returned by the server, wherein the first query result is returned 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; alternatively, the first and second electrodes may be,
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 time length threshold range.
16. A data information update system, comprising: at least one client and a server, wherein:
the at least one client includes the data information updating apparatus of claim 15, configured to initiate an inquiry request for obtaining the latest data information to the server, where the inquiry request carries a first version number of the data information recorded by the client;
the server comprises the data information updating device of claim 14, configured to determine a time threshold for the server to respond to the query request when it is determined that the first version number is consistent with the second version number of the data information maintained by the server; and if the data information is detected to be updated within the time length threshold value range, sending the latest data information to the client.
17. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of any one of claims 1-14.
18. A computer readable storage medium storing one or more programs which, when executed by an electronic device including 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 true CN110888889A (en) 2020-03-17
CN110888889B 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)

Cited By (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
CN111865687A (en) * 2020-07-20 2020-10-30 上海悦易网络信息技术有限公司 Service data updating method and equipment
CN111913974A (en) * 2020-07-17 2020-11-10 青岛海信网络科技股份有限公司 Method and server for measuring point configuration of rail transit passenger information system
CN111953653A (en) * 2020-07-07 2020-11-17 上海金仕达软件科技有限公司 Data transmission method, system and device
CN112463259A (en) * 2020-12-18 2021-03-09 杭州搜车网科技有限公司 Configuration information generation method, device, electronic device and medium
CN113296687A (en) * 2020-06-10 2021-08-24 阿里巴巴集团控股有限公司 Data processing method, device, computing equipment and medium
CN113704274A (en) * 2020-05-20 2021-11-26 中国移动通信集团福建有限公司 Data reading method and electronic equipment
CN114448803A (en) * 2022-01-29 2022-05-06 网宿科技股份有限公司 Configuration issuing method, electronic equipment and storage medium
CN114598559A (en) * 2021-07-22 2022-06-07 湖南亚信软件有限公司 Data processing method and device, electronic equipment and computer readable storage medium
WO2023109864A1 (en) * 2021-12-16 2023-06-22 华为技术有限公司 Data system, and data access method and device

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 (5)

* Cited by examiner, † Cited by third party
Title
MING LI 等: "Influence of temporal delay and display update rate in an augmented reality application scenario" *
YI-SHIANG TZENG 等: "Event Duration Detection on Microblogging" *
张叶春 等: "数据库增量更新技术在基础测绘数据更新上的应用" *
李慧莲 等: "寻呼成功率优化方法探讨" *
谭光玮 等: "基于CDC机制的数据仓库实时数据更新方法研究" *

Cited By (13)

* 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
CN113704274A (en) * 2020-05-20 2021-11-26 中国移动通信集团福建有限公司 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
CN111913974A (en) * 2020-07-17 2020-11-10 青岛海信网络科技股份有限公司 Method and server for measuring point configuration of rail transit passenger information system
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
CN111865687A (en) * 2020-07-20 2020-10-30 上海悦易网络信息技术有限公司 Service data updating method and equipment
CN112463259A (en) * 2020-12-18 2021-03-09 杭州搜车网科技有限公司 Configuration information generation method, device, electronic device and medium
CN114598559A (en) * 2021-07-22 2022-06-07 湖南亚信软件有限公司 Data processing method and device, electronic equipment and computer readable storage medium
WO2023109864A1 (en) * 2021-12-16 2023-06-22 华为技术有限公司 Data system, and data access method and device
CN114448803A (en) * 2022-01-29 2022-05-06 网宿科技股份有限公司 Configuration issuing method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110888889B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN110888889B (en) Data information updating method, device and equipment
CN108683516B (en) Application instance upgrading method, device and system
TWI685226B (en) Service addressing method and device in decentralized environment
WO2018177239A1 (en) Service processing and consensus method and device
WO2017140131A1 (en) Data writing and reading method and apparatus, and cloud storage system
US10511480B2 (en) Message flow management for virtual networks
US10846185B2 (en) Method for processing acquire lock request and server
JP6859340B2 (en) Equipment, systems and methods for retrieving, processing and updating global information
JP2019502202A (en) Method and apparatus for upgrading a distributed storage system
CN110895484A (en) Task scheduling method and device
CN107168775B (en) Method and device for automatically processing suspension affairs
US11397632B2 (en) Safely recovering workloads within a finite timeframe from unhealthy cluster nodes
CN110895483A (en) Task recovery method and device
US11934665B2 (en) Systems and methods for ephemeral storage snapshotting
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN110895486A (en) Distributed task scheduling system
US11930292B2 (en) Device state monitoring method and apparatus
CN113301173A (en) Domain name updating system and method, message forwarding method and server
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
CN113064732A (en) Distributed system and management method thereof
US20230385159A1 (en) Systems and methods for preventing data loss
JP7429792B2 (en) Data transmission methods, terminals and computer-readable storage media
JP2020119018A (en) Information processing system, information processing device and program
CN114064780A (en) Session information processing method, system, device, storage medium and electronic equipment
CN114296909A (en) Automatic node capacity expansion and reduction method and system according to kubernets event

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