CN115004643A - Authority configuration method, device, node equipment and data processing system - Google Patents

Authority configuration method, device, node equipment and data processing system Download PDF

Info

Publication number
CN115004643A
CN115004643A CN202080094698.1A CN202080094698A CN115004643A CN 115004643 A CN115004643 A CN 115004643A CN 202080094698 A CN202080094698 A CN 202080094698A CN 115004643 A CN115004643 A CN 115004643A
Authority
CN
China
Prior art keywords
data processing
processing node
resource access
node
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202080094698.1A
Other languages
Chinese (zh)
Other versions
CN115004643B (en
Inventor
郭子亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115004643A publication Critical patent/CN115004643A/en
Application granted granted Critical
Publication of CN115004643B publication Critical patent/CN115004643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/427Loop networks with decentralised control
    • H04L12/433Loop networks with decentralised control with asynchronous transmission, e.g. token ring, register insertion

Abstract

The embodiment of the application discloses a permission configuration method, a permission configuration device, node equipment and a data processing system. The method comprises the following steps: the current data processing node acquires a data processing node to be configured; acquiring the resource access priority of a data processing node to be configured; if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node; and configuring the resource access authority to the target data processing node. Therefore, when the next data processing node which can have the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and the data processing node to be configured is taken as the target data processing node only when the resource access priority meets the target condition, so that the target data processing node can be determined through the priority, and the problems that each data processing node has the same probability of acquiring the resource access authority, the access efficiency is low, and resources are wasted are avoided.

Description

Authority configuration method, device, node equipment and data processing system Technical Field
The present application relates to the field of distributed data processing, and more particularly, to a method and an apparatus for configuring a permission, a node device, and a data processing system.
Background
In a data processing system, there is a case where a plurality of data processing nodes share the same resource, and in this case, the plurality of data processing nodes acquire access authority to the resource in a predetermined order and perform resource access in a mutually exclusive manner. However, the related method of performing resource access by the exclusive method has problems of low access efficiency and waste of resources.
Disclosure of Invention
In view of the above problems, the present application provides a method, an apparatus, a node device, and a data processing system for configuring a right to improve the above problems.
In a first aspect, the present application provides a method for configuring a right, where the method includes: the current data processing node acquires a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, wherein the data processing node to be subjected to resource access authority configuration is a next data processing node adjacent to a corresponding resource access sequence of the current data processing node; acquiring the resource access priority of the data processing node to be configured; if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node; and configuring the resource access authority to the target data processing node.
In a second aspect, the present application provides a permission configuration method, applied to a data processing system, where the data processing system includes a control node and a data processing node, and the method includes: the control node acquires a target data processing node to be configured with the resource access authority configuration as a target data processing node to be configured, and the data processing node to be configured with the resource access authority of the data processing node to be configured with the resource access authority is a next data processing node adjacent to the resource access sequence of the current data processing node in the corresponding resource access sequence; acquiring the resource access priority of the data processing node to be configured; if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node; and configuring the resource access authority to the target data processing node.
In a third aspect, the present application provides a resource access right configuration apparatus, where the apparatus includes: the node selection unit is used for acquiring a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, wherein the data processing node to be subjected to resource access authority configuration is a next data processing node which is adjacent to the corresponding resource access sequence of the current data processing node; the priority acquisition unit is used for acquiring the resource access priority of the data processing node to be configured; the node detection unit is used for taking the data processing node to be configured as a target data processing node if the resource access priority meets a target condition; and the authority configuration unit is used for configuring the resource access authority to the target data processing node.
In a fourth aspect, the present application provides a data processing system comprising a control node and a data processing node; the data processing node is used for processing data based on shared resources; the control node is used for acquiring a target data processing node to be subjected to resource access authority configuration as a target data processing node to be configured, wherein the data processing node to be subjected to resource access authority configuration of the data processing node to be subjected to resource access authority configuration is the next data processing node with the corresponding resource access sequence adjacent to the resource access sequence of the current data processing node; acquiring the resource access priority of the data processing node to be configured; if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node; and configuring the resource access authority to the target data processing node.
In a fifth aspect, the present application provides a node device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a sixth aspect, the present application provides a computer readable storage medium having program code executable by a processor, the program code causing the processor to perform the above-described method.
According to the authority configuration method, the authority configuration device, the node equipment and the data processing system, after a current data processing node acquires a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, the resource access priority of the data processing node to be configured is firstly acquired, and then if the resource access priority meets a target condition, the data processing node to be configured is taken as a target data processing node so as to configure the resource access authority to the target data processing node. Therefore, through the above manner, when the next data processing node capable of having the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and under the condition that the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access authority, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating an application scenario proposed in an embodiment of the present application;
fig. 2 is a schematic diagram illustrating another application scenario proposed in an embodiment of the present application;
fig. 3 is a flowchart illustrating a rights configuration method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating another rights configuration method proposed in an embodiment of the present application;
fig. 5 is a flowchart illustrating a further permission configuration method proposed in an embodiment of the present application;
FIG. 6 is a flow chart illustrating a further privilege configuration method proposed in the embodiment of the present application;
fig. 7 is a flowchart illustrating another rights configuration method proposed in an embodiment of the present application;
fig. 8 is a block diagram illustrating a structure of a rights configuration apparatus according to an embodiment of the present application;
fig. 9 is a block diagram showing a configuration of another rights configuration apparatus proposed in an embodiment of the present application;
fig. 10 is a block diagram illustrating a structure of still another rights configuration apparatus according to an embodiment of the present application;
fig. 11 shows a block diagram of a node device according to an embodiment of the present application.
Fig. 12 is a storage unit, according to an embodiment of the present application, configured to store or carry program code for implementing a rights configuration method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In a computer system, a flow of data processing is inevitably performed. For example, in a shopping system, browsing data may be processed, order data may be processed, and chat data may be processed. For another example, there may be processing of data to be transmitted in the information transmission system, and processing of data to be stored may also be performed correspondingly.
As the amount of data required to be processed in modern computer systems increases, a plurality of data processing nodes may be configured in a computer system to process data, thereby improving the data processing capability of the entire computer system. In this case, different data processing nodes may all need to access the same resource (e.g., a critical resource that is mutually exclusive accessed) for data processing. In order to make different data processing nodes orderly access to the same resource, a token can be used to determine which data processing node currently has resource access authority. In this case, the token may be transmitted between different data processing nodes, and the data processing nodes that acquire the token may access the resource in a mutually exclusive manner.
However, the inventors have found in the study of such an authorization arrangement method based on tokens, that there are problems of low access efficiency and waste of resources in such a method. Specifically, in the case of multiple data processing nodes, the data processing tasks executed by each data processing node may be different, that is, the timing at which different data processing nodes need to access the resource is different, but the chances that each data processing node acquires the token are equal. Therefore, the inventor finds that if the tokens are directly and sequentially passed, the data processing node which acquires the token may actually not need to perform resource access right currently, which causes the data processing node which acquires the token to pass the token to the next data processing node without performing resource access. Therefore, under the condition that the data processing node which does not need to access the resource still acquires the token and needs to perform the token passing operation, the invalid token passing communication overhead is caused, so that the resource waste is caused, and the processing efficiency of the data processing node which needs the resource access authority urgently at present is also influenced.
Therefore, in order to improve the above problem, the inventor proposes an authority configuration method, an authority configuration device, a node device, and a data processing system in the present application, where after a current data processing node acquires a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, a resource access priority of the data processing node to be configured is first acquired, and then if the resource access priority satisfies a target condition, the data processing node to be configured is taken as a target data processing node, so as to configure the resource access authority to the target data processing node.
Therefore, through the above manner, when the next data processing node capable of having the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and under the condition that the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access authority, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided.
The following first introduces an environment of a data processing system in which the method and apparatus for configuring permissions provided in the present application operate.
As shown in fig. 1, data processing system 100 shown in fig. 1 includes data processing node 121, data processing node 122, data processing node 123, data processing node 124, data processing node 125, and data processing node 126. And, among them, data processing node 121, data processing node 122, data processing node 123, data processing node 124, data processing node 125, and data processing node 126 are ring structures. In the environment shown in fig. 1, a data processing node that can acquire resource access authority is determined by a node that currently acquires resource access authority. Illustratively, in the case where the data processing node 121 currently acquires the resource access right, the data processing node 121 determines the data processing node which acquires the resource access right next. For example, if the determination is made according to the resource access order, the data processing node 121 first detects whether the data processing node 122 following the corresponding resource access order can acquire the resource access authority, if so, the resource access authority may be allocated to the data processing node 122 in a manner of instruction, and if not, the data processing node 123 following the data processing node 122 in the corresponding resource access order may continue to detect whether the resource access authority can be acquired.
Furthermore, in addition to the environment shown in FIG. 1, the data processing system provided herein may also be that shown in FIG. 2. In the environment shown in fig. 2, the next data processing node that can acquire the resource access right is detected by the control node 110.
It should be noted that the ring structures shown in fig. 1 and fig. 2 are only exemplary, the specific environment structure may be in other manners, and the location of each data processing node in the ring structure may also be changed. Illustratively, the order of the previous cycles of the data processing nodes may be in a counterclockwise manner, in addition to the clockwise manner shown in FIG. 1.
It should be noted that the data processing nodes shown in fig. 1 and 2 may be hardware device nodes or software nodes. Illustratively, in the case of a software node, the data processing node may be a process or a thread. For example, the data processing nodes are processes of different applications, and the same resource to be accessed is a computing resource of the processor. For another example, the data processing nodes are respectively different threads of the same application program, and the same resource to be accessed is a channel for communicating with an external program. Under the condition of being a hardware node, the data processing node may be a plurality of devices working in cooperation, for example, a plurality of smart phones working in cooperation, a smart band, an unmanned aerial vehicle, or the like. And the same resource to be accessed may be a communication band, etc.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, a method for configuring permissions provided in the present application includes:
s110: the current data processing node acquires a data processing node to be subjected to resource access authority configuration as the data processing node to be configured, and the data processing node to be subjected to resource access authority configuration is a next data processing node adjacent to the corresponding resource access sequence of the current data processing node.
It should be noted that the current data processing node is the data processing node currently acquiring the resource access right. Each data processing node is formed by a ring network structure shown in fig. 1 or fig. 2, and each data processing node corresponds to a respective resource access sequence, and the resource access sequence represents the sequential position relationship of the corresponding data processing node relative to other data processing nodes. For example, as shown in fig. 1, the arrow points between the data processing nodes represent the resource access sequence, and if the current data processing node is the data processing node 121, the next data processing node whose corresponding resource access sequence is adjacent to the resource access sequence of the current data processing node is the data processing node 122.
S120: and acquiring the resource access priority of the data processing node to be configured.
In the embodiment of the application, each data processing node corresponds to a resource access priority, and the data processing node with the higher resource access priority can acquire the resource access authority with higher probability. The current data processing node may have a plurality of ways of obtaining the resource access priority of the data processing node to be configured.
As one mode, the current data processing node may obtain the resource access priority of the data processing node to be configured by sending an inquiry request to the data processing node to be configured. In this way, the current data processing node may send an inquiry request to the data processing node to be configured, and after receiving the inquiry request, the data processing node to be configured locally queries the corresponding resource access priority, and then returns the queried resource access priority to the current data processing node, so that the current data processing node may obtain the resource access priority of the data processing node to be configured.
Alternatively, each data processing node may be configured with node priority information, and the node priority information may store resource access priorities of data processing nodes in the same ring network structure as the current data processing node. In this way, the current data processing node can acquire the resource access priority of the data processing node to be configured by querying the local node priority information. Optionally, in order to enable each data processing node to obtain the latest resource access priority of other data processing nodes in real time, after detecting that the corresponding resource access priority is updated, each data processing node may send a priority synchronization request to other data processing nodes, so as to synchronize the updated resource access priority to other data processing nodes in real time.
It should be noted that, due to a system upset or the like, the resource access priority cannot be updated synchronously between different data processing nodes. For example, if a module in a data processing node that is responsible for sending a priority synchronization request crashes, the latest resource access priority of the data processing node cannot be synchronized with other data processing nodes although data processing operations can still be performed. In this case, as a manner, the current data processing node may preferentially query the local node priority information, and obtain the update time of the latest resource access priority of the data processing node to be configured from the local node priority information, and if the time length between the update time and the current time is less than the threshold duration, determine that the latest resource access priority of the data processing node to be configured, which is recorded in the local node priority information, is valid, and further directly obtain the resource access priority of the data processing node to be configured from the local node priority information. If the time length between the updating time and the current time is not less than the threshold duration, determining that the latest resource access priority of the data processing node to be configured recorded in the local node priority information is invalid, and then triggering the data processing node to be configured to inquire the latest resource access priority from the local in real time and return the latest resource access priority to the current data processing node by sending an inquiry request to the data processing node to be configured.
S130: and if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node.
Optionally, the target condition may include that the resource access priority is greater than the specified priority, or may include that the resource access priority is within a specified priority interval.
S140: and configuring the resource access authority to the target data processing node.
In this way, the data processing node may identify whether the current data processing node is the current data processing node that has acquired the resource access right or not by using the node identifier. Correspondingly, in the process that the current data processing node configures the resource access authority to the target data processing node, an authority configuration instruction can be sent to the target data processing node, and after receiving the authority configuration instruction, the target data processing node can update the node identifier of the target data processing node to represent the current data processing node which has acquired the resource access authority. Illustratively, if the value of the node identifier is 0, the resource access right is not obtained, and if the value of the node identifier is 1, the resource access right is obtained. In this case, the target data processing node may update its node identifier to 1 after receiving the permission configuration instruction, and the target data processing node may start resource access after further detecting that the node identifier is 1.
According to the authority configuration method provided by the embodiment of the application, after the current data processing node acquires a data processing node to be subjected to resource access authority configuration as the data processing node to be configured, the resource access priority of the data processing node to be configured is acquired, and then if the resource access priority meets a target condition, the data processing node to be configured is taken as a target data processing node so as to configure the resource access authority to the target data processing node. Therefore, through the above manner, when the next data processing node capable of having the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and under the condition that the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access authority, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided.
Referring to fig. 4, a method for configuring permissions provided by the present application includes:
s210: the current data processing node acquires a data processing node to be subjected to resource access authority configuration as the data processing node to be configured, and the data processing node to be subjected to resource access authority configuration is a next data processing node adjacent to the corresponding resource access sequence of the current data processing node.
S220: and acquiring the resource access priority of the data processing node to be configured.
S230: detecting whether the resource access priority is greater than a specified priority.
Optionally, in the embodiment of the present application, the resource access priority of the data processing node may be between-128 and 127. Alternatively, the assigned priority may be one-half of the lowest resource access priority. For example, if the resource access priority of the data processing node may be between-128 and 127, then the specified priority may be-128/2 ═ -64.
S240: and if the resource access priority is detected to be greater than the designated priority, judging that the resource access priority meets a target condition.
S250: and if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node.
S251: and configuring the resource access authority to the target data processing node.
S260: and if the resource access priority is not greater than the designated priority, acquiring the resource access identifier of the data processing node to be configured.
S270: and detecting the resource access identification of the data processing node to be configured.
S271: and if the resource access identifier of the data processing node to be configured represents that the data processing node to be configured is a node which is allowed to perform resource access currently, taking the data processing node to be configured as a target data processing node, and configuring the data processing node to be configured as a node which is not allowed to perform resource access.
S272: and configuring the resource access authority to the target data processing node.
S273: and if the resource access identifier of the data processing node to be configured represents that the data processing node to be configured is a node which is not allowed to perform resource access currently, taking the next data processing node which is adjacent to the target data processing node which is to be configured with the resource access authority currently as a new data processing node to be configured, and configuring the data processing node to be configured as a node which is allowed to perform resource access.
Optionally, if the resource access identifier is 1, the target data processing node is a node that is currently not allowed to perform resource access, that is, the target data processing node is characterized to be a node that is required to be skipped over and a next data processing node adjacent to the data processing node to be configured is taken as a new data processing node to be configured, and then it is further detected whether the new data processing node to be configured can obtain the resource access right. And if the resource access identifier is 0, representing that the target data processing node is a node which is allowed to access the resource currently.
As a mode, the resource access right is configured to the next data processing node whose corresponding resource access sequence is adjacent to the target data processing node to be currently configured with the resource access right.
Illustratively, as shown in FIG. 1, data processing node 121, data processing node 122, and data processing node 123 are three data processing nodes ordered sequentially in resource access order. If the data processing node 121 is a current data processing node, the data processing node 121 firstly uses the data processing node 122 adjacent to the data processing node 121 as a data processing node to be configured when the permission transfer is required, and when it is determined that the resource access identifier of the data processing node 122 represents that the data processing node 122 is currently a node which does not allow resource access, the data processing node 123 adjacent to the data processing node 122 is used as a new data processing node to be configured.
According to the authority configuration method provided by the embodiment of the application, after the current data processing node acquires the data processing node to be subjected to resource access authority configuration as the data processing node to be configured, the resource access priority of the data processing node to be configured is acquired, and then the data processing node to be configured is taken as a target data processing node to configure the resource access authority to the target data processing node under the condition that the resource access priority is greater than the designated priority.
Therefore, through the above manner, when the next data processing node capable of having the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and under the condition that the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access authority, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided. In addition, in this embodiment, when it is detected that the resource access priority is not greater than the specified priority, the resource access identifier of the data processing node to be configured is further detected, and the target data processing node that can acquire the resource access right is determined according to the value of the resource access identifier, so that the entire right configuration process is more flexible, and it can be more accurately determined which specific data processing nodes actually need the resource access right.
Referring to fig. 5, a method for configuring permissions provided by the present application includes:
s310: the current data processing node acquires a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, wherein the data processing node to be subjected to resource access authority configuration is a next data processing node of which the corresponding resource access sequence is adjacent to the resource access sequence of the current data processing node.
S320: and acquiring the resource access priority of the data processing node to be configured.
S330: and if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node.
S340: and configuring the resource access authority to the target data processing node.
S350: and if the confirmation message returned by the target data processing node is not received within the specified time length, judging that the target data processing node is invalid.
Correspondingly, if the confirmation message returned by the target data processing node is received within the specified time length, the target data processing node is confirmed to successfully acquire the resource access authority.
S360: and taking the next data processing node adjacent to the corresponding resource access sequence of the target data processing node as a data processing node to be configured.
It should be noted that, as a manner, if the resource access right is obtained, a confirmation message is returned to the data processing node before the current data processing node in the corresponding resource access sequence.
If the resource access authority is acquired, after a confirmation message is returned to the data processing node in front of the current data processing node in the corresponding resource access sequence, the method further comprises the following steps: and if the resource access is detected to be needed, the access priority of the current data processing node is improved.
If the resource access authority is acquired, returning a confirmation message to the data processing node of which the corresponding resource access sequence is before the current data processing node further comprises: and if the resource access is detected to be unnecessary, reducing the access priority of the current data processing node.
It should be noted that, a task-to-be-processed storage area may be configured in each data processing node, and the task-to-be-processed storage area may store a task that is currently required to be processed by the data processing node. And when the task in the to-be-processed task storage area is processed, deleting the processed to-be-processed task from the to-be-processed task storage area. Then, the data processing node (e.g., the current data processing node) may detect whether resource access is required by querying whether the to-be-processed task is stored in the to-be-processed task storage area, for example, if it is queried that the to-be-processed task is stored, it is detected that resource access is required, and if it is queried that the to-be-processed task storage area is empty, it is detected that resource access is not required.
The authority configuration method provided by the embodiment of the application can confirm the resource access priority of the data processing node to be configured when determining the next data processing node capable of having the resource access authority, and can take the data processing node to be configured as the target data processing node capable of acquiring the resource access authority only when the resource access priority meets the target condition, so that the target data processing node can be determined through the priority, and low access efficiency and resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided. In addition, in this embodiment, in the configuration process of the resource access permission, a confirmation message mechanism is also introduced, so that the current data processing node can effectively confirm whether the determined target data processing node has successfully acquired the resource access permission, so as to avoid that the resource access permission is stagnated between the current data processing node and the determined target data processing node, and other data processing nodes cannot acquire the resource access permission.
Referring to fig. 6, a method for configuring permissions provided by the present application includes:
s410: and acquiring the online data processing node.
As one way, the method further comprises: when the data processing node is on line, broadcasting on-line prompt information to other data processing nodes; the data processing node for acquiring online data comprises: acquiring locally received online prompt information; and taking the data processing node which sends the online prompt information as an online data processing node.
As a mode, the acquiring locally received online prompt information includes: and acquiring the locally received online prompt information within a specified time period, wherein the specified time period is a time period from the current data processing node being used as the current data processing node last time to the current data processing node being used as the current data processing node.
S420: and generating current resource access sequence information according to the online data processing nodes, wherein the resource access sequence information comprises a resource access sequence currently corresponding to each data processing node.
S430: the current data processing node acquires a data processing node to be subjected to resource access authority configuration as the data processing node to be configured, and the data processing node to be subjected to resource access authority configuration is a next data processing node adjacent to the corresponding resource access sequence of the current data processing node.
S440: and acquiring the resource access priority of the data processing node to be configured.
S450: and if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node.
S460: and configuring the resource access authority to the target data processing node.
It should be noted that, as a manner, the configuring the resource access right to the target data processing node includes: sending a permission configuration instruction to the target data processing node through a first communication path so as to configure the resource access permission to the target data processing node; the method further comprises the following steps: and sending online prompt information to other data processing nodes through the second communication path.
Optionally, the second communication path may be further configured to send an inquiry request for obtaining the resource access priority in the foregoing embodiment, and may also be configured to send a priority synchronization request.
The permission configuration method provided by the embodiment of the application realizes that when the next data processing node capable of having the resource access permission is determined, the resource access priority of the data processing node to be configured is determined, and when the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access permission, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access permission are avoided. In addition, in this embodiment, before determining the next data processing node that can have the resource access right, the online data processing node is acquired first, and then the current resource access sequence information including the current resource access sequence corresponding to each data processing node is generated according to the online data processing node, so that it can be effectively determined in real time which data processing nodes are currently in a working state, and the data processing node that is not online is determined as the target data processing node, which causes resource waste.
Referring to fig. 7, a method for configuring permissions provided by the present application includes: the method is applied to a data processing system, the data processing system comprises a control node and a data processing node, and the method comprises the following steps:
s510: the control node acquires a target data processing node to be configured with the resource access authority configuration as a target data processing node to be configured, and the data processing node to be configured with the resource access authority of the data processing node to be configured with the resource access authority is a next data processing node with a corresponding resource access sequence adjacent to the resource access sequence of the current data processing node.
S520: and acquiring the resource access priority of the data processing node to be configured.
S530: and if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node.
S540: and configuring the resource access authority to the target data processing node.
It should be noted that the functions that can be performed by the control node in this embodiment are the same as those that can be performed by the current data processing node in the foregoing embodiment. The steps performed by the current data processing node in the foregoing embodiments may all be directly run in the control node in the present embodiment.
According to the authority configuration method, after a current data processing node acquires a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, a resource access priority of the data processing node to be configured is acquired, and then if the resource access priority meets a target condition, the data processing node to be configured is taken as a target data processing node so as to configure the resource access authority to the target data processing node. Therefore, through the above manner, when the next data processing node capable of having the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and under the condition that the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access authority, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided.
Referring to fig. 8, the present application provides a device 600 for configuring resource access rights, where the device 600 includes:
the node selecting unit 610 is configured to acquire a data processing node to be subjected to resource access permission configuration as a data processing node to be configured, where the data processing node to be subjected to resource access permission configuration is a next data processing node whose corresponding resource access ordering is adjacent to the resource access ordering of the current data processing node.
A priority obtaining unit 620, configured to obtain a resource access priority of the data processing node to be configured.
A node detecting unit 630, configured to, if the resource access priority satisfies the target condition, use the to-be-configured data processing node as a target data processing node.
And the authority configuring unit 640 is configured to configure the resource access authority to the target data processing node.
The node detecting unit 630 is specifically configured to detect whether the resource access priority is greater than a specified priority; and if the resource access priority is detected to be greater than the designated priority, judging that the resource access priority meets a target condition.
As a manner, the node detecting unit 630 is specifically configured to detect the resource access identifier of the to-be-configured data processing node if it is detected that the resource access priority is not greater than the specified priority; and if the resource access identifier of the data processing node to be configured represents that the data processing node to be configured is a node which is allowed to perform resource access currently, taking the data processing node to be configured as a target data processing node, and configuring the data processing node to be configured as a node which is not allowed to perform resource access. Correspondingly, the node detecting unit 630 is further specifically configured to, if the resource access identifier of the data processing node to be configured indicates that the data processing node to be configured is a node which is not allowed to perform resource access currently, take a next data processing node, which is adjacent to the target data processing node to be configured with the resource access permission currently, of the corresponding resource access sequence as a new data processing node to be configured, and configure the data processing node to be configured as a node which is allowed to perform resource access.
In this manner, the authority configuring unit 640 is specifically configured to configure the resource access authority to a next data processing node adjacent to the target data processing node to be currently configured with the resource access authority according to the corresponding resource access ranking.
As a manner, the node selecting unit 610 is further configured to determine that the target data processing node is invalid if a confirmation message returned by the target data processing node is not received within a specified duration; and taking the next data processing node adjacent to the corresponding resource access sequence of the target data processing node as a data processing node to be configured. In this manner, as shown in fig. 9, the apparatus 600 further includes an acknowledgement message sending unit 650, configured to, if the resource access right is obtained, return an acknowledgement message to a data processing node that is ordered before the current data processing node in the corresponding resource access sequence.
As one mode, as shown in fig. 10, the apparatus 600 further includes: and the priority management unit 660 is configured to, if it is detected that resource access is required, raise the access priority of the current data processing node. And if the resource access is not required, reducing the access priority of the current data processing node.
As a mode, the node selecting unit 610 is further configured to obtain an online data processing node; and generating current resource access sequence information according to the online data processing nodes, wherein the resource access sequence information comprises a resource access sequence currently corresponding to each data processing node. Optionally, the node selecting unit 610 is further configured to obtain a configured valid data processing node from the online data processing nodes, and correspondingly, the node selecting unit 610 is specifically configured to generate current resource access sequence information according to the valid data processing node. Optionally, the node selecting unit 610 is specifically configured to obtain locally received online prompt information; and taking the data processing node which sends the online prompt information as an online data processing node. The node selecting unit 610 is specifically configured to acquire locally received online prompt information within a specified time period, where the specified time period is a time period from when the current data processing node is used as the current data processing node last time to when the current data processing node is used as the current data processing node this time.
As one mode, the authority configuring unit 640 is specifically configured to send an authority configuration instruction to the target data processing node through a first communication path, so as to configure the resource access authority to the target data processing node. In this manner, as shown in fig. 10, the apparatus 600 further includes: and an online prompt unit 660, configured to send online prompt information to other data processing nodes through the second communication path.
According to the authority configuration device, after the current data processing node acquires the data processing node to be subjected to resource access authority configuration as the data processing node to be configured, the resource access priority of the data processing node to be configured is acquired, and then if the resource access priority meets a target condition, the data processing node to be configured is taken as a target data processing node so as to configure the resource access authority to the target data processing node. Therefore, through the above manner, when the next data processing node capable of having the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and under the condition that the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access authority, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided.
It should be noted that the contents in the apparatus embodiment and the contents in the foregoing method embodiment correspond to each other, and further detailed descriptions of the technology in the apparatus embodiment may refer to the contents in the foregoing method embodiment, which is not described herein again.
A node apparatus provided by the present application will be described below with reference to fig. 11.
Referring to fig. 11, based on the above-mentioned short message push method, another node device 200 including a processor 102 capable of executing the short message push method is further provided in the embodiment of the present application. Node device 200 also includes memory 104, and network module 106. The memory 104 stores programs that can execute the content of the foregoing embodiments, and the processor 102 can execute the programs stored in the memory 104.
Wherein the processor 102 interfaces with various interfaces and circuitry throughout the node apparatus 200 to perform various functions of the node apparatus 200 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 104 and invoking data stored in the memory 104. Alternatively, the processor 102 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 102 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 102, but may be implemented by a communication chip.
The Memory 104 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, code sets, or instruction sets. The memory 104 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal 100 in use, such as a phonebook, audio-video data, chat log data, and the like.
The network module 106 is configured to receive and transmit electromagnetic waves, and implement interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, for example, an audio playing device. The network module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The network module 106 may communicate with various networks, such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 106 may interact with a base station.
Optionally, the node device 200 may be a smart phone, a smart band, a server, an unmanned aerial vehicle, or the like.
Referring to fig. 12, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 1100 has stored therein program code that can be called by a processor to perform the method described in the above-described method embodiments.
The computer-readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 1100 includes a non-volatile computer-readable storage medium. The computer readable storage medium 1100 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 1110 may be compressed, for example, in a suitable form.
To sum up, according to the permission configuration method, device, node device and data processing system provided by the present application, after the current data processing node acquires the data processing node to be subjected to resource access permission configuration as the data processing node to be configured, the resource access priority of the data processing node to be configured is acquired first, and then if the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node, so as to configure the resource access permission to the target data processing node. Therefore, through the above manner, when the next data processing node capable of having the resource access authority is determined, the resource access priority of the data processing node to be configured is determined, and under the condition that the resource access priority meets the target condition, the data processing node to be configured is taken as the target data processing node capable of acquiring the resource access authority, so that the target data processing node can be determined through the priority, and the low access efficiency and the resource waste caused by the fact that each data processing node has the same probability of acquiring the resource access authority are avoided.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (20)

  1. A method for configuring rights, the method comprising:
    the current data processing node acquires a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, wherein the data processing node to be subjected to resource access authority configuration is a next data processing node of which the corresponding resource access sequence is adjacent to the resource access sequence of the current data processing node;
    acquiring the resource access priority of the data processing node to be configured;
    if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node;
    and configuring the resource access authority to the target data processing node.
  2. The method of claim 1, further comprising:
    detecting whether the resource access priority is greater than a specified priority;
    and if the resource access priority is detected to be greater than the designated priority, judging that the resource access priority meets a target condition.
  3. The method of claim 2, further comprising:
    if the resource access priority is not larger than the designated priority, detecting a resource access identifier of the data processing node to be configured;
    if the resource access identifier of the data processing node to be configured represents that the data processing node to be configured is a node which is allowed to perform resource access currently, taking the data processing node to be configured as a target data processing node, and configuring the data processing node to be configured as a node which is not allowed to perform resource access;
    and configuring the resource access authority to the target data processing node.
  4. The method of claim 3, further comprising:
    and if the resource access identifier of the data processing node to be configured represents that the data processing node to be configured is a node which is not allowed to perform resource access currently, taking the next data processing node which is adjacent to the target data processing node which is to be configured with the resource access authority currently as a new data processing node to be configured, and configuring the data processing node to be configured as a node which is allowed to perform resource access.
  5. The method of claim 4, further comprising:
    and configuring the resource access authority to the next data processing node adjacent to the target data processing node to be configured with the resource access authority at present according to the corresponding resource access sequence.
  6. The method according to any of claims 1-5, wherein said configuring said resource access rights to said target said data processing node further comprises:
    if the confirmation message returned by the target data processing node is not received within the specified time length, judging that the target data processing node is invalid;
    and taking the next data processing node adjacent to the corresponding resource access sequence of the target data processing node as the data processing node to be configured.
  7. The method according to any of claims 3-6, wherein before the current data processing node obtaining the target data processing node to be configured with the resource access right, the method further comprises:
    and if the resource access authority is acquired, returning a confirmation message to the data processing node which is in front of the current data processing node and is accessed and sequenced by the corresponding resource.
  8. The method according to claim 7, wherein, after the step of returning a confirmation message to the data processing node with the corresponding resource access ranking before the current data processing node if the resource access right is obtained, further comprises:
    and if the resource access is detected to be needed, the access priority of the current data processing node is improved.
  9. The method according to claim 8, wherein, after the step of returning a confirmation message to the data processing node with the corresponding resource access ranking before the current data processing node if the resource access right is obtained, further comprises:
    and if the resource access is detected to be unnecessary, reducing the access priority of the current data processing node.
  10. The method according to any one of claims 1 to 9, wherein before the current data processing node acquiring the data processing node to be subjected to resource access right configuration as the data processing node to be configured, the method further comprises:
    acquiring an online data processing node;
    and generating current resource access sequence information according to the online data processing nodes, wherein the resource access sequence information comprises a resource access sequence currently corresponding to each data processing node.
  11. The method of claim 10, wherein generating current resource access order information from the online data processing node further comprises:
    acquiring configured valid data processing nodes from the online data processing nodes;
    the generating of the current resource access sequence information according to the online data processing node includes:
    and generating current resource access sequence information according to the effective data processing node.
  12. The method of claim 10, further comprising: when the data processing node is on line, the data processing node broadcasts an on-line prompt message to other data processing nodes; the data processing node for acquiring online data comprises:
    acquiring locally received online prompt information;
    and taking the data processing node which sends the online prompt information as an online data processing node.
  13. The method of claim 12, wherein obtaining locally received online alert information comprises:
    and acquiring the locally received online prompt information within a specified time period, wherein the specified time period is a time period from the current data processing node being used as the current data processing node last time to the current data processing node being used as the current data processing node.
  14. The method of any of claims 1-13, wherein said configuring said resource access rights to said target data processing node comprises:
    sending a permission configuration instruction to the target data processing node through a first communication path so as to configure the resource access permission to the target data processing node;
    the method further comprises the following steps:
    and sending online prompt information to other data processing nodes through the second communication path.
  15. An authority configuration method applied to a data processing system, wherein the data processing system comprises a control node and a data processing node, and the method comprises the following steps:
    the control node acquires a target data processing node to be configured with the resource access authority configuration as a target data processing node to be configured, and the data processing node to be configured with the resource access authority of the data processing node to be configured with the resource access authority is a next data processing node adjacent to the resource access sequence of the current data processing node in the corresponding resource access sequence;
    acquiring the resource access priority of the data processing node to be configured;
    if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node;
    and configuring the resource access authority to the target data processing node.
  16. An apparatus for configuring resource access rights, the apparatus comprising:
    the node selection unit is used for acquiring a data processing node to be subjected to resource access authority configuration as a data processing node to be configured, wherein the data processing node to be subjected to resource access authority configuration is a next data processing node which is adjacent to the corresponding resource access sequence of the current data processing node;
    a priority acquiring unit, configured to acquire a resource access priority of the data processing node to be configured;
    the node detection unit is used for taking the data processing node to be configured as a target data processing node if the resource access priority meets a target condition;
    and the authority configuration unit is used for configuring the resource access authority to the target data processing node.
  17. The apparatus of claim 16, wherein the node detecting unit is configured to determine that the resource access priority satisfies a target condition if it is detected that the resource access priority is greater than the specified priority.
  18. A data processing system comprising a control node and a data processing node;
    the data processing node is used for processing data based on shared resources;
    the control node is used for acquiring a target data processing node to be configured with resource access authority as a target data processing node to be configured, and the data processing node to be configured with resource access authority of the data processing node to be configured with resource access authority is a next data processing node adjacent to the resource access sequence of the current data processing node in the corresponding resource access sequence; acquiring the resource access priority of the data processing node to be configured; if the resource access priority meets the target condition, taking the data processing node to be configured as a target data processing node; and configuring the resource access authority to the target data processing node.
  19. A node device comprising one or more processors and memory;
    one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-14.
  20. A computer-readable storage medium storing program code executable by a processor, the program code causing the processor to perform the method of any one of claims 1-14.
CN202080094698.1A 2020-05-12 2020-05-12 Authority configuration method, device, node equipment and data processing system Active CN115004643B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/089755 WO2021226820A1 (en) 2020-05-12 2020-05-12 Permission configuration method and apparatus, and node device and data processing system

Publications (2)

Publication Number Publication Date
CN115004643A true CN115004643A (en) 2022-09-02
CN115004643B CN115004643B (en) 2023-09-08

Family

ID=78525590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080094698.1A Active CN115004643B (en) 2020-05-12 2020-05-12 Authority configuration method, device, node equipment and data processing system

Country Status (2)

Country Link
CN (1) CN115004643B (en)
WO (1) WO2021226820A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4726018A (en) * 1986-08-25 1988-02-16 International Business Machines Corporation Method of providing priority access to a transmission communication ring
US4819229A (en) * 1986-03-13 1989-04-04 University Of Strathclyde Local area network priority control system
US5553073A (en) * 1993-05-17 1996-09-03 Ibm Corporation Token ring network
CN101330458A (en) * 2008-07-22 2008-12-24 宇龙计算机通信科技(深圳)有限公司 Method, apparatus and system for controlling access authority of pickaback plane
CN102394916A (en) * 2011-10-11 2012-03-28 上海创件信息科技有限公司 Method for controlling resource access rights in relation to network cooperation space-time equalization
CN103533661A (en) * 2013-10-23 2014-01-22 中国舰船研究设计中心 Wireless channel access control method based on virtual token
CN106843170A (en) * 2016-11-30 2017-06-13 浙江中控软件技术有限公司 Method for scheduling task based on token

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3537353A1 (en) * 1985-10-19 1987-04-23 Licentia Gmbh Data transmission system with a ring-shaped transmission line
US7181547B1 (en) * 2001-06-28 2007-02-20 Fortinet, Inc. Identifying nodes in a ring network
CN103473846B (en) * 2013-09-22 2015-11-25 四川智行电子科技有限公司 The dynamic queuing strategy of complicated many tokens
CN108737321A (en) * 2017-04-13 2018-11-02 成都卫士通信息产业股份有限公司 Multi-course concurrency processing system and its method based on PKCS#11 standards

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4819229A (en) * 1986-03-13 1989-04-04 University Of Strathclyde Local area network priority control system
US4726018A (en) * 1986-08-25 1988-02-16 International Business Machines Corporation Method of providing priority access to a transmission communication ring
US5553073A (en) * 1993-05-17 1996-09-03 Ibm Corporation Token ring network
CN101330458A (en) * 2008-07-22 2008-12-24 宇龙计算机通信科技(深圳)有限公司 Method, apparatus and system for controlling access authority of pickaback plane
CN102394916A (en) * 2011-10-11 2012-03-28 上海创件信息科技有限公司 Method for controlling resource access rights in relation to network cooperation space-time equalization
CN103533661A (en) * 2013-10-23 2014-01-22 中国舰船研究设计中心 Wireless channel access control method based on virtual token
CN106843170A (en) * 2016-11-30 2017-06-13 浙江中控软件技术有限公司 Method for scheduling task based on token

Also Published As

Publication number Publication date
WO2021226820A1 (en) 2021-11-18
CN115004643B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
CN113055451B (en) Resource downloading method and device, electronic equipment and storage medium
EP3592004A1 (en) Broadcast processing method, device, storage medium and terminal device
CN114077568A (en) Inter-core communication method and device, electronic assembly and electronic equipment
CN106874131B (en) Broadcast queue adjusting method and device and terminal equipment
EP3846054A1 (en) Data processing method for security authentication, server, client device, and medium
CN113452770B (en) Data synchronization method, device, computer equipment and storage medium
CN111338710A (en) Application program control method and device, electronic equipment and storage medium
CN114327710A (en) Function management method, management device, terminal equipment and readable storage medium
CN110708293B (en) Method and device for distributing multimedia service
CN106550021B (en) Push method and device for push message
CN110597643B (en) Inter-core communication method, processor and electronic equipment
CN106954191A (en) Broadcast transmission method, device and terminal device
CN114556892A (en) Method and device for subscribing resources
CN115004643B (en) Authority configuration method, device, node equipment and data processing system
CN112000019A (en) Method, device and equipment for sharing equipment instruction control
CN111813529B (en) Data processing method, device, electronic equipment and storage medium
CN111522634A (en) Application management method, device and equipment
CN113365272B (en) Method and system for preventing network from being rubbed
CN112052089B (en) Memory recovery method and device and electronic equipment
CN114270309A (en) Resource acquisition method and device and electronic equipment
CN109086107B (en) Bullet screen message distribution method, device, equipment and storage medium
CN112040057B (en) Device control method, device, electronic device, control system and storage medium
CN112099736A (en) Data storage method and device, electronic equipment and storage medium
CN114189384B (en) Service processing method, device, equipment and storage medium
CN114270343A (en) Data request method, device, system, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant