Computing power resource information storage method and device, electronic equipment and storage medium

By hashing the computing resource information and matching the hash ring of the storage node, the problem of dynamic changes in the storage location of computing resource in the visual network is solved, and efficient resource allocation and response speed are achieved.

CN119166043APending Publication Date: 2024-12-20VISIONVERA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411065921.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the context of the widespread application of visual networking, the prior art is difficult to respond to the dynamically changing computing resource requirements in the network in real time, resulting in waste or insufficient resources and the inability to effectively manage the storage location of computing resource.

Method used

By hashing the computing resource information to be stored, the terminal hash value is generated, and matched with the pre-established storage node hash ring, the target storage node that meets the matching conditions is determined, and the computing resource information is stored in the node , realize dynamic resource allocation.

Benefits of technology

Real-time positioning and dynamic allocation of computing resource information is realized, service quality and response speed are improved, and resource waste or insufficient caused by manual intervention and static configuration are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166043A_ABST
    Figure CN119166043A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a computing power resource information storage method and device, electronic equipment and a storage medium. The method comprises the steps of performing hash processing on a terminal identifier of a computing power terminal corresponding to computing power resource information to be stored based on a computing power resource information storage request to obtain a terminal hash value of the computing power terminal; matching the terminal hash value with each storage node hash value, and determining the storage node corresponding to the storage node hash value meeting a matching condition as a target storage node; and storing the computing power resource information to be stored in the target storage node. According to the embodiment of the invention, the positioning of the storage position after the computing power terminal reports the resource is realized, the dynamic change demand and the resource state in the network are responded in real time, the allocation of the computing power resource is carried out based on the reported information, and the service quality and the response speed are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The visual network is a real-time network that can achieve real-time transmission of high-definition video across the entire network, which is impossible with the Internet, and will push many Internet applications towards high-definition video.

[0003] In the context of widespread application of visual networking, efficient management of computing resources has become the key to supporting complex services. In existing technical solutions, the storage location of computing resources usually relies on static configuration and manual intervention, which makes it difficult to respond to the dynamically changing needs and resource status in the network in real time, resulting in waste or insufficient computing resources. Summary of the invention

[0004] In view of the above problems, embodiments of the present application are proposed to provide a computing resource information storage method, device, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect, an embodiment of the present application provides a method for storing computing power resource information, the method comprising:

[0006] Based on the computing power resource information storage request, hash processing is performed on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored to obtain a terminal hash value of the computing power terminal;

[0007] Matching the terminal hash value with the hash values ​​of each storage node, and determining the storage node corresponding to the storage node hash value that meets the matching condition as the target storage node;

[0008] The computing power resource information to be stored is stored in the target storage node.

[0009] Optionally, matching the terminal hash value with the storage node hash value includes:

[0010] Obtain a node hash ring corresponding to a pre-established storage node, wherein each hash value constituting the node hash ring corresponds to a storage node hash value of a storage node;

[0011] The terminal hash value is matched with each hash value on the node hash ring.

[0012] Optionally, determining the storage node corresponding to the node hash value that meets the matching condition as the target storage node includes:

[0013] Find whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring;

[0014] When there is a storage node hash value identical to the terminal hash value on the node hash ring, the storage node hash value identical to the terminal hash value is determined as the target node hash value satisfying the matching condition, and the storage node corresponding to the target node hash value is the target storage node.

[0015] Optionally, determining the storage node corresponding to the node hash value that meets the matching condition as the target storage node includes:

[0016] Find whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring;

[0017] When there is no storage node hash value identical to the terminal hash value on the node hash ring, the storage node hash value closest to the terminal hash value is screened out from the node hash ring based on the adjacent node algorithm, and the storage node hash value closest to the terminal hash value is determined as the target node hash value that meets the matching condition, and the storage node corresponding to the target node hash value is the target storage node.

[0018] Optionally, the method further comprises:

[0019] Obtain node-specific attribute information of all storage nodes;

[0020] Perform hash processing on the node inherent attribute information of each storage node to obtain the storage node hash value of each storage node;

[0021] The storage node hash values ​​of all storage nodes are mapped to a pre-established empty hash ring to generate a node hash ring corresponding to all storage nodes.

[0022] In a second aspect, an embodiment of the present application provides a computing power resource information storage device, the device comprising:

