Information acquisition method, server cluster, server and device

By determining the resource group and node of the target user in large-scale resource monitoring scenarios, and directly jumping to the target node to obtain information, the problem of low query efficiency of the main node is solved and the efficiency of information acquisition is improved.

CN114090388BActive Publication Date: 2025-09-30NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111407957.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2025-09-30
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

In large-scale resource monitoring scenarios, the query efficiency of the master node is limited, making it difficult to effectively share the pressure, affecting the efficiency of users in viewing information about target resources.

Method used

By determining the resource group and node corresponding to the target user's identifier, it directly jumps to the target node that stores the target resource information, reducing the query pressure of the root node and improving the efficiency of information acquisition.

Benefits of technology

It realizes the direct jump from the root node to the target node among multiple nodes in the hierarchical relationship, sharing the query pressure of the root node and improving the query efficiency of the target resource information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090388B_ABST
    Figure CN114090388B_ABST
Patent Text Reader

Abstract

The present application provides an information acquisition method, a server cluster, a server, and a device, relating to the field of Internet technology. The method is applied to a server cluster, the server cluster including multiple nodes in a hierarchical relationship; the method includes: obtaining an information acquisition request, the information acquisition request being used to request information about a target resource, the information acquisition request including an identifier of a target user; determining M resource groups corresponding to the identifier of the target user; based on the M resource groups, determining N nodes, the N nodes including one or more nodes corresponding to each of the M resource groups; the server cluster including N nodes; based on the N nodes, determining a target node, the target node storing information about the target resource; the target node outputting the information about the target resource. The method can improve query efficiency while ensuring that the user can view the information about the target resource.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet technology, and more specifically, to an information acquisition method, a server cluster, a server, and a device. Background Art

[0002] In the face of scenarios where tens of thousands of large-scale resource monitoring or network isolation exists between monitoring nodes, it is very necessary to introduce a distributed monitoring and collection architecture. Currently, under the existing monitoring architecture, the main function of the master node is to aggregate and display the monitoring data of each agent node, while the main function of the agent node is to collect monitoring data and report it to the master node. The master node is the root node in the existing monitoring architecture, and the agent node is the child node under the root node in the existing monitoring architecture.

[0003] As the amount of monitored resources gradually increases, ordinary users originally only need to view the monitoring information of a small number of resources under their own authority. However, since the master node database stores the entire set of resources, the query efficiency of each operation needs to be optimized to ensure.

[0004] Therefore, when users view the information of target resources, how to share the pressure of the master node and improve the query efficiency is an urgent problem to be solved in this field. Summary of the Invention

[0005] Provided are an information acquisition method, a server cluster, a server, and a device, which can improve query efficiency while ensuring that users can view information about target resources.

[0006] In a first aspect, an information acquisition method is provided, the method being applied to a server cluster, the server cluster comprising a plurality of nodes in a hierarchical relationship;

[0007] The method includes:

[0008] Obtain an information acquisition request, where the information acquisition request is used to request information about a target resource, and the information acquisition request includes an identifier of a target user;

[0009] Determine M resource groups corresponding to the identifier of the target user, where M is a positive integer greater than or equal to 1;

[0010] Determine N nodes based on the M resource groups, where the N nodes include one or more nodes corresponding to each resource group in the M resource groups, where N is a positive integer greater than or equal to 1, and the server cluster includes the N nodes;

[0011] Determine a target node based on the N nodes, where the target node stores information about the target resource;

[0012] The target node outputs the information of the target resource.

[0013] In a second aspect, a method for obtaining information is provided. The method is applied to a first server and includes:

[0014] Receiving original data sent by the cache server, where the original data includes an identifier of the first resource;

[0015] Based on the identifier of the first resource, processing the original data corresponding to the identifier of the first resource in the original data for at least one preset period to obtain at least one information of the first resource;

[0016] Determining, based on the identifier of the first resource, an identifier of a first node corresponding to the identifier of the first resource;

[0017] The at least one information is sent to a first node corresponding to the identifier of the first node and all parent nodes of the first node.

[0018] In a third aspect, a server cluster is provided, the server cluster including a plurality of nodes in a hierarchical relationship;

[0019] The server cluster includes:

[0020] an acquiring unit, configured to acquire an information acquisition request, wherein the information acquisition request is used to request information about a target resource, and the information acquisition request includes an identifier of a target user;

[0021] A first determining unit, configured to determine M resource groups corresponding to the identifier of the target user, where M is a positive integer greater than or equal to 1;

[0022] a second determining unit, configured to determine N nodes based on the M resource groups, where the N nodes include one or more nodes corresponding to each of the M resource groups, where N is a positive integer greater than or equal to 1, and the server cluster includes the N nodes;

[0023] A third determining unit is configured to determine a target node based on the N nodes, where the target node stores information about the target resource;

[0024] The output unit is used for the target node to output the information of the target resource.

[0025] In a fourth aspect, a server is provided, comprising:

[0026] a receiving unit, configured to receive original data sent by the cache server, where the original data includes an identifier of the first resource;

[0027] a data processing unit, configured to perform data processing on raw data corresponding to the identifier of the first resource in the raw data at at least one preset period based on the identifier of the first resource to obtain at least one information of the first resource;

[0028] a determining unit, configured to determine, based on the identifier of the first resource, an identifier of a first node corresponding to the identifier of the first resource;

[0029] A sending unit is configured to send the at least one information to the first node corresponding to the identifier of the first node and all parent nodes of the first node.

[0030] According to a fifth aspect, an electronic device is provided, including:

[0031] a processor adapted to execute a computer program;

[0032] A computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method of the first aspect or the method of the second aspect is implemented.

[0033] In a sixth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method of the first aspect or the method of the second aspect.

[0034] In a seventh aspect, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the method of the first aspect or the method of the second aspect.

[0035] Based on the above scheme, first, this application determines M resource groups corresponding to the identifier of the target user, which is equivalent to taking into account the permissions of the resource groups accessible to the target user; secondly, it determines N nodes corresponding to the M resource groups, which is equivalent to taking into account that the resources in the resource groups accessible to the target user are related to the N nodes; finally, based on the N nodes, it determines the target node, which enables the target user to jump directly from the root node to the only target node when accessing the top-level node (root node) among multiple nodes with a hierarchical relationship. Since the target node stores the information of the target resource, the target resource information is directly output by the target node, so that when obtaining the target resource information from multiple nodes with a hierarchical relationship, it is no longer all obtained from the root node, but the pressure of the root node to query the target resource information is shared through the target node. Moreover, the target node has less data than the root node. Outputting the target resource information at the target node improves the query efficiency of the target resource information, that is, improves the efficiency of the user in obtaining the target resource information.

[0036] That is, by determining the M resource groups corresponding to the target user's identifier and the N nodes corresponding to the M resource groups, and then determining the target node based on the N nodes, the user can jump directly from the root node to the target node when accessing the root node among multiple nodes, thereby improving the output efficiency of the target resource information. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0038] Figure 1 This is an example of the system framework provided in the embodiments of the present application.

[0039] Figure 2 It is a schematic flow chart of the information acquisition method provided in an embodiment of the present application.

[0040] Figure 3 This is an exemplary block diagram of multiple nodes in a two-layer hierarchical relationship provided in an embodiment of the present application.

[0041] Figure 4 This is an exemplary block diagram of multiple nodes in a three-layer hierarchical relationship provided in an embodiment of the present application.

[0042] Figure 5a This is an example of the process of pre-storing the corresponding relationship in the master node provided in an embodiment of the present application.

[0043] Figure 5b This is an example of a process in which a user accesses a server cluster to obtain information about a target resource, as provided in an embodiment of the present application.

[0044] Figure 6 This is another schematic flowchart of the information acquisition method provided in an embodiment of the present application.

[0045] Figure 7 This is a schematic block diagram of a first server sending at least one information to a server cluster provided by an embodiment of the present application.

[0046] Figure 8 It is a schematic block diagram of a server cluster provided in an embodiment of the present application.

[0047] Figure 9 It is a schematic block diagram of the server provided in an embodiment of the present application.

[0048] Figure 10 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0050] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0051] The solutions provided in the embodiments of the present application also relate to data processing technologies in the field of network media. Network media works differently from traditional audio and video equipment. Network media relies on technologies and equipment provided by information technology (IT) equipment developers to transmit, store, and process audio and video signals. Traditional serial digital input (SDI) transmission methods lack true network switching characteristics. A lot of work needs to be done to use SDI to create some network functions similar to those provided by Ethernet and Internet Protocol (IP). Therefore, network media technology in the video industry has emerged. Furthermore, data processing technology for network media may include the transmission, storage, and processing of audio and video signals.

[0052] Figure 1 This is an example of the system framework 100 provided in an embodiment of the present application.

[0053] The system framework 100 can be an information query system. The specific type of information is not limited in this embodiment of the present application. The system framework 100 includes: a server cluster 110, a cache server 120, and a first server 130. Both the cache server 120 and the first server 130 can be connected to the server cluster 110 via a wireless or wired network.

[0054] Cache server 120 and first server 130 can each be at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Cache server 120 is configured to receive raw data from server cluster 110 and send the received raw data to first server 130. First server 130 processes the received raw data to obtain processed data and sends the processed data to server cluster 110.

[0055] The server cluster 110 may include at least one of a plurality of servers, a cloud computing platform, and a virtualization center. The server cluster 110 includes a plurality of nodes in a hierarchical relationship, wherein each node may be one or more servers; on the one hand, the server cluster 110 is responsible for acquiring and storing raw data; on the other hand, the server cluster 110 is responsible for receiving and storing processed data. Optionally, the server cluster 110 may also undertake secondary data processing tasks, while the first server 130 undertakes primary data processing tasks; optionally, the cache server 120 may also undertake secondary data processing tasks, while the first server 130 undertakes primary data processing tasks; alternatively, the cache server 120, the first server 130, and the server cluster 110 may adopt a distributed computing architecture for collaborative computing.

[0056] Optionally, taking the system framework 100 as a monitoring resource report query system as an example, the server cluster 110 includes: a master node 111, an agent node 112, and an agent node 113. The master node 111, the agent node 112, and the agent node 113 can be servers, respectively, and the master node 111 is the parent node of the agent node 112 and the agent node 113. Exemplarily, the master node 111, the agent node 112, and the agent node 113 are respectively used to obtain monitoring data of different resources in their respective nodes, and uniformly send the obtained monitoring data to the cache server 120. The cache server 120 sends the received monitoring data to the first server 130. The first server 130 processes the received monitoring data to obtain processed data, and then sends the processed data to at least one of the master node 111, the agent node 112, and the agent node 113 in the server cluster 110 according to certain rules.

[0057] It should be noted that the number of nodes in the server cluster 110 is only illustrative and may also include multiple other proxy nodes, which is not specifically limited in this application.

[0058] Figure 2 2 is a schematic flow chart of an information acquisition method 200 provided in an embodiment of the present application. The method 200 is applied to a server cluster, which includes multiple nodes in a hierarchical relationship; for example Figure 1 A server cluster 110 is shown.

[0059] like Figure 2 As shown, the method 200 may include some or all of the following:

[0060] S201, obtaining an information acquisition request, where the information acquisition request is used to request information about a target resource, and the information acquisition request includes an identifier of a target user;

[0061] S202, determining M resource groups corresponding to the identifier of the target user, where M is a positive integer greater than or equal to 1;

[0062] S203: Determine N nodes based on the M resource groups, where the N nodes include one or more nodes corresponding to each of the M resource groups, where N is a positive integer greater than or equal to 1, and the server cluster includes the N nodes.

[0063] S204, determining a target node based on the N nodes, where the target node stores information about the target resource;

[0064] S205: The target node outputs the information of the target resource.

[0065] In other words, first, the server cluster obtains an information acquisition request, requesting to obtain information about the target resource, and the information acquisition request includes the identifier of the target user; secondly, the server cluster determines M resource groups corresponding to the identifier of the target user based on the identifier of the target user, and then for each of the M resource groups, determines one or more nodes corresponding to each resource group, and finally determines N nodes, and then determines the target node based on the N nodes; finally, the target node outputs the information about the target resource.

[0066] For example, first, the server cluster obtains an information acquisition request through the master node, requesting to obtain information about the target resource, and the information acquisition request includes the identifier of the target user; secondly, the master node determines M resource groups corresponding to the identifier of the user based on the identifier of the target user, and then for each of the M resource groups, determines one or more proxy nodes corresponding to each resource group, and finally determines N proxy nodes corresponding to the M resource groups, and determines the target node based on the N proxy nodes; finally, the server cluster outputs the information about the target resource through the target node. For example, the master node can be as follows Figure 1 The master node 111 shown, the N nodes can be as follows Figure 1 As shown in the example, the proxy node 112 and the proxy node 113 are used, and the target node is the master node 111 .

[0067] Exemplarily, the information may be a statistical report of monitoring data, or large-screen display information of monitoring data; for example, the large-screen display information may be the ranking of a certain indicator in the monitoring data, or the average data of a certain indicator.

[0068] Another example is that the information can be a statistical report of order data, or it can be a large-screen display information of order data; for example, the large-screen display information can be a ranking of different order categories, or it can be the average data of a certain type of order. This application does not impose specific restrictions on this.

[0069] Of course, in other alternative embodiments, if the information of the target resource is the original data of the target resource, the server cluster may directly determine the node corresponding to the target resource among the N nodes as the target node.

[0070] Based on the above scheme, first, this application determines M resource groups corresponding to the identifier of the target user, which is equivalent to taking into account the permissions of the resource groups accessible to the target user; secondly, it determines N nodes corresponding to the M resource groups, which is equivalent to taking into account that the resources in the resource groups accessible to the target user are related to the N nodes; finally, based on the N nodes, it determines the target node, which enables the target user to jump directly from the root node to the only target node when accessing the top-level node (root node) among multiple nodes with a hierarchical relationship. Since the target node stores the information of the target resource, the target resource information is directly output by the target node, so that when obtaining the target resource information from multiple nodes with a hierarchical relationship, it is no longer all obtained from the root node, but the pressure of the root node to query the target resource information is shared through the target node. Moreover, the target node has less data than the root node. Outputting the target resource information at the target node improves the query efficiency of the target resource information, that is, improves the efficiency of the user in obtaining the target resource information.

[0071] That is, by determining the M resource groups corresponding to the target user's identifier and the N nodes corresponding to the M resource groups, and then determining the target node based on the N nodes, the user can jump directly from the root node to the target node when accessing the root node among multiple nodes, thereby improving the output efficiency of the target resource information.

[0072] It should be noted that the hierarchical relationship may be a tree-structured hierarchical relationship, wherein the information acquisition request may be obtained through a root node in the server cluster.

[0073] It should be noted that the target resource is one or more resources accessible to the target user.

[0074] It should be noted that the node corresponding to each resource group in the M resource groups can be configured with one or more resources, and the M resource groups are resource groups corresponding to resources accessible to the target user;

[0075] The following will be combined Figure 3 and Figure 4 The process of outputting target resource information by the target node is described with an example.

[0076] Figure 3 This is an exemplary block diagram 300 of multiple nodes in a two-layer hierarchical relationship provided by an embodiment of the present application.

[0077] like Figure 3As shown, the block diagram 300 includes a node 310 , a node 320 , a node 330 and a node 340 ; wherein the node 310 is the parent node of the nodes 320 , 330 and 340 .

[0078] Node 320 is associated with the Beijing resource group, node 330 is associated with the Hangzhou resource group, and node 340 is associated with the Dalian resource group. Node 310 is responsible for monitoring resources E and F, node 320 is responsible for monitoring resources A and B, node 330 is responsible for monitoring resource C, and node 340 is responsible for monitoring resource D. User A is associated with the Beijing resource group, user B is associated with the Hangzhou resource group, and user C is associated with both the Beijing and Dalian resource groups.

[0079] Based on this, if node 310 receives an information acquisition request from user A, it first detects that the resource group associated with user A is the Beijing resource group; secondly, based on the Beijing resource group, it determines that node 320 is associated with the Beijing resource group; finally, node 310 passes the information acquisition request to node 320 and obtains the information of the target resource from node 320.

[0080] Since in the existing solution, nodes 320, 330 and 340 will send the acquired monitoring resource data to node 310, the amount of data of node 310 is much larger than that of node 320. Therefore, in the solution provided in this application, Figure 3 In the block diagram 300 shown, the user can directly view the information of the target resource at the node 320 , which not only improves the query efficiency but also relieves the query pressure of the node 310 .

[0081] If node 310 receives an information acquisition request from user C, first, it detects that the resource groups associated with user C are the Beijing resource group and the Dalian resource group; secondly, based on the Beijing resource group and the Dalian resource group, it determines that nodes 320 and 340 are associated with the Beijing resource group and the Dalian resource group respectively, and determines the target node in the parent node 310 of nodes 320 and 340, that is, the target node is node 310. Since the target node and the node of the information acquisition request are the same node, the information of the target resource is directly obtained from node 310 of the information acquisition request.

[0082] Figure 4 This is an exemplary block diagram 400 of multiple nodes in a three-layer hierarchical relationship provided by an embodiment of the present application.

[0083] like Figure 4As shown, the block diagram 400 includes node 410, node 420, node 430, node 440, node 450, node 460, node 470, node 480 and node 490; wherein, the node 410 is the parent node of node 420, node 430, node 440, node 450, node 460, node 470, node 480 and node 490; node 420 is the parent node of node 450, node 460 and node 470; node 440 is the parent node of node 480 and node 490.

[0084] Node 420 is associated with the Beijing resource group, node 430 is associated with the Hangzhou resource group, node 440 is associated with the Dalian resource group, node 450 is associated with the Xicheng District resource group, nodes 460 and 470 are associated with the Haidian District resource group, and nodes 480 and 490 are associated with the High-tech Zone resource group. Node 420 is responsible for monitoring resource D, node 430 is responsible for monitoring resource E, node 440 is responsible for monitoring resource H, node 450 is responsible for monitoring resource A, node 460 is responsible for monitoring resource B, node 470 is responsible for monitoring resource C, node 480 is responsible for monitoring resource F, and node 490 is responsible for monitoring resource G. User A is associated with the Beijing resource group, user B is associated with the Xicheng District resource group, and user C is associated with the Haidian District resource group and the Xicheng District resource group.

[0085] Based on this, if node 410 receives an information acquisition request from user A, it first detects that the resource group associated with user A is the Beijing resource group; secondly, based on the Beijing resource group, it determines that node 420 is associated with the Beijing resource group; finally, node 410 passes the information acquisition request to node 420 and obtains the information of the target resource from node 420.

[0086] If node 410 receives an information acquisition request from user B, it first detects that the resource group associated with user B is the Xicheng District resource group; secondly, based on the Xicheng District resource group, it determines that node 450 is associated with the Xicheng District resource group; finally, node 410 passes the information acquisition request to node 450 and obtains the information of the target resource from node 450.

[0087] If node 410 receives an information acquisition request from user C, first, it detects that the resource groups associated with user C are the Haidian District resource group and the Xicheng District resource group; second, based on the Haidian District resource group and the Xicheng District resource group, it determines that nodes 450, 460, and 470 are associated with the Xicheng District resource group and the Haidian District resource group, respectively; finally, the target node is determined from the parent nodes of nodes 450, 460, and 470, that is, the target node is determined from nodes 420 and 410. For example, if the target node is determined to be 420, the information acquisition request is passed to node 420 to obtain the information of the target resource from node 420.

[0088] Since in the existing solution, nodes 420, 440 and 440 will send the acquired monitoring resource data to node 410, the amount of data of node 410 is much larger than that of node 420. Therefore, in the solution provided in this application, Figure 4 In the block diagram 400 shown, the user can directly view the information of the target resource at the node 420 , which not only improves the query efficiency but also relieves the query pressure of the node 410 .

[0089] If node 410 receives an information acquisition request from user C, first, it detects that the resource groups associated with user C are the Beijing resource group and the Dalian resource group; secondly, based on the Beijing resource group and the Dalian resource group, it determines that nodes 420 and 440 are associated with the Beijing resource group and the Dalian resource group respectively, and determines the target node in the parent node 410 of nodes 420 and 440, that is, the target node is node 410. Since the target node and the node of the information acquisition request are the same node, the information of the target resource is directly obtained from node 410 of the information acquisition request.

[0090] In some embodiments of the present application, S202 may include:

[0091] Obtaining a first mapping relationship;

[0092] The first mapping relationship includes an identifier of at least one user and an identifier of a resource group corresponding to each identifier of the at least one user, and the identifier of the at least one user includes an identifier of the target user;

[0093] Determine the identifier of the resource group corresponding to the identifier of the target user in the first mapping relationship as the identifier of the M resource groups;

[0094] The resource groups corresponding to the identifiers of the M resource groups are determined as the M resource groups.

[0095] For example, the resource group can be divided by region, which can be Beijing resource group, Hangzhou resource group, Dalian resource group, etc. The user's identification can also be divided by region, which can be Beijing operation and maintenance 1, Hangzhou operation and maintenance 2, Dalian operation and maintenance 3, Northeast and North China operation and maintenance director 4, etc.

[0096] As another example, the resource groups may be divided by region, such as the Xicheng District resource group, the Haidian District resource group, the Chaoyang District resource group, etc. The user identifiers may also be divided by region, such as Xicheng District Operation and Maintenance 2, Haidian District Operation and Maintenance 3, Chaoyang District Operation and Maintenance 4, etc. Of course, resource groups may also be divided by combining regions and areas, and this application does not impose any specific restrictions on this.

[0097] Exemplarily, the first mapping relationship may be stored in the node in the form of a vocabulary file or in the form of a correspondence graph. The present application does not impose any specific restrictions on the storage method or storage format of the first mapping relationship.

[0098] In some embodiments of the present application, S203 may include:

[0099] Obtaining a second mapping relationship;

[0100] The second mapping relationship includes an identifier of at least one resource group and an identifier of a node corresponding to an identifier of each resource group in the identifier of the at least one resource group, and the at least one resource group includes the M resource groups;

[0101] For the identifier of the first resource group among the identifiers of the M resource groups respectively corresponding to the M resource groups, determine the identifier of the node corresponding to the identifier of the first resource group in the second mapping relationship as the identifier of the node among the identifiers of the N nodes respectively corresponding to the N nodes;

[0102] The N nodes corresponding to the identifiers of the N nodes are determined as the N nodes.

[0103] Illustratively, any one of the N nodes may be a server in a server cluster, or may be multiple servers in a server cluster, and this application does not impose any specific limitation on this.

[0104] Illustratively, the identifier of the node may be the server number or the server IP address, and this application does not impose any specific limitation on this.

[0105] Exemplarily, the second mapping relationship may be stored in the node in the form of a vocabulary file or in the form of a correspondence graph. The present application does not impose any specific restrictions on the storage method or storage format of the second mapping relationship.

[0106] It should be noted that any one of the N nodes is used to monitor one or more resources in the resource group corresponding to the any one node.

[0107] In some embodiments of the present application, S204 may include:

[0108] If N is greater than 1, then among the parent nodes corresponding to the N nodes, the common parent node of the N nodes is determined as the target node.

[0109] Determining the common parent node of the N nodes as the target node is equivalent to sharing the pressure of the node that obtains the information acquisition request to query the information of the target resource by sacrificing part of the storage space of the common parent node of the N nodes. Moreover, when the node that obtains the information acquisition request is the root node and the common parent node of the N nodes is not the root node, the amount of data of the common parent node of the N nodes is much smaller than the amount of data of the root node. Therefore, querying the information of the target resource in the common parent node of the N nodes can improve the query efficiency.

[0110] Of course, in other alternative embodiments, since the information of the target resource is stored in the common parent node of the N nodes, if the user directly queries the information of the target resource in the common parent node of the N nodes, there is no need to call the interfaces of the N nodes, and the information of the target resource can be directly obtained.

[0111] In some embodiments of the present application, if N is equal to 1, the N nodes are determined as the target nodes.

[0112] If N is equal to 1, which is equivalent to there being only one clear node among the N nodes, then a node among the N nodes is directly determined as the target node, which is equivalent to directly jumping from the node that obtains the information acquisition request to the target node, and querying and outputting the information of the target resource from the target node. On the one hand, it reduces the query pressure of the node that obtains the information acquisition request. On the other hand, since the amount of data of the target node is less than the amount of data of the node that obtains the information acquisition request, when querying the information of the target resource, it improves the query efficiency of the target resource information.

[0113] In some embodiments of the present application, the target resource includes resources monitored by the N nodes and / or resources monitored by all child nodes of the N nodes.

[0114] For example, Figure 4 As shown, since the resource group associated with user A is the Beijing resource group, user A can view the resources in the node corresponding to the Beijing resource group associated with user A, that is, the information of resource D can be viewed in node 420. Since nodes 450, 460 and 470 are respectively child nodes of node 420, the user can also access the information of the resources (resources A, B, C) monitored by nodes 450, 460 and 470 respectively.

[0115] For example, Figure 4As shown, since the resource groups associated with user C are the Xicheng District resource group and the Haidian District resource group, user C can view the resources (resource A, resource B) monitored by nodes 450 and 460 corresponding to the Xicheng District resource group and the Haidian District resource group associated with user C respectively. Since node 451 is a child node of node 450, user C can also view the information of resource I monitored by node 451. Since the target node is the parent node corresponding to the N nodes, when the target node is node 420, the information of resource A, resource B, and resource I can be viewed in node 420, but the information of resource D monitored by node 420 cannot be viewed.

[0116] In some embodiments of the present application, before S201, the method may further include:

[0117] Construct multiple nodes with hierarchical relationships;

[0118] Collecting and saving original data of a first resource through a first node among the multiple nodes, where the original data includes an identifier of the first resource;

[0119] Sending the original data to the cache server;

[0120] At least one piece of information about the first resource sent by the first server is received and stored through the first node and all parent nodes of the first node.

[0121] In other words, before obtaining an information acquisition request, the server cluster first constructs multiple nodes in a hierarchical relationship, collects and saves the original data of the first resource through the first node among the multiple nodes, and sends the original data to the cache server. The cache server and the first server process the original data to obtain at least one information of the first resource. The first server sends the at least one information of the first resource to the server cluster, and the first node in the server cluster and all parent nodes of the first node receive and save the at least one information of the first resource sent by the first server.

[0122] Exemplarily, after collecting and storing the raw data of the first resource, the first node outputs the raw data of the first resource to a cache server, Kafka, or a message middleware. The Kafka server or the message middleware then sends the raw data of the first resource to the first server, which processes the raw data of the first resource. For example, multiple nodes output the raw data of the resources corresponding to each node to the same category (Topic) of the same Kafka.

[0123] It should be noted that the first server can be an independently deployed server, which is used to uniformly consume the original data of resources corresponding to each node sent by Kafka.

[0124] It should be noted that Kafka is a high-throughput distributed publish-subscribe messaging system. Each message published to the Kafka cluster has a category, which is called a Topic. Generally, messages from different Topics are physically stored separately. Although the messages of a Topic are logically stored on one or more servers, users only need to specify the Topic of the message to produce or consume data without having to worry about where the data is stored.

[0125] It should be noted that the first node is any node among the multiple nodes.

[0126] It should be noted that the first resource is a resource corresponding to the first node in the pre-stored correspondence between nodes and resources.

[0127] It should be noted that if the user has access to a resource group, they can add new resources to the node corresponding to the resource group. This means that based on the pre-stored correspondence between the user's identifier and the resource group, and between the resource group and the node, the new resource is transferred to the node through the interface. Optionally, the new resource is transferred to the node through the Resource Representational State (REST) ​​interface.

[0128] It should be noted that the cache server and the first server can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, as well as big data and artificial intelligence platforms. The servers can be connected directly or indirectly through wired or wireless communications, and this application does not impose any restrictions here.

[0129] It should be noted that since all parent nodes include the root node among the multiple nodes, in other alternative embodiments, if the user accesses the root node, since the root node also stores the information of the target resource, the user can still ensure efficiency when viewing the information of the target resource.

[0130] By storing at least one information of the first resource in the first node and all parent nodes of the first node, on the one hand, if the user accesses the parent node, the information of the target resource can be directly obtained without calling the interface of the child node; on the other hand, compared with the existing solution in which the root node stores the processed data of all resources, the data volume of at least one information of the first resource occupies a limited storage space of the parent node, that is, on the basis of sacrificing a small part of the storage space of the parent node, efficient query of the information of the first resource is achieved, thereby improving the query efficiency.

[0131] In addition, on the one hand, the original data of the first resource is only saved in the corresponding node of the first resource and does not need to be reported to the root node, which can save the storage space of the root node; on the other hand, the user can directly view the original data of the target resource in the node where the original data of the target resource is stored, which improves the query efficiency compared to querying at the root node.

[0132] It should be noted that before constructing multiple nodes with a hierarchical relationship, the following corresponding relationship can be pre-stored in the root node:

[0133] The correspondence between pre-stored resource groups and nodes:

[0134] For example, the resource groups may include Beijing resource group, Hangzhou resource group, Dalian resource group, and other resource groups, and the nodes may include Figure 3 Node 320, node 330, and node 340 are shown; among them, the Beijing resource group corresponds to node 320, the Hangzhou resource group corresponds to node 330, and the Dalian resource group corresponds to node 340.

[0135] In another example, the resource groups may include Beijing resource group, Xicheng District resource group, Haidian District resource group, Chaoyang District resource group, and other resource groups, and the nodes may include: Figure 4 Nodes 420, 450, 460, and 470 are shown; among them, the Beijing resource group corresponds to node 420, the Xicheng District resource group corresponds to node 450, the Haidian District resource group corresponds to node 460, and the Chaoyang District resource group corresponds to node 470.

[0136] The correspondence between pre-stored resource groups and resources:

[0137] For example, resources A and B correspond to the Beijing resource group, resource C corresponds to the Hangzhou resource group, resource D corresponds to the Dalian resource group, resource E corresponds to other resource groups, and resource F has no corresponding resource group. Based on this, the corresponding relationship between pre-stored nodes and resources is:

[0138] Resources A and B correspond to node 320 , resource C corresponds to node 330 , resource D corresponds to node 340 , and resources E and F have no matching nodes, so they correspond to root node 310 .

[0139] In another example, resource D corresponds to the Beijing resource group, resource A corresponds to the Xicheng District resource group, resource B corresponds to the Haidian District resource group, and resource C corresponds to the Chaoyang District resource group. Based on this, the corresponding relationship between the pre-stored nodes and resources is:

[0140] Node 450 corresponds to resource A, node 460 corresponds to resource B, node 470 corresponds to resource C, and node 420 corresponds to resource D.

[0141] Pre-stored correspondence between users and resource groups:

[0142] For example, user A corresponds to the Beijing resource group, user B corresponds to the Hangzhou resource group, and user C corresponds to the Dalian resource group.

[0143] In another example, user A corresponds to the Beijing resource group, user B corresponds to the Xicheng District resource group, and user C corresponds to the Haidian District resource group and the Chaoyang District resource group.

[0144] It should be noted that the administrator user can view all resources in multiple nodes, that is, the resource group corresponding to the administrator user is all resource groups.

[0145] In some embodiments of the present application, the multiple nodes having a hierarchical relationship may be constructed in the following manner:

[0146] Obtain a configuration file for each of the multiple nodes;

[0147] The multiple nodes are constructed based on the configuration file of each node.

[0148] Exemplarily, multiple nodes are registered according to their respective node configuration files when they are first started, thereby forming multiple nodes with a hierarchical relationship. When the multiple nodes are subsequently run, they perform corresponding functions according to the registration information in the configuration files.

[0149] It should be noted that the format of the configuration file of each node is the same.

[0150] By assigning a configuration file to each node, it is equivalent to expanding the functions of the child nodes. The child nodes no longer just monitor the raw data of resources, but like the root node, have all the functions of a complete node, sharing the storage and query pressure of the root node, reducing the data storage volume of the root node, and improving data query efficiency.

[0151] For example, Figure 3 As shown, there are node 310 , node 320 , node 330 , and node 340 .

[0152] For the node 310, node 320, node 330 and node 340, when deployed, node 310 is the root node, the identifier of node 310 can be ADMIN, and the identifier of the parent node of node 320, node 330 and node 340 is ADMIN. Then, during the first startup process, each node will register according to the configuration file of its own node, thereby forming the following: Figure 3 The four nodes shown have a hierarchical relationship.

[0153] Another exemplary example is Figure 4As shown, the identifier of node 420 may be BEIJING, and the identifier of the parent node of node 420 is ADMIN; the identifiers of node 450, node 460, and node 470 are XICHENG, HAIDIAN, and CHAOYANG, respectively, and the identifier of the parent node of node 450, node 460, and node 470 is BEIJING. In the first startup process, each node will register according to its own node configuration file, thereby forming the following Figure 4 Multiple nodes with a hierarchical relationship are shown.

[0154] Each node is configured at the first startup through its configuration file, so that subordinate relationships can be quickly established between nodes, thereby realizing multiple nodes with a hierarchical relationship.

[0155] In some embodiments of the present application, the configuration file includes at least one of the following:

[0156] The node identifier of the node, the Internet Protocol IP address of the node, the service port of the node, the node identifier of the node's parent node, the Internet Protocol IP address of the node's parent node, and the service port of the node's parent node.

[0157] It should be noted that the communication between the node and the parent node of the node is achieved based on the Internet Protocol IP address of the node, the service port of the node, the Internet Protocol IP address of the parent node of the node and the service port of the parent node of the node, that is, the IP address and service port are mainly used for REST interface calls between nodes.

[0158] In some embodiments of the present application, the first node collects and stores the original data of the first resource in the following manner, including:

[0159] Obtaining a third mapping relationship;

[0160] The third mapping relationship includes identifiers of multiple nodes and identifiers of resources corresponding to the identifiers of each of the multiple nodes, and the identifiers of the multiple nodes include the identifier of the first node;

[0161] Determine the identifier of the resource corresponding to the identifier of the first node in the third mapping relationship as the identifier of the first resource;

[0162] The original data of the first resource corresponding to the identifier of the first resource is collected and stored through the first node.

[0163] Exemplarily, the third mapping relationship may be stored in the node in the form of a vocabulary file or in the form of a correspondence graph. The present application does not impose any specific restrictions on the storage method or storage format of the third mapping relationship.

[0164] The following will be combined Figure 5a and Figure 5b The overall process of the information acquisition method provided in the embodiment of the present application is schematically described.

[0165] Figure 5a This is an example of the process of pre-storing the corresponding relationship in the master node provided by an embodiment of the present application.

[0166] like Figure 5a As shown, first, the administrator logs in to the master node, creates a common user on the master node, and creates a resource group on the master node; second, the administrator associates the common user with the resource group on the master node, and associates the resource group with the nodes in the server cluster; finally, the common user adds resources to the resource group associated with it, and the resource group distributes the added resources to the proxy nodes associated with the resource group.

[0167] exist Figure 5a On the basis of Figure 5b This is an example of a process in which a user accesses a server cluster to obtain information about a target resource, as provided in an embodiment of the present application.

[0168] like Figure 5b As shown, after an ordinary user logs in to the master node in the server cluster, the master node can Figure 5a The resource group associated with the ordinary user and the proxy node in the server cluster associated with the resource group will jump from the master node to the proxy node, thereby obtaining the target resource information at the proxy node.

[0169] Figure 6 is another schematic flow chart of the information acquisition method 600 provided in an embodiment of the present application. The method 600 is applied to a first server, which may be Figure 1 A first server 130 is shown.

[0170] It should be noted that the first server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, as well as big data and artificial intelligence platforms. The servers can be connected directly or indirectly through wired or wireless communications, and this application does not impose any restrictions here.

[0171] like Figure 6 As shown, the method 600 may include some or all of the following:

[0172] S601, receiving original data sent by a cache server, where the original data includes an identifier of a first resource;

[0173] S602, based on the identifier of the first resource, performing data processing on raw data corresponding to the identifier of the first resource in at least one preset period to obtain at least one information of the first resource;

[0174] S603, based on the identifier of the first resource, determining an identifier of a first node corresponding to the identifier of the first resource;

[0175] S604: Send the at least one information to the first node corresponding to the identifier of the first node and all parent nodes of the first node.

[0176] In other words, after the first server receives the original data sent by the cache server, it processes the original data corresponding to the identifier of the first resource in at least one preset period, obtains at least one information about the first resource, and sends the at least one information to the first node that monitors the original data of the first resource in the server cluster and all parent nodes of the first node.

[0177] For example, Figure 3 As shown, if the first node is node 320 , the at least one information will be sent to node 320 and node 310 .

[0178] Exemplarily, the at least one information may be the average value of a statistical report of monitoring data within a preset period, or it may be the large-screen display information of monitoring data within a preset period; for example, the statistical report may be the average value of the monitoring data; for example, the large-screen display information may be the ranking of a certain indicator in the monitoring data, or it may be the average data of a certain indicator.

[0179] Of course, the at least one information may also be a statistical report of monitoring data under multiple preset periods, or may be a large-screen display information of monitoring data under multiple preset periods;

[0180] Another exemplary embodiment is that the at least one information may be a statistical report of order data within a preset period, or it may be large-screen display information of order data within a preset period; for example, the large-screen display information may be a ranking of different order categories, or it may be the average data of a certain type of order, and this application does not impose any specific restrictions on this.

[0181] Of course, the at least one information may also be a statistical report of order data under multiple preset periods, or may be large-screen display information of order data under multiple preset periods.

[0182] It should be noted that the original data includes original data of one or more resources, and the one or more resources include the first resource.

[0183] It should be noted that the at least one preset period can be one hour, one day, one week, half a month or one month, etc. This application does not impose any specific restrictions on the setting time of the at least one preset period.

[0184] It should be noted that the first node and all parent nodes of the first node are nodes in the server cluster.

[0185] By receiving the original data sent by the cache server, processing the original data, and then sending the processed data to the server cluster, on the one hand, while ensuring that users can obtain information about target resources in the server cluster, it not only reduces the computing power requirements of the devices in the server cluster, reduces the cost of the devices in the server cluster, but also reduces the load on the devices in the server cluster; on the other hand, handing over data processing to the first server can also improve the utilization rate of the computing power in the first server.

[0186] The following will be combined Figure 7 An example of a first server sending at least one information to a server cluster is given.

[0187] Figure 7 This is a schematic block diagram 700 of a first server sending at least one information to a server cluster provided by an embodiment of the present application.

[0188] like Figure 7 As shown, the block diagram includes all parent nodes 710 of the first node, the first node 720 , a cache server 730 and a first server 740 .

[0189] First, the first node 720 is used to store the acquired original data of the first resource into a local database, and send the original data of the first resource to a cache server.

[0190] The cache server 720 is configured to receive the original data of the first resource sent by the first node 720 , and send the original data of the first resource to the first server 730 .

[0191] The first server 730 is used to consume the original data of the first resource sent by the cache server 720, process the original data of the first resource in at least one preset period, obtain at least one information, and send the at least one information to the first node 720 and all parent nodes 710 of the first node.

[0192] It should be noted that the at least one cycle includes hourly, daily, weekly, and monthly.

[0193] In some embodiments of the present application, the at least one preset period includes a first preset period, a second preset period, a third preset period, and a fourth preset period, the first preset period is smaller than the second preset period, the second preset period is smaller than the third preset period, and the third preset period is smaller than the fourth preset period; based on this, S602 may include:

[0194] Processing original data corresponding to the identifier of the first resource at the first preset period to obtain first information;

[0195] performing data processing on the plurality of first information respectively obtained in the plurality of first preset periods in the second preset period to obtain second information;

[0196] performing data processing on the plurality of second information respectively obtained in the plurality of second preset periods in the third preset period to obtain third information;

[0197] performing data processing on the plurality of third information respectively obtained in the plurality of third preset periods in the fourth preset period to obtain fourth information;

[0198] determining the first information, the second information, the third information, and the fourth information as the at least one information;

[0199] Based on this, S604 may include:

[0200] The first information, the second information, the third information, and the fourth information are sent to the first node and all parent nodes of the first node.

[0201] Exemplarily, the first preset period, the second preset period, the third preset period, and the fourth preset period may be one hour, one day, one week, and one month, respectively.

[0202] By processing the data based on the results of a small preset period and then calculating the data processing results of a large period, the computational complexity is reduced and computing resources are saved.

[0203] In some embodiments of the present application, S602 may further include:

[0204] After sending the first information to the first node and all parent nodes of the first node, deleting original data corresponding to the identifier of the first resource;

[0205] After sending the second information to the first node and all parent nodes of the first node, deleting the first information;

[0206] After sending the third information to the first node and all parent nodes of the first node, deleting the second information;

[0207] After sending the fourth information to the first node and all parent nodes of the first node, the third information is deleted.

[0208] After sending the result of the data processing in the small cycle, the source data processed in the small cycle is deleted, which is equivalent to saving the storage space of the first server while ensuring the integrity of the data sent to the server cluster.

[0209] It should be noted that the terms "root node" and "master node" can be used interchangeably in this application.

[0210] It should be noted that the terms "sub-node" and "proxy node" are used interchangeably in this application.

[0211] It should be noted that in the above description, the terms "first\second\third" involved are only used to distinguish similar objects and do not represent a specific order for the objects. It should be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted and should not be a limitation of this application.

[0212] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will no longer describe the various possible combinations separately. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the idea of ​​the present application, they should also be regarded as the contents disclosed in the present application. It should also be understood that in the various method embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0213] The method provided in the embodiment of the present application is described above. The server cluster and the first server provided in the embodiment of the present application are described below.

[0214] Figure 8 800 is a schematic block diagram of a server cluster 800 provided in an embodiment of the present application. It should be noted that the server cluster includes multiple nodes in a hierarchical relationship.

[0215] like Figure 8 As shown, the server cluster 800 may include some or all of the following:

[0216] An acquiring unit 810 acquires an information acquisition request, where the information acquisition request is used to request information about a target resource, and the information acquisition request includes an identifier of a target user.

[0217] A first determining unit 820 determines M resource groups corresponding to the identifier of the target user, where M is a positive integer greater than or equal to 1;

[0218] A second determining unit 830 determines N nodes based on the M resource groups, where the N nodes include one or more nodes corresponding to each of the M resource groups, where N is a positive integer greater than or equal to 1, and the server cluster includes the N nodes;

[0219] A third determining unit 840 determines a target node based on the N nodes, where the target node stores information about the target resource;

[0220] The output unit 850 is used for the target node to output the target resource information.

[0221] In some embodiments of the present application, the first determining unit 820 is configured to:

[0222] Obtaining a first mapping relationship;

[0223] The first mapping relationship includes an identifier of at least one user and an identifier of a resource group corresponding to each identifier of the at least one user, and the identifier of the at least one user includes an identifier of the target user;

[0224] Determine the identifier of the resource group corresponding to the identifier of the target user in the first mapping relationship as the identifier of the M resource groups;

[0225] The resource groups corresponding to the identifiers of the M resource groups are determined as the M resource groups.

[0226] In some embodiments of the present application, the second determining unit 830 is configured to:

[0227] Obtaining a second mapping relationship;

[0228] The second mapping relationship includes an identifier of at least one resource group and an identifier of a node corresponding to an identifier of each resource group in the identifier of the at least one resource group, and the at least one resource group includes the M resource groups;

[0229] For the identifier of the first resource group among the identifiers of the M resource groups respectively corresponding to the M resource groups, determine the identifier of the node corresponding to the identifier of the first resource group in the second mapping relationship as the identifier of the node among the identifiers of the N nodes respectively corresponding to the N nodes;

[0230] The N nodes corresponding to the identifiers of the N nodes are determined as the N nodes.

[0231] In some embodiments of the present application, the third determining unit 840 is configured to:

[0232] If N is greater than 1, then among the parent nodes corresponding to the N nodes, the common parent node of the N nodes is determined as the target node.

[0233] In some embodiments of the present application, if N is equal to 1, the N nodes are determined as the target nodes.

[0234] In some embodiments of the present application, the target resource includes resources monitored by the N nodes and / or resources monitored by all child nodes of the N nodes.

[0235] In some embodiments of the present application, the obtaining unit 810 may also be used to:

[0236] Construct multiple nodes with hierarchical relationships;

[0237] Collecting and saving original data of a first resource through a first node among the multiple nodes, where the original data includes an identifier of the first resource;

[0238] Sending the original data to the cache server;

[0239] At least one piece of information about the first resource sent by the first server is received and stored through the first node and all parent nodes of the first node.

[0240] In some embodiments of the present application, the obtaining unit 810 may also be used to:

[0241] Obtain a configuration file for each of the multiple nodes;

[0242] The multiple nodes are constructed based on the configuration file of each node.

[0243] In some embodiments of the present application, the configuration file includes at least one of the following:

[0244] The node identifier of the node, the Internet Protocol IP address of the node, the service port of the node, the node identifier of the node's parent node, the Internet Protocol IP address of the node's parent node, and the service port of the node's parent node.

[0245] In some embodiments of the present application, the obtaining unit 810 may also be used to:

[0246] Obtaining a third mapping relationship;

[0247] The third mapping relationship includes identifiers of multiple nodes and identifiers of resources corresponding to the identifiers of each of the multiple nodes, and the identifiers of the multiple nodes include the identifier of the first node;

[0248] Determine the identifier of the resource corresponding to the identifier of the first node in the third mapping relationship as the identifier of the first resource;

[0249] The original data of the first resource corresponding to the identifier of the first resource is collected and stored through the first node.

[0250] Figure 9 It is a schematic block diagram of the server 900 provided in an embodiment of the present application.

[0251] It should be noted that the server can be Figure 1 A first server 130 is shown.

[0252] like Figure 9 As shown, the server 900 may include some or all of the following:

[0253] A receiving unit 910 receives original data sent by a cache server, where the original data includes an identifier of a first resource;

[0254] The data processing unit 920 processes the original data corresponding to the identifier of the first resource in at least one preset period based on the identifier of the first resource to obtain at least one information of the first resource;

[0255] The determining unit 930 determines, based on the identifier of the first resource, an identifier of a first node corresponding to the identifier of the first resource;

[0256] The sending unit 940 sends the at least one information to the first node corresponding to the identifier of the first node and all parent nodes of the first node.

[0257] In some embodiments of the present application, the at least one preset period includes a first preset period, a second preset period, a third preset period, and a fourth preset period, the first preset period is smaller than the second preset period, the second preset period is smaller than the third preset period, and the third preset period is smaller than the fourth preset period;

[0258] Based on this, the data processing unit 920 may be used to:

[0259] Processing original data corresponding to the identifier of the first resource at the first preset period to obtain first information;

[0260] performing data processing on the plurality of first information respectively obtained in the plurality of first preset periods in the second preset period to obtain second information;

[0261] performing data processing on the plurality of second information respectively obtained in the plurality of second preset periods in the third preset period to obtain third information;

[0262] performing data processing on the plurality of third information respectively obtained in the plurality of third preset periods in the fourth preset period to obtain fourth information;

[0263] determining the first information, the second information, the third information, and the fourth information as the at least one information;

[0264] Based on this, the sending unit 940 may be configured to:

[0265] The first information, the second information, the third information, and the fourth information are sent to the first node and all parent nodes of the first node.

[0266] In some embodiments of the present application, the data processing unit 920 may also be used to:

[0267] After sending the first information to the first node and all parent nodes of the first node, deleting original data corresponding to the identifier of the first resource;

[0268] After sending the second information to the first node and all parent nodes of the first node, deleting the first information;

[0269] After sending the third information to the first node and all parent nodes of the first node, deleting the second information;

[0270] After sending the fourth information to the first node and all parent nodes of the first node, the third information is deleted.

[0271] It should be understood that the embodiments of the server cluster 800 and the server 900 may correspond to the method embodiments, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described here. Specifically, the server cluster 800 may correspond to the corresponding subject in the method 200 for executing the embodiment of the present application, and the server 900 may correspond to the corresponding subject in the method 600 for executing the embodiment of the present application, and the various units in the server cluster 800 and the server 900 are respectively for implementing the corresponding processes in the method 200 and the method 600. For the sake of brevity, they will not be described here.

[0272] It should also be understood that the various units of the server cluster 800 and server 900 involved in the embodiment of the present application can be separately or all merged into one or several other units to constitute, or some (some) units therein can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be realized by multiple units, or the function of multiple units is realized by one unit. In other embodiments of the present application, the server cluster 800 and server 900 can also include other units. In practical applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of multiple units. According to another embodiment of the present application, the server cluster 800 and server 900 involved in the embodiment of the present application can be constructed by running a computer program (including program code) that can execute each step involved in the corresponding method on a general-purpose computing device including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), etc., to construct the server cluster 800 and server 900 involved in the embodiment of the present application, and to realize the information acquisition method of the embodiment of the present application. The computer program may be recorded on, for example, a computer-readable storage medium, loaded into an electronic device via the computer-readable storage medium, and run therein to implement the corresponding method of the embodiment of the present application.

[0273] In other words, the units mentioned above can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can be implemented in the form of a combination of hardware and software. Specifically, the steps of the method embodiments in the embodiments of the present application can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software in a decoding processor. Optionally, the software can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps in the above method embodiments in combination with its hardware.

