Alarm method and device, electronic equipment and storage medium

By introducing a non-intrusive testing device into the cloud host and utilizing write requests, read requests, and comparison mechanisms, the user experience degradation and data channel security issues caused by modifications to existing protocols are resolved. This enables rapid detection and alerting of data path anomalies, thereby improving data channel security.

CN119003291BActive Publication Date: 2026-11-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310562132.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2026-11-20
Estimated Expiration
2043-05-18

AI Technical Summary

Technical Problem

When existing virtio and NVMe protocol solutions are modified in cloud servers to enhance data security, it can affect user experience and reduce data channel security, lacking a non-intrusive end-to-end data protection solution.

Method used

Introduce a non-intrusive testing device into the cloud server. The block device of the testing device tests the data path and uses write requests, read requests and comparison mechanisms to detect data path anomalies and generate alarm information.

Benefits of technology

It improves the security of data channels in block devices used to store client user data in cloud servers, enabling rapid detection and alerts for data path anomalies, and reducing the impact on user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003291B_ABST
    Figure CN119003291B_ABST
Patent Text Reader

Abstract

The application discloses an alarm method and device, electronic equipment and storage medium, which can be applied to various scenes such as cloud technology, artificial intelligence, intelligent transportation and Internet of Vehicles. The method is applied to a stress testing device in a cloud host. The cloud host comprises a virtual machine and the stress testing device. The method comprises the following steps: sending a write request of preset data to a first block device in a data processing device; 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 read request of the preset data to the first block device; receiving a data reading result sent by the first block device; comparing the preset data and the data reading result to obtain a comparison result; and sending alarm information to an operation and maintenance system if the comparison result is an inconsistent comparison result. The stress testing device is a non-intrusive bypass device, and the security of a data channel of a block device used for storing user data in the cloud host during the stress testing process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Cloud servers in data centers typically use block devices from distributed storage repositories as storage media. Reading and writing data involves long data paths, which increases the risk to block device data security. Block devices implemented based on the virtio generic virtualization protocol lack a unified end-to-end data protection scheme or protocol. Currently, commonly used end-to-end data protection schemes include: first, modifying the generic virtio protocol to add data verification protection; second, using a new protocol, such as the NVMe protocol.

[0003] Both modifying the generic virtio protocol and adopting the NVMe protocol can address the data security issues faced by block devices on cloud servers. However, both solutions require replacing the existing protocol and potentially compromising user data within the cloud server, impacting the client user experience and reducing the security of the data channels on the block devices used to store client user data. Summary of the Invention

[0004] This application provides an alarm method, device, electronic device, and storage medium that can introduce a non-intrusive testing device into a cloud host and separately set up a block device corresponding to the testing device to test the data path in the cloud host. This improves the security of the data channel of the block device used to store client user data in the cloud host and can quickly detect anomalies in the data path in the cloud host.

[0005] On one hand, this application provides an alarm method applied to a probe testing device in a cloud host, the cloud host including a virtual machine and the probe testing device, the method comprising:

[0006] A write request for preset data is sent to a first device in the data processing device; the data processing device is communicatively connected to the cloud host; the data processing device includes the first device and a second device; the first device is communicatively connected to the testing device, and the second device is communicatively connected to the virtual machine; the first device is built based on the second device; the second device is used to store the data of the target object;

[0007] Receive a write complete message sent by the first device, wherein the write complete message is a message generated after the first device writes the preset data;

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

[0009] Receive the data read result sent by the first device; the data read result is the data read by the first device based on the read request;

[0010] The preset data and the data reading results are compared to obtain the comparison results;

[0011] If the comparison result is inconsistent, 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, which is applied to a probe testing device in a cloud host. The cloud host includes a virtual machine and the probe testing device. The alarm device includes:

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

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

[0015] The read request sending module is used to send read requests to the first device;

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

[0017] The comparison module is used to compare the preset data and the data reading results to obtain the comparison results;

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

[0019] In one exemplary embodiment, the alarm device further includes:

[0020] The area identifier determination module is used to determine the target area identifier corresponding to the current testing cycle based on the cycle identifier mapping relationship; the cycle identifier mapping relationship represents the correspondence between the area identifier and the testing cycle; the area identifier is the identifier of the data area in the first device.

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

[0022] The request generation module is used to generate the write request based on the target region identifier and the preset data;

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

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

[0025] In one exemplary embodiment, the alarm device further includes:

[0026] The request sending module is used to send a device identifier acquisition request to the first device.