[0023] A terminal hash value acquisition module is used to perform hash processing on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored based on the computing power resource information storage request to obtain the terminal hash value of the computing power terminal;

[0024] A target storage node determination module, used to match the terminal hash value with the hash values ​​of each storage node, and determine the storage node corresponding to the storage node hash value that meets the matching condition as the target storage node;

[0025] The computing power resource information storage module is used to store the computing power resource information to be stored in the target storage node.

[0026] Optionally, the target storage node determination module includes:

[0027] A node hash ring acquisition unit, used to acquire a node hash ring corresponding to a pre-established storage node, wherein each hash value constituting the node hash ring corresponds to a storage node hash value of a storage node;

[0028] The terminal hash value matching unit is used to match the terminal hash value with each hash value on the node hash ring.

[0029] Optionally, the target storage node determination module includes:

[0030] A node hash value search unit, used to search whether there is a storage node hash value identical to the terminal hash value on the node hash ring;

[0031] The first hash value acquisition unit is used to determine the storage node hash value that is the same as the terminal hash value as a target node hash value that meets the matching condition when there is a storage node hash value that is the same as the terminal hash value on the node hash ring, and the storage node corresponding to the target node hash value is the target storage node.

[0032] Optionally, the target storage node determination module includes:

[0033] A storage node hash value search unit, used to search whether there is a storage node hash value identical to the terminal hash value on the node hash ring;

[0034] The second hash value acquisition unit is used to filter out the storage node hash value closest to the terminal hash value from the node hash ring based on the adjacent node algorithm when there is no storage node hash value identical to the terminal hash value on the node hash ring, and determine the storage node hash value closest to the terminal hash value as the target node hash value that meets the matching condition.

[0035] Optionally, the device further comprises:

[0036] An inherent attribute acquisition module, used to acquire node inherent attribute information of all the storage nodes;

[0037] A node hash value acquisition module is used to perform hash processing on the node inherent attribute information of each storage node to obtain the storage node hash value of each storage node;

[0038] The node hash ring generation module is used to map the storage node hash values ​​of all storage nodes to a pre-established empty hash ring to generate node hash rings corresponding to all storage nodes.

[0039] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0040] one or more processors; and

[0041] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the device to execute any of the computing power resource information storage methods described above.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that enables a processor to execute any of the computing power resource information storage methods described above.

[0043] The embodiments of the present application include the following advantages:

[0044] The solution provided in the embodiment of the present application is to perform hash processing on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored based on the computing power resource information storage request to obtain the terminal hash value of the computing power terminal. The terminal hash value is matched with the hash value of each storage node, and the storage node corresponding to the storage node hash value that meets the matching condition is determined as the target storage node. The computing power resource information to be stored is stored in the target storage node. The embodiment of the present application stores the resource status information of the computing power terminal to the designated node according to the hash value corresponding to the terminal identifier, so as to locate the storage position after the computing power terminal reports the computing power resource information, respond to the dynamically changing demand and computing power resource information in the network in real time, and allocate computing power resources based on the reported information, thereby improving the service quality and response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flowchart of a method for storing computing power resource information provided in an embodiment of the present application;

[0046] Figure 2 A flowchart of a hash value matching method provided in an embodiment of the present application;

[0047] Figure 3 A flowchart of a method for obtaining a target node hash value provided in an embodiment of the present application;

[0048] Figure 4 A flowchart of another method for obtaining a target node hash value provided in an embodiment of the present application;

[0049] Figure 5 A flowchart of a method for generating a node hash ring provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of a system architecture process provided in an embodiment of the present application;

[0051] Figure 7 A schematic diagram of a computing resource information storage process provided in an embodiment of the present application;

[0052] Figure 8 A schematic diagram of the structure of a computing resource information storage device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0054] Reference Figure 1 , shows a flowchart of a method for storing computing resource information provided by an embodiment of the present application. Figure 1 As shown, the computing resource information storage method may include: step 101, step 102 and step 103.

[0055] Step 101: Based on a computing power resource information storage request, a terminal identifier of a computing power terminal corresponding to the computing power resource information to be stored is hashed to obtain a terminal hash value of the computing power terminal.

[0056] In this embodiment, the computing power terminal refers to a terminal device that has computing capabilities and performs computing tasks. In this example, the computing power terminal may include but is not limited to PC (Personal Computer), cloud phones, cloud computers and other devices.