[0274] Figure 10 It is a schematic structural diagram of an electronic device 10 provided in an embodiment of the present application.

[0275] like Figure 10As shown, the electronic device 10 includes at least a processor 11 and a computer-readable storage medium 12. The processor 11 and the computer-readable storage medium 12 may be connected via a bus or other means. The computer-readable storage medium 12 is used to store a computer program 14, which includes computer instructions. The processor 11 is used to execute the computer instructions stored in the computer-readable storage medium 12. The processor 11 is the computing core and control core of the electronic device 10. It is suitable for implementing one or more computer instructions, and is specifically suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding function.

[0276] As an example, the processor 11 may also be referred to as a central processing unit (CPU). The processor 11 may include, but is not limited to, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.

[0277] As an example, the computer-readable storage medium 12 may be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium located away from the aforementioned processor 11. Specifically, the computer-readable storage medium 12 includes, but is not limited to: volatile memory and / or non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0278] In one implementation, the electronic device 10 may be Figure 8 and Figure 9 The server cluster 800 and the server 900 are shown respectively; the computer readable storage medium 12 stores computer instructions; the processor 11 loads and executes the computer instructions stored in the computer readable storage medium 12 to implement Figure 2 and Figure 6 The corresponding steps in the method embodiment shown; in the specific implementation, the computer instructions in the computer-readable storage medium 12 are loaded by the processor 11 and the corresponding steps are executed. To avoid repetition, they are not repeated here.

[0279] According to another aspect of the present application, an embodiment of the present application further provides a computer-readable storage medium (Memory), which is a memory device in the electronic device 10 for storing programs and data. For example, a computer-readable storage medium 12. It can be understood that the computer-readable storage medium 12 here can include both the built-in storage medium in the electronic device 10 and, of course, the extended storage medium supported by the electronic device 10. The computer-readable storage medium provides a storage space, which stores the operating system of the electronic device 10. In addition, one or more computer instructions suitable for being loaded and executed by the processor 11 are also stored in the storage space. These computer instructions can be one or more computer programs 14 (including program codes).

[0280] The electronic device 10 may further include a transceiver 13 , which may be connected to the processor 11 or the computer-readable storage medium 12 .

[0281] The computer-readable storage medium 12 can control the transceiver 13 to communicate with other devices. Specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 13 may include a transmitter and a receiver. The transceiver 13 may further include one or more antennas.

[0282] According to another aspect of the present application, a computer program product or computer program is provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. For example, computer program 14 is provided. In this case, electronic device 10 may be a computer, and processor 11 reads the computer instructions from computer-readable storage medium 12. Processor 11 executes the computer instructions, causing the computer to perform the information acquisition methods provided in the various optional embodiments described above.

[0283] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process of the embodiment of the present application is run in whole or in part or the functions of the embodiment of the present application are implemented. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode.

[0284] Those skilled in the art will appreciate that the units and process steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0285] Finally, it should be noted that the above embodiments are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. An information acquisition method, characterized in that: The method is applied to a server cluster, wherein the server cluster includes a plurality of nodes in a hierarchical relationship; The method comprises: Obtaining an information acquisition request, wherein the information acquisition request is used to request information about a target resource, and the information acquisition request includes an identifier of a target user; Determine M resource groups corresponding to the identifier of the target user, where M is a positive integer greater than or equal to 1; Determine N nodes based on the M resource groups, where the N nodes include one or more nodes corresponding to each of the M resource groups, where N is a positive integer greater than or equal to 1, and the server cluster includes the N nodes; Determine a target node based on the N nodes, where the target node stores information about the target resource; The target node outputs information about the target resource; The step of determining the target node based on the N nodes includes: If N is greater than 1, then among the parent nodes corresponding to the N nodes, the common parent node of the N nodes is determined as the target node; If N is equal to 1, the N nodes are determined as the target nodes.

2. The method according to claim 1, characterized in that The determining of the M resource groups corresponding to the target user identifier includes: Obtaining a first mapping relationship; The first mapping relationship includes an identifier of at least one user and an identifier of a resource group corresponding to each identifier of the at least one user, and the identifier of the at least one user includes an identifier of the target user; Determine the identifier of the resource group corresponding to the identifier of the target user in the first mapping relationship as the identifiers of the M resource groups; The resource groups corresponding to the identifiers of the M resource groups are determined as the M resource groups.

3. The method according to claim 1, characterized in that The determining N nodes based on the M resource groups includes: Obtaining a second mapping relationship; The second mapping relationship includes an identifier of at least one resource group and an identifier of a node corresponding to an identifier of each resource group in the identifier of the at least one resource group, and the at least one resource group includes the M resource groups; For the identifier of the first resource group among the identifiers of the M resource groups respectively corresponding to the M resource groups, determine the identifier of the node corresponding to the identifier of the first resource group in the second mapping relationship as the identifier of the node among the identifiers of the N nodes respectively corresponding to the N nodes; The N nodes corresponding to the identifiers of the N nodes are determined as the N nodes.

4. The method according to any one of claims 1 to 3, characterized in that Before obtaining the information acquisition request, the method further includes: Constructing the plurality of nodes having a hierarchical relationship; Collecting and saving original data of a first resource through a first node among the multiple nodes, where the original data includes an identifier of the first resource; Sending the original data to a cache server; At least one piece of information about the first resource sent by the first server is received and saved through the first node and all parent nodes of the first node.

5. The method according to claim 4, characterized in that The step of constructing the plurality of nodes having a hierarchical relationship includes: Obtaining a configuration file of each of the multiple nodes; The multiple nodes are constructed based on the configuration file of each node.

6. The method according to claim 4, characterized in that The collecting and saving the original data of the first resource by the first node among the multiple nodes includes: Obtaining a third mapping relationship; The third mapping relationship includes identifiers of multiple nodes and identifiers of resources corresponding to the identifiers of each of the multiple nodes, and the identifiers of the multiple nodes include the identifier of the first node; Determining the identifier of the resource corresponding to the identifier of the first node in the third mapping relationship as the identifier of the first resource; The original data of the first resource corresponding to the identifier of the first resource is collected and stored through the first node.

7. A server cluster, characterized in that: The server cluster includes a plurality of nodes in a hierarchical relationship; The server cluster includes: an acquiring unit, configured to acquire an information acquisition request, wherein the information acquisition request is used to request information about a target resource, and the information acquisition request includes an identifier of a target user; A first determining unit, configured to determine M resource groups corresponding to the identifier of the target user, where M is a positive integer greater than or equal to 1; a second determining unit, configured to determine N nodes based on the M resource groups, where the N nodes include one or more nodes corresponding to each of the M resource groups, where N is a positive integer greater than or equal to 1, and the server cluster includes the N nodes; A third determining unit is configured to determine a target node based on the N nodes, where the target node stores information about the target resource; An output unit, configured for the target node to output information about the target resource; The third determining unit is specifically configured to: If N is greater than 1, then among the parent nodes corresponding to the N nodes, the common parent node of the N nodes is determined as the target node; If N is equal to 1, the N nodes are determined as the target nodes.

8. An electronic device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Software testing method and software testing system based on distributed testing node cluster

    CN110297766A

  • Resource management method and device, computer equipment and storage medium

    CN113204427A