Alarm method and device, electronic equipment and storage medium

By introducing a non-invasive dialing device in the cloud host, detecting and comparing the write and read results in the data path, the problems of data security and user experience in the cloud host are solved, and the rapid discovery and processing of data path exceptions are achieved. function.

CN119003291APending Publication Date: 2024-11-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310562132.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2024-11-22

Smart Images

  • Figure CN119003291A_ABST
    Figure CN119003291A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm method and device, electronic equipment and a storage medium, which can be applied to various scenes such as cloud technology, artificial intelligence, smart traffic and Internet of Vehicles, the method is applied to a dial testing device in a cloud host, and the cloud host comprises a virtual machine and the dial testing device. The method comprises the following steps: sending a write request of preset data to first block equipment in data processing equipment; receiving a write completion message sent by the first block device, wherein the write completion message is a message generated after the first block device writes the preset data; sending a reading request of preset data to the first block device; receiving a data reading result sent by the first block device; comparing preset data with the data reading result to obtain a comparison result; and if the comparison result is a comparison inconsistent result, alarm information is sent to the operation and maintenance system. The dial testing device is a non-invasive bypass device, and the security of the data channel of the block device used for storing the user data in the cloud host in the dial testing process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an alarm method, device, electronic device and storage medium. Background Art

[0002] Cloud hosts in data centers generally use block devices in distributed storage warehouses as storage media. The read and write access of stored data has a long data path. The characteristics of long data paths increase the risk of block device data security. Block devices based on the virtio general virtualization protocol do not have a unified end-to-end data protection solution or protocol. Currently, there are several commonly used end-to-end data protection solutions: one is to modify the general virtio protocol and add data verification protection functions; the other is to use new protocols, such as the NVMe protocol.

[0003] Both modifying the general virtio protocol and adopting the NVMe protocol can solve the data security issues faced by cloud host block devices. However, both solutions require replacing the existing protocol and invading the user data in the cloud host, affecting the experience of client users and reducing the security of the data channel of the block device in the cloud host used to store client user data. Summary of the invention

[0004] The present application provides an alarm method, device, electronic device and storage medium, which can introduce a non-invasive dial-up test device in a cloud host, and separately set up a block device corresponding to the dial-up test device to test the data path in the cloud host, thereby improving the security of the data channel of the block device used to store client user data in the cloud host, and can quickly discover the abnormality of the data path in the cloud host.

[0005] On the one hand, the present application provides an alarm method, which is applied to a dialing device in a cloud host, the cloud host includes a virtual machine and the dialing device, and the method includes:

[0006] Sending a write request for preset data to a first block device in a data processing device; the data processing device is connected to the cloud host in communication; the data processing device includes the first block device and a second block device; the first block device is connected to the dialing device in communication, and the second block device is connected to the virtual machine in communication; the first block device is constructed based on the second block device; the second block device is used to store data of the target object;

[0007] receiving a write completion message sent by the first block device, where the write completion message is a message generated after the first block device writes the preset data;

[0008] Sending a read request to the first device;

[0009] receiving a data reading result sent by the first block device; the data reading result is data read by the first block device based on the read request;

[0010] Comparing the preset data with the data reading result to obtain a comparison result;

[0011] If the comparison result is an inconsistent comparison result, an alarm message is sent to the operation and maintenance system; the alarm message indicates that the data path in the cloud host is abnormal.

[0012] On the other hand, an alarm device is provided, the device is applied to a dialing device in a cloud host, the cloud host includes a virtual machine and the dialing device, and the alarm device includes:

[0013] A write request sending module is used to send a write request for preset data to a first block device in a data processing device; the data processing device is connected to the cloud host in communication; the data processing device includes the first block device and a second block device; the first block device is connected to the dialing device in communication, and the second block device is connected to the virtual machine in communication; the first block device is constructed based on the second block device; the second block device is used to store data of the target object;

[0014] a message receiving module, configured to receive a write completion message sent by the first block device, wherein the write completion message is a message generated after the first block device writes the preset data;

[0015] A read request sending module, used for sending a read request to the first block device;

[0016] a read result sending module, configured to receive a data read result sent by the first block device; the data read result is data read by the first block device based on the read request;

[0017] A comparison module, used for comparing the preset data and the data reading result to obtain a comparison result;

[0018] The alarm module is used to send an alarm message to the operation and maintenance system if the comparison result is an inconsistent comparison result; the alarm message indicates that the data path in the cloud host is abnormal.

[0019] In an exemplary embodiment, the alarm device further comprises:

[0020] A region identification determination module, used to determine the target region identification corresponding to the current dialing test cycle based on the period identification mapping relationship; the period identification mapping relationship represents the corresponding relationship between the region identification and the dialing test cycle; the region identification is the identification of the data region in the first device;

[0021] A data construction module, configured to construct the preset data based on the target capacity of the target area corresponding to the target area identifier; the memory occupied by the preset data is less than or equal to the target capacity;

[0022] A request generation module, configured to generate the write request based on the target area identifier and the preset data;

[0023] In an exemplary embodiment, the write request sending module includes:

[0024] A request sending unit is used to send a write request for the preset data to the target area in the first block device based on the target area identifier.

[0025] In an exemplary embodiment, the alarm device further comprises:

[0026] An acquisition request sending module, used for sending a device identification acquisition request to the first block device;

[0027] A device identification receiving module, configured to receive a device identification sent by the first device; the device identification is determined based on the device identification acquisition request;

[0028] The request sending unit comprises:

[0029] The execution subunit is used to execute a write request for sending the preset data to the target area in the first block device when the device identifier is a preset identifier.

[0030] In an exemplary embodiment, the alarm device further comprises:

[0031] an identification acquisition module, used to acquire area identifications corresponding to a plurality of data areas in the first block device, wherein the plurality of data areas are obtained by partitioning the first block device based on a preset number of partitions;

