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

Method and device for changing number of objects Download PDF

Info

Publication number
CN111552847B
CN111552847B CN202010358441.4A CN202010358441A CN111552847B CN 111552847 B CN111552847 B CN 111552847B CN 202010358441 A CN202010358441 A CN 202010358441A CN 111552847 B CN111552847 B CN 111552847B
Authority
CN
China
Prior art keywords
object group
target object
group
level
operation instruction
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.)
Active
Application number
CN202010358441.4A
Other languages
Chinese (zh)
Other versions
CN111552847A (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 the application, when the received operation instruction is used for indicating to add the target object in the target object group, the target object group and the upper user group to which the target object group belongs are determined as the first object group set, before the operation instruction is executed, the object group to which the target object belongs is determined as the 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 object groups of which the object numbers need to be changed are directly searched according to the relation among the object group sets without traversing each object group to update the object numbers counted by the object groups, so that the working efficiency is greatly improved.

Description

Method and device for changing number of objects
Technical Field
The present disclosure relates to the field of data structures, and in particular, to a method and an apparatus for changing the number of objects.
Background
Tree structured organization is often used in common electronic devices. In a user management function of a firewall device, for example, an organization structure in an enterprise is typically shown in the form of a tree diagram, in which a root node is used to represent the enterprise, child nodes are used to represent departments in the enterprise, leaf nodes are used to represent employees in the enterprise, and hierarchical relationships between nodes represent affiliations between employees and departments, and departments.
In such a tree structure, it is also often necessary to expose the number of objects in each object group. Taking a user management function as an example, the situation of 'body and multi-role' of staff in an enterprise is common, and when the electronic equipment displays the organization 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 the object group, the object group to which the user belongs cannot be directly changed in number, but the user object in all the object groups needs to be traversed and counted, and the repeated processing is carried out on each counted object group, so that the number of the user objects in each object group is determined, and the efficiency of the method for traversing and counting is very low.
Disclosure of Invention
Aiming at the technical problems, the application provides a method for changing the number of objects, which can improve the efficiency of changing the counted number of objects of the object group.
According to a first aspect of the present application, there is provided a method of altering the number of objects, the method comprising:
determining a target object to be operated and a target object group to be operated in response to the received operation instruction;
determining at least one superior object group to which the target object group belongs in the recorded subordinate relations of 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 to the target object group, determining at least one object group to which the target object belongs in the recorded subordination relation of the target object and the multi-level object group before executing the operation instruction, 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 object number 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 subordinate 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, if the operation instruction is used to instruct adding the target object to the target object group, at least one object group to which the target object belongs in the recorded dependencies of the target object and the multi-level object group before executing the operation instruction, 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 object number of the target object group.
In the application, when the received operation instruction is used for indicating to add the target object in the target object group, the target object group and the upper user group to which the target object group belongs are determined as the first object group set, before the operation instruction is executed, the object group to which the target object belongs is determined as the 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, when the objects are newly added in the object groups, the object number counted by the object groups does not need to be updated by traversing each object group, but the object groups needing to be changed in number are directly searched according to the relation among the object group sets, and the counted object number of the object groups is changed, so that 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 following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may also be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a schematic diagram of an organization 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 of a method of altering the number of objects shown in an exemplary embodiment of the present application;
FIG. 4 is a hardware block diagram 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 exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to 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 some aspects of the present application as detailed in the accompanying claims.
The terminology used in the description 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 or 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 in this specification 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, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The tree structure is a data structure with a tree relation of 'one-to-many' between data elements, and the structure can intuitively represent the subordinate relation and the parallel relation between nodes.
Typically, 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 multi-level child node, and a leaf node are included. When the tree structure is used for representing the organization relation, the root node corresponds to the highest-level object group in the organization relation, the multi-level child nodes respectively correspond to each level of object groups of the highest-level object group, and leaf nodes under each child node respectively correspond to each object contained in the object group corresponding to the child node.
For an object or group of objects to which the object group belongs, all nodes from the root node of the tree structure to the branch taken by the node may be referred to as the group of the object or group of objects.
Wherein the subject or subject group may include a direct subject (hereinafter referred to simply as a direct subject) or an indirect subject.
Specifically, if the node corresponding to the two object groups is the relationship of the parent node and the child node, the object group corresponding to the child node is considered to belong to the object group corresponding to the parent node. Similarly, if a node of an object is related to a node of an object group as a parent-child node, the object is considered to belong directly to the object group.
Objects or object groups having an affiliated relationship are determined as indirect affiliated relationships, except for direct affiliated relationships.
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, each department under company a and company a is the object group described in the embodiment of the present application, and the staff is the object described in the embodiment of the present application. The A company belongs to 3 primary departments, namely a management center, a marketing center and a production center, wherein the management center comprises staff 1 and staff 2; the marketing center comprises staff 3; the production center comprises staff 1 and staff 4.
Taking employee 1 as an example, the group to which employee 1 belongs includes a management center, a production center, and company a. The management center and the production center are direct groups of staff 1, and company A is an indirect group of staff 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 the tree structure, it is also necessary to determine the number of objects in each object. For example, in fig. 1, company a and departments also need to count the number of employees in the organization, shown as "count" in fig. 1. Since employees may belong to multiple departments at the same time, for example, employee 1 belongs to a management center and a production center at the same time, in counting the number of employees, it is not possible to simply add the numbers in the subordinate organizations of the organization, and it is also necessary to avoid the number of people to be repeatedly counted.
In the embodiment of the application, the number of the objects in each object group can be counted as follows.
For each object group of which the number of objects to be counted is equal, the following steps may be performed:
first, all generic 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 may be determined that company a does not have an object of direct genus.
Then, all the generic object groups of the object group are determined, and for each generic object group, the generic object of the generic object group is determined.
Still taking company a in fig. 1 as an example, it may be determined that the generic objects of company a include a management center, a marketing center, and a production center, and the generic objects of each object group are respectively determined, and generic objects including employee 1, employee 2, employee 3, employee 1, and employee 4 may be obtained.
Then, it is checked whether all the objects are acquired in the above steps. If all the objects are not acquired, repeating the two steps aiming at each object group in all the acquired generic object groups; if all the objects have been acquired, the next step is performed.
In company a of fig. 1, the two steps described above have acquired all employees, and then the next step is performed.
And finally, counting the obtained objects, removing repeated objects, and determining an object set according to the removed repeated objects. The number of the objects in the object set is the number of the objects required by the object group of which the number is to be counted.
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 the repeated objects in the obtained objects are removed, so that an object set { employee 1, employee 2, employee 3, and employee 4}, and therefore, the number of objects in the object group a company 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.
In an organizational relationship, adding or deleting objects in a group of objects is a common operation. For example, for company a shown in fig. 1, since the staff of the marketing center is insufficient, staff 2 is required to simultaneously double the role of the marketing center, staff 2 is required to be added in the marketing center, and the organization chart after staff change is shown in fig. 2.
At this time, if the object in the object group is changed, the corresponding count also needs to be changed. The electronic device may reckon the objects in each object group according to the method for counting the number of people, and determine the number of objects in each object group after removing the weight.
However, the object in the object group is changed frequently, and if the method is used, each object group needs to be traversed each time, which is very inefficient.
In view of this, the present application proposes a new method of changing the number of objects. When the object is newly added in the object group, the object number counted by the object group is not required to be updated by traversing each object group, but the object group needing to change the object number is directly searched according to the relation among the object group sets, and the counted object number of the object group is changed.
As shown in fig. 3, the method comprises the following steps:
step S301: determining a target object to be operated and a target object group to be operated in response to the received operation instruction;
step S302: in the recorded subordinate relations of the target object and the multi-level object groups, 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 the application, the electronic device builds the subordinate relations of the object and the multi-level object group through the tree structure, and the corresponding relation between the nodes and the object or the object group in the tree structure is described above and is not described herein.
After receiving the operation instruction, the electronic device may determine the target object and the target object group indicated by the operation instruction. Generally, the operational instructions may include adding objects in the object group or deleting objects in the object group. It will be appreciated that if an object needs to be transferred from a source object set to a target object set, it can be split into two operation instructions, first deleting the object in the source object set and then adding the object in the target object set.
For a selected target object group, a first set of object groups may be determined from the direct and indirect groups of the target object group. Specifically, the upper level directly subordinate group of the target object group is determined first, then the upper level directly subordinate group of the upper level directly subordinate group is determined for each upper level directly subordinate group, the step is repeated until the object group of the highest level (namely the root node of the tree structure), and finally the target object group and all the upper level object groups determined in the steps are added into the first object group set.
The present application also requires determining a second set of object groups from the target objects. The manner in which the second set of objects is determined is different for different operating instructions. If the instruction indicates adding a target object in the target object group, step S303 is performed; if the instruction indicates that the target object is deleted from the target object group, step S304 is performed.
Step S303: if the operation instruction is used for indicating that the target object is added to the target object group, determining at least one object group to which the target object belongs in the recorded affiliation of the target object and the multi-level object group before executing the operation instruction, and generating a second object group set.
In the present application, the operation instruction for instructing to add the target object to the target object group may be to add the affiliation between the target object and the target object group in the recorded affiliations between the target object and the multi-level object group.
In this step, a second set of object groups needs to be determined before executing the operation instructions. 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 object group set is described below by the tree organization structure shown in fig. 1.
Assuming that the operation instruction is to add employee 2 in the marketing center, it may be determined that the target object is employee 2 and the target object group is the marketing center.
First, all the immediate groups of employee 2, i.e., the management center, are determined.
Of course, the generic group of objects may also include multiple object groups, for example, the generic group of employee 1 is a management center and a production center.
Then, for the immediate group management center, the upper immediate group of the immediate group, company a, is determined.
If the immediate group includes a plurality of object groups, the above operation is performed for each immediate group, and at the same time, this step is repeated until the queried immediate group is the root node.
Finally, all the object groups determined in the steps are determined as second object groups.
It can be determined that if the target object is employee 2, the second object group is { company a, management center }.
Step S304: and if the operation instruction is used for indicating the target object to be deleted in the target object group, determining at least one object group to which the target object belongs in the recorded affiliation of the target object and the multi-level object group after executing the operation instruction, and generating a second object group set.
In the present application, the operation instruction for instructing to delete the target object in the target object group may be to delete the affiliation of the target object and 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 executing the operation instruction. 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 may 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 first, and the organization structure after deleting the corresponding relationship is shown in fig. 1.
Then, according to fig. 1, the group to which the direct combination of employee 2 belongs is determined, and the specific method is the same as step S302, and will not be described here again.
It can be determined that, in the organization structure shown in fig. 2, the second object group set is { company a, management center }, after the operation of deleting employee 2 by the marketing center is performed.
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 object quantity of the target object group.
In the present application, according to the first object group set and the second object group set determined in steps S301 to S304, the target object group of the number of objects to be changed may be determined by the following method.
First, an intersection of a first set of object groups with the second set of object groups is determined.
And then determining a complement of the intersection in the first object group set, wherein the complement is a target object group of the number of users to be changed.
The complement of the intersection in the first object group set refers to an object group set that belongs to the first object group and does not belong to the intersection.
The reason for determining the target object group by the above method is explained in two cases as follows.
First case: the operation instructions are 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. Thus, the intersection of the two is the object group including the target user, and the object group is not affected by the adding operation.
Further, the complement of the intersection in the first object group may be regarded as the object group that is affected by the current operation and is newly added to the target object.
Second case: the operation instructions are 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 belongs after deleting the target object. Thus, the intersection of the two is a user group that is not affected by the present operation, and even if the deletion operation is performed, the target object is included in the user group.
Further, the complement of the intersection in the first object group may be regarded as the object group that is affected by the current operation and that has deleted the target object.
Finally, the number of objects in the change target object group may be instructed according to the operation.
In this application, the operation instruction generally includes only one target user and one target user group. If the operation instruction is an increase, adding 1 to the number of the objects counted by the determined target object group; if the operation instruction is a decrease, the number of the objects counted by the determined target object group is decreased by 1. Of course, if the operation instruction includes a plurality of target users or a plurality of target user groups, the operation instruction may be processed one by one according to the method of the present application, and the specific limitation is not given here.
Thus, the flow of fig. 1 is completed.
In the application, when the received operation instruction is used for indicating to add the target object in the target object group, the target object group and the upper user group to which the target object group belongs are determined as the first object group set, before the operation instruction is executed, the object group to which the target object belongs is determined as the 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, when the objects are newly added in the object groups, the object number counted by the object groups does not need to be updated by traversing each object group, but the object groups needing to change the object number are directly searched according to the relation among the object group sets, and the counted object number of the object groups is changed.
The method of changing the number of objects of the present application is described in detail below in conjunction with fig. 1, 2 and two specific embodiments.
Example 1: assuming an organizational structure as shown in FIG. 1, the operational instructions are used to instruct the addition of employee 2 in the marketing center.
First, it is determined that the affiliated group of the marketing center (including the affiliated group directly and the affiliated group indirectly) includes company a, thereby determining that the first object group set is { marketing center, company a }.
Then, before the marketing center adds the employee 2, it is determined that the group to which the employee 2 belongs includes the management center, company a, thereby determining that the second object group set is { management center, company a }.
Finally, determining the intersection of the first object group set and the second object group set as { A company }, wherein the complement of the intersection in the first object group set is { marketing center }.
According to the above steps, the object group with the number of objects to be changed can be determined as the marketing center, so that after the marketing center increases staff 2, the number of objects counted by the marketing center can be increased by 1, and the organization relationship shown in fig. 2 can be obtained.
Example 2: assuming that the organization is as shown in fig. 2, the operation instruction is for instructing deletion of employee 2 in the marketing center.
First, it is determined that the affiliated group of the marketing center (including the affiliated group directly and the affiliated group indirectly) includes company a, thereby determining that the first object group set is { marketing center, company a }.
Then, after the marketing center deletes the employee 2, it is determined that the group to which the employee 2 belongs includes the management center, company a, thereby determining that the second object group set is { management center, company a }.
Finally, determining the intersection of the first object group set and the second object group set as { A company }, wherein the complement of the intersection in the first object group set is { marketing center }.
According to the above steps, the object group with the number of objects to be changed can be determined as the marketing center, so that after the marketing center increases the staff 2, the number of objects counted by the marketing center is reduced by 1, and the organization relationship shown in fig. 1 can be obtained.
Corresponding to the embodiment of the method for changing the number of objects, the application also provides an embodiment of the device for changing the number of objects.
The embodiment of the device for changing the number of the objects can be applied to electronic equipment. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions in a nonvolatile memory into a memory by a processor of an electronic device where the device is located for operation. In terms of hardware, as shown in fig. 4, a hardware structure diagram of an electronic device where the device for changing the number of objects in the present application is located is shown in fig. 4, and in addition to 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 generally may further include other hardware according to the actual function of the electronic device, which is not described herein again.
Referring to fig. 5, fig. 5 is a block diagram illustrating a device 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 a target object to be operated, and a target object group to be operated, in response to a received operation instruction;
a first determining unit 502, configured to determine, in the recorded dependencies of the target object and the 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 503, configured to determine, if the operation instruction is used to instruct adding the target object to the target object group, at least one object group to which the target object belongs in the recorded dependencies of the target object and the multi-level object group before executing the operation instruction, 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 number of objects counted by the target object group.
Optionally, the apparatus further comprises:
a third determining unit 505 (not shown in the figure) is configured to determine, after executing the operation instruction, at least one object group to which the target object belongs in the recorded dependencies of the target object and the multi-level object group, and generate a second object group set if the operation instruction is used to instruct deletion of the target object in the target object group.
Optionally, if the operation instruction is configured to instruct adding the target object to the target object group, the executing the operation instruction includes: and adding the affiliation of the target object and the target object group in the recorded affiliation of the target object and the multi-level object group.
Optionally, if the operation instruction is configured to instruct deletion of the target object in the target object group, the executing the operation instruction includes: and 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 the target object group based on the first object group set and the second object group set includes:
determining an intersection of the first set of object groups and the second set of object groups;
and determining a complement of the intersection in the first object group set, and taking the complement as a target object group.
Optionally, the affiliation of the target object and the multi-level object group is built through a tree structure;
the tree structure of the organization relationship comprises a root node, a multi-level child node and a leaf node;
the root node corresponds to the highest-level object group;
the multi-level child nodes respectively correspond to each level of object groups of the highest level object group;
leaf nodes under each child node respectively correspond to each object contained in the object group corresponding to the child node.
The block diagram of the apparatus shown in fig. 5 is thus completed.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method of changing a number of objects, the method comprising:
determining a target object to be operated and a target object group to be operated in response to the received operation instruction;
determining at least one superior object group to which the target object group belongs in the recorded subordinate relations of 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 to the target object group, determining at least one object group to which the target object belongs in the recorded subordination relation of the target object and the multi-level object group before executing the operation instruction, and generating a second object group set;
determining a target object group based on the first object group set and the second object group set, and changing the counted object quantity of the target object group;
the determining a target object group based on the first object group set and the second object group set includes:
determining an intersection of the first set of object groups and the second set of object groups;
and determining a complement of the intersection in the first object group set, and taking the complement as a target object group.
2. The method according to claim 1, wherein the method further comprises:
and if the operation instruction is used for indicating the target object to be deleted in the target object group, determining at least one object group to which the target object belongs in the recorded affiliation of the target object and the multi-level object group after executing the operation instruction, and generating a second object group set.
3. The method of claim 1, wherein if the operation instruction is for instructing the addition of the target object to the target object group, the executing the operation instruction comprises:
and adding the affiliation of the target object and the target object group in the recorded affiliation of the target object and the multi-level object group.
4. The method of claim 2, wherein if the operation instruction is for instructing deletion of the target object in the target object group, the executing the operation instruction comprises:
and 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 the affiliations of the target object and the set of multi-level objects are built by a tree structure;
the tree structure of the organization relationship comprises a root node, a multi-level child node and a leaf node;
the root node corresponds to the highest-level object group;
the multi-level child nodes respectively correspond to each level of object groups of the highest level object group;
leaf nodes under each child node respectively correspond to each object contained in the object group corresponding to the child node.
6. 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 subordinate 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, if the operation instruction is used to instruct adding the target object to the target object group, at least one object group to which the target object belongs in the recorded dependencies of the target object and the multi-level object group before executing the operation instruction, and generate a second object group set;
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 object quantity of the target object group;
the determining a target object group based on the first object group set and the second object group set includes:
determining an intersection of the first set of object groups and the second set of object groups;
and determining a complement of the intersection in the first object group set, and taking the complement as a target object group.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and the third determining unit is used for determining at least one object group to which the target object belongs in the recorded subordinate relations of the target object and the multi-level object group after executing the operation instruction if the operation instruction is used for indicating the target object to be deleted in the target object group, so as to generate a second object group set.
8. The apparatus of claim 6, wherein if the operation instruction is to instruct adding the target object to the target object group, the executing the operation instruction comprises:
and adding the affiliation of the target object and the target object group in the recorded affiliation of the target object and the multi-level object group.
9. The apparatus of claim 7, wherein if the operation instruction is to instruct deletion of the target object in the target object group, the executing the operation instruction comprises:
and 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.
10. The apparatus of claim 6, wherein the affiliations of the target object and the set of multi-level objects are constructed by a tree structure;
the tree structure of the organization relationship comprises a root node, a multi-level child node and a leaf node;
the root node corresponds to the highest-level object group;
the multi-level child nodes respectively correspond to each level of object groups of the highest level object group;
leaf nodes under each child node respectively correspond to each object contained 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 CN111552847A (en) 2020-08-18
CN111552847B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115706714A (en) * 2021-08-06 2023-02-17 北京字跳网络技术有限公司 Interaction method, 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

Also Published As

Publication number Publication date
CN111552847A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN107430611B (en) Filtering data lineage graph
CN110168523A (en) Change monitoring to inquire across figure
CN107251021B (en) Filtering data lineage graph
CN111382956A (en) Enterprise group relationship mining method and device
JP2013529814A (en) Processing related datasets
CN111078695A (en) Method and device for calculating metadata association relation in enterprise
CN113656407A (en) Data topology generation method and device, electronic equipment and storage medium
CN115660711A (en) User ID generation method and device, electronic equipment and readable storage medium
CN111552847B (en) Method and device for changing number of objects
US11604903B2 (en) Layered analytical modeling of telecom tower structure and scenario analysis
CN109240893B (en) Application running state query method and terminal equipment
CN107330031B (en) Data storage method and device and electronic equipment
Tick et al. Business process modeling—Simulation of administrative activities
CN110888888A (en) Personnel relationship analysis method and device, electronic equipment and storage medium
CN106845869A (en) The method and system of affiliated enterprise are determined based on big data
CN115543428A (en) Simulated data generation method and device based on strategy template
CN115757023A (en) Business process processing method and device and finite-state machine model
CN116127154A (en) Knowledge tag recommendation method and device, electronic equipment and storage medium
CN112559603B (en) Feature extraction method, device, equipment and computer-readable storage medium
US20140280385A1 (en) Hierarchical intersections
CN114118770A (en) Index calculation method and device
CN110443560B (en) Protocol data management method, device, computer equipment and storage medium
JP2023507688A (en) edge table representation of the process
CN109977104A (en) Data managing method and device
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