A video image cross-node storage method and system
By building local Hadoop node clusters and circular linked list nodes in the HDFS system, using hash verification and circular logic references, the security and management issues of cloud storage video images are solved, efficient and safe video image storage is achieved, and the cost is reduced Network latency and traffic costs.
Patent Information
- Application Number
- CN202410867722.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-01
AI Technical Summary
Cloud storage of video images has security risks, difficult management, high traffic costs and network latency issues, and is prone to data leakage, tampering and loss.
The HDFS system is used to build a local Hadoop node cluster, video images are stored and managed through circular linked list nodes, hash verification is used to ensure data security and recoverability, and intelligent storage is achieved through circular logical references.
It achieves efficient, secure and easy-to-manage storage of video images, reduces network latency and traffic costs, avoids the risk of data loss and tampering, and improves the robustness of storage.
Smart Images

Figure CN118410204B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video image storage, and in particular to a video image cross-node storage method and system. Background Art
[0002] At present, the main method for storing large amounts of video is cloud storage. Cloud storage video images have low-cost scalability. Cloud storage video images allow users to dynamically increase or decrease storage space according to demand without purchasing additional hardware; and cloud storage video images can access data stored in the cloud through the Internet anytime and anywhere, which greatly increases the accessibility and convenience of data. However, the above-mentioned cloud storage video images are prone to security risks and are difficult to manage. Video images in the cloud are prone to data leakage, data tampering, and data loss. In addition, video images stored in the cloud will increase traffic costs, and are also affected by network transmission bandwidth, which makes video images stored in the cloud have large network delays under certain circumstances. Summary of the invention
[0003] One of the invention objects of the present invention is to provide a method and system for cross-node storage of video images. The method and system utilize the HDFS system (Hadoop Distributed File System) to construct a local Hadoop node cluster for video image storage, and the present invention constructs a circular linked list node in the Hadoop node cluster for storing video images of the same type or the same attributes. The video images can be efficiently stored and managed in a local storage space through the circular linked list node, and the circular linked list node can realize fast storage and query of the video images by setting pointers.
[0004] Another inventive object of the present invention is to provide a method and system for cross-node storage of video images, wherein the method and system utilize the naming node of the HDFS system to construct the circular linked list node for the storage node, wherein the circular linked list node uses hash verification to store and query the video image, and also constructs corresponding circular linked list nodes in the two replica storage nodes in the HDFS system, thereby making the circular linked list node recoverable, avoiding the problem of data loss due to node failure, and improving the robustness of the circular linked list node for video image storage.
[0005] Another inventive object of the present invention is to provide a method and system for cross-node storage of video images. The method and system can store images or video data with circular logical references constructed by the circular linked list nodes, making the image data storage more intelligent. When inserting or deleting the reference logic in the circular linked list nodes, the pointer pointing to the corresponding circular linked list node can be directly adjusted, thereby realizing efficient, safe and easy-to-manage storage of video images.
[0006] In order to achieve at least one of the above-mentioned invention objects, the present invention further provides a method for storing video images across nodes, the method comprising:
[0007] The naming node of the HDFS system generates different hash identifiers according to the relationship type of the video image to be stored, and the naming node constructs a circular linked list node in the storage node according to the hash identifier;
[0008] The naming node sends the corresponding hash identifier to the corresponding storage node, and sends the corresponding hash identifier to all the circular list nodes according to the circular linked list node where the storage node is located;
[0009] After acquiring the video image, constructing the channel, attribute or logical relationship of the video image, the naming node of the HDFS system assigns a corresponding hash identifier according to the channel, attribute or logical relationship of the video image, and sends the video image and the corresponding hash identifier to the circular linked list node;
[0010] After the corresponding circular linked list node obtains the video image, it verifies it according to the hash identifier stored in itself. If the verification passes, the video image is stored in the circular linked list node through the node pointer.
[0011] According to one of the preferred embodiments of the present invention, the method for constructing a circular linked list node includes: defining a class through the named node, including multiple defined storage nodes in the defined class, and configuring pointers in the multiple storage nodes, wherein the defined storage nodes include a head node and a tail node, each storage node points to the next storage node through the configured pointer, wherein the tail node pointer is configured to point to the head node, so as to construct a circular linked list node in the defined multiple storage nodes.
[0012] According to another preferred embodiment of the present invention, the method for constructing the hash identifier includes: obtaining the MAC address of the video image input interface, using a hash algorithm to calculate the MAC address of the input interface to obtain a hash value, using the hash value as the hash identifier of the channel relationship of the video image, sending the hash identifier of the channel relationship to one of the circular linked list nodes, traversing all corresponding nodes in the circular linked list according to the pointer of one of the circular linked list nodes, and sending the hash identifier of the channel relationship to all the same circular linked list nodes for storage, and the hash identifier of the channel relationship is used for channel storage verification of the corresponding video image.
[0013] According to another preferred embodiment of the present invention, the method for constructing the hash identifier includes: configuring a random number generator in the naming node, generating at least one random number using the random number generator, and after acquiring the video image, determining that the video image includes attributes of the video image format and the video image type, and assigning a random number according to the attributes of each video image including the format and type, and using a hash algorithm to calculate the hash value of the random number, using the hash value of the random number as the hash identifier of the corresponding video image attribute relationship, and sending the hash identifier of the video image attribute relationship to one of the circular linked list nodes, traversing all corresponding circular linked list nodes according to the pointer of one of the circular linked list nodes, and sending the hash identifier of the video image attribute relationship to all the same circular linked list nodes for storage, and the hash identifier of the video image attribute relationship is used for attribute verification of the corresponding video image.
[0014] According to another preferred embodiment of the present invention, the method for constructing the hash identifier includes: configuring a random number generator at the naming node, generating at least one random number using the random number generator, after acquiring the video image, identifying the characters and events in the video image using an AI model, and judging the logical relationship between the characters and events, assigning corresponding random numbers according to the logical relationship between the characters and events, and calculating the hash value of the random number using a hash algorithm, using the hash value of the random number as the hash identifier of the logical relationship corresponding to the video image, sending the hash identifier of the logical relationship to one of the circular linked list nodes, traversing all corresponding circular linked list nodes according to the pointer of one of the circular linked list nodes, sending the hash identifier of the logical relationship of the video image to all the same circular linked list nodes for storage, and the hash identifier of the logical relationship of the video image is used for logical verification of the corresponding video image.
[0015] According to another preferred embodiment of the present invention, the hash verification method includes: defining the hash identifier pre-stored in the circular linked list node as the first hash identifier, after the naming node of the HDFS system assigns the corresponding second hash identifier to each video image, binds the second hash identifier and the corresponding video image, and sends the second hash identifier to one of the storage nodes, the storage node compares the first hash identifier stored in itself with the second hash identifier, if the first hash identifier and the second hash identifier are the same, the storage node is verified, and the naming node sends the video image bound to the second hash identifier to the verified storage node for storage; if the storage node fails the verification, it returns verification failure, and the storage of the corresponding video image in the storage node is no longer executed.
[0016] According to another preferred embodiment of the present invention, the cross-node storage method of the circular linked list node includes: when the storage node verification is passed, the storage space of the current storage node is calculated; if the current storage node has no storage space, the storage space of the next storage node is calculated based on the pointer of the circular linked list node in the current storage node; if the next storage node has storage space, the video image bound to the second hash identifier is sent to the next storage node until the storage space of all the circular linked list nodes is full.
[0017] According to another preferred embodiment of the present invention, the cross-node storage method includes: after the HDFS system obtains the video image to be stored and constructs a circular linked list node, it automatically generates a copy of the video image, obtains the first hash identifier of the corresponding circular linked list node, configures the pointer and constructs a copy circular linked list node corresponding to the copy data, the first hash identifier is stored in each copy circular linked list node, when one of the storage nodes in the circular linked list node crashes and there is data loss, the named node searches for the corresponding data of the corresponding copy circular linked list node through the first hash identifier for the recovery of the corresponding lost data.
[0018] In order to achieve at least one of the above-mentioned invention purposes, the present invention further provides a video image cross-node storage system, and the system executes the above-mentioned video image cross-node storage method.
[0019] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned video image cross-node storage method. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 Shown is a schematic flow chart of a video image cross-node storage method of the present invention.
[0021] Figure 2 What is shown is a schematic diagram of the structure of the circular linked list node construction in the present invention.
[0022] Figure 3 Shown is a schematic diagram of the structure of the video graph cross-node storage system described in the present invention. DETAILED DESCRIPTION
[0023] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0024] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0025] Please combine Figure 1-Figure 3The present invention discloses a method and system for cross-node storage of video images. The method mainly includes the following steps: constructing at least one name node in the HDFS system, the name node can manage the data storage of multiple storage nodes in the HDFS system, storage node fault judgment and storage node data recovery, etc., wherein the name node also receives request data from different clients, and performs relevant operations of the corresponding storage node according to the request data of different clients, wherein the present invention uses the HDFS system to construct the name node and storage node locally, so that the video image will not have traffic and bandwidth pressure. Further, the present invention constructs a circular linked list node based on the name node and storage node, and uses the circular linked list node to perform efficient and standardized video image storage of client video images. It should be noted that the circular linked list node in the present invention is used as the relationship between video images for storage and query. The present invention uses the circular linked list node to store and query the corresponding video image according to the channel, attribute or logical relationship of the video image, thereby realizing the cross-node relational storage of the video image, so that the cross-node storage between different storage nodes increases the connection, and improves the efficiency of storage scheduling between different storage nodes by means of pointers. In addition, the present invention also configures different hash identifiers based on the channel, attribute or logical relationship of the video image, wherein the hash identifier is sent to the corresponding circular linked list node, and the corresponding circular linked list node stores the hash identifier and is used to verify whether the video image data to be sent has the corresponding hash identifier. If it exists, the verification is performed by allowing the video image data to be stored in the corresponding circular linked list node. When the naming node of the HDFS system is used to query the relevant data of the corresponding storage node, the specified circular linked list node can be found according to the hash identifier, and a circular fuzzy query can be performed according to the preset pointer, thereby improving the query effect of the video image.
[0026] Specifically, when the naming node of the HDFS system obtains a storage request from the client, the naming node obtains the mac address of the corresponding client channel according to the storage request message. The client channel includes different gateways, so the mac address can be the gateway mac address. After obtaining the mac address, the naming node further uses a hash algorithm to perform a hash operation on the mac address to obtain a hash identifier based on the mac address, and uses the hash identifier to construct a circular linked list node of the corresponding channel relationship.
[0027] In one of the preferred embodiments of the present invention, a circular linked list is constructed by acquiring information of multiple storage nodes through the naming node of the HDFS system, wherein the storage node information includes a storage node name, and each storage node name in the circular linked list serves as a corresponding circular linked list node. The class of the circular linked list is configured through the naming node, and the pre-acquired storage node name is added to the class of the circular linked list as the node of the circular linked list, and a pointer is further configured for each storage node in the class of the circular linked list, wherein the storage node includes a head node and a tail node, and there is only one pointer to the storage node, and each pointer points to a storage node in the circular linked list, and the pointer of the tail node of the storage node points to the head node. For example, the node names in the circular linked list are defined as: node1, node2, node3, node4. In C language or C++ language, an int pointer can be declared in each of the above storage nodes, and the pointer is pointed to the corresponding storage node address. For example, the node1 storage node is defined as the head node, the node4 node is defined as the tail node, the pointer declared in the node1 points to the address adr2 of node2, and similarly, the pointer declared in the node2 points to the address adr3 of node3, and the pointer of the tail node node4 points to the head node node1, thereby completing the construction of the circular linked list node. Of course, in another preferred embodiment of the present invention, in the JAVA language, a string object can be added to the class (class) of the established circular linked list, the string object has a corresponding storage node address, and the circular linked list node is established by referencing a variable storing the node name to point to the instance of the string object. The above process is equivalent to a pointer function. The pointer in the present invention can be understood as a functional description. The technical solutions that can realize the pointer function in the field of computer programs can be understood as technical solutions similar to the present invention.
[0028] After completing the construction of the circular linked list node of each storage node, the hash identifier is further sent to one of the circular linked list nodes through the naming node of the HDFS system. After obtaining the hash identifier, one of the circular linked list nodes sends the hash identifier to all nodes of the same circular linked list according to the pointer of the circular linked list. The nodes of the same circular linked list all store the hash identifier. It should be noted that there is only one hash identifier in a circular linked list, so the circular linked list node only stores and queries video images of a specific relationship.
[0029] Further, in one of the preferred embodiments of the present invention, when the HDFS system obtains the video image of the client, when the video image is larger than the storage space of the circular linked list constructed in the HDFS system, the video image needs to be split to obtain smaller data blocks bolck, wherein the data block bolck size can be set by the dfs.blocksize parameter. Generally speaking, each cut data block in the HDFS system is smaller than the complete storage space of the storage node. For example, when the size of one of the videos M is 1000MB, the video M can be split into 10 data blocks bolck1-data block bolck10 through the naming node in the HDFS system, wherein each data block bolck is less than 128MB. In one of the preferred embodiments of the present invention, the data block bolck is assigned a corresponding hash identifier to each of the split data blocks bolck according to the relationship type to which the video as a whole belongs. When the data block bolck is scheduled for storage, it is necessary to compare the assigned hash identifier with the hash identifier pre-stored in the corresponding circular linked list node. If the hash identifiers are the same, the verification is passed, otherwise the verification fails. At this time, the split data blocks are all assigned to the linked list nodes of the same relationship.
[0030] Specifically, after the naming node of the HDFS system obtains the MAC address of each input video image and performs a hash operation to obtain the hash identifier of the corresponding channel relationship, the naming node divides the video image into data blocks bolck that are smaller than the storage space of the corresponding circular linked list node according to the size of the video image, and binds the hash identifier of the channel relationship and the divided data block bolck, thereby realizing the storage of the corresponding data block bolck in the corresponding circular linked list.
[0031] In another preferred embodiment of the present invention, the naming node is also configured with a random number generator, wherein the random number generator of the naming node can be a pseudo-random number generator or a true random number generator, and the random number generator in the present invention is a software random number generator, and the random number generator can be obtained based on the software-related random number algorithm, wherein the true random number generator can be obtained by obtaining the uncertainty related to the computer hardware through the software. After generating the corresponding random number, the naming node stores the random number, and uses the hash algorithm to perform a hash operation on the random number to obtain a hash identifier. It should be noted that the hash identifier generated based on the random number in the present invention is used to configure and verify the attributes or logical relationships of the video image, wherein the hash identifier of the attribute relationship can be generated. After the attribute relationship is constructed, a circular linked list node based on the attribute relationship can be constructed through the naming node, that is, the hash identifier of the attribute relationship is sent to a corresponding circular linked list node, and the hash identifier of the attribute relationship is sent to all nodes of the circular linked list through the pointer of the circular linked list node. Thus, all nodes of the circular linked list are used to store, verify and query video images of specific attributes. It should be noted that the attribute relationship described in the present invention is that the named node is judged according to the attributes such as the format and type of the video image sent from the client. For example, the video format may include but is not limited to MP4, MOV, WMV and AVI formats, etc. In the present invention, the same random number generated hash identifier is bound to the above-mentioned videos of the same format, and different random number hash identifiers are bound to videos of different formats. And videos of different formats are stored in different circular linked lists. The format of the picture may include but is not limited to BMP, JPEG, PNG and GIF, etc. The same random number generated hash identifier is bound to the above-mentioned pictures of the same format, and different random number hash identifiers are bound to pictures of different formats.
[0032] In the present invention, the relationship included in the video image also includes a logical relationship, wherein the logical relationship can be considered as a cause-and-effect relationship between the content of a video image or a logical relationship of an event, such as the existence of different video images from the occurrence to the result of a certain event, such as a fire event in a certain area, and the video generated in the fire event includes a fire video, a corresponding fire alarm video, and a subsequent fire result report video, etc. There is a certain cause-and-effect relationship between the above different videos, so the AI model can be used to identify the feature image or feature text in the corresponding video image as a basis for judging that the corresponding image content has the same logical relationship, such as using the existing AI image recognition model to identify the fire situation at the same location, and using the AI voice recognition model to identify reports about the fire at the same location from the corresponding video. It should be noted that the above-mentioned AI image recognition model and AI voice recognition model are existing mature models, and the present invention does not improve the above-mentioned AI model, so the present invention will no longer elaborate on how to train the AI model. When the features of relevant content in the video image are identified by the AI model, the hash identifier of the logical relationship of the corresponding random number is bound to the video image, and the hash identifier of the logical relationship is sent to one of the nodes of the corresponding circular linked list through the named node. One of the nodes in the circular linked list sends the hash identifier of the logical relationship to all the nodes in the circular linked list through its own pointer.
[0033] In another preferred embodiment of the present invention, the logical relationship of cause and effect or events between the video image content can be identified based on character features, that is, the existing face recognition model and speech recognition model can be used to record the corresponding characters as the main features of the logical relationship of the video image. For example, if the input video is a biographical video of a certain person, when the naming node obtains the video, the relevant face recognition model or text recognition model is called to identify the main character features in the video, and the main character features are used as the basis for the logical relationship of the video image, and a hash identifier generated by random number calculation is bound to the video image. When the same main character features as before exist in different videos input subsequently, the hash identifier generated by the same random number calculation as the previous video is bound to different videos input subsequently. Storage verification and query are performed based on the hash identifier.
[0034] The storage verification method based on the hash identifier in the present invention includes channel verification, attribute verification and logic verification, wherein the specific verification method includes: defining the hash identifier pre-stored in the circular linked list node as the first hash identifier, the hash identifier assigned to each video image by the naming node of the HDFS system as the second hash identifier, binding the second hash identifier to the corresponding video image, and sending the second hash identifier to one of the storage nodes through the naming node, the storage node compares the first hash identifier stored in itself with the second hash identifier, if the first hash identifier and the second hash identifier are the same, the storage node is verified, and the naming node sends the video image bound to the second hash identifier to the storage node that has passed the verification for storage; if the storage node verification fails, verification failure is returned, and the storage of the corresponding video image in the storage node is no longer executed. Since the hash identifier in the present invention includes a channel relationship hash identifier, an attribute relationship hash identifier and a logical relationship hash identifier. Hash identifiers of different types of relationships can be stored separately through the naming node of the HDFS system. In other words, when the naming node of the HDFS system can select the client input video image to construct at least one of the channel relationship hash identifier, attribute relationship hash identifier and logical relationship hash identifier to store the corresponding circular linked list node according to the needs of its own storage mode.
[0035] In another preferred embodiment of the present invention, since the HDFS system will copy and create replica data when storing corresponding video data, and store it in the replica storage node, the present invention also performs the following processing on the replica data recovered from the storage node crash: after obtaining the video image to be stored and constructing the circular linked list node, the HDFS system automatically generates the replica data of the video image, obtains the first hash identifier of the corresponding circular linked list node, and constructs the replica circular linked list node corresponding to the replica data after configuring the pointer. The first hash identifier is stored in each replica circular linked list node. When one of the storage nodes in the circular linked list node crashes and there is data loss, the named node searches for the corresponding data of the corresponding replica circular linked list node through the first hash identifier for the recovery of the corresponding lost data. The replica circular linked list node is constructed the same as the original circular linked list node, and the present invention will not elaborate on this.
[0036] Furthermore, the present invention also makes the following scheduling for the storage method of each circular linked list node: when the storage node is verified, the storage space of the current storage node is calculated. If the current storage node has no storage space, the storage space of the next storage node is calculated according to the pointer of the circular linked list node in the current storage node. If the next storage node has storage space, the video image bound to the second hash identifier is sent to the next storage node until the storage space of all circular linked list nodes is full. When the corresponding circular linked list nodes are all fully stored, the named node can insert a new storage node name in the corresponding circular linked list, and adjust the pointer pointing of the storage node name and the pointer pointing of the previous node name to obtain the circular linked list node where the new node is inserted.
[0037] The embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. The embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU), the above-mentioned functions defined in the method of the present application are executed. It should be noted that the above-mentioned computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of an electrical, magnetic, optical, electromagnetic, infrared segment, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wire segments, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, electrical wire, optical cable, RF, etc., or any suitable combination of the foregoing.
[0038] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0039] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be deformed or modified in any way.
Claims
1. A video image cross-node storage method, characterized in that: The method comprises: The naming node of the HDFS system generates different hash identifiers according to the relationship type of the video image to be stored, and the naming node constructs a circular linked list node in the storage node according to the hash identifier; The naming node sends the corresponding hash identifier to the corresponding storage node, and sends the corresponding hash identifier to all the circular list nodes according to the circular linked list node where the storage node is located; After acquiring the video image, constructing the channel, attribute or logical relationship of the video image, the naming node of the HDFS system assigns a corresponding hash identifier according to the channel, attribute or logical relationship of the video image, and sends the video image and the corresponding hash identifier to the circular linked list node; After the corresponding circular linked list node obtains the video image, it verifies it according to the hash identifier stored in itself. If the verification passes, the video image is stored in the circular linked list node through the node pointer; The circular linked list node construction method includes: defining a class through the named node, including multiple defined storage nodes in the defined class, and configuring pointers in the multiple storage nodes, wherein the defined storage nodes include a head node and a tail node, each storage node points to the next storage node through the configured pointer, wherein the tail node pointer is configured to point to the head node, so as to construct a circular linked list node in the defined multiple storage nodes.
2. A video image cross-node storage method according to claim 1, characterized in that: The method for constructing the hash identifier includes: obtaining the MAC address of the video image input interface, using a hash algorithm to calculate the MAC address of the input interface to obtain a hash value, using the hash value as the hash identifier of the channel relationship of the video image, sending the hash identifier of the channel relationship to one of the circular linked list nodes, traversing all corresponding nodes in the circular linked list according to the pointer of one of the circular linked list nodes, and sending the hash identifier of the channel relationship to all the same circular linked list nodes for storage, and the hash identifier of the channel relationship is used for channel storage verification of the corresponding video image.
3. A video image cross-node storage method according to claim 1, characterized in that: The method for constructing the hash identifier includes: configuring a random number generator in the naming node, generating at least one random number using the random number generator, and after acquiring the video image, determining the attributes of the video image including the video image format and the video image type, and assigning a random number according to the attributes of each video image including the format and type, and using a hash algorithm to calculate the hash value of the random number, using the hash value of the random number as the hash identifier of the corresponding video image attribute relationship, and sending the hash identifier of the video image attribute relationship to one of the circular linked list nodes, traversing all corresponding circular linked list nodes according to the pointer of one of the circular linked list nodes, and sending the hash identifier of the video image attribute relationship to all the same circular linked list nodes for storage, and the hash identifier of the video image attribute relationship is used for attribute verification of the corresponding video image.
4. A video image cross-node storage method according to claim 1, characterized in that: The method for constructing the hash identifier includes: configuring a random number generator at the naming node, generating at least one random number using the random number generator, and after acquiring the video image, identifying the characters and events in the video image using an AI model, and judging the logical relationship between the characters and events, allocating corresponding random numbers according to the logical relationship between the characters and events, and calculating the hash value of the random number using a hash algorithm, using the hash value of the random number as the hash identifier of the logical relationship corresponding to the video image, sending the hash identifier of the logical relationship to one of the circular linked list nodes, traversing all corresponding circular linked list nodes according to the pointer of one of the circular linked list nodes, sending the hash identifier of the logical relationship of the video image to all the same circular linked list nodes for storage, and the hash identifier of the logical relationship of the video image is used for logical verification of the corresponding video image.
5. A video image cross-node storage method according to claim 1, characterized in that: The hash identifier verification method includes: defining the hash identifier pre-stored in the circular linked list node as the first hash identifier, after the naming node of the HDFS system assigns the corresponding second hash identifier to each video image, binds the second hash identifier to the corresponding video image, and sends the second hash identifier to one of the storage nodes, the storage node compares the first hash identifier stored in itself with the second hash identifier, if the first hash identifier and the second hash identifier are the same, the storage node is verified, and the naming node sends the video image bound to the second hash identifier to the verified storage node for storage; if the storage node fails the verification, it returns verification failure and no longer executes the storage of the corresponding video image in the storage node.
6. A video image cross-node storage method according to claim 5, characterized in that: The cross-node storage method of the circular linked list node includes: when the storage node is verified, the storage space of the current storage node is calculated; if the current storage node has no storage space, the storage space of the next storage node is calculated according to the pointer of the circular linked list node in the current storage node; if the next storage node has storage space, the video image bound to the second hash identifier is sent to the next storage node until the storage space of all the circular linked list nodes is full.
7. A video image cross-node storage method according to claim 5, characterized in that: The cross-node storage method includes: after the HDFS system obtains the video image to be stored and constructs a circular linked list node, it automatically generates the copy data of the video image, obtains the first hash identifier of the corresponding circular linked list node, configures the pointer and constructs the copy circular linked list node corresponding to the copy data, the first hash identifier is stored in each copy circular linked list node, when one of the storage nodes in the circular linked list node crashes and there is data loss, the named node searches for the corresponding data of the corresponding copy circular linked list node through the first hash identifier for the recovery of the corresponding lost data.
8. A video image cross-node storage system, characterized in that: The system executes a video image cross-node storage method as described in any one of claims 1-7 above.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the video image cross-node storage method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data access method and equipment
CN104636286A
Video image information acquisition method based on distributed cluster
CN110971872A
Transaction processing method and device, computer equipment and storage medium
CN111708615A
Data storage method and device, computer equipment and storage medium
CN112667592A
Storage cluster management method and device, electronic equipment and storage medium
CN114816225A