[0032] A dial test cycle determination module, used to determine the dial test cycles corresponding to the multiple data areas;

[0033] The relationship building module is used to build the cycle identifier mapping relationship according to the area identifier corresponding to each data area and the dialing test cycle.

[0034] In an exemplary embodiment, the comparison module includes:

[0035] A data header determination unit, used to determine the data headers corresponding to the preset data and the data reading result;

[0036] A first data segment determining unit, configured to determine a data result corresponding to each data header in the preset data, and obtain a first data segment corresponding to the preset data;

[0037] A second data segment determining unit, configured to determine a data result corresponding to each data header in the data reading result, and obtain a second data segment corresponding to the data reading result;

[0038] a verification result determination unit, configured to process the first data segment based on a verification algorithm to obtain a first verification result, and to process the second data segment based on the verification algorithm to obtain a second verification result;

[0039] A comparison unit is used to compare the first verification result and the second verification result to obtain the comparison result.

[0040] In an exemplary embodiment, the verification result determination unit includes:

[0041] A first determining subunit, configured to determine a checksum of each data in the first data segment based on a check algorithm to obtain the first check result;

[0042] The second determination subunit is used to determine the checksum of each data in the second data segment based on the check algorithm to obtain the second check result.

[0043] In an exemplary embodiment, if the comparison result is an inconsistent comparison result, the alarm device further includes:

[0044] An instruction generation module is used to generate a virtual machine migration instruction based on the inconsistent comparison result; the virtual machine migration instruction is used to migrate the virtual machine from the cloud host to the target host.

[0045] In an exemplary embodiment, the alarm device further comprises:

[0046] A snapshot request generation module, used for generating a snapshot construction request based on the comparison inconsistent result;

[0047] The snapshot request sending module is used to send a snapshot building request to the second block device, so that the second block device creates a snapshot of the second block device based on the snapshot building request.

[0048] In an exemplary embodiment, if the comparison result is an inconsistent comparison result, the alarm device further includes:

[0049] A cycle determination module, used to determine the next dial test cycle corresponding to the current dial test cycle;

[0050] An identification determination module, used to determine the identification of the area to be tested corresponding to the next dialing test cycle based on the cycle identification mapping relationship;

[0051] A request update module, used for generating an update write request based on the identification of the area to be tested;

[0052] An update request sending module is used to send the update write request to the area to be tested in the first block device based on the area to be tested identifier; the area to be tested is the area corresponding to the area to be tested identifier.

[0053] On the other hand, an alarm device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the alarm method as described above.

[0054] On the other hand, a computer storage medium is provided, wherein the computer storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the alarm method as described above.

[0055] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the alarm method as described above.

[0056] The alarm method, device, electronic device and storage medium provided by the present application have the following technical effects:

[0057] The present application sends a write request of preset data to the first block device in the data processing device; the data processing device is connected to the cloud host in communication; the data processing device includes a first block device and a second block device; the first block device is connected to the dialing device in communication, and the second block device is connected to the virtual machine in communication; the first block device is constructed based on the second block device; the second block device is used to store the data of the target object; receive the write completion message sent by the first block device, the write completion message is a message generated after the first block device writes the preset data; send a read request of preset data to the first block device; receive the data reading result sent by the first block device; the data reading result is the data read by the first block device based on the read request; compare the preset data and the data reading result to obtain the comparison result; if the comparison result is an inconsistent comparison result, send an alarm message to the operation and maintenance system; the alarm message indicates that the data path in the cloud host is abnormal. The present application introduces a non-invasive dialing device in the cloud host, and separately sets a block device corresponding to the dialing device to test the data path in the cloud host, thereby improving the security of the data channel of the block device used to store client user data in the cloud host, and can quickly discover the abnormality of the data path in the cloud host and issue an alarm in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions and advantages of the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 is a schematic diagram of an alarm system provided by an embodiment of this specification;

[0060] Figure 2 It is a flowchart of an alarm method provided by an embodiment of this specification;

[0061] Figure 3 is a flowchart of a method for generating the write request based on the target area identifier and the preset data provided in an embodiment of this specification;

[0062] Figure 4 It is a flowchart of a method for constructing a period identifier mapping relationship provided in an embodiment of this specification;

[0063] Figure 5 It is a flowchart of a method for obtaining a device identification provided in an embodiment of this specification;

[0064] Figure 6It is a flowchart of a method for comparing the preset data and the data reading result to obtain a comparison result provided by an embodiment of this specification;

[0065] Figure 7 This is a schematic diagram of a data header format provided in an embodiment of this specification;

[0066] Figure 8 is a flowchart of a method for sending an update write request to a tested area in the first block device provided by an embodiment of the present specification;

[0067] Fig. 9 It is a structural diagram of an alarm system provided in an embodiment of this specification;

[0068] Fig.10 It is a flowchart of an alarm method based on an alarm system provided in an embodiment of this specification;

[0069] Fig.11 It is a structural diagram of an alarm device provided in an embodiment of this specification;

[0070] Fig.12 It is a structural diagram of a server provided in an embodiment of this specification. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0072] First, some nouns or terms that appear in the description of the embodiments of this specification are explained as follows:

[0073] DPU (Data Process Unit): Data processing unit, smart network card

[0074] NVMe (Non-Volatile Memory Express): Non-Volatile Memory Host Controller Interface Specification

[0075] VM (Virtual Machine): Virtual Machine

[0076] Virtio: Paravirtualization solution interface specification, widely used in cloud computing.

[0077] Block device: A type of input / output (I / O) device that manages and controls a computer. It stores information in blocks of fixed size. Each block has its own address and can read data of a certain length at any location in the device, such as a hard disk, USB flash drive, SD card, etc.

[0078] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0079] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0080] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0081] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0082] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0083] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0084] See also Figure 1 , Figure 1 is a schematic diagram of an alarm system provided in an embodiment of this specification, such as Figure 1 As shown, the alarm system may include at least a server 01 and a client 02 .

[0085] Specifically, in the embodiments of this specification, the server 01 may include an independently operated server, or a distributed server, or a server cluster composed of multiple servers, and may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 01 may include a network communication unit, a processor, a memory, and the like. Specifically, the server 01 can be used to write data and read data in the first device and compare the written data with the read data, and generate an alarm message based on the inconsistent comparison results.

[0086] Specifically, in the embodiments of this specification, the client 02 may include physical devices such as smart phones, desktop computers, tablet computers, laptop computers, digital assistants, smart wearable devices, smart speakers, vehicle terminals, smart TVs, etc., and may also include software running in physical devices, such as web pages provided by some service providers to users, or applications provided by these service providers to users. Specifically, the client 02 may be used to display alarm information.

[0087] The following introduces an alarm method of this application. Figure 2 It is a flowchart of an alarm method provided in an embodiment of this specification. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only execution order. When the actual system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment). The specific method is applied to a dialing device in a cloud host, and the cloud host includes a virtual machine and the dialing device, such as Figure 2 As shown, the method may include:

[0088] S201: Send a write request for preset data to a first block device in a data processing device; the data processing device includes the first block device and a second block device; the first block device is communicatively connected to the dialing device, and the second block device is communicatively connected to the virtual machine; the first block device is constructed based on the second block device; the second block device is used to store data of a target object.

[0089] In the embodiment of the present specification, the cloud host includes a virtual machine and a dialing device, which is an independent process in the cloud host and a non-invasive bypass device. It sends a data read and write request to the first block device, and its operation does not affect other second block devices on the cloud host. Block devices are a type of input / output (I / O) devices that manage and control computers. They store information in blocks of fixed size. Each block has its own address and can also read data of a certain length at any position of the device, such as a hard disk, a USB flash drive, an SD card, etc. The data processing device (DPU) includes two block devices, namely a first block device and a second block device, wherein the first block device is a block device set for the dialing device; the first block device is connected to the dialing device in communication, and the second block device is connected to the virtual machine in communication; the second block device can be one or more; the first block device is constructed based on the second block device; the first block device can be constructed based on the configuration information of the second block device; the second block device is used to store the data of the target object; the target object can be a user corresponding to the client; the first block device is used to perform a dialing test; thereby separating the block devices used for testing and for storing user data to avoid affecting the stability of user data during the test process.

[0090] In the embodiments of this specification, Figure 3 As shown, before sending a write request for preset data to the first block device in the data processing device, the method further includes:

[0091] S301: Determine the target area identifier corresponding to the current dial test cycle based on the cycle identifier mapping relationship; the cycle identifier mapping relationship represents the corresponding relationship between the area identifier and the dial test cycle; the area identifier is the identifier of the data area in the first device;

[0092] In an embodiment of the present specification, before sending a write request for preset data to the first device in the data processing device, the target area identifier corresponding to the current dialing test cycle can also be determined based on a pre-constructed cycle identifier mapping relationship; wherein the cycle identifier mapping relationship represents the correspondence between the area identifier and the dialing test cycle; different data areas can be tested in different dialing test cycles; the area identifier is the identifier of the data area in the first device; the first device may include multiple data areas, the capacity of each data area may be the same or different, and each data area is set with a corresponding area identifier; the area identifier may be a character, an image, etc.; for example, the area identifier may be sector a.

[0093] In the embodiments of this specification, Figure 4 As shown, the method for constructing the period identifier mapping relationship includes:

[0094] S401: Obtaining area identifiers corresponding to a plurality of data areas in the first device, wherein the plurality of data areas are obtained by partitioning the first device based on a preset number of partitions;

[0095] In an embodiment of the present specification, the cloud host can pre-set a preset number of partitions and / or a preset partition capacity, and partition the first device according to the preset number of partitions and / or the preset partition capacity, and construct a region identifier for each data area; during the application process, the region identifiers corresponding to each of the multiple data areas in the first device can be obtained.

[0096] S403: Determine the dial test cycles corresponding to the multiple data areas;

[0097] In the embodiments of the present specification, the dialing test time period can be determined first, and then the dialing test time period can be divided into multiple dialing test cycles. The number of dialing test cycles can be determined according to the data area. The dialing test order of each data area can be determined first, and then the dialing test cycle corresponding to each data area can be determined according to the dialing test order of each data area.

[0098] S405: Construct the cycle identifier mapping relationship according to the area identifier corresponding to each data area and the dialing test cycle.

[0099] In the embodiment of the present specification, the period identifier mapping relationship may be constructed according to the area identifier corresponding to each data area and the dialing test cycle; in the period identifier mapping relationship, the area identifier and the dialing test cycle may be in a one-to-one relationship.

[0100] S303: constructing the preset data based on the target capacity of the target area corresponding to the target area identifier; the memory occupied by the preset data is less than or equal to the target capacity;

[0101] In the embodiment of the present specification, the target area corresponding to the target area identifier can be determined, and then the storage capacity corresponding to the target area can be obtained to obtain the target capacity; according to the target capacity, preset data is set. Since the preset data is the data that needs to be written to the target area, the memory occupied by the preset data is less than or equal to the target capacity.

[0102] S305: Generate the write request based on the target area identifier and the preset data.

[0103] In the embodiment of the present specification, a write request corresponding to the preset data may be generated according to the target area identifier and the preset data; the write request is used to write the preset data in the target area.

[0104] In the embodiment of this specification, the sending of a write request for preset data to a first block device in the data processing device includes:

[0105] Based on the target area identifier, a write request for the preset data is sent to the target area in the first block device.