[0057] Computing resources refer to the resources used by the computing terminal to perform computing tasks. In this example, computing resources may include but are not limited to CPU (Central Processing Processor), GPU (Graphics Processing Unit), memory and other resources.

[0058] The computing resource information refers to the resource status information of the computing resources in the computing terminal. In this example, the computing resource information may include, but is not limited to, the utilization rate, temperature, energy consumption, and other information of the computing resources.

[0059] In this embodiment, when storing the computing power resource information of the computing power resources in the computing power terminal, the computing power information collection module pre-built in the computing power terminal can collect the computing power resource information of the computing power resources in the computing power terminal in real time, such as collecting the CPU usage rate, energy consumption and other information in the computing power terminal. The computing power terminal generates a computing power resource information storage request based on the computing power resource information collected by the computing power information collection module for real-time reporting.

[0060] In a specific implementation of the present application, the computing power resource information of the computing power terminal can be obtained once every preset time period, such as 30 minutes, 2 hours, etc.

[0061] In another specific implementation of the present application, after the computing power terminal generates a computing power resource information storage request based on the computing power information collection module, the computing power resource information storage request can be reported through a low-latency information transmission protocol (such as a visual network protocol, etc.). This protocol focuses on accelerating the computing power resource information reporting process of the computing power terminal while ensuring the security and integrity of the data during transmission. This protocol can maintain a highly stable communication link when the network bandwidth is tight or facing complex network conditions, thereby ensuring the smooth flow and real-time analysis and processing of computing power information.

[0062] The terminal identifier refers to an identifier used to indicate the identity of the computing power terminal. In this example, the terminal identifier can be the inherent attribute information of the computing power terminal to indicate the unique identity of the computing power terminal, such as the IP address, host number, and other information of the computing power terminal.

[0063] Hash processing is a process of transforming an input of any length into a fixed-length output (called a hash value) through a hash algorithm. In this example, the hash algorithm may be, but is not limited to, an MD5 algorithm, a SHA algorithm, and the like.

[0064] After receiving the computing power resource information storage request of the computing power terminal, the computing power resource information storage request can be parsed to obtain the computing power resource information of the computing power terminal. Furthermore, the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored can be hashed to obtain the terminal hash value of the computing power terminal. It can be understood that if the terminal identifier is text information such as the terminal name of the computing power terminal, when calculating the terminal hash value, it is necessary to convert the text information such as the terminal name into numerical information, and then perform hashing to obtain the terminal hash value.

[0065] The embodiment of the present application can locate the storage location of the computing power resource information by hashing the terminal identifier and storing the computing power resource information corresponding to the computing power terminal to a designated storage node according to the obtained hash value of the computing power terminal.

[0066] After hashing the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored to obtain the terminal hash value of the computing power terminal based on the computing power resource information storage request, step 102 is executed.

[0067] Step 102: Match the terminal hash value with the hash values ​​of each storage node, and determine the storage node corresponding to the storage node hash value that meets the matching condition as the target storage node.

[0068] The target storage node refers to the storage node used to store the computing resource information of the computing terminal.

[0069] After obtaining the terminal hash value of the computing power terminal, the terminal hash value can be matched with the storage node hash value of each storage node to obtain the storage node hash value that meets the matching condition. Furthermore, the storage node corresponding to the storage node hash value that meets the matching condition can be used as the target storage node.

[0070] In this embodiment, a node hash ring corresponding to the storage node can be pre-established, and the storage node hash value corresponding to the storage node is marked on the node hash ring. After obtaining the terminal hash value of the computing power terminal, the terminal hash value matching process can be performed through the node hash ring. Figure 2 This is described in detail as follows.

[0071] Reference Figure 2 , shows a flowchart of a hash value matching method provided by an embodiment of the present application. Figure 2 As shown, the hash value matching method may include: step 201 and step 202.

[0072] Step 201: Obtain a pre-established node hash ring corresponding to a storage node, wherein each hash value constituting the node hash ring corresponds to a storage node hash value of a storage node.

[0073] In this embodiment, the node hash ring refers to a pre-established hash ring for storing the node hash values ​​corresponding to the storage nodes. The establishment process of the node hash ring will be described in the following embodiments in conjunction with Figure 5 A detailed description is given below and this embodiment will not be described in detail here.

[0074] After obtaining the terminal hash value of the computing power terminal, the node hash ring corresponding to the pre-established storage node can be obtained. Each hash value on the node hash ring corresponds to the storage node hash value of a storage node.

[0075] After obtaining the node hash ring corresponding to the pre-established storage node, step 202 is executed.

[0076] Step 202: Match the terminal hash value with each hash value on the node hash ring.

[0077] After obtaining the node hash ring corresponding to the pre-established storage node, the terminal hash value can be matched with each hash value on the node hash ring.

[0078] The embodiment of the present application can quickly find the storage node that matches the terminal hash value by matching the node hash ring of the pre-established storage node with the terminal hash value, thereby improving the storage efficiency of the computing resource information of the computing power terminal and the accuracy of the storage node positioning.

[0079] In this embodiment, when there is a storage node hash value that is the same as the terminal hash value on the node hash ring, the storage node hash value can be used as the target node hash value corresponding to the computing power terminal. Figure 3 This is described in detail as follows.

[0080] Reference Figure 3 , shows a flowchart of the steps of a method for obtaining a target node hash value provided by an embodiment of the present application. Figure 3 As shown, the method for obtaining the target node hash value may include: step 301 and step 302.

[0081] Step 301: Find whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring.

[0082] In this embodiment, after obtaining the terminal hash value of the computing power terminal, it is possible to search whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring.

[0083] Step 302: When there is a storage node hash value identical to the terminal hash value on the node hash ring, determine the storage node hash value identical to the terminal hash value as the target node hash value that meets the matching condition.

[0084] If there is a storage node hash value that is the same as the terminal hash value on the node hash ring, the storage node hash value that is the same as the terminal hash value can be used as the target node hash value, and the storage node corresponding to the target node hash value is the target storage node. For example, the terminal hash value is 10, and the storage node hash values ​​on the node hash ring include: 1, 8, 10, 23, etc. At this time, the storage node hash value 10 can be used as the target node hash value, etc.

[0085] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.

[0086] The embodiment of the present application searches for a storage node hash value that is the same as the terminal hash value as the target node hash value through a node hash ring, and locates the node storing the computing power resource information of the computing power terminal according to the target node hash value, thereby realizing rapid positioning of the storage node and rapid storage of the computing power resource information.

[0087] In this embodiment, when there is no storage node hash value that is the same as the terminal hash value on the node hash ring, the adjacent node algorithm can be used to find the target node hash value from the node hash ring. Figure 4 This is described in detail as follows.

[0088] Reference Figure 4, shows a flowchart of another method for obtaining a target node hash value provided by an embodiment of the present application. Figure 4 As shown, the method for obtaining the target node hash value may include: step 401 and step 402.

[0089] Step 401: Find whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring.

[0090] In this embodiment, after obtaining the terminal hash value of the computing power terminal, it is possible to search whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring.

[0091] Step 402: When there is no storage node hash value identical to the terminal hash value on the node hash ring, the storage node hash value closest to the terminal hash value is screened out from the node hash ring based on the adjacent node algorithm, and the storage node hash value closest to the terminal hash value is determined as the target node hash value that meets the matching condition.

[0092] In the case that there is no storage node hash value identical to the terminal hash value on the node hash ring, the storage node hash value closest to the terminal hash value can be screened out from the node hash ring based on the adjacent node algorithm, and the storage node hash value closest to the terminal hash value is used as the target node hash value, and the storage node corresponding to the target node hash value is the target storage node. For example, the terminal hash value is 12, and the storage node hash values ​​on the node hash ring are: 1, 5, 6, 10, 15, 22, etc. When the adjacent node algorithm is used to search for the target node hash value, the storage node hash value adjacent to the terminal hash value can be searched from the node hash ring, that is, the storage node hash value 10 and the storage node hash value 15 on the node hash ring are the storage node hash values ​​adjacent to the terminal hash value 12. Then, the distance between adjacent storage node hash values ​​and terminal hash values ​​can be calculated, that is, the distance between storage node hash value 10 and terminal hash value 12 is 2, and the distance between storage node hash value 15 and terminal hash value 12 is 3. At this time, it can be determined that storage node hash value 10 is the storage node hash value closest to terminal hash value 12, and storage node hash value 10 is used as the target node hash value, etc.

[0093] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.

