CN113986135B - Method, device, equipment and storage medium for processing request - Google Patents

Method, device, equipment and storage medium for processing request Download PDF

Info

Publication number
CN113986135B
CN113986135B CN202111259249.0A CN202111259249A CN113986135B CN 113986135 B CN113986135 B CN 113986135B CN 202111259249 A CN202111259249 A CN 202111259249A CN 113986135 B CN113986135 B CN 113986135B
Authority
CN
China
Prior art keywords
identifier
read
cluster
cluster identifier
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111259249.0A
Other languages
Chinese (zh)
Other versions
CN113986135A (en
Inventor
陈诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111259249.0A priority Critical patent/CN113986135B/en
Publication of CN113986135A publication Critical patent/CN113986135A/en
Application granted granted Critical
Publication of CN113986135B publication Critical patent/CN113986135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems

Abstract

The disclosure provides a method, a device, equipment, a storage medium and a program product for processing a request, which relate to the technical field of artificial intelligence, in particular to the technical fields of cloud computing, distributed storage and the like. The specific implementation scheme is as follows: acquiring a read-write request for target data from a client, wherein the read-write request comprises a first cluster identifier; determining whether the first cluster identifier is consistent with a locally stored second cluster identifier; under the condition that the first cluster identifier is consistent with the second cluster identifier stored locally, performing read-write operation on the target data; and under the condition that the first cluster identifier is inconsistent with the locally stored second cluster identifier, acquiring the action identifier, and processing the read-write request according to the action identifier.

Description

Method, device, equipment and storage medium for processing request
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to the technical fields of cloud computing, distributed storage and the like.
Background
With the development of cloud computing, the data volume processed by a cloud server is larger and larger, and a distributed block storage system is generated. The distributed block storage system may provide low latency, high durability, high reliability, and high resilience block storage services for cloud servers.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, storage medium, and program product for processing a request.
According to an aspect of the present disclosure, there is provided a method of processing a request, including: obtaining a read-write request aiming at target data from a client, wherein the read-write request comprises a first cluster identifier; determining whether the first cluster identifier is consistent with a locally stored second cluster identifier; performing read-write operation on the target data under the condition that the first cluster identifier is consistent with a locally stored second cluster identifier; and under the condition that the first cluster identifier is inconsistent with the locally stored second cluster identifier, acquiring an action identifier, and processing the read-write request according to the action identifier.
According to another aspect of the present disclosure, there is provided a method of processing a request, comprising: acquiring a read-write request for target data from a client; determining a storage block corresponding to the target data; and sending the storage node identifier and the cluster identifier corresponding to the storage block to the client.
According to another aspect of the present disclosure, there is provided a method of processing a request, comprising: sending a first read-write request to a control node; receiving a storage node identifier and a cluster identifier from the control node; generating a second read-write request according to the cluster identifier; and sending the second read-write request to a storage node indicated by the storage node identification.
According to another aspect of the present disclosure, there is provided an apparatus for processing a request, including: the first acquisition module is used for acquiring a read-write request for target data from a client, wherein the read-write request comprises a first cluster identifier; the first determining module is used for determining whether the first cluster identifier is consistent with a locally stored second cluster identifier; the first processing module is used for performing read-write operation on the target data under the condition that the first cluster identifier is consistent with the second cluster identifier stored locally; and the second processing module is used for acquiring an action identifier under the condition that the first cluster identifier is inconsistent with the second cluster identifier stored locally, and processing the read-write request according to the action identifier.
According to another aspect of the present disclosure, there is provided an apparatus for processing a request, including: the second acquisition module is used for acquiring a read-write request for target data from the client; a second determining module, configured to determine a storage block corresponding to the target data; and the second sending module is used for sending the storage node identifier and the cluster identifier corresponding to the storage block to the client.
According to another aspect of the present disclosure, there is provided an apparatus for processing a request, including: a fourth sending module, configured to send a first read-write request to the control node; the second receiving module is used for receiving the storage node identification and the cluster identification from the control node; the generation module is used for generating a second read-write request according to the cluster identifier; and a fifth sending module, configured to send the second read-write request to a storage node indicated by the storage node identifier.
Another aspect of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods shown in the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods shown in the disclosed embodiments.
According to another aspect of the disclosed embodiments, there is provided a computer program product comprising a computer program/instruction, characterized in that the computer program/instruction, when executed by a processor, implements the steps of the method shown in the disclosed embodiments.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic view of an application scenario of a method, apparatus, electronic device, and storage medium for processing a request according to an embodiment of the disclosure;
FIG. 2 schematically illustrates a flow chart of a method of processing a request according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of processing a request according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a method of processing a request according to another embodiment of the disclosure;
FIG. 5 schematically illustrates a flow chart of a method of processing a request according to another embodiment of the disclosure;
FIG. 6 schematically illustrates a schematic diagram of a method of processing a request according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a block diagram of an apparatus for processing a request, in accordance with an embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of an apparatus for processing a request according to another embodiment of the disclosure;
FIG. 9 schematically illustrates a block diagram of an apparatus for processing a request according to another embodiment of the disclosure; and
FIG. 10 schematically illustrates a block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An application scenario of the method and apparatus provided by the present disclosure will be described below with reference to fig. 1.
Fig. 1 is an application scenario schematic diagram of a method, an apparatus, an electronic device, and a storage medium for processing a request according to an embodiment of the present disclosure. It should be noted that fig. 1 illustrates only an example of an application scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments, or scenarios.
As shown in fig. 1, the application scenario 100 includes a terminal device 110 and a storage system 120.
According to embodiments of the present disclosure, a user may interact with the server storage system 120 through a network using the terminal device 110 to receive or transmit messages, etc. The terminal device 110 may have a client 111 installed thereon. The client 111 may be used to process read and write requests by a user.
According to embodiments of the present disclosure, terminal device 110 may be a variety of electronic devices with support for network communications, including but not limited to smartphones, tablets, laptop computers, desktop computers, servers, and the like.
According to an embodiment of the present disclosure, the storage system 120 may include a plurality of clusters 121, each cluster 121 may include a control node 1211 and a plurality of storage nodes 1212. Wherein a control node 1211 may be used to manage the storage nodes 1212 within the same cluster 121. Storage node 1212 may be used to store data for users and provide read-write services.
Storage system 120 may be, for example, a distributed block storage system, according to embodiments of the present disclosure. The user may use the distributed block storage service provided by the distributed block storage system 120 through a virtual machine disposed in the terminal device 110. The storage space in the distributed block storage system 120 may be mapped into a volume, which may be mounted in a virtual machine. Each volume may be split into a number of blocks (blocks), each corresponding to one storage node 1212 in distributed block storage system 120. When a user reads and writes a volume through the terminal device 110, the virtual machine generates a read and write request. The read-write request is forwarded inside the virtual machine to the client 111 of the distributed block store. After receiving the read/write request, the client 111 sends the read/write request to the corresponding control node 1211. The control node 1211 determines which block is specifically read and written, and the storage node 1212 corresponding to the block, according to the read/write request, and sends information such as the node identifier and the cluster identifier of the storage node 1212 to the client 111. After acquiring the node identifier and the cluster identifier of the corresponding storage node 1212, the client 111 encapsulates the cluster identifier in a read-write request, and then sends the cluster identifier to the storage node 1212 to request the storage node 1212 to perform a data read-write operation.
In the technical scheme of the disclosure, the related processes of data collection, storage, use, processing, transmission, provision, disclosure and the like all conform to the regulations of related laws and regulations and do not violate the popular public order.
Fig. 2 schematically illustrates a flow chart of a method of processing a request according to an embodiment of the disclosure.
As shown in fig. 2, the method 200 of processing a request includes operations S210 to S240. The method 200 may be performed, for example, by a storage node as shown above.
In operation S210, a read-write request for target data from a client is acquired.
According to the embodiment of the disclosure, when a user needs to read and write target data, a read and write request for the target data can be sent to a storage node through a client. Wherein the read-write request includes a first cluster identity. The first cluster identifier may be used to indicate a cluster to which the target data corresponds.
Then, in operation S220, it is determined whether the first cluster identity is consistent with the locally stored second cluster identity. In case the first cluster identity is consistent with the locally stored second cluster identity, operation S230 is performed. In case the first cluster identity is inconsistent with the locally stored second cluster identity, operation S240 is performed.
According to an embodiment of the present disclosure, the storage node may have a second cluster identifier pre-stored, and the second cluster identifier may be used to indicate the cluster to which the storage node belongs. By determining whether the first cluster identity is consistent with the locally stored second cluster identity, it may be determined whether the read-write request was sent from a cluster other than the cluster in which the storage node is located.
In operation S230, a read/write operation is performed on the target data.
According to an embodiment of the present disclosure, if the first cluster identity is consistent with the locally stored second cluster identity, the read-write request is processed normally.
In operation S240, the action identifier is acquired, and the read-write request is processed according to the action identifier.
According to embodiments of the present disclosure, a storage node may pre-store an action identifier, which may be used to instruct the storage node how to handle read-write requests that receive cluster identifier inconsistencies. Based on the above, if the first cluster identifier is inconsistent with the locally stored second cluster identifier, corresponding processing operation is executed according to the pre-stored action identifier.
According to the embodiment of the disclosure, whether the read-write request is matched with the storage node is determined by comparing the cluster identifiers in the read-write request, and corresponding processing is executed according to the action identifiers under the condition of no match, so that wrong data access caused by the fact that other clusters are added by mistake in the process of connecting the storage node to the line can be avoided, and the reliability of the storage system can be improved.
As an alternative embodiment, the action identifier may comprise, for example, any one of a rejection identifier and a ignore identifier. Under the condition that the pre-stored action identifier is the neglect identifier, the storage node can ignore the problem that the cluster identifier is not matched, and perform read-write operation on target data corresponding to the read-write request. In the case that the pre-stored action identity is a rejection identity, the storage node may send a rejection message to the client and an alarm message to the control node. The control node may perform an offline operation for the storage node in response to receiving the alert message from the storage node. The client may re-acquire the new storage node after receiving the reject message, re-attempt the read-write.
Fig. 3 schematically illustrates a flow chart of a method of processing a request according to another embodiment of the present disclosure.
As shown in fig. 3, the method 300 of processing a request includes operations S310-S330. The method 300 may be performed, for example, by the control node shown above.
In operation S310, a read-write request for target data from a client is acquired.
According to the embodiment of the disclosure, when a user needs to read and write target data, a read and write request for the target data can be sent to a control node through a client.
In operation S320, a memory block corresponding to the target data is determined.
According to embodiments of the present disclosure, a storage block may be allocated for target data, where the storage block corresponds to one storage node.
In operation S330, a storage node identifier and a cluster identifier corresponding to the storage block are transmitted to the client.
According to the embodiment of the disclosure, the storage node identification of the allocated storage node and the cluster identification of the cluster to which the control node belongs may be sent to the client.
Fig. 4 schematically illustrates a flow chart of a method of processing a request according to another embodiment of the disclosure.
As shown in fig. 4, the method 400 of processing a request includes operations S410 to S440. The method 400 may be performed, for example, by a client as shown above.
In operation S410, a first read-write request is sent to a control node.
In operation S420, a storage node identification and a cluster identification from the control node are received.
In operation S430, a second read-write request is generated according to the cluster identity.
In operation S440, a second read-write request is sent to the storage node indicated by the storage node identification.
According to the embodiment of the disclosure, the control node can return the corresponding storage node identifier and the cluster identifier by sending the first read-write request to the control node. The storage node identification may be used to indicate a storage node assigned to a client. Based on the above, the client may add the cluster identifier to the read-write request, generate a second read-write request, and send the second read-write request to the storage node indicated by the storage node identifier, so as to read and write the data.
As an alternative embodiment, the cluster identity and the action identity of the cluster may be issued by the control node in the cluster to storage nodes in the same cluster. Based on this, fig. 5 schematically shows a flow chart of a method of processing a request according to another embodiment of the present disclosure.
As shown in fig. 5, the method 500 of processing a request may further include the storage node periodically sending a heartbeat request to the control node at operation S510.
Then, in operation S520, the control node transmits the cluster identity and the action identity to the storage node in response to receiving the heartbeat request from the storage node.
In operation S530, the storage node receives the second cluster identity from the control node and stores the second cluster identity locally.
According to embodiments of the present disclosure, the storage node may send heartbeat requests to the corresponding control node at a predetermined frequency. Wherein, the preset frequency can be set according to actual needs. Illustratively, in this embodiment, the predetermined frequency may be once a minute. After receiving the heartbeat request from the storage node, the control node sends the latest cluster identifier and the action identifier to the storage node. Thus, the cluster identity and the action identity in the storage node may be kept synchronized with the cluster identity and the action identity in the control node.
The method of handling requests shown above is further described with reference to FIG. 6 in connection with an exemplary embodiment. Those skilled in the art will appreciate that the following example embodiments are merely for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Fig. 6 schematically illustrates a schematic diagram of a method of processing a request according to an embodiment of the disclosure.
As shown in fig. 6, the method 600 of processing a request may include the client sending a first read-write request to a control node in operation S610.
In operation S620, the control node receives a read-write request for target data from the client. A memory block corresponding to the target data is determined.
In operation S630, the control node transmits a storage node identifier and a cluster identifier corresponding to the storage block to the client.
In operation S640, the client receives a storage node identification and a cluster identification from the control node. And generating a second read-write request according to the cluster identification.
In operation S650, the client transmits a second read-write request to the storage node indicated by the storage node identification.
In operation S660, the storage node acquires a read-write request for target data from the client. It is determined whether the first cluster identity is consistent with the locally stored second cluster identity. In case the first cluster identity is not consistent with the locally stored second cluster identity, operation S670 is performed. In case the first cluster identity is consistent with the locally stored second cluster identity, operation S680 is performed.
In operation S670, the storage node acquires the action identifier, and if the action identifier includes the rejection identifier, operations S690 to S6100 are performed. In case the action identity includes an ignore identity, operation S680 is performed.
In operation S680, the storage node performs read-write operation on the target data, and sends the read-write result to the client.
In operation S690, the storage node transmits a rejection message to the client.
In operation S6100, the storage node transmits an alarm message to the control node.
According to an embodiment of the present disclosure, all requests of a cluster are uniquely identified by setting a cluster identification. When the storage node receives the read-write request, the cluster identifiers in the read-write request are compared to determine whether the read-write request is matched with the storage node, and corresponding processing is executed according to the action identifiers under the condition of no matching, so that the storage node can be prevented from accessing data of other clusters in the online and offline process, and the reliability of the storage system can be improved.
Fig. 7 schematically illustrates a block diagram of an apparatus for processing a request according to an embodiment of the disclosure.
As shown in fig. 7, the apparatus 700 for processing a request includes a first acquisition module 710, a first determination module 720, a first processing module 730, and a second processing module 740.
The first obtaining module 710 is configured to obtain a read-write request for target data from a client, where the read-write request includes a first cluster identifier.
A first determining module 720 is configured to determine whether the first cluster identifier is consistent with the locally stored second cluster identifier.
The first processing module 730 is configured to perform a read/write operation on the target data when the first cluster identifier is consistent with the locally stored second cluster identifier.
And the second processing module 740 is configured to obtain the action identifier and process the read-write request according to the action identifier when the first cluster identifier is inconsistent with the locally stored second cluster identifier. According to an embodiment of the present disclosure, the action identity includes any one of a rejection identity and a ignore identity. The second processing module may include an acquisition sub-module, a sending sub-module, and a read-write sub-module. The acquisition sub-module is used for acquiring the action identifier. And the sending sub-module is used for sending a rejection message to the client and sending an alarm message to the control node under the condition that the action identifier comprises the rejection identifier. And the read-write sub-module is used for performing read-write operation on the target data corresponding to the read-write request under the condition that the action identifier comprises the neglect identifier.
According to an embodiment of the disclosure, the apparatus may further include a first transmitting module and a first receiving module. The first sending module is used for periodically sending a heartbeat request to the control node. The first receiving module is used for receiving the second cluster identification from the control node and storing the second cluster identification to the local.
Fig. 8 schematically illustrates a block diagram of an apparatus for processing a request according to another embodiment of the disclosure.
As shown in fig. 8, the apparatus 800 for processing a request includes a second acquisition module 810, a second determination module 820, and a second transmission module 830.
A second obtaining module 810 is configured to obtain a read-write request for the target data from the client.
And a second determining module 820 for determining a memory block corresponding to the target data.
And the second sending module 830 is configured to send the storage node identifier and the cluster identifier corresponding to the storage block to the client.
According to an embodiment of the disclosure, the apparatus may further include a third sending module configured to send the cluster identifier and the action identifier to the storage node in response to receiving the heartbeat request from the storage node.
According to an embodiment of the disclosure, the apparatus may further include a offline module for performing an offline operation for the storage node in response to receiving the alarm message from the storage node.
Fig. 9 schematically illustrates a block diagram of an apparatus for processing a request according to another embodiment of the disclosure.
As shown in fig. 9, the apparatus 900 for processing a request includes a fourth transmitting module 910, a second receiving module 920, a generating module 930, and a fifth transmitting module 940.
A fourth sending module 910, configured to send the first read-write request to the control node.
A second receiving module 920 is configured to receive the storage node identifier and the cluster identifier from the control node.
The generating module 930 is configured to generate a second read-write request according to the cluster identifier.
A fifth sending module 940 is configured to send a second read-write request to the storage node indicated by the storage node identifier.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 10 schematically illustrates a block diagram of an example electronic device 1000 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the apparatus 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Various components in device 1000 are connected to I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and communication unit 1009 such as a network card, modem, wireless communication transceiver, etc. Communication unit 1009 allows device 1000 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The computing unit 1001 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the respective methods and processes described above, for example, a method of processing a request. For example, in some embodiments, the method of processing a request may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1000 via ROM 1002 and/or communication unit 1009. When a computer program is loaded into RAM 1003 and executed by computing unit 1001, one or more steps of the method of processing a request described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the method of processing the request in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service (Virtual Private Server or VPS for short) are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (6)

1. A method of processing a request, comprising:
obtaining a read-write request aiming at target data from a client, wherein the read-write request comprises a first cluster identifier;
determining whether the first cluster identifier is consistent with a locally stored second cluster identifier;
performing read-write operation on the target data under the condition that the first cluster identifier is consistent with a locally stored second cluster identifier; and
under the condition that the first cluster identifier is inconsistent with a locally stored second cluster identifier, acquiring an action identifier, and processing the read-write request according to the action identifier;
wherein the action identifier comprises any one of a rejection identifier and an neglect identifier; the processing the read-write request according to the action identifier in the request comprises the following steps:
sending a rejection message to the client and sending an alarm message to a control node under the condition that the action identifier comprises a rejection identifier; and
and under the condition that the action identifier comprises an neglect identifier, performing read-write operation on the target data corresponding to the read-write request.
2. The method of claim 1, further comprising:
periodically sending a heartbeat request to a control node; and
and receiving a second cluster identifier from the control node, and storing the second cluster identifier to the local.
3. An apparatus for processing a request, comprising:
the first acquisition module is used for acquiring a read-write request for target data from a client, wherein the read-write request comprises a first cluster identifier;
the first determining module is used for determining whether the first cluster identifier is consistent with a locally stored second cluster identifier;
the first processing module is used for performing read-write operation on the target data under the condition that the first cluster identifier is consistent with the second cluster identifier stored locally; and
the second processing module is used for acquiring an action identifier and processing the read-write request according to the action identifier under the condition that the first cluster identifier is inconsistent with a locally stored second cluster identifier;
wherein the action identifier comprises any one of a rejection identifier and an neglect identifier; the second processing module includes:
the acquisition sub-module is used for acquiring the action identifier;
a sending sub-module, configured to send a rejection message to the client and send an alarm message to a control node when the action identifier includes a rejection identifier; and
and the read-write sub-module is used for performing read-write operation on the target data corresponding to the read-write request under the condition that the action identifier comprises the neglect identifier.
4. The apparatus of claim 3, further comprising:
the first sending module is used for periodically sending a heartbeat request to the control node; and
the first receiving module is used for receiving a second cluster identifier from the control node and storing the second cluster identifier to the local.
5. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-2.
6. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-2.
CN202111259249.0A 2021-10-27 2021-10-27 Method, device, equipment and storage medium for processing request Active CN113986135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111259249.0A CN113986135B (en) 2021-10-27 2021-10-27 Method, device, equipment and storage medium for processing request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111259249.0A CN113986135B (en) 2021-10-27 2021-10-27 Method, device, equipment and storage medium for processing request

Publications (2)

Publication Number Publication Date
CN113986135A CN113986135A (en) 2022-01-28
CN113986135B true CN113986135B (en) 2023-08-15

Family

ID=79742984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111259249.0A Active CN113986135B (en) 2021-10-27 2021-10-27 Method, device, equipment and storage medium for processing request

Country Status (1)

Country Link
CN (1) CN113986135B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115576437B (en) * 2022-09-28 2023-07-14 北京百度网讯科技有限公司 Configuration method of key function and input device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647797A (en) * 2013-11-15 2014-03-19 北京邮电大学 Distributed file system and data access method thereof
CN110909379A (en) * 2019-11-08 2020-03-24 浪潮电子信息产业股份有限公司 Storage cluster permission determination method, device, equipment and storage medium
CN113157812A (en) * 2021-05-21 2021-07-23 湖南快乐阳光互动娱乐传媒有限公司 Method and system for synchronizing distributed multi-cluster state class data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019219954A (en) * 2018-06-20 2019-12-26 株式会社日立製作所 Cluster storage system, data management control method, and data management control program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647797A (en) * 2013-11-15 2014-03-19 北京邮电大学 Distributed file system and data access method thereof
CN110909379A (en) * 2019-11-08 2020-03-24 浪潮电子信息产业股份有限公司 Storage cluster permission determination method, device, equipment and storage medium
CN113157812A (en) * 2021-05-21 2021-07-23 湖南快乐阳光互动娱乐传媒有限公司 Method and system for synchronizing distributed multi-cluster state class data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种面向视频监控的云存储系统设计与实现;施朗;艾雄军;马方方;;电子技术与软件工程(08);全文 *

Also Published As

Publication number Publication date
CN113986135A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
CN113986135B (en) Method, device, equipment and storage medium for processing request
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN115514718B (en) Data interaction method, control layer and equipment based on data transmission system
CN116540938A (en) Data reading method, device, distributed storage system, equipment and storage medium
CN115103024B (en) Sequence number generation method and device, electronic equipment and storage medium
CN115086347B (en) Data synchronization method, device, electronic equipment and storage medium
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN113641688A (en) Node updating method, related device and computer program product
CN113726885A (en) Method and device for adjusting flow quota
CN113595870B (en) Push message processing method and device, electronic equipment and storage medium
CN113360689B (en) Image retrieval system, method, related device and computer program product
CN115174447B (en) Network communication method, device, system, equipment and storage medium
CN114449031B (en) Information acquisition method, device, equipment and storage medium
CN115168440A (en) Data read-write method, distributed storage system, device, equipment and storage medium
CN116939228A (en) Distributed processing method, device and equipment for remote sensing image and storage medium
CN113934581A (en) Method and device for acquiring disk fault information of storage system, electronic equipment and medium
CN116708362A (en) Communication address processing method, device, equipment and storage medium
CN117608879A (en) Message queue processing method and device, electronic equipment and storage medium
CN115794734A (en) Method, device and equipment for performing read-write operation on file storage system
CN117596288A (en) Message transmission method and device, electronic equipment and storage medium
CN116521739A (en) Data processing method and device and electronic equipment
CN115913954A (en) Cluster management information interaction method, device, equipment and storage medium
CN115686911A (en) Server-side self-checking method and device, electronic equipment and storage medium

Legal Events

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