[0106] In the embodiment of this specification, the first device can be divided into multiple data areas, and then each data area can be dialed and tested in turn. Specifically, the target area can be determined according to the current dialing test cycle; and then a write request for the preset data is sent to the target area.

[0107] In the embodiments of this specification, Figure 5 As shown, before sending the write request for the preset data to the target area in the first block device, the method further includes:

[0108] S2001: Sending a device identification acquisition request to the first device;

[0109] In an embodiment of the present specification, a corresponding first block device may be pre-set in the cloud host for the dialing device. During the communication process, the dialing device only interacts with the first block device. The dialing device may verify the device identifier of the first block device before sending a write request to the first block device, thereby determining whether the first block device is the dialing block device set for the dialing device.

[0110] S2003: receiving a device identification sent by the first device; the device identification is determined based on the device identification acquisition request;

[0111] In the embodiment of the present specification, after receiving the device identification acquisition request, the first block device may acquire the attribute information of the first block device and acquire the device identification from the attribute information.

[0112] In the embodiment of the present specification, the sending of the write request for the preset data to the target area in the first block device includes:

[0113] In a case where the device identifier is a preset identifier, a write request for sending the preset data to the target area in the first block device is executed.

[0114] In an embodiment of the present specification, after constructing a dialing test apparatus and a first device, a preset identifier of the first device can be constructed, and the preset identifier of the first device can be sent to the dialing test apparatus; after receiving the device identifier, the device identifier can be compared with the preset identifier to verify the first device, and when it is determined that the device identifier is the preset identifier, a write request for sending the preset data to the target area in the first device is executed, thereby improving the accuracy of the first device and improving the dialing test efficiency.

[0115] In the embodiment of the present specification, before sending the write request for the preset data to the target area in the first block device, the method further includes:

[0116] Sending a device identification acquisition request to a candidate block device in the data processing device; the candidate block device is any device in the data processing device;

[0117] If the device identifier of the candidate block device is a preset identifier, the candidate block device is determined as the first block device.

[0118] In an embodiment of the present specification, a device identification acquisition request can be sent to each block device in the data processing device, the device identification of each block device can be obtained in turn, and the device identification can be compared with a preset identification, so that the first block device can be quickly screened out from multiple candidate block devices.

[0119] S203: Receive a write completion message sent by the first block device, where the write completion message is a message generated after the first block device writes the preset data.

[0120] In the embodiment of the present specification, the first block device can write preset data in the first block device based on the write request, and after the data writing is completed, a write completion message is generated, and the write completion message is fed back to the dialing device. If the data writing fails, a write failure message is generated and sent to the dialing device, and the dialing device sends the write failure message to the operation and maintenance system.

[0121] In an embodiment of the present specification, if the write request is a request sent to the target area in the first block device, the first block device writes the preset data in the target area, the write completion message is a message generated after the first block device writes the preset data, and the write completion message is a message corresponding to the target area.

[0122] S205: Send a read request to the first block device.

[0123] In an embodiment of the present specification, the dialing device can generate a read request after receiving a write completion message; in a dialing cycle, the read request and the area in the first block device targeted by the write request are the same; if the write request is a request sent to the target area in the first block device, then the read request is also a request sent to the target area in the first block device.

[0124] S207: Receive a data reading result sent by the first block device; the data reading result is data read by the first block device based on the read request.

[0125] In the embodiment of the present specification, after receiving the read request, the first block device can read the data in the first block device to obtain the data reading result. If the read request is a data reading request for the target area, the data stored in the target area of ​​the first block device is read.

[0126] S209: Compare the preset data and the data reading result to obtain a comparison result.

[0127] In the embodiment of the present specification, after receiving the data reading result, the data reading result may be compared with the preset data corresponding to the write request to determine whether the two are consistent and obtain a comparison result.

[0128] In the embodiments of this specification, Figure 6 As shown, the preset data and the data reading result are compared to obtain a comparison result, including:

[0129] S2091: Determine the data headers corresponding to the preset data and the data reading result;

[0130] In the embodiments of this specification, the preset data and the data reading result may include two parts: a data header and a data segment. In an exemplary embodiment, Figure 7 As shown, Figure 7 This is a schematic diagram of the data header format, in which the parameter magic is fixed. Magic is a lightweight display interface component developed with JavaScript scripts, which has the advantages of high performance, small code size, and support for multiple initialization methods. The parameter io_num records the serial number of the data segment; the parameters time_sec (seconds) and time_nsec (nanoseconds) record the timestamp of the IO write request; the parameter sector_num records the disk sector serial number corresponding to the data segment; checksum records the checksum of the data segment data, which can be generated by algorithms such as parity check and crc check.

[0131] S2093: Determine a data result corresponding to each data header in the preset data, and obtain a first data segment corresponding to the preset data;

[0132] In the embodiment of the present specification, the data result corresponding to each data header in the preset data may be determined as the first data segment corresponding to the preset data.

[0133] S2095: Determine a data result corresponding to each data header in the data reading result, and obtain a second data segment corresponding to the data reading result;

[0134] In an embodiment of the present specification, the data result corresponding to each data header in the data reading result can be determined as the second data segment corresponding to the data reading result; the second data segment has the same data format as the first data segment. The data of the first data segment and the second data segment are randomly generated.

[0135] S2097: Processing the first data segment based on a verification algorithm to obtain a first verification result, and processing the second data segment based on the verification algorithm to obtain a second verification result;

[0136] In the embodiments of the present specification, the check algorithm may include but is not limited to a parity check algorithm, a Hamming code check algorithm, a cyclic redundancy check algorithm (CRC), etc.; the check algorithms for the first data segment and the second data segment are consistent, the first data segment can be processed by the check algorithm to obtain a first check result, and the second data segment can be processed according to the same check algorithm to obtain a second check result; the data format of the first check result is consistent with that of the second check result.