[0094] The embodiment of the present application can realize the positioning storage of computing power resource information of the computing power terminal by using an adjacent node algorithm to obtain a target node hash value that matches the terminal hash value on the node hash ring when there is no storage node hash value identical to the terminal hash value in the node hash ring.

[0095] Next, combine Figure 5 The process of establishing the node hash ring is described in detail.

[0096] Reference Figure 5 , shows a flowchart of the steps of a node hash ring generation method provided by an embodiment of the present application. Figure 5 As shown, the node hash ring generation method may include: step 501, step 502 and step 503.

[0097] Step 501: Obtain node-specific attribute information of all the storage nodes.

[0098] In this embodiment, the node inherent attribute refers to the inherent attribute of the storage node, such as the factory serial number information of the storage node, the node number allocated by the server to the storage node, and other information.

[0099] When constructing the node hash ring of the storage nodes, the node inherent attribute information of all the storage nodes can be obtained.

[0100] After acquiring the node-specific attribute information of all storage nodes, step 502 is executed.

[0101] Step 502: Perform hash processing on the node inherent attribute information of each storage node respectively to obtain the storage node hash value of each storage node.

[0102] After the node inherent attribute information of all storage nodes is acquired, the node inherent attribute information of each storage node may be hashed to obtain the storage node hash value of each storage node.

[0103] It can be understood that in this example, the hash algorithm used for hashing the node inherent attribute information and the hashing of the terminal identification should be consistent to avoid inconsistent generated hash values.

[0104] After performing hash processing on the node inherent attribute information of each storage node to obtain the storage node hash value of each storage node, step 503 is executed.

[0105] Step 503: Map the storage node hash values ​​of all storage nodes to a pre-established empty hash ring to generate a node hash ring corresponding to all storage nodes.

[0106] After hashing the node inherent attribute information of each storage node to obtain the storage node hash value of each storage node, the storage node hash values ​​of all storage nodes can be used as the node identification of the storage node, and the storage node hash values ​​of all storage nodes can be mapped to a pre-established empty hash ring to generate a node hash ring corresponding to all storage nodes. In a specific implementation, an empty hash ring can be established in advance, and the number of added hash values ​​(such as 10000, 20000, etc.) can be pre-set on the empty hash ring. After obtaining the storage node hash value of the storage node, the storage node hash values ​​of all storage nodes can be mapped to the empty hash ring to obtain a node hash ring.

[0107] The embodiment of the present application establishes a node hash ring of the storage node to store the storage node hash value of the storage node, so that when the system storage resources are updated (such as the increase and decrease of storage nodes), the node hash ring will be dynamically updated, and when the computing power terminal is stored, it is possible to update the storage location to the latest storage node according to the hash value match. At this time, the information stored on the previous storage node can be used as a backup. Thereby achieving balanced resource allocation, manual updates can be avoided, and the investment in labor costs can be reduced.

[0108] After matching the terminal hash value with the hash values ​​of each storage node and determining the storage node corresponding to the storage node hash value that meets the matching condition as the target storage node, step 103 is executed.

[0109] Step 103: Store the computing resource information to be stored in the target storage node.

[0110] After obtaining the target storage node, the computing power resource information of the computing power terminal can be stored in the target storage node.

[0111] The embodiments of the present application achieve computing power allocation by responding in real time to dynamically changing demands and computing power resource information in the network, and allocating computing power resources based on the reported information. Specifically, when processing computing power tasks, there is no need to obtain the computing power resource information of the computing power resources of the computing power terminal to allocate computing power to meet the computing power requirements of the computing power tasks. Instead, the computing power resource information can be directly obtained from the storage node to determine the computing power resources that meet the computing power requirements of the computing power tasks, thereby achieving computing power allocation, improving the efficiency of computing power allocation, and further improving service quality and response speed.

[0112] Next, combine Figure 6 The storage process of computing resource information is described in detail.

[0113] Reference Figure 6 , which shows a schematic diagram of a system architecture process provided by an embodiment of the present application. Figure 6As shown, the system architecture flow may include:

[0114] 1. Task initialization, task initialization is an important step in project management, which involves making all necessary preparations for the upcoming task or project to ensure that the task can proceed smoothly and achieve the intended goal. In this example, task initialization can determine the computing power terminal, the type of computing power resource, and the type of resource status parameter required to store resource status parameters.

