CN111552847A - Method and device for changing number of objects - Google Patents

Method and device for changing number of objects Download PDF

Info

Publication number
CN111552847A
CN111552847A CN202010358441.4A CN202010358441A CN111552847A CN 111552847 A CN111552847 A CN 111552847A CN 202010358441 A CN202010358441 A CN 202010358441A CN 111552847 A CN111552847 A CN 111552847A
Authority
CN
China
Prior art keywords
target object
object group
group
operation instruction
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
CN202010358441.4A
Other languages
Chinese (zh)
Other versions
CN111552847B (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202010358441.4A priority Critical patent/CN111552847B/en
Publication of CN111552847A publication Critical patent/CN111552847A/en
Application granted granted Critical
Publication of CN111552847B publication Critical patent/CN111552847B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method and a device for changing the number of objects. In this application, when the received operation instruction is used to instruct to add a target object to the target object group, the target object group and an upper user group to which the target object group belongs are determined as a first object group set, before the operation instruction is executed, an object group to which the target object belongs is determined as a second object group set, and finally, the target object group is determined based on the first object group and the second object group. According to the method and the device, the number of the objects counted by the object groups does not need to be updated by traversing each object group, the object groups of which the number of the objects needs to be changed are directly searched according to the relation among the object group sets, and the working efficiency is greatly improved.

Description

Method and device for changing number of objects
Technical Field
The present application relates to the field of data structure technologies, and in particular, to a method and an apparatus for changing the number of objects.
Background
The tree structure organization relationship is often used in common electronic devices. For example, in the user management function of the firewall device, the organizational structure in the enterprise is generally shown in the form of a tree diagram, wherein a root node is used for representing the enterprise, child nodes are used for representing departments in the enterprise, leaf nodes are used for representing employees in the enterprise, and the hierarchical relationship between the nodes represents the affiliations between the employees and the departments and between the departments.
In such a tree structure, it is also often necessary to expose the number of objects in each object group. Taking the user management function as an example, the situation of "having one and more roles" of employees in an enterprise is common, and when the electronic device displays the organizational relationship, one user object may belong to a plurality of object groups at the same time. When a user object is newly added or deleted in an object group, the number of all objects in the object group to which the user belongs cannot be directly changed, but the user objects in all the object groups need to be subjected to traversal statistics, and the repeated processing is performed on each object group after statistics, so that the number of the user objects in each object group is determined, and the efficiency of the traversal statistics method is very low.
Disclosure of Invention
In view of the above technical problems, the present application provides a method for changing the number of objects, which can improve the efficiency of changing the number of objects counted by an object group.
According to a first aspect of the present application, there is provided a method of changing a number of objects, the method comprising:
in response to the received operation instruction, determining a target object to be operated and a target object group to be operated;
determining at least one superior object group to which the target object group belongs in the recorded subordinate relationship between the target object and the multi-level object groups, and generating a first object group set according to the target object group and the at least one superior object group;
if the operation instruction is used for indicating that the target object is added in the target object group, before the operation instruction is executed, determining at least one object group to which the target object belongs in the recorded target object and the dependency relationship of the multi-level object groups, and generating a second object group set;
and determining a target object group based on the first object group set and the second object group set, and changing the counted number of the objects of the target object group.
According to a second aspect of the present application, there is provided an apparatus for changing the number of objects, the apparatus comprising:
the instruction response unit is used for responding to the received operation instruction, and determining a target object to be operated and a target object group to be operated;
a first determining unit, configured to determine, in a recorded dependency relationship between a target object and a multi-level object group, at least one upper-level object group to which the target object group belongs, and generate a first object group set according to the target object group and the at least one upper-level object group;
a second determining unit, configured to determine, before executing the operation instruction, at least one object group to which the target object belongs from the recorded affiliations of the target object and the multi-level object groups, if the operation instruction is used to indicate that the target object is added to the target object group, and generate a second object group set;
and the target determining unit is used for determining a target object group based on the first object group set and the second object group set and changing the counted number of the objects of the target object group.
In this application, when the received operation instruction is used to instruct to add a target object to the target object group, the target object group and an upper user group to which the target object group belongs are determined as a first object group set, before the operation instruction is executed, an object group to which the target object belongs is determined as a second object group set, and finally, the target object group is determined based on the first object group and the second object group.
Therefore, according to the method of the application, when the objects are newly added in the object group, the number of the objects counted by the object group is not required to be updated by traversing each object group, the object group of which the number of the objects is required to be changed is directly searched according to the relation among the object group sets, the counted number of the objects of the object group is changed, and the working efficiency is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of an organizational relationship shown in an exemplary embodiment of the present application;
FIG. 2 is a schematic diagram of another organizational relationship shown in an exemplary embodiment of the present application;
FIG. 3 is a flow chart illustrating a method for changing the number of objects in accordance with an exemplary embodiment of the present application;
FIG. 4 is a diagram illustrating a hardware configuration of an electronic device according to an exemplary embodiment of the present application;
fig. 5 is a block diagram of an apparatus for changing the number of objects according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The tree structure is a data structure with one-to-many tree relationship among data elements, and the structure can intuitively show the dependency relationship and the parallel relationship among nodes.
Conventionally, menu pages in web pages, asset management of financial systems, user management functions in electronic devices, etc. may be presented using a tree structure.
In the tree structure, a root node, a plurality of levels of child nodes, and a leaf node are included. When the tree structure is used for representing the organization relationship, the root node corresponds to the highest-level object group in the organization relationship, the multi-level child nodes respectively correspond to all levels of object groups of the highest-level object group, and the leaf nodes under all child nodes respectively correspond to all objects contained in the object groups corresponding to the child nodes.
For an object group to which an object or object group belongs, all nodes from the root node of the tree structure to the branch on which the node belongs may be referred to as the group of the object or object group.
The relationship between objects or object groups may include direct relationship (hereinafter, referred to as "direct relationship") or indirect relationship.
Specifically, if the nodes corresponding to the two object groups are in the relationship of parent and child nodes, it is considered that the object group corresponding to the child node directly belongs to the object group corresponding to the parent node. Similarly, if the node of the object and the node of the object group are in a parent-child relationship, the object is considered to belong directly to the object group.
And determining the other affiliations except the direct affiliation in the object or the object group with the affiliation as indirect affiliations.
Taking the tree structure shown in fig. 1 as an example, the organization relationship of company a is exemplarily shown. It can be understood that company a and each department subordinate to company a are the object group described in the embodiment of the present application, and the employee is the object described in the embodiment of the present application. The company A belongs to 3 primary departments which are respectively a management center, a marketing center and a production center, wherein the management center comprises an employee 1 and an employee 2; the marketing center includes staff 3; the production center includes employee 1 and employee 4.
Taking employee 1 as an example, the group to which employee 1 belongs includes a management center, a production center, and company a. Wherein, the management center and the production center are directly affiliated groups of the employee 1, and the company A is an indirectly affiliated group of the employee 1; similarly, employee 1 is a direct child of the management center and the production center, and is an indirect child of company a.
In some applications of tree structures, it is also necessary to determine the number of objects in each object. For example, in FIG. 1, company A and each department also need to count the number of employees in the organization, which is shown as "count" in FIG. 1. Since the staff may belong to a plurality of departments at the same time, for example, the staff 1 belongs to the management center and the production center at the same time, in counting the number of the staff, it is not possible to add up the numbers of the respective organizations subordinate to the organization, and it is also necessary to avoid the number of the people who are repeatedly calculated.
In the embodiment of the present application, the number of subjects in each subject group can be counted as follows.
For each object group of the number of objects to be counted, the following steps may be performed:
first, all the directly subordinate objects of the object group are determined.
For example, in fig. 1, assuming that the object group of the number of objects to be counted is company a, it can be determined that company a does not have a direct object.
Then, all the directly subordinate object groups of the object group are determined, and for each directly subordinate object group, the directly subordinate objects of the directly subordinate object group are determined.
Still taking company a in fig. 1 as an example, it may be determined that the direct objects of company a include a management center, a marketing center, and a production center, and the direct objects of each object group are respectively determined, and the direct objects may include employee 1, employee 2, employee 3, employee 1, and employee 4.
Next, it is checked whether all objects are acquired in the above steps. If all the objects are not obtained, the two steps are repeatedly executed for each object group in all the obtained directly-affiliated object groups; if all objects have been acquired, the next step is performed.
In company a of fig. 1, when all employees have been acquired in the above two steps, the next step is executed.
And finally, counting the acquired objects, removing repeated objects, and determining an object set according to the objects after the repeated objects are removed. The number of objects in the object set is the number of objects required by the object group of the number of objects to be counted.
Still taking company a in fig. 1 as an example, the obtained objects include employee 1, employee 2, employee 3, employee 1, and employee 4, and repeated objects are removed to obtain an object set { employee 1, employee 2, employee 3, and employee 4}, so that the number of objects in the company of object group a can be determined to be 4.
For other object groups, the above method may also be performed to determine the number of objects in the object group, which is not described herein again.
In an organizational relationship, adding or deleting objects in an object group is a common operation. For example, in company a shown in fig. 1, because of the shortage of staff in the marketing center, staff 2 is required to simultaneously play the role of the marketing center, staff 2 is required to be added to the marketing center, and the organization relationship diagram after staff change is shown in fig. 2.
At this time, when an object in the object group is changed, the corresponding count also needs to be changed. The electronic device may re-count the objects in each object group according to the above method for counting the number of people, and determine the number of objects in each object group after de-weighting.
However, the objects in the object group are changed frequently, and if the method is used, each object group needs to be traversed every time, which is very inefficient.
In view of the above, the present application provides a new method for changing the number of objects. When objects are newly added in the object groups, the object groups with the number of the objects needing to be changed are directly searched according to the relation among the object group sets without traversing each object group to update the number of the objects counted by the object groups, and the counted number of the objects of the object groups is changed.
As shown in fig. 3, the method comprises the following steps:
step S301: in response to the received operation instruction, determining a target object to be operated and a target object group to be operated;
step S302: in the recorded affiliation of the target object and the multi-level object group, at least one upper level object group to which the target object group belongs is determined, and a first object group set is generated according to the target object group and the at least one upper level object group.
In this application, the electronic device builds the subordination relationship between the object and the multi-level object group through the tree structure, and the correspondence relationship between the node in the tree structure and the object or the object group is described above and is not described herein again.
After receiving the operation instruction, the electronic device may determine a target object and a target object group indicated by the operation instruction. Generally, the operation instructions may include adding an object to the group of objects, or deleting an object from the group of objects. It will be appreciated that if an object needs to be transferred from a source object group to a target object group, the object may be split into two operation instructions, first deleting the object in the source object group and then adding the object in the target object group.
For a selected target object group, a first set of object groups may be determined based on the directly and indirectly affiliated groups of the target object group. Specifically, the upper level direct group of the target object group is determined, then the upper level direct group of the upper level direct group is determined for each upper level direct group, the step is repeated until the highest level object group (i.e. the root node of the tree structure) is reached, and finally the target object group and all the upper level object groups determined in the step are added into the first object group set.
The application further requires determining a second set of object groups based on the target object. The second set of object groups is determined differently for different operation instructions. If the instruction indicates to add a target object in the target object group, go to step S303; if the instruction indicates that the target object is deleted in the target object group, step S304 is performed.
Step S303: if the operation instruction is used for indicating that the target object is added in the target object group, before the operation instruction is executed, at least one object group to which the target object belongs is determined in the recorded affiliation of the target object and the multi-level object group, and a second object group set is generated.
In the present application, the operation instruction for instructing to add the target object to the target object group may be to add the dependency relationship between the target object and the target object group to the recorded dependency relationships between the target object and the multi-level object group.
In this step, the second set of object groups needs to be determined before executing the operation instruction. The method for acquiring the object group of the target object is similar to the method for acquiring the upper object group of the target object group. The method of determining the second set of object groups is described below by means of a tree organization as shown in fig. 1.
Assuming that the operation instruction is to add employee 2 in the marketing center, the target object can be determined to be employee 2, and the target object group is the marketing center.
First, all direct groups, i.e. management centers, of employee 2 are determined.
Of course, the direct group of objects may also include multiple object groups, such as the direct group of employee 1 as a management center and a production center.
Then, the upper-level direct group, company a, of the direct group is determined for the direct group management center.
If the direct group comprises a plurality of object groups, the operation is executed for each direct group, and meanwhile, the step is repeated until the inquired direct group is the root node.
And finally, determining all the object groups determined in the step as a second object group.
From this, it can be determined that if the target object is employee 2, the second object group set is { company a, management center }.
Step S304: if the operation instruction is used for indicating that the target object is deleted in the target object group, after the operation instruction is executed, at least one object group to which the target object belongs is determined in the recorded affiliation of the target object and the multi-level object group, and a second object group set is generated.
In the present application, the operation instruction for instructing deletion of the target object in the target object group may be to delete the affiliation of the target object with the target object group from among the recorded affiliations of the target object and the multi-level object group.
In this step, it is necessary to determine the second object group set after the operation instruction is executed. Taking the tree organization structure shown in fig. 2 as an example, assuming that the operation instruction is to delete employee 2 in the marketing center, it can be determined that the target object is employee 2, and the target object group is the marketing center.
In this step, the corresponding relationship between the marketing center and the employee 2 needs to be deleted, and the organization structure after the corresponding relationship is deleted is shown in fig. 1.
Then, the group to which the direct combination of employee 2 belongs and the group to which the direct combination belongs are determined according to fig. 1, and the specific method is the same as step S302, and is not described herein again.
It can be determined that in the organization structure shown in fig. 2, after the operation of deleting employee 2 by the marketing center is performed, the second object group is collected as { company a, management center }.
Step S305: and determining a target object group based on the first object group set and the second object group set, and changing the counted number of the objects of the target object group.
In the present application, the target object group of the number of objects to be changed may be determined by the following method according to the first object group set and the second object group set determined in steps S301 to S304.
First, an intersection of a first set of object groups and the second set of object groups is determined.
Then, determining a complement of the intersection in the first object group set, wherein the complement is a target object group with the number of users to be changed.
The complement of the intersection in the first object group set refers to the object group set that belongs to the first object group and does not belong to the intersection.
The reason why the above-described method is adopted to determine the target object group is explained in two cases below.
In the first case: the operation instruction is used for indicating that the target object is added in the target object group.
The first object group may be regarded as an object group related to the present operation instruction, and the second object group is a group to which the target object belongs before the target object is added. Therefore, the intersection of the two is the object group which already comprises the target user, and the object groups are not influenced by the adding operation.
Further, the complement of the intersection in the first object group can be regarded as the object group to which the target object is added under the influence of the operation.
In the second case: the operation instruction is used for indicating that the target object is deleted in the target object group:
the first object group may be regarded as an object group related to the present operation instruction, and the second object group is a group to which the target object still belongs after the target object is deleted. Therefore, the intersection of the two is a user group which is not influenced by the current operation, and even if the deletion operation is executed, the target object is still included in the user groups.
Further, the complement of the intersection in the first object group may be regarded as the object group from which the target object is deleted, which is affected by the operation.
Finally, the number of objects in the target object group may be changed according to the operation instruction.
In the application, the operation instruction generally only comprises one target user and one target user group. If the operation instruction is increased, adding 1 to the number of the objects counted by the determined target object group; and if the operation instruction is reduced, reducing the number of the objects counted by the determined target object group by 1. Of course, if the operation command includes a plurality of target users or a plurality of target user groups, the operation command may be processed one by one according to the method of the present application, and is not specifically limited herein.
At this point, the flow of fig. 1 is completed.
In this application, when the received operation instruction is used to instruct to add a target object to the target object group, the target object group and an upper user group to which the target object group belongs are determined as a first object group set, before the operation instruction is executed, an object group to which the target object belongs is determined as a second object group set, and finally, the target object group is determined based on the first object group and the second object group.
Therefore, according to the method of the present application, when objects are newly added to the object groups, the number of the objects counted by the object groups does not need to be updated by traversing each object group, but the object groups of which the number of the objects needs to be changed are directly found according to the relationship among the sets of the object groups, and the counted number of the objects of the object groups is changed.
The following describes the method for changing the number of objects in the present application with reference to fig. 1 and fig. 2 and two specific embodiments.
Example 1: assuming an organization structure as shown in fig. 1, the operation instruction is used to instruct addition of employee 2 in the marketing center.
First, it is determined that the affiliated group (including the direct affiliated group and the indirect affiliated group) of the marketing center includes company a, thereby determining that the first set of object groups is { marketing center, company a }.
Then, before adding employee 2 to the marketing center, it is determined that the belonging group of employee 2 includes management center, company a, and thus the second set of object groups is determined to be { management center, company a }.
Finally, the intersection of the first set of object groups and the second set of object groups is determined to be { company a }, and the complement of the intersection in the first set of object groups is determined to be { marketing center }.
According to the steps, the object group needing to change the number of the objects can be determined as the marketing center, so that after the staff 2 is added to the marketing center, the number of the objects counted by the marketing center is added by 1, and the organization relation shown in fig. 2 is obtained.
Example 2: assuming that the organization structure is as shown in fig. 2, the operation instruction is for instructing to delete employee 2 in the marketing center.
First, it is determined that the affiliated group (including the direct affiliated group and the indirect affiliated group) of the marketing center includes company a, thereby determining that the first set of object groups is { marketing center, company a }.
Then, after the marketing center deletes employee 2, it is determined that the belonging group of employee 2 includes the management center, company a, and thus it is determined that the second object group set is { the management center, company a }.
Finally, the intersection of the first set of object groups and the second set of object groups is determined to be { company a }, and the complement of the intersection in the first set of object groups is determined to be { marketing center }.
According to the steps, the object group needing to change the number of the objects can be determined as the marketing center, so that after the staff 2 is added to the marketing center, the number of the objects counted by the marketing center is reduced by 1, and the organization relation shown in fig. 1 is obtained.
Corresponding to the embodiment of the method for changing the number of the objects, the application also provides an embodiment of a device for changing the number of the objects.
The embodiment of the device for changing the number of the objects can be applied to the electronic equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 4, a hardware structure diagram of an electronic device where the device for changing the number of objects is located in the present application is shown, except for the processor, the memory, the network output interface, and the nonvolatile memory shown in fig. 4, the electronic device where the device is located in the embodiment may also include other hardware according to the actual function of the electronic device, which is not described again.
Referring to fig. 5, fig. 5 is a block diagram of an apparatus for changing the number of objects according to an exemplary embodiment of the present application. The apparatus may be applied to an electronic device, and the apparatus may include:
an instruction response unit 501, configured to determine, in response to a received operation instruction, a target object to be operated and a target object group to be operated;
a first determining unit 502, configured to determine, in the recorded dependency relationship between the target object and the multi-level object groups, at least one upper-level object group to which the target object group belongs, and generate a first object group set according to the target object group and the at least one upper-level object group;
a second determining unit 503, configured to, if the operation instruction is used to indicate that the target object is added to the target object group, determine, before executing the operation instruction, at least one object group to which the target object belongs in the recorded affiliations of the target object and the multi-level object groups, and generate a second object group set;
a target determining unit 504, configured to determine a target object group based on the first object group set and the second object group set, and change the counted number of objects of the target object group.
Optionally, the apparatus further comprises:
a third determining unit 505 (not shown in the figure), configured to determine, after executing the operation instruction, at least one object group to which the target object belongs in the recorded affiliations of the target object and the multi-level object groups, and generate a second object group set, if the operation instruction is used to instruct to delete the target object in the target object group.
Optionally, if the operation instruction is used to indicate that the target object is added to the target object group, the executing the operation instruction includes: and adding the subordination relation between the target object and the target object group in the recorded subordination relation between the target object and the multi-level object group.
Optionally, if the operation instruction is used to instruct to delete the target object in the target object group, the executing the operation instruction includes: deleting the affiliation of the target object and the target object group from the recorded affiliations of the target object and the multi-level object group.
Optionally, the determining a target object group based on the first object group set and the second object group set comprises:
determining an intersection of the first set of object groups and the second set of object groups;
determining a complement of the intersection in the first object group set, and using the complement as a target object group.
Optionally, the target object and the dependency relationship of the multi-level object group are built through a tree structure;
the tree structure of the organization relation comprises a root node, a plurality of levels of child nodes and leaf nodes;
the root node corresponds to a highest level object group;
the multi-level child nodes respectively correspond to all levels of object groups of the highest level object group;
the leaf nodes under each child node respectively correspond to each object included in the object group corresponding to the child node.
Thus, the block diagram of the apparatus shown in fig. 5 is completed.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (12)

1. A method for changing the number of objects is applied to an electronic device, and the method comprises the following steps:
in response to the received operation instruction, determining a target object to be operated and a target object group to be operated;
determining at least one superior object group to which the target object group belongs in the recorded subordinate relationship between the target object and the multi-level object groups, and generating a first object group set according to the target object group and the at least one superior object group;
if the operation instruction is used for indicating that the target object is added in the target object group, before the operation instruction is executed, determining at least one object group to which the target object belongs in the recorded target object and the dependency relationship of the multi-level object groups, and generating a second object group set;
and determining a target object group based on the first object group set and the second object group set, and changing the counted number of the objects of the target object group.
2. The method of claim 1, further comprising:
if the operation instruction is used for indicating that the target object is deleted in the target object group, after the operation instruction is executed, at least one object group to which the target object belongs is determined in the recorded affiliation of the target object and the multi-level object group, and a second object group set is generated.
3. The method of claim 1, wherein if the operation instruction is used to indicate that the target object is added to the target object group, the executing the operation instruction comprises:
and adding the subordination relation between the target object and the target object group in the recorded subordination relation between the target object and the multi-level object group.
4. The method of claim 2, wherein if the operation instruction is used to indicate that the target object is deleted in the target object group, the executing the operation instruction comprises:
deleting the affiliation of the target object and the target object group from the recorded affiliations of the target object and the multi-level object group.
5. The method of claim 1, wherein determining a target object group based on the first set of object groups and the second set of object groups comprises:
determining an intersection of the first set of object groups and the second set of object groups;
determining a complement of the intersection in the first object group set, and using the complement as a target object group.
6. The method of claim 1, wherein the target object and the membership of the multi-level object group are constructed by a tree structure;
the tree structure of the organization relation comprises a root node, a plurality of levels of child nodes and leaf nodes;
the root node corresponds to a highest level object group;
the multi-level child nodes respectively correspond to all levels of object groups of the highest level object group;
the leaf nodes under each child node respectively correspond to each object included in the object group corresponding to the child node.
7. An apparatus for changing the number of objects, the apparatus being applied to an electronic device, the apparatus comprising:
the instruction response unit is used for responding to the received operation instruction, and determining a target object to be operated and a target object group to be operated;
a first determining unit, configured to determine, in a recorded dependency relationship between a target object and a multi-level object group, at least one upper-level object group to which the target object group belongs, and generate a first object group set according to the target object group and the at least one upper-level object group;
a second determining unit, configured to determine, before executing the operation instruction, at least one object group to which the target object belongs from the recorded affiliations of the target object and the multi-level object groups, if the operation instruction is used to indicate that the target object is added to the target object group, and generate a second object group set;
and the target determining unit is used for determining a target object group based on the first object group set and the second object group set and changing the counted number of the objects of the target object group.
8. The apparatus of claim 1, further comprising:
and if the operation instruction is used for indicating that the target object is deleted in the target object group, after the operation instruction is executed, determining at least one object group to which the target object belongs in the recorded affiliations of the target object and the multi-level object groups, and generating a second object group set.
9. The apparatus of claim 1, wherein if the operation instruction is used to indicate that the target object is added to the target object group, the executing the operation instruction comprises:
and adding the subordination relation between the target object and the target object group in the recorded subordination relation between the target object and the multi-level object group.
10. The method of claim 8, wherein if the operation instruction is used to indicate that the target object is deleted in the target object group, the executing the operation instruction comprises:
deleting the affiliation of the target object and the target object group from the recorded affiliations of the target object and the multi-level object group.
11. The method of claim 7, wherein determining a target object group based on the first set of object groups and the second set of object groups comprises:
determining an intersection of the first set of object groups and the second set of object groups;
determining a complement of the intersection in the first object group set, and using the complement as a target object group.
12. The method of claim 7, wherein the target object and the membership of the multi-level object group are constructed by a tree structure;
the tree structure of the organization relation comprises a root node, a plurality of levels of child nodes and leaf nodes;
the root node corresponds to a highest level object group;
the multi-level child nodes respectively correspond to all levels of object groups of the highest level object group;
the leaf nodes under each child node respectively correspond to each object included in the object group corresponding to the child node.
CN202010358441.4A 2020-04-29 2020-04-29 Method and device for changing number of objects Active CN111552847B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010358441.4A CN111552847B (en) 2020-04-29 2020-04-29 Method and device for changing number of objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010358441.4A CN111552847B (en) 2020-04-29 2020-04-29 Method and device for changing number of objects

Publications (2)

Publication Number Publication Date
CN111552847A true CN111552847A (en) 2020-08-18
CN111552847B CN111552847B (en) 2023-04-25

Family

ID=72006277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010358441.4A Active CN111552847B (en) 2020-04-29 2020-04-29 Method and device for changing number of objects

Country Status (1)

Country Link
CN (1) CN111552847B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023011649A1 (en) * 2021-08-06 2023-02-09 北京字跳网络技术有限公司 Interaction method and apparatus, electronic device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015001934A (en) * 2013-06-18 2015-01-05 日本電信電話株式会社 Access control information management system and server device therefor and method and program
WO2016035448A1 (en) * 2014-09-03 2016-03-10 ソニー株式会社 Information processing method, program, and information processing device
CN107103089A (en) * 2017-05-04 2017-08-29 腾讯科技(深圳)有限公司 The matching process and device of object
CN108205593A (en) * 2017-12-29 2018-06-26 华为技术有限公司 A kind of method and device of inquiry
CN109284289A (en) * 2018-09-11 2019-01-29 深圳市网安计算机安全检测技术有限公司 Data set processing method, device, computer equipment and storage medium
CN109408584A (en) * 2018-10-17 2019-03-01 平安科技(深圳)有限公司 Report display method, apparatus, computer installation and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015001934A (en) * 2013-06-18 2015-01-05 日本電信電話株式会社 Access control information management system and server device therefor and method and program
WO2016035448A1 (en) * 2014-09-03 2016-03-10 ソニー株式会社 Information processing method, program, and information processing device
CN107103089A (en) * 2017-05-04 2017-08-29 腾讯科技(深圳)有限公司 The matching process and device of object
CN108205593A (en) * 2017-12-29 2018-06-26 华为技术有限公司 A kind of method and device of inquiry
CN109284289A (en) * 2018-09-11 2019-01-29 深圳市网安计算机安全检测技术有限公司 Data set processing method, device, computer equipment and storage medium
CN109408584A (en) * 2018-10-17 2019-03-01 平安科技(深圳)有限公司 Report display method, apparatus, computer installation and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023011649A1 (en) * 2021-08-06 2023-02-09 北京字跳网络技术有限公司 Interaction method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN111552847B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
DE112018005462T5 (en) ANOMALY DETECTION USING COGNITIVE COMPUTING
CN102239458B (en) Visualizing relationships between data elements
CN107430611B (en) Filtering data lineage graph
US9275422B2 (en) Distributed k-core view materialization and maintenance for graphs
CN111885040A (en) Distributed network situation perception method, system, server and node equipment
CN111382956A (en) Enterprise group relationship mining method and device
CN107239468B (en) Task node management method and device
CN108133059A (en) Couple in heterogeneous database system containing extensive low-power cluster it is effective under push away
CN107506484B (en) Operation and maintenance data association auditing method, system, equipment and storage medium
CN103942739A (en) Method for construction of construction project risk knowledge base
CN115809302A (en) Metadata processing method, device, equipment and storage medium
CN114328674A (en) Data mining method and system based on intranet log behavior diagram
CN111552847B (en) Method and device for changing number of objects
CN111698326B (en) Method and device for determining cost attribution of cloud service resources
CN113836237A (en) Method and device for auditing data operation of database
KR101171551B1 (en) Event history memory device, event history tracking device, event history memory method, computer-readable recording medium recording event history memory program and computer-readable recording medium recording data structure
Tick et al. Business process modeling—Simulation of administrative activities
CN114531306B (en) Real-time detection method and system based on threat behaviors
CN115757023A (en) Business process processing method and device and finite-state machine model
CN112559603B (en) Feature extraction method, device, equipment and computer-readable storage medium
CN116127154A (en) Knowledge tag recommendation method and device, electronic equipment and storage medium
US20140280385A1 (en) Hierarchical intersections
CN113656369A (en) Log distributed streaming acquisition and calculation method in big data scene
JP2023507688A (en) edge table representation of the process
CN114741577B (en) Service data management method, system, electronic equipment and readable 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