[0137] In an exemplary embodiment, the processing the first data segment based on a verification algorithm to obtain a first verification result, and the processing the second data segment based on the verification algorithm to obtain a second verification result includes:

[0138] Determine the checksum of each data in the first data segment based on the check algorithm to obtain the first check result;

[0139] Based on the verification algorithm, a checksum of each data in the second data segment is determined to obtain the second verification result.

[0140] In the embodiment of the present specification, a checksum of each data in the first data segment can be calculated by a check algorithm to obtain the first check result; and a checksum of each data in the second data segment can be calculated to obtain the second check result.

[0141] S2099: Compare the first verification result and the second verification result to obtain the comparison result.

[0142] In the embodiment of the present specification, the first verification result and the second verification result can be compared. If the comparison between the two is consistent, it means that there is no abnormality; if the comparison between the two is inconsistent, it means that there is a risk problem in the data path of the cloud host.

[0143] S2011: If the comparison result is an inconsistent comparison result, an alarm message is sent to the operation and maintenance system; the alarm message indicates that the data path in the cloud host is abnormal.

[0144] In the embodiment of the present specification, if the first verification result and the second verification result are inconsistent, it means that there is erroneous data in the process of reading or writing data, and an alarm message is sent to the operation and maintenance system in time, and the repair strategy corresponding to the alarm message can be pre-stored; so that the operation and maintenance system executes the corresponding repair strategy when receiving the alarm message. In each dial test cycle, the dial test device will check the data header and data segment content in turn to determine whether the data is safe, so as to identify whether the data path is unobstructed.

[0145] In the embodiment of this specification, if the comparison result is an inconsistent comparison result, the method further includes:

[0146] Based on the inconsistent comparison result, a virtual machine migration instruction is generated; the virtual machine migration instruction is used to migrate the virtual machine from the cloud host to the target host.

[0147] In an embodiment of the present specification, when the comparison result is an inconsistent comparison result, a virtual machine migration instruction can be generated; the cloud host can migrate the virtual machine from the cloud host to the target host according to the virtual machine migration instruction; the target host can be a host other than the cloud host.

[0148] In the embodiment of the present specification, when the comparison result is an inconsistent comparison result, the virtual machine in the cloud host can be migrated out of the cloud host, thereby minimizing the impact on the client data and improving the stability of the data stored in the virtual machine.

[0149] In the embodiment of this specification, the method further includes:

[0150] Based on the inconsistent comparison results, a snapshot building request is generated;

[0151] Send a snapshot building request to the second block device, so that the second block device creates a snapshot of the second block device based on the snapshot building request.

[0152] In the embodiment of the present specification, when the comparison result is an inconsistent comparison result, a snapshot building request can be generated, which is used to create a snapshot of the second block device; when the second block device receives the snapshot building request, it can create a snapshot of the second block device based on the request.

[0153] In the embodiment of the present specification, since the second block device is used to store client data, when the dial-up testing device detects that the data path in the cloud host is abnormal, a snapshot building request can be sent to the second block device in a timely manner; so that the second block device creates a snapshot of the second block device based on the snapshot building request, thereby saving the client data in a timely manner to avoid data loss and the like.

[0154] In the embodiments of this specification, Figure 8 As shown, if the comparison result is a consistent comparison result, the method further includes:

[0155] S801: Determine a next dialing test cycle corresponding to the current dialing test cycle;

[0156] S803: Determine the identification of the area to be tested corresponding to the next dial test cycle based on the cycle identification mapping relationship;

[0157] S805: Generate an update write request based on the identification of the area to be tested;

[0158] S807: Based on the area-to-be-tested identifier, send the update write request to the area-to-be-tested in the first device; the area-to-be-tested is the area corresponding to the area-to-be-tested identifier.

[0159] In an embodiment of the present specification, if the comparison result is a consistent comparison result, it means that there is no abnormal problem in the data path corresponding to the target area. At this time, the next dialing test cycle can be started, and the test area identifier corresponding to the next dialing test cycle can be determined according to the cycle identifier mapping relationship; the dialing test is repeated on the test area corresponding to the test area identifier; first, an update write request is generated according to the test area identifier; then, based on the test area identifier, the update write request is sent to the test area in the first device; the dialing method of the test area is similar to that of the target area. After sending the update write request, an update read request is sent to the test area, and finally a data comparison is performed to determine whether to issue an alarm after obtaining the data comparison result.

[0160] In the embodiment of the present specification, if the storage capacity of each data area in the first device is the same, the same preset data can be set for each data area for dialing test; if the storage capacity of each data area in the first device is different, preset data of different sizes can be set according to the storage capacity corresponding to each data area to ensure that the storage space corresponding to each data area can be used to store the corresponding preset data. In each dialing test cycle, the dialing test device will sequentially check the data header and data segment content to determine whether the data is safe, so as to identify whether the data path is unobstructed.

[0161] In an exemplary embodiment, the method further comprises:

[0162] When a preset condition is met, sending the alarm information to the operation and maintenance system;

[0163] The preset condition is receiving a write failure message sent by the first block device or receiving a data read failure message sent by the first block device.

[0164] In an embodiment of the present specification, if a write failure message sent by the first block device or a data read failure message sent by the first block device is received, the dialing device sends an alarm message to the operation and maintenance system; and different alarm messages can be generated and sent to the operation and maintenance system according to different preset conditions.