[0115] 2. Computing power equipment collection: Computing power equipment (such as a computing power information collection module, etc.) can be pre-set in the computing power terminal. Through this computing power equipment, key parameters such as the utilization rate, temperature, energy consumption, etc. of computing power resources such as CPU, GPU, and memory in the computing power terminal can be collected in real time (i.e., the computing power resource information in this embodiment).

[0116] 3. Task scheduling: Task scheduling refers to the allocation and management of tasks (or processes, threads) in the system according to certain algorithms and rules, in order to optimize resource usage, improve system response speed, ensure tasks are completed on time, etc. In practical applications, task scheduling can be implemented in a variety of ways, such as multithreading, timers, thread pools (such as ScheduledExecutorService in Java), etc., to report computing resource status parameters in real time.

[0117] 4. Computing power protocol transmission. In this example, an efficient and low-latency information transmission protocol can be used. This protocol focuses on accelerating the real-time computing power data reporting process of the computing power terminal, while ensuring the security and integrity of the data during transmission. This protocol has been carefully optimized to maintain a highly stable communication link when the network bandwidth is tight or facing complex network conditions, thereby ensuring the smooth flow and instant analysis and processing of computing power information.

[0118] 5. Receiving module. In this example, the receiving module on the server side can receive the resource status parameters of the computing power resources of the computing power terminal. Create a virtual hash ring on the server side, and connect the head and tail. The virtual hash ring can efficiently locate the node position in the dynamically changing storage node set. Then map each storage service number (that is, the node hash value of the storage node) to the hash ring. After obtaining the reported computing power device information data. The location can be confirmed by the positioning algorithm. Next, first obtain the terminal identifier in the user message from the program, such as the IP host number HostID (1~254). The terminal identifier is used to uniquely identify a device in a specific network. Use the hash algorithm to calculate the terminal identifier. Go to hit the storage location. If the specific value cannot be hit, then match the nearest hash position on the ring based on the adjacent algorithm. Finally, calculate the location of the available storage node closest to the calculation result, and finally store the computing power data in the corresponding storage server.

[0119] 6. Central intelligent scheduling. On the server side, a central scheduling system with big data analysis and machine learning capabilities can be built to receive and process reported information, analyze computing resource status in real time, and predict future resource demand trends.

[0120] 7. Resource calculation results. That is, dynamically adjust the computing power allocation strategy through real-time resource algorithm analysis results.

[0121] 8. Console management. The console can provide a visual monitoring interface for managers to monitor the status of computing resources and the execution of scheduling strategies in real time, and support manual intervention and adjustment to meet special needs.

[0122] Reference Figure 7 , which shows a schematic diagram of a computing resource information storage process provided by an embodiment of the present application. Figure 7 As shown, the process may include:

[0123] 1) Initialize the task. Task initialization is an important step in project management. It involves making all necessary preparations for the task or project to be performed to ensure that the task can proceed smoothly and achieve the intended goal. In this example, task initialization can determine the computing power terminal, the type of computing power resource, and the type of resource status parameter required to store resource status parameters.

[0124] 2) The computing power collection module collects computing power resource information. That is, the computing power collection module built into the computing power terminal collects the resource status parameters of the computing power resources in the computing power terminal in real time.

[0125] 3) Packing into a message. The computing power resource information and the terminal identifier of the computing power terminal can be packaged together to generate a computing power resource information message of the computing power terminal.

[0126] 4) Through low-latency information transmission protocol. That is, design and implement an efficient and low-latency information transmission protocol (such as the visual network protocol) to report messages to the server. This protocol can maintain a highly stable communication link when the network bandwidth is tight or facing complex network conditions, thereby ensuring the smooth flow of computing power information and real-time analysis and processing.

[0127] 5) The data receiving module receives the message. That is, the data receiving module in the server can receive the computing resource information message reported by the computing terminal.

[0128] 6) Algorithm locates the storage location. That is, by hashing the terminal identifier of the computing power terminal, the terminal hash value is obtained, and the storage location (i.e., storage node) of the computing power resource information corresponding to the computing power terminal is determined in combination with the pre-established node hash ring.

[0129] 7) Data storage. That is, after determining the storage node corresponding to the computing power terminal, the computing power resource information of the computing power terminal can be stored in the storage node to realize the positioning storage of real-time computing power resource information.