[0027] The device identifier receiving module is used to receive the device identifier sent by the first device; the device identifier is determined based on the device identifier acquisition request;

[0028] The request sending unit includes:

[0029] An execution subunit is configured to execute a write request to send the preset data to the target area in the first device when the device identifier is a preset identifier.

[0030] In one exemplary embodiment, the alarm device further includes:

[0031] The identifier acquisition module is used to acquire the region identifiers corresponding to each of the multiple data regions in the first device, wherein the multiple data regions are obtained by partitioning the first device based on a preset number of partitions;

[0032] The test cycle determination module is used to determine the test cycle corresponding to each of the multiple data areas;

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

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

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

[0036] The first data segment determination unit is used to determine the data result corresponding to each data header in the preset data, and to obtain the first data segment corresponding to the preset data.

[0037] The second data segment determination unit is used to determine the data result corresponding to each data header in the data reading result, and to obtain the second data segment corresponding to the data reading result.

[0038] The verification result determination unit is used to process the first data segment based on the 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] The comparison unit is used to compare the first verification result and the second verification result to obtain the comparison result.

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

[0041] The first determining subunit is used to determine the checksum of each data in the first data segment based on the check algorithm, and obtain the first check result;

[0042] The second determining subunit is used to determine the checksum of each data in the second data segment based on the verification algorithm, and obtain the second verification result.

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

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

[0045] In one exemplary embodiment, the alarm device further includes:

[0046] A snapshot request generation module is used to generate a snapshot build request based on the comparison inconsistency results;

[0047] A snapshot request sending module is used to send a snapshot build request to the second block device, so that the second block device can create a snapshot of the second block device based on the snapshot build request.

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

[0049] The cycle determination module is used to determine the next testing cycle corresponding to the current testing cycle;

[0050] The identifier determination module is used to determine the identifier of the area to be tested corresponding to the next testing cycle based on the period identifier mapping relationship.

[0051] The update request module is used to generate an update write request based on the identifier of the region to be tested;

[0052] The update request sending module is used to send the update write request to the area under test in the first device based on the area under test identifier; the area under test is the area corresponding to the area under test identifier.

[0053] On the other hand, an alarm device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being 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 that stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the alarm method described above.

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

[0056] The alarm method, device, electronic equipment, and storage medium provided in this application have the following technical advantages:

[0057] This 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 testing device, and the second device is communicatively connected to a virtual machine; the first device is built based on the second device; the second device is used to store the data of the target object; a write completion message is received from the first device, which 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 read result is received from the first device; the data read result is the data read by the first device based on the read request; the preset data and the data read result are compared to obtain a comparison result; if the comparison result is inconsistent, an alarm message is sent to the operation and maintenance system; the alarm message indicates an anomaly in the data path in the cloud host. This application introduces a non-intrusive testing device in the cloud host and sets up a separate block device corresponding to the testing 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 detect anomalies in the data path in the cloud host and issue timely alarms. Attached Figure Description

[0058] To more clearly illustrate the technical solutions and advantages in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

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

[0060] Figure 2 This is a flowchart illustrating an alarm method provided in an embodiment of this specification;

[0061] Figure 3 This is a flowchart illustrating a method for generating a write request based on the target region identifier and the preset data, as provided in an embodiment of this specification.

[0062] Figure 4 This is a flowchart illustrating a method for constructing a periodic identifier mapping relationship provided in the embodiments of this specification;

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

[0064] Figure 6This is a flowchart illustrating a method for comparing preset data and data reading results to obtain comparison results, as provided in an embodiment of this specification.

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

[0066] Figure 8 This is a flowchart illustrating a method for sending an update write request to the area under test in the first device, as provided in an embodiment of this specification.

[0067] Figure 9 This is a schematic diagram of the structure of an alarm system provided in the embodiments of this specification;

[0068] Figure 10 This is a flowchart illustrating an alarm method based on an alarm system provided in the embodiments of this specification;

[0069] Figure 11 This is a schematic diagram of the structure of an alarm device provided in the embodiments of this specification;

[0070] Figure 12 This is a schematic diagram of the structure of a server provided in the embodiments of this specification. Detailed Implementation

[0071] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

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

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

[0074] NVMe (Non-Volatile Memory Express): Non-volatile memory host controller interface specification

[0075] VM (Virtual Machine): Virtual Machine

[0076] Virtio: A semi-virtualization solution interface specification widely used in the cloud computing field.

[0077] Block devices: A type of computer input / output (I / O) device that manages and controls information. They store information in fixed-size blocks, each with its own address. Data of a certain length can be read from any location on the device, such as hard drives, USB flash drives, and SD cards.

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

[0079] Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system 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 a 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 storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions to the outside world.

[0081] Currently, the storage method of storage systems is as follows: Logical volumes are created. During the creation of a logical volume, physical storage space is allocated to each logical volume. This physical storage space may consist of a single storage device or the disks of several storage devices. Clients store data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. Each object contains not only the data but also additional information such as a data identifier (ID, ID entity). The file system writes each object to the physical storage space of that logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.

[0082] The process by which a storage system allocates physical storage space to a logical volume is as follows: the physical storage space is pre-divided into strips according to the capacity estimate 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 Redundant Array of Independent Disks (RAID). A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume.

[0083] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0084] Please see Figure 1 , Figure 1 This 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 server 01 and client 02.

[0085] Specifically, in the embodiments of this specification, server 01 may include a standalone server, a distributed server, or a server cluster composed of multiple servers. It may also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, 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, and a memory, etc. Specifically, server 01 can be used to write and read data in the first device, compare the written and read data, and generate alarm information based on the inconsistency result.

[0086] Specifically, in the embodiments of this specification, the client 02 may include physical devices such as smartphones, desktop computers, tablets, laptops, digital assistants, smart wearable devices, smart speakers, in-vehicle terminals, and smart TVs. It may also include software running on the physical device, such as web pages provided to users by service providers, or applications provided to users by such service providers. Specifically, the client 02 can be used to display alarm information.

[0087] The following describes one alarm method of this application. Figure 2 This is a flowchart illustrating an alarm method provided in an embodiment of this specification. This specification provides the operational steps of the method described in the embodiment or flowchart, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiment or drawings. Specifically, the method is applied to a testing device in a cloud host, where the cloud host includes a virtual machine and the testing device, as shown... Figure 2 As shown, the method may include:

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

[0089] In the embodiments of this specification, the cloud host includes a virtual machine and a testing device. This testing device is an independent process within the cloud host, a non-intrusive bypass device. It sends read / write requests to a first block device, and its operation does not affect other second blocks on the cloud host. A block device is a type of input / output (I / O) device that manages and controls a computer. It stores information in fixed-size blocks, each with its own address, and can read data of a certain length from any location on the device, such as a hard drive, USB flash drive, or SD card. The data processing unit (DPU) includes two types of block devices: a first block device and a second block device. The first block device is specifically designed for the testing device; it is communicatively connected to the testing device, and the second block device is communicatively connected to the virtual machine. There can be one or more second blocks; the first block device is built upon the second block device; the first block device can be built based on the configuration information of the second block device; the second block device is used to store data of a target object; the target object can be a user corresponding to a client; the first block device is used for testing. This separates the block devices used for testing from those used for storing user data, avoiding impact on the stability of user data during testing.

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

[0091] S301: Based on the cycle identifier mapping relationship, determine the target area identifier corresponding to the current testing cycle; the cycle identifier mapping relationship represents the correspondence between the area identifier and the testing cycle; the area identifier is the identifier of the data area in the first device;

[0092] In the embodiments of this 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 testing cycle can be determined according to a pre-constructed cycle identifier mapping relationship; wherein, the cycle identifier mapping relationship represents the correspondence between the area identifier and the testing cycle; different data areas can be tested in different testing cycles; the area identifier is the identifier of the data area in the first device; the first device may include multiple data areas, and 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 can be a character, an image, etc.; for example, the area identifier can be sector a.

[0093] In the embodiments described in this specification, such as Figure 4 As shown, the method for constructing the periodic identifier mapping relationship includes:

[0094] S401: Obtain the region identifier corresponding to each of the multiple data regions in the first device, wherein the multiple data regions are obtained by partitioning the first device based on a preset number of partitions;

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

[0096] S403: Determine the testing cycle corresponding to each of the multiple data areas;

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

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

[0099] In the embodiments of this specification, the period identifier mapping relationship can be constructed based on the area identifier corresponding to each data area and the dialing cycle; the area identifier and the dialing cycle in the period identifier mapping relationship can be a one-to-one relationship.

[0100] S303: Based on the target capacity of the target region corresponding to the target region identifier, construct the preset data; the memory occupied by the preset data is less than or equal to the target capacity;

[0101] In the embodiments of this 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 embodiments of this specification, a write request corresponding to the preset data can be generated based on the target area identifier and preset data; the write request is used to write the preset data in the target area.

[0104] In this embodiment of the specification, sending a write request for preset data to the first 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 device.

[0106] In the embodiments of this specification, the first device can be divided into multiple data areas, and then each data area can be tested sequentially. Specifically, the target area can be determined according to the current testing cycle; then a write request for the preset data can be sent to the target area.

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

[0108] S2001: Send a device identifier acquisition request to the first device;

[0109] In the embodiments of this specification, a first device can be pre-configured in the cloud host for the testing device. During communication, the testing device only interacts with the first device. Before sending a write request to the first device, the testing device can verify the device identifier of the first device to determine whether the first device is the testing block device configured for the testing device.

[0110] S2003: Receive the device identifier sent by the first device; the device identifier is determined based on the device identifier acquisition request;

[0111] In the embodiments of this specification, after receiving a device identifier acquisition request, the first device can obtain the attribute information of the first device and obtain the device identifier from the attribute information.

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

[0113] If the device identifier is a preset identifier, a write request is executed to send the preset data to the target area in the first device.

[0114] In the embodiments of this specification, after constructing the dialing test device and the first device, a preset identifier for the first device can be constructed and sent to the dialing test device. After receiving the device identifier, the device identifier can be compared with the preset identifier to verify the first device. If the device identifier is determined to be 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 increasing the dialing test efficiency.

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

[0116] Send a device identifier acquisition request to any 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 the embodiments of this specification, a device identifier acquisition request can be sent to each block device in the data processing device to sequentially acquire the device identifier of each block device and compare the device identifier with a preset identifier, thereby quickly selecting the first block device from multiple candidate block devices.

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

[0120] In the embodiments described in this specification, the first device can write preset data based on a write request, and after the data writing is completed, generate a write completion message and send the write completion message back to the testing device. If writing data fails, a write failure message is generated and sent to the testing device, which then sends the write failure message to the operation and maintenance system.

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

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

[0123] In the embodiments of this specification, the testing device can generate a read request after receiving a write completion message; in one testing cycle, the read request and the write request target the same area in the first device; if the write request is a request sent to the target area in the first device, then the read request is also a request sent to the target area in the first device.

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

[0125] In the embodiments described in this specification, the first device can read data from itself after receiving a read request, and obtain the data read result. If the read request is a data read request for a target area, then the data stored in the target area of ​​the first device is read.

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

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

[0128] In the embodiments described in this specification, such as Figure 6 As shown, the comparison of the preset data and the data reading result to obtain the comparison result includes:

[0129] S2091: Determine the data headers corresponding to the preset data and the data reading results, respectively;

[0130] In the embodiments described in 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, as shown below... Figure 7 As shown, Figure 7 This is a schematic diagram of a data header format. The parameter `magic` is fixed. `magic` is a lightweight display interface component developed using JavaScript, which has advantages such as high performance, small code size, and support for multiple initialization methods. The parameter `io_num` records the sequence number of the data segment. The parameters `time_sec` (seconds) and `time_nsec` (nanoseconds) record the timestamps of the IO write requests. The parameter `sector_num` records the disk sector sequence number corresponding to the data segment. The `checksum` records the checksum of the data segment, which can be generated by algorithms such as parity check and CRC check.

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

[0132] In the embodiments of this specification, the data result corresponding to each data header in the preset data can be determined as the first data segment corresponding to the preset data.

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

[0134] In the embodiments of this 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 in the first data segment and the second data segment are randomly generated.

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

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

[0137] In an exemplary embodiment, the step of processing the first data segment based on the 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, includes:

[0138] Based on the verification algorithm, the checksum of each data in the first data segment is determined, and the first verification result is obtained.

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

[0140] In the embodiments of this specification, the checksum of each data in the first data segment can be calculated using a checksum algorithm to obtain the first checksum result; and the checksum of each data in the second data segment can be calculated to obtain the second checksum result.

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

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

[0143] S2011: If the comparison result is inconsistent, 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 embodiments described in this specification, if the first verification result and the second verification result are inconsistent, it indicates that there is erroneous data during the data reading or writing process, and an alarm message is promptly sent to the operation and maintenance system. The corresponding repair strategy for the alarm message can be pre-stored so that the operation and maintenance system can execute the corresponding repair strategy upon receiving the alarm message. During each testing cycle, the testing device sequentially verifies the data header and data segment content to determine data security, thereby identifying whether the data path is unobstructed.

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

[0146] Based on the inconsistency results, 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 the embodiments of this specification, when the comparison result is inconsistent, 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 embodiments of this specification, when the comparison result is inconsistent, the virtual machine in the cloud host can be migrated out of the cloud host, thereby minimizing the impact on client data and improving the stability of data stored in the virtual machine.

[0149] In the embodiments described in this specification, the method further includes:

[0150] Based on the inconsistency results, a snapshot build request is generated;

[0151] Send a snapshot build request to the second device; so that the second device creates a snapshot of the second device based on the snapshot build request.

[0152] In the embodiments of this specification, when the comparison result is inconsistent, a snapshot build request can be generated. This request is used to create a snapshot of the second device. When the second device receives the snapshot build request, it can create a snapshot of the second device based on the request.

[0153] In this embodiment of the specification, since the second device is used to store client data, when the testing device detects an abnormal data path in the cloud host, it can promptly send a snapshot build request to the second device; so that the second device can create a snapshot of the second device based on the snapshot build request, thereby saving the client data in a timely manner and avoiding data loss.

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

[0155] S801: Determine the next testing cycle corresponding to the current testing cycle;

[0156] S803: Based on the cycle identifier mapping relationship, determine the test area identifier corresponding to the next test cycle;

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

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

[0159] In the embodiments of this specification, if the comparison result is consistent, it indicates that there is no abnormality in the data path corresponding to the target area. At this time, the next testing cycle can be started, and the test area identifier corresponding to the next testing cycle is determined according to the cycle identifier mapping relationship. The test area corresponding to the test area identifier is repeatedly tested. First, an update write request is generated according to the test area identifier. Then, the update write request is sent to the test area in the first device based on the test area identifier. The testing method for the test area is similar to that for the target area. After sending the update write request, an update read request is sent to the test area. Finally, the data is compared, and the data comparison result is obtained before determining whether to issue an alarm.

[0160] In the embodiments of this 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 dial-up testing; 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. During each dial-up testing cycle, the testing device will sequentially verify the data header and data segment content to determine whether the data is secure, thereby identifying whether the data path is unobstructed.

[0161] In one exemplary embodiment, the method further includes:

[0162] Under the condition that the preset conditions are met, the alarm information is sent to the operation and maintenance system;

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

[0164] In the embodiments of this specification, if a write failure message or a data read failure message sent by the first device is received, the testing device sends an alarm message to the operation and maintenance system; and can generate different alarm messages for different preset conditions and send them to the operation and maintenance system.

[0165] In the embodiments described in this specification, such as Figure 9 As shown, Figure 9 This is a schematic diagram of an alarm system. The alarm system includes a cloud host and a data processing device. The cloud host includes a virtual machine and a testing device. The testing device includes a first drive, and the virtual machine includes a second drive. The two drives have identical structures. The data processing device includes a first device, a second device, and a cloud disk front-end device. The cloud disk front-end device is used to interact with a remote disk warehouse. The remote disk warehouse stores data from multiple cloud hosts. The cloud disk front-end device can obtain the current cloud host's data from the remote disk warehouse. The two devices have identical structures. The first device interacts with the first drive in the testing device, and the second device interacts with the second drive in the testing device. By analyzing the interaction results between the testing device and the first device, the system can determine whether the data path in the cloud host is unobstructed, thereby promptly identifying and addressing data path risks in the cloud host, improving the operational stability of the cloud host.

[0166] In the embodiments described in this specification, such as Figure 10 As shown, Figure 10 This is a flowchart illustrating an alarm method based on an alarm system, including:

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

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

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

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

[0171] (5) If so, generate a write request 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, send an alarm message to the operation and maintenance system;

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

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

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

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

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

[0179] In the embodiments described in this specification, the testing device, as a non-intrusive bypass detection device, will not affect the normal operation of the cloud host or the traffic of the customer's block device if it encounters a problem of blocked data requests for the block device during the inspection process. The method of this embodiment covers the entire data path of the block device, does not affect cloud host users, and can quickly identify problems affecting data security in the data path. Simultaneously, this device can quickly integrate 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] As can be seen from the technical solutions provided in the embodiments of this specification above, the embodiments of this specification send a write request for preset data to a 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 a testing device, and the second device is communicatively connected to a virtual machine; the first device is built based on the second device; the second device is used to store the data of the target object; a write completion message is received from the first device, which 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 read result is received from the first device; the data read result is the data read by the first device based on the read request; the preset data and the data read result are compared to obtain a comparison result; if the comparison result is inconsistent, an alarm message is sent to the operation and maintenance system; the alarm message indicates an abnormal data path in the cloud host. This application introduces a non-intrusive testing device into the cloud host and sets up a separate block device corresponding to the testing device to test the data path in the cloud host. This improves the security of the data channel of the block device used to store client user data in the cloud host, and can quickly detect anomalies in the data path in the cloud host and issue timely alarms.

[0181] This specification also provides an alarm device, such as... Figure 11 As shown, the device is used as a probe testing device in a cloud host. The cloud host includes a virtual machine and the probe testing device. The alarm device includes:

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

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

[0184] The read request sending module 1130 is used to send a read request to the first device;

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

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

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

[0188] In one exemplary embodiment, the alarm device further includes:

[0189] The area identifier determination module is used to determine the target area identifier corresponding to the current testing cycle based on the cycle identifier mapping relationship; the cycle identifier mapping relationship represents the correspondence between the area identifier and the testing cycle; the area identifier is the identifier of the data area in the first device.

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

[0191] The request generation module is used to generate the write request based on the target region identifier and the preset data;

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

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

[0194] In one exemplary embodiment, the alarm device further includes:

[0195] The request sending module is used to send a device identifier acquisition request to the first device.

[0196] The device identifier receiving module is used to receive the device identifier sent by the first device; the device identifier is determined based on the device identifier acquisition request;

[0197] The request sending unit includes:

[0198] An execution subunit is configured to execute a write request to send the preset data to the target area in the first device when the device identifier is a preset identifier.

[0199] In one exemplary embodiment, the alarm device further includes:

[0200] The identifier acquisition module is used to acquire the region identifiers corresponding to each of the multiple data regions in the first device, wherein the multiple data regions are obtained by partitioning the first device based on a preset number of partitions;

[0201] The test cycle determination module is used to determine the test cycle corresponding to each of the multiple data areas;

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

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

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

[0205] The first data segment determination unit is used to determine the data result corresponding to each data header in the preset data, and to obtain the first data segment corresponding to the preset data.

[0206] The second data segment determination unit is used to determine the data result corresponding to each data header in the data reading result, and to obtain the second data segment corresponding to the data reading result.

[0207] The verification result determination unit is used to process the first data segment based on the 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] The comparison unit is used to compare the first verification result and the second verification result to obtain the comparison result.

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

[0210] The first determining subunit is used to determine the checksum of each data in the first data segment based on the check algorithm, and obtain the first check result;

[0211] The second determining subunit is used to determine the checksum of each data in the second data segment based on the verification algorithm, and obtain the second verification result.

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

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

[0214] In one exemplary embodiment, the alarm device further includes:

[0215] A snapshot request generation module is used to generate a snapshot build request based on the comparison inconsistency results;

[0216] A snapshot request sending module is used to send a snapshot build request to the second block device, so that the second block device can create a snapshot of the second block device based on the snapshot build request.

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

[0218] The cycle determination module is used to determine the next testing cycle corresponding to the current testing cycle;

[0219] The identifier determination module is used to determine the identifier of the area to be tested corresponding to the next testing cycle based on the period identifier mapping relationship.

[0220] The update request module is used to generate an update write request based on the identifier of the region to be tested;

[0221] The update request sending module is used to send the update write request to the area under test in the first device based on the area under test identifier; the area under test is the area corresponding to the area under test identifier.

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

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

[0224] Embodiments of this application also provide a computer storage medium, which can be disposed in a terminal to store at least one instruction or at least one program related to implementing an alarm method in the method embodiment. 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.

[0225] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the alarm method provided in the above-described method embodiments.

[0226] Optionally, in the embodiments of this specification, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0227] The memory described in the embodiments of this specification can be used to store software programs and modules. 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. The program storage area may store the operating system, application programs required for the functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, 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 methods provided in the embodiments of this specification can be executed on mobile terminals, computer terminals, servers, or similar computing devices. Taking running on a server as an example, Figure 12 This is a hardware structure block diagram of a server for an alarm method provided in an embodiment of this specification. For example... Figure 12 As shown, the server 1200 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1210 (CPUs 1210 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 1230 for storing data, and one or more storage media 1220 (e.g., one or more mass storage devices) for storing application programs 1223 or data 1222. The memory 1230 and storage media 1220 may be temporary or persistent storage. The program stored in the storage media 1220 may include one or more modules, each module including a series of instruction operations on the server. Furthermore, the CPU 1210 may be configured to communicate with the storage media 1220 and execute the series of instruction operations stored in the storage media 1220 on the server 1200. Server 1200 may also include one or more power supplies 1260, one or more wired or wireless network interfaces 1250, one or more input / output interfaces 1240, and / or one or more operating systems 1221, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0229] The input / output interface 1240 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 1200. In one example, the input / output interface 1240 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 1240 may be a radio frequency (RF) module for wireless communication with the Internet.

[0230] Those skilled in the art will understand that Figure 12 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 1200 may also include... Figure 12 The more or fewer components shown, or having the same Figure 12 The different configurations shown.

[0231] As can be seen from the embodiments of the alarm method, apparatus, device, or storage medium provided in this application, this 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 testing device, and the second device is communicatively connected to a virtual machine; the first device is built based on the second device; the second device is used to store data of a target object; a write completion message is received from the first device, which 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 read result is received from the first device; the data read result is the data read by the first device based on the read request; the preset data and the data read result are compared to obtain a comparison result; if the comparison result is inconsistent, an alarm message is sent to the operation and maintenance system; the alarm message indicates an abnormal data path in the cloud host. This application introduces a non-intrusive testing device into the cloud host and sets up a separate block device corresponding to the testing device to test the data path in the cloud host. This improves the security of the data channel of the block device used to store client user data in the cloud host, and can quickly detect anomalies in the data path in the cloud host and issue timely alarms.

[0232] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments of this specification have been described above. 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 a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0233] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0234] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer storage medium, such as a read-only memory, a disk, or an optical disk.

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

Claims

1. An alarm method, characterized in that, The method is applied to a testing device in a cloud host, the cloud host including a virtual machine and the testing device, the testing device being a non-intrusive bypass device, the method comprising: Send a device identifier acquisition request to the first device; Receive the device identifier sent by the first device; the device identifier is determined based on the device identifier acquisition request; If the device identifier is a preset identifier, the first device is determined to be a test block device set up for the test device, and a write request for preset data is sent 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 the first device and a second device; the first device is communicatively connected to the test device, and the second device is communicatively connected to the virtual machine; the first device is built based on the second device; the second device is used to store the data of the target object; Receive a write complete message sent by the first device, wherein the write complete message is a message generated after the first device writes the preset data; Send a read request to the first device; Receive the data read result sent by the first device; the data read result is the data read by the first device based on the read request; The preset data and the data reading results are compared to obtain the comparison results; If the comparison result is inconsistent, 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, characterized in that, Before sending a write request for preset data to the first device in the data processing device, the method further includes: Based on the period identifier mapping relationship, the target area identifier corresponding to the current testing period is determined; the period identifier mapping relationship represents the correspondence between the area identifier and the testing period; the area identifier is the identifier of the data area in the first device. Based on the target capacity of the target region corresponding to the target region identifier, the preset data is constructed; the memory occupied by the preset data is less than or equal to the target capacity. The write request is generated based on the target region identifier and the preset data; Sending a write request for preset data to the first 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 device.

3. The method according to claim 2, characterized in that, The method for constructing the periodic identifier mapping relationship includes: Obtain the region identifiers corresponding to each of the multiple data regions in the first device, wherein the multiple data regions are obtained by partitioning the first device based on a preset number of partitions; Determine the corresponding testing cycle for each of the multiple data regions; Based on the area identifier and testing cycle corresponding to each data area, the cycle identifier mapping relationship is constructed.

4. The method according to any one of claims 1-3, characterized in that, The comparison of the preset data and the data reading result to obtain the comparison result includes: Determine the data headers corresponding to the preset data and the data reading results, respectively. Determine the data result corresponding to each data header in the preset data to obtain the first data segment corresponding to the preset data; Determine the data result corresponding to each data header in the data reading result to obtain the second data segment corresponding to the data reading result; The first data segment is processed based on the verification algorithm to obtain a first verification result, and the second data segment is processed 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.

5. The method according to claim 4, characterized in that, The process of processing the first data segment based on the 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, includes: Based on the verification algorithm, the checksum of each data point in the first data segment is determined, and the first verification result is obtained. Based on the verification algorithm, the checksum of each data in the second data segment is determined, and the second verification result is obtained.

6. The method according to claim 1, characterized in that, If the comparison result is inconsistent, the method further includes: Based on the inconsistency results, 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.

7. The method according to claim 6, characterized in that, The method further includes: Based on the inconsistency results, a snapshot build request is generated; Send a snapshot build request to the second device; so that the second device creates a snapshot of the second device based on the snapshot build request.

8. The method according to claim 2, characterized in that, If the comparison result is a consistent result, the method further includes: Determine the next testing cycle corresponding to the current testing cycle; Based on the cycle identifier mapping relationship, the test area identifier corresponding to the next test cycle is determined; Based on the identifier of the region to be tested, an update write request is generated; Based on the identifier of the region to be tested, the update write request is sent to the region to be tested in the first device; the region to be tested is the region corresponding to the identifier of the region to be tested.

9. An alarm device, characterized in that, The device is used in a cloud host for testing purposes. The cloud host includes a virtual machine and the testing device. The testing device is a non-intrusive bypass device. The alarm device includes: The request sending module is used to send a device identifier acquisition request to the first device. The device identifier receiving module is used to receive the device identifier sent by the first device; the device identifier is determined based on the device identifier acquisition request; A write request sending module is used to determine, when the device identifier is a preset identifier, that the first device is a test block device set up for the test device, and 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 the first device and a second device; the first device is communicatively connected to the test device, and the second device is communicatively connected to the virtual machine; the first device is built based on the second device; the second device is used to store the data of the target object; The message receiving module is used to receive a write completion message sent by the first device, wherein the write completion message is a message generated after the first device writes the preset data; The read request sending module is used to send read requests to the first device; A read result sending module is used to receive a data read result sent by the first device; the data read result is the data read by the first device based on the read request; The comparison module is used to compare the preset data and the data reading results to obtain the comparison results; The alarm module is used to send alarm information to the operation and maintenance system if the comparison result is inconsistent; the alarm information indicates that the data path in the cloud host is abnormal.

10. The apparatus according to claim 9, characterized in that, The alarm device also includes: The area identifier determination module is used to determine the target area identifier corresponding to the current testing cycle based on the cycle identifier mapping relationship; the cycle identifier mapping relationship represents the correspondence between the area identifier and the testing cycle; the area identifier is the identifier of the data area in the first device. A data construction module is used to construct the preset data based on the target capacity of the target region corresponding to the target region identifier; the memory occupied by the preset data is less than or equal to the target capacity; The request generation module is used to generate the write request based on the target region identifier and the preset data; The write request sending module includes a request sending unit, used to send a write request for the preset data to the target area in the first device based on the target area identifier.

11. The apparatus according to claim 10, characterized in that, The alarm device also includes: The identifier acquisition module is used to acquire the region identifiers corresponding to each of the multiple data regions in the first device, wherein the multiple data regions are obtained by partitioning the first device based on a preset number of partitions; The test cycle determination module is used to determine the test cycle corresponding to each of the multiple data areas; The relationship building module is used to build the cycle identifier mapping relationship based on the area identifier corresponding to each data area and the dialing cycle.

12. The apparatus according to any one of claims 9-11, characterized in that, The comparison module includes: A data header determination unit is used to determine the data headers corresponding to the preset data and the data reading result, respectively. The first data segment determination unit is used to determine the data result corresponding to each data header in the preset data, and to obtain the first data segment corresponding to the preset data. The second data segment determination unit is used to determine the data result corresponding to each data header in the data reading result, and to obtain the second data segment corresponding to the data reading result. The verification result determination unit is used to process the first data segment based on the 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; The comparison unit is used to compare the first verification result and the second verification result to obtain the comparison result.

13. The apparatus according to claim 12, characterized in that, The verification result determination unit includes: The first determining subunit is used to determine the checksum of each data in the first data segment based on the check algorithm, and obtain the first check result; The second determining subunit is used to determine the checksum of each data in the second data segment based on the verification algorithm, and obtain the second verification result.

14. The apparatus according to claim 9, characterized in that, If the comparison result is inconsistent, the alarm device further includes: an instruction generation module, 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.

15. The apparatus according to claim 14, characterized in that, The alarm device also includes: A snapshot request generation module is used to generate a snapshot build request based on the comparison inconsistency results; A snapshot request sending module is used to send a snapshot build request to the second block device, so that the second block device can create a snapshot of the second block device based on the snapshot build request.

16. The apparatus according to claim 10, characterized in that, If the comparison result is inconsistent, the alarm device further includes: The cycle determination module is used to determine the next testing cycle corresponding to the current testing cycle; The identifier determination module is used to determine the identifier of the area to be tested corresponding to the next testing cycle based on the period identifier mapping relationship. The update request module is used to generate an update write request based on the identifier of the region to be tested; The update request sending module is used to send the update write request to the area under test in the first device based on the area under test identifier; the area under test is the area corresponding to the area under test identifier.

17. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the alarm method as described in any one of claims 1-8.

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

19. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the alarm method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • 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