[0165] In the embodiments of this specification, Fig. 9 As shown, Fig. 9 The present invention is a structural diagram of an alarm system, wherein the alarm system comprises a cloud host and a data processing device, wherein the cloud host comprises a virtual machine and a dialing device, the dialing device comprises a first driver, the virtual machine comprises a second driver, and the two drivers have the same structure; the data processing device comprises a first block device, a second block device and a cloud disk front-end device, the cloud disk front-end device is used for data interaction with a remote disk warehouse, the remote disk warehouse is used for storing data of multiple cloud hosts, the cloud disk front-end device can obtain data of the current cloud host through the remote disk warehouse, and the two block devices have the same structure; the first block device interacts with the first driver in the dialing device, and the second block device interacts with the second driver in the dialing device; the interaction result between the dialing device and the first block device can be used to determine whether the data path in the cloud host is unobstructed, thereby timely discovering the risk problem of the data path in the cloud host, facilitating timely handling of the risk problem, and improving the operation stability of the cloud host.

[0166] In the embodiments of this specification, Fig.10 As shown, Fig.10 The figure is a flowchart of an alarm method based on an alarm system, including:

[0167] (1) Start the dial-up test device in the cloud host;

[0168] (2) Get the device ID of the first device;

[0169] (3) Determine whether the device identification is the expected value, the expected value is the preset identification;

[0170] (4) If not, wait n seconds and restart the dialing device; the value of n can be set according to the actual situation;

[0171] (5) If yes, generate a write request data packet (IO pattern X), and determine the target data area identifier (parameter a) and preset data (size b) in the first device;

[0172] (6) Initiate a write request to the first device;

[0173] (7) If the write request fails, an alarm message is sent to the operation and maintenance system;

[0174] (8) If the write request is successful, a read request of size b is initiated to the target data area (sector a);

[0175] (9) If the read request fails, an alarm message is sent to the operation and maintenance system;

[0176] (10) If the read request is successful, compare the read data with the write request data (pattern X) to determine whether the comparison is consistent (whether there is erroneous data);

[0177] (11) If the comparison is inconsistent (wrong data exists), send an alarm message to the operation and maintenance system;

[0178] (12) If the comparison is consistent (no erroneous data exists), wait m milliseconds and then jump to step (5) to re-initiate a write request for the next data area.

[0179] In the embodiment of this specification, the dial-up test device is a non-invasive bypass detection device. If the block device data request is blocked during the inspection process, it will not affect the normal operation of the cloud host and the traffic of the client block device. The method of this embodiment covers the entire data path of the block device, does not affect the cloud host user, and can quickly discover problems that affect data security in the data path. At the same time, the device can quickly interact with the operation and maintenance system to minimize the impact of data security risks and reduce the impact on other block devices in the cloud host.

[0180] It can be seen from the technical solution provided by the above embodiments of this specification that the embodiments of this specification send a write request for preset data to the first device in the data processing device; the data processing device is communicatively connected to the cloud host; the data processing device includes a first device and a second device; the first device is communicatively connected to the dialing device, and the second device is communicatively connected to the virtual machine; the first device is constructed based on the second device; the second device is used to store data of the target object; a write completion message sent by the first device is received, and the write completion message is a message generated after the first device writes the preset data; a read request for preset data is sent to the first device; a data reading result sent by the first device is received; the data reading result is the data read by the first device based on the read request; the preset data and the data reading result are compared to obtain a comparison result; if the comparison result is an inconsistent comparison result, an alarm message is sent to the operation and maintenance system; the alarm message indicates that the data path in the cloud host is abnormal. The present application introduces a non-invasive dial-up test device in a cloud host, and separately sets up a block device corresponding to the dial-up test device to test the data path in the cloud host, thereby improving the security of the data channel of the block device used to store client user data in the cloud host, and can quickly discover the anomaly of the data path in the cloud host and issue an alarm in time.

[0181] The embodiment of this specification also provides an alarm device, such as Fig.11 As shown, the device is applied to a dialing device in a cloud host, the cloud host includes a virtual machine and the dialing device, and the alarm device includes:

[0182] A write request sending module 1110 is used to send a write request for preset data to a first block device in a data processing device; the data processing device includes the first block device and a second block device; the first block device is communicatively connected to the dialing device, and the second block device is communicatively connected to the virtual machine; the first block device is constructed based on the second block device; the second block device is used to store data of a target object;

[0183] A message receiving module 1120, configured to receive a write completion message sent by the first block device, wherein the write completion message is a message generated after the first block device writes the preset data;

[0184] A read request sending module 1130, configured to send a read request to the first block device;

[0185] A read result sending module 1140 is used to receive a data read result sent by the first block device; the data read result is data read by the first block device based on the read request;

[0186] A comparison module 1150 is used to compare the preset data and the data reading result to obtain a comparison result;

[0187] The alarm module 1160 is used to send an alarm message to the operation and maintenance system if the comparison result is an inconsistent comparison result; the alarm message indicates that the data path in the cloud host is abnormal.

[0188] In an exemplary embodiment, the alarm device further comprises:

[0189] A region identification determination module, used to determine the target region identification corresponding to the current dialing test cycle based on the period identification mapping relationship; the period identification mapping relationship represents the corresponding relationship between the region identification and the dialing test cycle; the region identification is the identification of the data region in the first device;

[0190] A data construction module, configured to construct the preset data based on the target capacity of the target area corresponding to the target area identifier; the memory occupied by the preset data is less than or equal to the target capacity;

[0191] A request generation module, configured to generate the write request based on the target area identifier and the preset data;

[0192] In an exemplary embodiment, the write request sending module includes:

[0193] A request sending unit is used to send a write request for the preset data to the target area in the first block device based on the target area identifier.

[0194] In an exemplary embodiment, the alarm device further comprises:

[0195] An acquisition request sending module, used for sending a device identification acquisition request to the first block device;

[0196] A device identification receiving module, configured to receive a device identification sent by the first device; the device identification is determined based on the device identification acquisition request;

[0197] The request sending unit comprises:

[0198] The execution subunit is used to execute a write request for sending the preset data to the target area in the first block device when the device identifier is a preset identifier.

[0199] In an exemplary embodiment, the alarm device further comprises:

[0200] an identification acquisition module, used to acquire area identifications corresponding to a plurality of data areas in the first block device, wherein the plurality of data areas are obtained by partitioning the first block device based on a preset number of partitions;

[0201] A dial test cycle determination module, used to determine the dial test cycles corresponding to the multiple data areas;

[0202] The relationship building module is used to build the cycle identifier mapping relationship according to the area identifier corresponding to each data area and the dialing test cycle.

[0203] In an exemplary embodiment, the comparison module includes:

[0204] A data header determination unit, used to determine the data headers corresponding to the preset data and the data reading result;

[0205] A first data segment determining unit, configured to determine a data result corresponding to each data header in the preset data, and obtain a first data segment corresponding to the preset data;

[0206] A second data segment determining unit, configured to determine a data result corresponding to each data header in the data reading result, and obtain a second data segment corresponding to the data reading result;

[0207] a verification result determination unit, configured to process the first data segment based on a verification algorithm to obtain a first verification result, and to process the second data segment based on the verification algorithm to obtain a second verification result;

[0208] A comparison unit is used to compare the first verification result and the second verification result to obtain the comparison result.

[0209] In an exemplary embodiment, the verification result determination unit includes:

[0210] A first determining subunit, configured to determine a checksum of each data in the first data segment based on a check algorithm to obtain the first check result;

[0211] The second determination subunit is used to determine the checksum of each data in the second data segment based on the check algorithm to obtain the second check result.

[0212] In an exemplary embodiment, if the comparison result is an inconsistent comparison result, the alarm device further includes:

[0213] An instruction generation module is used to generate a virtual machine migration instruction based on the inconsistent comparison result; the virtual machine migration instruction is used to migrate the virtual machine from the cloud host to the target host.

[0214] In an exemplary embodiment, the alarm device further comprises:

[0215] A snapshot request generation module, used for generating a snapshot construction request based on the comparison inconsistent result;

[0216] The snapshot request sending module is used to send a snapshot building request to the second block device, so that the second block device creates a snapshot of the second block device based on the snapshot building request.

[0217] In an exemplary embodiment, if the comparison result is an inconsistent comparison result, the alarm device further includes:

[0218] A cycle determination module, used to determine the next dial test cycle corresponding to the current dial test cycle;

[0219] An identification determination module, used to determine the identification of the area to be tested corresponding to the next dialing test cycle based on the cycle identification mapping relationship;

[0220] A request update module, used for generating an update write request based on the identification of the area to be tested;

[0221] An update request sending module is used to send the update write request to the area to be tested in the first block device based on the area to be tested identifier; the area to be tested is the area corresponding to the area to be tested identifier.

[0222] The device and method embodiments in the described device embodiments are based on the same inventive concept.

[0223] An embodiment of the present specification provides an alarm device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the alarm method provided in the above method embodiment.

[0224] An embodiment of the present application also provides a computer storage medium, which can be set in a terminal to store at least one instruction or at least one program related to an alarm method in a method embodiment, and the at least one instruction or at least one program is loaded and executed by the processor to implement the alarm method provided by the above method embodiment.

[0225] The embodiment of the present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the alarm method provided by the above method embodiment.

[0226] Optionally, in the embodiments of this specification, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0227] The memory described in the embodiments of this specification can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.

[0228] The alarm method embodiments provided in the embodiments of this specification can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Fig.12 1 is a hardware structure diagram of a server of an alarm method provided in an embodiment of this specification. Fig.12 As shown, the server 1200 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1210 (the central processing unit 1210 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1230 for storing data, and one or more storage media 1220 (such as one or more mass storage devices) for storing application programs 1223 or data 1222. Among them, the memory 1230 and the storage medium 1220 can be short-term storage or permanent storage. The program stored in the storage medium 1220 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 1210 can be configured to communicate with the storage medium 1220 and execute a series of instruction operations in the storage medium 1220 on the server 1200. The server 1200 may also include one or more power supplies 1260, one or more wired or wireless network interfaces 1250, one or more input and output interfaces 1240, and / or one or more operating systems 1221, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0229] The input / output interface 1240 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 1200. In one example, the input / output interface 1240 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 1240 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0230] It can be understood by those skilled in the art that Fig.12 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.12 More or fewer components as shown, or with Fig.12 Different configurations are shown.

[0231] It can be seen from the embodiments of the alarm method, device, equipment or storage medium provided by the above-mentioned application that the application sends a write request for preset data to a first device in a data processing device; the data processing device is communicatively connected to a cloud host; the data processing device includes a first device and a second device; the first device is communicatively connected to a dialing device, and the second device is communicatively connected to a virtual machine; the first device is constructed based on the second device; the second device is used to store data of a target object; a write completion message sent by the first device is received, and the write completion message is a message generated after the first device writes the preset data; a read request for preset data is sent to the first device; a data reading result sent by the first device is received; the data reading result is the data read by the first device based on the read request; the preset data and the data reading result are compared to obtain a comparison result; if the comparison result is an inconsistent comparison result, an alarm message is sent to an operation and maintenance system; the alarm message indicates that the data path in the cloud host is abnormal. The present application introduces a non-invasive dial-up test device in a cloud host, and separately sets up a block device corresponding to the dial-up test device to test the data path in the cloud host, thereby improving the security of the data channel of the block device used to store client user data in the cloud host, and can quickly discover the anomaly of the data path in the cloud host and issue an alarm in time.

[0232] It should be noted that the above sequence of the embodiments of this specification is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0233] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0234] A person skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer storage medium, and the storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc.

[0235] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. An alarm method, It is characterized in that The method is applied to a dial-up test device in a cloud host, the cloud host includes a virtual machine and the dial-up test device, and the method includes: Sending a write request for preset data to a first block device in a data processing device; the data processing device is connected to the cloud host in communication; the data processing device includes the first block device and a second block device; the first block device is connected to the dialing device in communication, and the second block device is connected to the virtual machine in communication; the first block device is constructed based on the second block device; the second block device is used to store data of the target object; receiving a write completion message sent by the first block device, where the write completion message is a message generated after the first block device writes the preset data; Sending a read request to the first device; receiving a data reading result sent by the first block device; the data reading result is data read by the first block device based on the read request; Comparing the preset data with the data reading result to obtain a comparison result; If the comparison result is an inconsistent comparison result, an alarm message is sent to the operation and maintenance system; the alarm message indicates that the data path in the cloud host is abnormal.

2. The method according to claim 1, It is characterized in that Before sending a write request for preset data to the first block device in the data processing device, the method further includes: Based on the cycle identifier mapping relationship, determine the target area identifier corresponding to the current dial test cycle; the cycle identifier mapping relationship represents the corresponding relationship between the area identifier and the dial test cycle; the area identifier is the identifier of the data area in the first device; Based on the target capacity of the target area corresponding to the target area identifier, the preset data is constructed; the memory occupied by the preset data is less than or equal to the target capacity; generating the write request based on the target area identifier and the preset data; The sending a write request for preset data to a first block device in the data processing device includes: Based on the target area identifier, a write request for the preset data is sent to the target area in the first block device.

3. The method according to claim 2, It is characterized in that Before sending the write request for the preset data to the target area in the first block device, the method further includes: Sending a device identification acquisition request to the first device; Receiving a device identification sent by the first device; the device identification is determined based on the device identification acquisition request; The sending the write request for the preset data to the target area in the first block device includes: In a case where the device identifier is a preset identifier, a write request for sending the preset data to the target area in the first block device is executed.

4. The method according to claim 2, It is characterized in that The method for constructing the period identifier mapping relationship includes: Obtaining area identifiers corresponding to respective data areas in the first block device, wherein the plurality of data areas are obtained by partitioning the first block device based on a preset number of partitions; Determine the dial test cycles corresponding to the multiple data areas respectively; The cycle identifier mapping relationship is constructed according to the area identifier corresponding to each data area and the dialing test cycle.

5. The method according to any one of claims 1 to 4, It is characterized in that The comparing the preset data and the data reading result to obtain a comparison result includes: Determine the data headers corresponding to the preset data and the data reading result; Determine a data result corresponding to each data header in the preset data, and obtain a first data segment corresponding to the preset data; Determine a data result corresponding to each data header in the data reading result, and obtain a second data segment corresponding to the data reading result; Processing the first data segment based on a verification algorithm to obtain a first verification result, and processing the second data segment based on the verification algorithm to obtain a second verification result; The first verification result and the second verification result are compared to obtain the comparison result.

6. The method according to claim 5, It is characterized in that The processing of the first data segment based on the verification algorithm to obtain a first verification result, and the processing of the second data segment based on the verification algorithm to obtain a second verification result include: Based on the verification algorithm, determine the checksum of each data in the first data segment to obtain the first verification result, Based on the verification algorithm, a checksum of each data in the second data segment is determined to obtain the second verification result.

7. The method according to claim 1, It is characterized in that If the comparison result is an inconsistent comparison result, the method further includes: Based on the inconsistent comparison result, a virtual machine migration instruction is generated; the virtual machine migration instruction is used to migrate the virtual machine from the cloud host to the target host.

8. The method according to claim 7, It is characterized in that The method further comprises: Based on the inconsistent comparison results, a snapshot building request is generated; Send a snapshot building request to the second block device, so that the second block device creates a snapshot of the second block device based on the snapshot building request.

9. The method according to claim 2, It is characterized in that If the comparison result is a consistent comparison result, the method further includes: Determine a next dialing test cycle corresponding to the current dialing test cycle; Based on the cycle identifier mapping relationship, determine the to-be-tested area identifier corresponding to the next dial test cycle; Based on the identification of the area to be tested, generating an update write request; Based on the to-be-tested area identifier, the update write request is sent to the to-be-tested area in the first block device; the to-be-tested area is an area corresponding to the to-be-tested area identifier.

10. An alarm device, It is characterized in that The device is applied to a dialing device in a cloud host, the cloud host includes a virtual machine and the dialing device, and the alarm device includes: A write request sending module is used to send a write request for preset data to a first block device in a data processing device; the data processing device is connected to the cloud host in communication; the data processing device includes the first block device and a second block device; the first block device is connected to the dialing device in communication, and the second block device is connected to the virtual machine in communication; the first block device is constructed based on the second block device; the second block device is used to store data of the target object; a message receiving module, configured to receive a write completion message sent by the first block device, wherein the write completion message is a message generated after the first block device writes the preset data; A read request sending module, used for sending a read request to the first block device; a read result sending module, configured to receive a data read result sent by the first block device; the data read result is data read by the first block device based on the read request; A comparison module, used for comparing the preset data and the data reading result to obtain a comparison result; The alarm module is used to send an alarm message to the operation and maintenance system if the comparison result is an inconsistent comparison result; the alarm message indicates that the data path in the cloud host is abnormal.

11. An electronic device, It is characterized in that The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the alarm method as described in any one of claims 1-9.

12. A computer storage medium, It is characterized in that The computer storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the alarm method as described in any one of claims 1-9.

13. A computer program product comprising computer instructions, It is characterized in that When the computer instructions are executed by the processor, the alarm method as described in any one of claims 1-9 is implemented.

Citation Information

Patent Citations

  • Dial testing method, dial testing system, and computational node

    CN107005441A

  • Memory test method and device, computer readable storage medium and electronic equipment

    CN112242177A

  • Cloud network, measurement system, method and device for cloud network, and storage medium

    CN112994987A

  • Test environment management apparatus and test environment construction method

    US20150234907A1