[0130] 8) Central intelligent dispatching platform. Build a central dispatching system with big data analysis and machine learning capabilities to receive and process reported information, analyze computing resource status in real time, and predict future resource demand trends.

[0131] 9) Dynamically adjust the computing power allocation strategy. Specifically, the computing power allocation strategy can be dynamically adjusted according to the real-time resource algorithm analysis results, that is, the computing power allocation strategy can be adjusted according to the future resource demand trend predicted by the central intelligent scheduling platform.

[0132] 10) Managers monitor through the web interface. The calculated results can assist managers in real-time monitoring the status of computing resources, the execution of scheduling strategies, and the execution effect of scheduling strategies through the web interface.

[0133] The above method provided in the embodiment of the present application can realize the positioning of the storage location after the computing power terminal reports the resources, as well as the intelligent resource optimization allocation based on the reported information, which can improve the service quality and response speed.

[0134] The computing power resource information storage method provided in the embodiment of the present application performs hash processing on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored based on the computing power resource information storage request to obtain the terminal hash value of the computing power terminal. The terminal hash value is matched with the hash value of each storage node, and the storage node corresponding to the storage node hash value that meets the matching condition is determined as the target storage node. The computing power resource information to be stored is stored in the target storage node. The embodiment of the present application stores the resource status information of the computing power terminal to the designated node according to the hash value corresponding to the terminal identifier, so as to locate the storage position after the computing power terminal reports the computing power resource information, respond to the dynamically changing demand and computing power resource information in the network in real time, and allocate computing power resources based on the reported information, thereby improving the service quality and response speed.

[0135] It should be noted that, for the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0136] Reference Figure 8 , shows a schematic diagram of the structure of a computing resource information storage device provided in an embodiment of the present application. Figure 8 As shown, the computing power resource information storage device 800 may include the following modules:

[0137] The terminal hash value acquisition module 810 is used to perform hash processing on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored based on the computing power resource information storage request to obtain the terminal hash value of the computing power terminal;

[0138] The target storage node determination module 820 is used to match the terminal hash value with the hash values ​​of each storage node, and determine the storage node corresponding to the storage node hash value that meets the matching condition as the target storage node;

[0139] The computing power resource information storage module 830 is used to store the computing power resource information to be stored in the target storage node.

[0140] Optionally, the target storage node determination module includes:

[0141] A node hash ring acquisition unit, used to acquire a node hash ring corresponding to a pre-established storage node, wherein each hash value constituting the node hash ring corresponds to a storage node hash value of a storage node;

[0142] The terminal hash value matching unit is used to match the terminal hash value with each hash value on the node hash ring.

[0143] Optionally, the target storage node determination module includes:

[0144] A node hash value search unit, used to search whether there is a storage node hash value identical to the terminal hash value on the node hash ring;

[0145] The first hash value acquisition unit is used to determine the storage node hash value that is the same as the terminal hash value as a target node hash value that meets the matching condition when there is a storage node hash value that is the same as the terminal hash value on the node hash ring, and the storage node corresponding to the target node hash value is the target storage node.

[0146] Optionally, the target storage node determination module includes:

[0147] A storage node hash value search unit, used to search whether there is a storage node hash value identical to the terminal hash value on the node hash ring;

[0148] The second hash value acquisition unit is used to filter out the storage node hash value closest to the terminal hash value from the node hash ring based on the adjacent node algorithm when there is no storage node hash value identical to the terminal hash value on the node hash ring, and determine the storage node hash value closest to the terminal hash value as the target node hash value that meets the matching condition.

[0149] Optionally, the device further comprises:

[0150] An inherent attribute acquisition module, used to acquire node inherent attribute information of all the storage nodes;

[0151] A node hash value acquisition module is used to perform hash processing on the node inherent attribute information of each storage node to obtain the storage node hash value of each storage node;

[0152] The node hash ring generation module is used to map the storage node hash values ​​of all storage nodes to a pre-established empty hash ring to generate node hash rings corresponding to all storage nodes.

[0153] The computing power resource information storage device provided in the embodiment of the present application performs hash processing on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored based on the computing power resource information storage request to obtain the terminal hash value of the computing power terminal. The terminal hash value is matched with the hash value of each storage node, and the storage node corresponding to the storage node hash value that meets the matching condition is determined as the target storage node. The computing power resource information to be stored is stored in the target storage node. The embodiment of the present application stores the resource status information of the computing power terminal to the designated node according to the hash value corresponding to the terminal identifier, so as to locate the storage position after the computing power terminal reports the computing power resource information, respond to the dynamically changing demand and computing power resource information in the network in real time, and allocate computing power resources based on the reported information, thereby improving the service quality and response speed.

[0154] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0155] In an embodiment of the present application, an electronic device is also provided. The electronic device may include one or more processors, and one or more machine-readable media storing instructions thereon, the instructions being, for example, application programs. When the instructions are executed by the one or more processors, the processors execute any of the above-mentioned computing resource information storage methods.

[0156] In an embodiment of the present application, a non-temporary computer-readable storage medium is also provided, on which a computer program is stored, and the program can be executed by a processor of an electronic device to implement any of the above computing resource information storage methods. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.

[0157] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0158] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0159] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0163] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0164] The above is a detailed introduction to a computing resource information storage method, device, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for storing computing power resource information, characterized in that: The method comprises: Based on the computing power resource information storage request, hash processing is performed on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored to obtain a terminal hash value of the computing power terminal; Matching the terminal hash value with the hash values ​​of each storage node, and determining the storage node corresponding to the storage node hash value that meets the matching condition as the target storage node; The computing power resource information to be stored is stored in the target storage node.

2. The method according to claim 1, characterized in that The matching of the terminal hash value with the storage node hash value includes: Obtain a node hash ring corresponding to a pre-established storage node, wherein each hash value constituting the node hash ring corresponds to a storage node hash value of a storage node; The terminal hash value is matched with each hash value on the node hash ring.

3. The method according to claim 1 or 2, characterized in that: The step of determining the storage node corresponding to the node hash value that meets the matching condition as the target storage node includes: Find whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring; When there is a storage node hash value identical to the terminal hash value on the node hash ring, the storage node hash value identical to the terminal hash value is determined as the target node hash value satisfying the matching condition, and the storage node corresponding to the target node hash value is the target storage node.

4. The method according to claim 1 or 2, characterized in that: The step of determining the storage node corresponding to the node hash value that meets the matching condition as the target storage node includes: Find whether there is a storage node hash value that is the same as the terminal hash value on the node hash ring; When there is no storage node hash value identical to the terminal hash value on the node hash ring, the storage node hash value closest to the terminal hash value is screened out from the node hash ring based on the adjacent node algorithm, and the storage node hash value closest to the terminal hash value is determined as the target node hash value that meets the matching condition, and the storage node corresponding to the target node hash value is the target storage node.

5. The method according to claim 2, characterized in that: The method further comprises: Obtain node-specific attribute information of all storage nodes; Perform hash processing on the node inherent attribute information of each storage node to obtain the storage node hash value of each storage node; The storage node hash values ​​of all storage nodes are mapped to a pre-established empty hash ring to generate a node hash ring corresponding to all storage nodes.

6. A computing resource information storage device, characterized in that: The device comprises: A terminal hash value acquisition module is used to perform hash processing on the terminal identifier of the computing power terminal corresponding to the computing power resource information to be stored based on the computing power resource information storage request to obtain the terminal hash value of the computing power terminal; A target storage node determination module, used to match the terminal hash value with the hash values ​​of each storage node, and determine the storage node corresponding to the storage node hash value that meets the matching condition as the target storage node; The computing power resource information storage module is used to store the computing power resource information to be stored in the target storage node.

7. The device according to claim 6, characterized in that The target storage node determination module includes: A node hash ring acquisition unit, used to acquire a node hash ring corresponding to a pre-established storage node, wherein each hash value constituting the node hash ring corresponds to a storage node hash value of a storage node; The terminal hash value matching unit is used to match the terminal hash value with each hash value on the node hash ring.

8. The device according to claim 6 or 7, characterized in that The target storage node determination module includes: A node hash value search unit, used to search whether there is a storage node hash value identical to the terminal hash value on the node hash ring; The first hash value acquisition unit is used to determine the storage node hash value that is the same as the terminal hash value as a target node hash value that meets the matching condition when there is a storage node hash value that is the same as the terminal hash value on the node hash ring, and the storage node corresponding to the target node hash value is the target storage node.

9. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the device to execute the computing resource information storage method as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the computing resource information storage method as described in any one of claims 1 to 5.