Efficient and secure ranking method for large-scale members of multi-level organization

CN121188052BActive Publication Date: 2026-10-20SICHUAN DIGITAL CERTIFICATE AUTHENTICATION MANAGEMENT CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511337066.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2026-10-20
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

[0005](1)初始性能问题:对于层级结构复杂、成员众多的组织,初始化全量成员的排序号需要生成大量的数据,静态序号在频繁调整时需全表更新,对数据库造成较大压力,数据库数据量越大时,性能影响越大;(2)排序调整复杂及效率问题:当需要调整某个成员或者特定部分成员排序时,上移下移、置顶/置底、组织机构调整(部门合并拆分)、操作引发级联重排序,矩阵管理多维度排序(主部门、副部门)需要更新该成员及其之后所有成员的排序号,操作复杂且效率低下;(3)分布式缺失,未考虑跨地域分支机构的数据同步问题,存在序号冲突风险;(4)历史追溯问题,不支持完整记录每次排序变更(前序值/修改后值/操作时间),符合安全审计要求;(5)排序结果加密保护问题,数据共享时对排序结果加密处理,避免通过连续序号可反推组织规模和识别敏感人员排序位置

Benefits of technology

[0064](1)轻量化初始化数据,支持百万级数据量的零压力初始化,确保数据库性能不受影响;(2)高效操作响应,实现毫秒级的排序调整(置顶/上移/下移/置底/人员变更),且操作仅需局部数据更新;(3)顺序稳定性,任何单次排序操作仅修改目标对象序号,其他成员排序保持绝对不变;(4)分布式一致性,动态序号间隔分配避免节点冲突实现分布式支持;(5)历史追溯性,版本号字段支持排序历史回溯,符合安全设计要求;(6)排序结果加密保护,应对组织数据共享时对排序结果加密处理,避免通过连续序号可反推组织规模和识别敏感人员排序位置。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121188052B_ABST
    Figure CN121188052B_ABST
Patent Text Reader

Abstract

The application discloses a kind of high-efficiency safe sequencing methods for multi-level organization large-scale members, comprising: the database table structure of department, personnel and personnel sequencing table is established;Intelligent sequencing is realized based on dynamic serial number: basic serial number is generated based on dynamic gap allocation engine, the value of the dynamic sequencing sort of personnel sequencing table under department is virtually filled with basic serial number, i.e.virtual serial number, when user carries out sequencing setting adjustment, according to operator transformation virtual serial number, and the virtual serial number of operation data is stored as entity serial number and filled in the field of dynamic sequencing sort, the order of organization members is shown by the combination of virtual number and entity number elastic binding;Data encryption processing: the sequencing result is encrypted, to prevent the organization scale and identify sensitive personnel sequencing position by continuous serial number backtracking;Data sharing is handled and access is controlled;With the advantages of response efficiency and high safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database technology, and in particular to an efficient and secure sorting method for a large number of members in multi-level organizations. Background Technology

[0002] In traditional sorting methods, to manage the order of organizational members, a common approach is to assign a sort number to each member within each organization and its sub-organizations, using this sort number to determine the display order of members. Another method is delayed initialization of sort numbers, where members are not numbered during data initialization. This avoids performance issues during initial data processing, and the numbers are assigned temporarily during sorting. However, this method lacks flexibility and cannot meet the needs of adjusting the order of only a subset of members, such as moving them to the top, top, bottom, or other flexible sorting requirements.

[0003] In government agencies, it is common practice to require that only internally authorized managers can view personnel location information. In scenarios such as data sharing or unified identity authentication, the sorting results data is encrypted for protection.

[0004] The commonly used method is to assign a sort number to each member one-to-one. This static method has the following drawbacks:

[0005] (1) Initial performance issues: For organizations with complex hierarchical structures and a large number of members, initializing the sort numbers of all members requires generating a large amount of data. Static serial numbers need to be updated across the entire table when frequently adjusted, which puts a lot of pressure on the database. The larger the amount of data in the database, the greater the performance impact. (2) Complexity and efficiency issues in sorting adjustment: When it is necessary to adjust the sorting of a member or a specific group of members, operations such as moving up or down, placing at the top or bottom, organizational restructuring (department merging and splitting), and operations that trigger cascading resorting, matrix management of multi-dimensional sorting (main department, deputy department) requires updating the sort numbers of that member and all subsequent members, which is complex and inefficient. (3) Distributed missing: The data synchronization problem of cross-regional branches is not considered, and there is a risk of serial number conflict. (4) Historical traceability issues: It does not support complete recording of each sorting change (previous value / modified value / operation time), which does not meet the security audit requirements. (5) Encryption protection of sorting results: When sharing data, the sorting results are encrypted to prevent the organization size and the identification of the sorting position of sensitive personnel from being deduced through continuous serial numbers.

[0006] like Figure 1 As shown, detailed examples of the above-mentioned defects are illustrated below:

[0007] (1) In the scenario of delayed initialization (i.e., only write sorted data when the actual order is set), due to the default handling mechanism of the database for NULL values, the following will occur: ① Members without sort value are forced to be classified (all are placed before or after); ② It is impossible to achieve mixed interleaving sort of sort value members and NULL value members; ③ The business requirement of "unsorted members are randomly interleaved among sorted members" cannot be met.

[0008] First: Initial state (Table 1): Users are arranged in the default order.

[0009] Second: Operation command: Move [User 4] in front of [User 3].

[0010] Third: Current results (Table 2): [User 4] and [User 3] have been forcibly pinned to the top.

[0011] The order of the remaining users was disrupted.

[0012] Fourth: Expected Result (Table 3): Only swap the relative positions of [User 4] and [User 3].

[0013] The order of other users remains unchanged.

[0014]

[0015] Table 1

[0016]

[0017] Table 2

[0018]

[0019] Table 3

[0020] (2) The efficiency of the initial full data: each time the order of personnel under the department is operated, the entire table sequence number is directly updated. This processing scheme will have a serious impact on the database performance as the number of personnel in the organization increases. When setting the order of personnel, the response time and data volume increase exponentially.

[0021] Based on the table and scenario, describe the application scenario and existing problems of initializing the full sorted data to achieve custom sorting of personnel under each department:

[0022] 1) If an organization has 20 sub-departments in each department and a total of 4 levels, then the number of departments that need to sort the personnel is: 1 + 20 + 20² + 20³ = 8421.

[0023] 2) If each department has 5 people, (1) the number of people to be sorted in the fourth layer is: 5*20 3=40,000 items. (2) The number of people to be sorted in the third layer is the sum of the third and fourth layers: 5*20² + 5*20 3= 42000. (3) The number of people to be sorted in the second layer is the second layer + the third layer + the fourth layer: 5*20 + 5*20² + 5*20 3= 42,100 items. (4) The number of people to be sorted in the first layer is: first layer + second layer + third layer + fourth layer: 5*1 + 5*20 + 5*20² + 5*20 3= 42,105 entries. The total number of people in the entire organizational tree is 40,000 (fourth level) + 2,000 (third level) + 100 (second level) + 5 (first level) = 42,105.

[0024]

[0025] Table 4

[0026]

[0027] Table 5 Summary of the Invention

[0028] To address the problems existing in the prior art, the purpose of this invention is to provide an efficient and secure sorting method for a large number of members in multi-level organizations. This invention has the advantages of high responsiveness and high security.

[0029] To achieve the above objectives, the technical solution adopted by this invention is: an efficient and secure sorting method for a large number of members in a multi-level organization, comprising the following steps:

[0030] Step 1: Establish the database table structure for departments, personnel, and personnel sorting tables;

[0031] Step 2: Implement intelligent sorting based on dynamic serial numbers: Based on the dynamic gap allocation engine, a basic serial number is generated. The value of the dynamic sorting sort table under the department is first virtually filled with the basic serial number, i.e., the virtual serial number. When the user adjusts the sorting settings, the virtual serial number is changed according to the operator, and the virtual serial number of the operation data is stored as an entity serial number and filled into the field of the dynamic sorting sort. The order of organizational members is displayed by combining the virtual number and the entity number and elastically binding them.

[0032] Step 3, Data Encryption Processing: The sorting results are encrypted to prevent the organization size from being inferred and the sorting position of sensitive personnel from consecutive serial numbers;

[0033] Step 4: Process data sharing and control access.

[0034] As a further improvement of the present invention, step 1 specifically includes the following steps:

[0035] Step 1.1: Create a department table: Store department information, including the department primary key, department name, parent department primary key, and the parent department path used to indicate the department's position in the hierarchical structure;

[0036] Step 1.2: Create a personnel table: Store personnel information, including the personnel primary key, personnel name, and the primary key of the department to which they belong;

[0037] Step 1.3: Create a virtual table of personnel with serial numbers: Store the virtual information of personnel under the department with basic serial numbers. The basic serial numbers are generated by dynamic gap allocation and include personnel primary key, personnel name, department primary key, and basic serial number;

[0038] Step 1.4: Create a personnel sorting table under the department: Store the sorting information of personnel under the department, including department primary key, personnel primary key, dynamic sorting (sort), version control, display mask rules, and encryption key.

[0039] As a further improvement of the present invention, step 2 specifically includes the following steps:

[0040] Step 2.1: Establish a global sort number, which specifically includes:

[0041] (1) Create basic serial number: During the initial allocation, the basic serial number is generated by the dynamic gap allocation engine. The 2^n interval allocation method is used to assign a triplet identifier of group ID, interval number and sub-serial number to each person.

[0042] (2) Distributed adaptation: Avoid sequence number conflicts by generating different interval numbers for different nodes;

[0043] Step 2.2, basic sorting sequence number allocation, specifically including:

[0044] ① Initial loading strategy: Generate basic sequence numbers through the user table and dynamic gap allocation engine, and establish an elastic binding between personnel IDs and basic sequence numbers through a hash consistency algorithm;

[0045] ② Incremental allocation mechanism: When a new member is added to an organization, a basic sequence number is obtained. The new member inherits the baseline group ID of the organizational unit to which it belongs. If no organizational unit is explicitly specified, the member is assigned to a temporary group.

[0046] Step 2.3, Adjusting the dynamic sorting: When a user initiates a sorting adjustment request, only the dynamic sorting value of the target record is modified.

[0047] As a further improvement of the present invention, in (1), each sorting interval retains a preset empty number space, and automatically splits when the interval fill rate reaches the first threshold, and automatically merges adjacent intervals when the utilization rate is lower than the second threshold.

[0048] As a further improvement of the present invention, step 3 specifically includes the following steps:

[0049] Step 3.1: Convert the basic sequence number based on mixed radix encoding: Use the base62 encoding conversion layer to convert the numerical sequence number into mixed radix encoding, hide the numerical pattern, and add random perturbation to sensitive data to restrict external systems from reverse deducing the original sequence number;

[0050] Step 3.2, Encryption of sorting results based on national cryptographic algorithms: A temporary key is dynamically generated using the SM3 hash algorithm. The input parameters include department ID, timestamp, and random number: Temporary key = SM3(sharing party department ID + receiving party department ID + timestamp + random number); The temporary key is used to encrypt the Base62 encoded sorting number using SM4 to generate ciphertext data.

[0051] Step 3.3: Construct a dynamic key management mechanism, specifically including:

[0052] (i) Department-level keys: Each department is assigned a unique SM2 key pair for data transmission and signature verification;

[0053] (ii) Versioned keys: A key rotation mechanism is implemented by combining version control fields, and the rotation cycle is determined according to the management policy settings;

[0054] (iii) Temporary session key: When sharing across organizations, a temporary key derived from SM3 is generated. The temporary key = SM3(sharing party department ID + receiving party department ID + timestamp + random number), which is bound to a single session. The system automatically clears the temporary key when the session ends, and it cannot be recovered.

[0055] (iv) The key is managed by a domestically produced cryptographic product on the server, and the encoding rules are stored separately from the encryption key.

[0056] As a further improvement of the present invention, step 4, the data sharing process specifically includes:

[0057] Temporary key transmission: Encrypted encapsulation, the temporary key is encrypted with the recipient's SM2 public key, and an SM3 hash checksum and timestamp are appended; secure channel, transmitted via TLS 1.3 protocol, and bound to a session ID to prevent man-in-the-middle attacks;

[0058] Data packet composition: The transmitted content includes the SM4 encrypted sorting result, the SM2 encrypted temporary key, and the SM2 signature.

[0059] As a further improvement of the present invention, in step 4, controlling access specifically includes:

[0060] Internal sharing mode: Provides plaintext data and original sequence number, supports full operation permissions, and controls the identity and time of data access through access control policies;

[0061] Cross-departmental sharing mode: uses encrypted data, adds random perturbation values, ensures non-linear coding of adjacent personnel, and only allows limited sorting operations;

[0062] External sharing mode: Provides a pure encoding format, adds random perturbation values ​​to ensure non-linear encoding between adjacent users, and restricts access to read-only mode.

[0063] The beneficial effects of this invention are:

[0064] (1) Lightweight initialization data, supporting zero-pressure initialization of millions of data volumes, ensuring that database performance is not affected; (2) Efficient operation response, realizing millisecond-level sorting adjustments (top / up / down / bottom / personnel changes), and the operation only requires local data updates; (3) Order stability, any single sorting operation only modifies the target object's sequence number, and the sorting of other members remains absolutely unchanged; (4) Distributed consistency, dynamic sequence number interval allocation avoids node conflicts and realizes distributed support; (5) Historical traceability, the version number field supports sorting history backtracking, which meets the security design requirements; (6) Encrypted protection of sorting results, the sorting results should be encrypted when the organization shares data, to prevent the organization's size and the identification of sensitive personnel's sorting positions from being deduced through consecutive sequence numbers. Attached Figure Description

[0065] Figure 1 An organizational chart for illustrative purposes;

[0066] Figure 2 This is a flowchart of an embodiment of the present invention;

[0067] Figure 3 This is a specific sorting processing logic diagram in an embodiment of the present invention. Detailed Implementation

[0068] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0069] Example

[0070] An efficient and secure sorting method for large-scale members in multi-level organizations includes the following steps:

[0071] S100: Establish the database table structure for departments, personnel, and personnel sorting tables, specifically including:

[0072] S101: Create the department table [dept] as shown in Table 6: Store department information, including the department primary key (id), department name (dept_name), parent department primary key (parent_id), and parent department path (parent_ids, used to indicate the position of the department in the hierarchical structure).

[0073]

[0074] Table 6

[0075] S102: Create a personnel table [user] as shown in Table 7: store personnel information, including personnel primary key (id), personnel name (user_name) and department primary key (dept_id).

[0076]

[0077] Table 7

[0078] S103: Create a virtual table of personnel with serial numbers as shown in Table 8 [user_virtual]: Store the virtual information of personnel under the department with basic serial numbers. The basic serial number is generated by dynamic gap allocation and includes personnel primary key (id), personnel name (user_name), department primary key (dept_id), and basic serial number (base_sort).

[0079]

[0080] Table 8

[0081] S104: Create a departmental personnel sorting table [dept_user_sort] as shown in Table 9: Store the sorting information of personnel under the department, including the department primary key (dept_id), personnel primary key (user_id), dynamic sorting (dynamic_sort_id), version control (version), and display encoding rules (display_mask_sort).

[0082]

[0083] Table 9

[0084] S200: Implementation of intelligent sorting technology based on dynamic sequence numbers:

[0085] Using a dynamic gap allocation engine to generate base sequence numbers, the `dynamic_sort_id` value of the personnel sorting table `dept_user_sort` under a department is initially filled with virtual base sequence numbers (i.e., virtual sequence numbers). When users adjust sorting settings, such as moving up, down, to the top, or to the bottom, the virtual sequence numbers change according to the operator, and these virtual sequence numbers are stored as entity sequence numbers and filled into the `dynamic_sort_id` field. This combination of virtual and entity numbers, along with flexible binding, enables the sequential display of organizational members. Specifically, this includes:

[0086] S201: Global sort number establishment:

[0087] 1. Create basic serial number: During initial allocation, basic serial number is generated through dynamic gap allocation engine. The 2^n interval allocation method is used to assign a triplet identifier (group ID, interval number, sub-serial number) to each person. Each sorting interval reserves 20% empty number space (e.g., interval 1000-2000 actually uses 1000-1600, and the reserved space is used for the allocation of new people). When the interval fill rate reaches the threshold (e.g., 80%), it will automatically split. When the utilization rate is less than 30%, adjacent intervals will be automatically merged.

[0088] 2. Distributed adaptation: To avoid sequence number conflicts, different interval numbers are generated for different nodes. Node A is assigned the interval: 1,000,000-1,999,999, and node B is assigned the interval: 2,000,000-2,999,999.

[0089] S202: Basic sorting sequence number allocation:

[0090] 1. Initial Loading Strategy: Generate basic serial numbers through the user table and dynamic gap allocation engine, and establish an elastic binding between personnel IDs and basic serial numbers through a hash consistency algorithm.

[0091] 2. Incremental allocation mechanism:

[0092] When a new member is added to an organization, a basic sequence number is obtained. The new member inherits the base group ID of the organizational unit to which it belongs. If no organizational unit is explicitly specified, the member is assigned to a temporary group.

[0093] S203: Adjustment of dynamic sorting

[0094] When a user initiates a sorting adjustment request, the system only modifies the dynamic_sort_id value of the target record. For example, after moving [User 4] up one order and setting the sorting, the sorting result is as follows: the base_sort field value has entity values ​​after sorting, and the unadjusted members retain their original dynamic_sort_id unchanged, as shown in Table 10.

[0095]

[0096] Table 10

[0097] S300: Data encryption processing:

[0098] In scenarios requiring data encryption, the sorting results are encrypted to prevent the organization's size and the identification of sensitive personnel's sorting positions from being deduced through consecutive sequence numbers; specifically including:

[0099] S301: Transformation of basic sequence numbers based on mixed radix encoding:

[0100] A base62 encoding conversion layer is added to convert numeric serial numbers into mixed radix encoding, hiding numerical patterns. Data conversion includes sensitive information fields such as personnel ID, usernames, mobile phone numbers, national ID numbers, and sequence numbers, as determined by management policies. Based on these policies, random perturbations (e.g., ±1000 offsets) are added to sensitive data to prevent external systems from reverse-engineering the original serial numbers.

[0101] S302: Encryption processing of sorting results based on national cryptographic algorithms:

[0102] 1. Dynamically generate a temporary key using the SM3 hash algorithm. Input parameters include department ID, timestamp, and random number. Formula: Temporary Key = SM3(Sharing Party Department ID + Receiving Party Department ID + Timestamp + Random Number).

[0103] 2. Use a temporary key to encrypt the Base62 encoded sort number using SM4 to generate ciphertext data.

[0104] S303: Dynamic Key Management Mechanism

[0105] 1. Department-level key: Each department is assigned a unique SM2 key pair for data transmission and signature verification.

[0106] 2. Versioned Keys: A key rotation mechanism is implemented by combining the version field, and the rotation cycle is determined according to the management policy settings.

[0107] 3. Temporary Session Key: When sharing across organizations, a temporary key derived from SM3 is generated. Temporary key = SM3(sharing party department ID + receiving party department ID + timestamp + random number), which is bound to a single session. The default expiration time is 24 hours after the operation is completed (or can be customized by the administrator). The system automatically clears the temporary key when the session ends, and it cannot be recovered.

[0108] 4. The key is managed by a domestically produced cryptographic product on the server, and the encoding rules and encryption keys are stored separately.

[0109] S400: Data Sharing and Access Control

[0110] S401: Result sharing processing:

[0111] 1. Temporary key transmission:

[0112] Encryption encapsulation: Encrypt the temporary key with the recipient's SM2 public key, and append the SM3 hash check value and timestamp.

[0113] Secure channel: Transmitted via TLS 1.3 protocol, with session ID bound to prevent man-in-the-middle attacks.

[0114] 2. Data packet composition:

[0115] The content sent includes: SM4 encrypted sorting results, SM2 encrypted temporary key, and SM2 signature (to verify the sender's identity).

[0116] S402: Result Access Control:

[0117] 1. Internal sharing mode: Provides plaintext data + original sequence number, supports full operation permissions, and can control the identity and time of data access through access control policies.

[0118] 2. Cross-departmental sharing mode: Encrypted data (sorting number) (coded through a hybrid coding strategy) is used, and random perturbation values ​​are added to ensure that the codes of adjacent personnel are non-linear, and only limited sorting operations are allowed.

[0119] 3. External sharing mode: Only provides pure encoding (encoding processed through a hybrid encoding strategy), adds random perturbation values ​​to ensure non-linearity of encoding by adjacent personnel, and restricts access to read-only.

[0120] In this embodiment, 1. Dynamic gap allocation engine: (1) It pioneered the (group ID + interval number + sub-sequence number) triplet identification system to realize the 2^n interval allocation method; (2) Each sorting interval retains 20% empty number space, and supports automatic splitting (>80% fill rate) and merging (<30% utilization rate); (3) Distributed nodes avoid conflicts through interval isolation (such as node A: 1,000,000-1,999,999).

[0121] 2. Hybrid base encoding encryption system: (1) Dual protection process: adopts the dual protection process of "first base62 hybrid encoding → then SM4 encryption"; (2) Flexible obfuscation factor: the encoding stage incorporates the (department ID + personnel ID + account + mobile phone number + ID card number) dimension obfuscation factor; (3) Three-in-one protection: the encryption stage realizes the three-in-one protection of SM4 encryption / SM3 verification / SM2 signature.

[0122] 3. Zero-pressure initialization mechanism: (1) Elastic binding technology: Breaking through the traditional full pre-allocation mode, only the personnel ID and the basic serial number (virtual number) are elastically bound when the first load is performed; (2) Intelligent inheritance strategy: In the incremental scenario, newly added members automatically inherit the base group ID of the organization unit to which they belong, and are assigned to the temporary group when not specified; (3) Performance breakthrough: The actual test showed that the initialization time of 100,000+ level data was reduced from 1200ms to 0ms (no initialization required).

[0123] 4. Localized sorting adjustment: (1) Precise operation: Any operation (top / up / down / bottom) only needs to modify the dynamic_sort_id of the target record; (2) Non-intrusive update: Non-adjusted members keep their original dynamic_sort_id unchanged, avoiding cascading updates; (3) Extreme performance: The time taken for the top operation is optimized from 80ms to 5ms (100,000 data).

[0124] 5. Distributed support: A dynamic gap allocation engine is used to achieve conflict-free sequence number allocation among distributed nodes.

[0125] Compared to traditional solutions, this embodiment has the following advantages:

[0126] (1) Breakthrough performance improvement (100,000 data points), as shown in Table 11:

[0127]

[0128] Table 11

[0129] (2) Enhanced safety features:

[0130] Anti-inference protection: By using ±1000 random perturbation values ​​to make the coding of adjacent personnel non-linear, and by using non-continuous coding allocation within departments with a +20% redundancy space design, it effectively defends against attacks that infer the organization's size through the continuity of sequence numbers.

[0131] Encryption system: Two-factor protection with separate storage of encoding rules and encryption keys, key rotation mechanism (version field associated with key update), and server cryptographic machine hosting the SM2 department master key.

[0132] (3) Business Adaptability Advantages:

[0133] Flexible sorting support: Perfectly solves the need for random interleaving of NULL value members, supports mixed sorting of sorted and unsorted members, and realizes a mixed mode of "some members in a specific order + the rest keep the default".

[0134] Large-scale validation: In the process of sorting and processing more than 100,000 organizational personnel trees, the processing performance was greatly improved, and the performance improvement became more obvious as the data scale increased.

[0135] (4) Multi-scenario adapted data security management:

[0136] Internal sharing: plaintext + original code + complete audit;

[0137] Cross-departmental sharing: encrypted data;

[0138] External sharing: pure encoded form + read-only restriction.

[0139] (5) Conflict-free operation: Parallel operation across regional branches is achieved by pre-allocating interval numbers. New nodes automatically obtain new interval ranges without data migration.

[0140] The embodiments described above are merely illustrative of specific implementations of the present invention, and while the descriptions are detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. An efficient and secure sorting method for a large number of members in a multi-level organization, characterized in that, Includes the following steps: Step 1: Establish the database table structure for departments, personnel, and personnel sorting tables; Step 2: Implement intelligent sorting based on dynamic serial numbers: Based on the dynamic gap allocation engine, a basic serial number is generated. The value of the dynamic sorting sort table under the department is first virtually filled with the basic serial number, i.e., the virtual serial number. When the user adjusts the sorting settings, the virtual serial number is changed according to the operator, and the virtual serial number of the operation data is stored as an entity serial number and filled into the field of the dynamic sorting sort. The order of organizational members is displayed by combining the virtual number and the entity number and elastically binding them. Step 2 specifically includes the following steps: Step 2.1: Establish a global sort number, which specifically includes: (1) Create basic serial number: During the initial allocation, the basic serial number is generated by the dynamic gap allocation engine. The 2^n interval allocation method is used to assign a triplet identifier of group ID, interval number and sub-serial number to each person. (2) Distributed adaptation: Avoid sequence number conflicts by generating different interval numbers for different nodes; Step 2.2, basic sorting sequence number allocation, specifically including: ① Initial loading strategy: Generate basic serial numbers through the user table and dynamic gap allocation engine, and establish elastic binding between personnel IDs and basic serial numbers through hash consistency algorithm; ② Incremental allocation mechanism: When a new member is added to an organization, a basic sequence number is obtained. The new member inherits the baseline group ID of the organizational unit to which it belongs. If no organizational unit is explicitly specified, the member is assigned to a temporary group. Step 2.3, Adjusting the dynamic sort: When a user initiates a sort adjustment request, only the dynamic sort value of the target record is modified; Step 3, Data Encryption Processing: The sorting results are encrypted to prevent the organization size from being inferred and the sorting position of sensitive personnel from consecutive serial numbers; Step 4: Process data sharing and control access.

2. The efficient and secure sorting method for a large number of members in a multi-level organization according to claim 1, characterized in that, Step 1 specifically includes the following steps: Step 1.1: Create a department table: Store department information, including the department primary key, department name, parent department primary key, and the parent department path used to indicate the department's position in the hierarchical structure; Step 1.2: Create a personnel table: Store personnel information, including the personnel primary key, personnel name, and the primary key of the department to which they belong; Step 1.3: Create a virtual table of personnel with serial numbers: Store the virtual information of personnel under the department with basic serial numbers. The basic serial numbers are generated by dynamic gap allocation and include personnel primary key, personnel name, department primary key, and basic serial number; Step 1.4: Create a personnel sorting table under the department: Store the sorting information of personnel under the department, including department primary key, personnel primary key, dynamic sorting (sort), version control, display mask rules, and encryption key.

3. The efficient and secure sorting method for a large number of members in a multi-level organization according to claim 1, characterized in that, In (1), each sorting interval retains a preset empty number space. When the interval fill rate reaches the first threshold, it is automatically split. When the utilization rate is lower than the second threshold, adjacent intervals are automatically merged.

4. The efficient and secure sorting method for a large number of members in a multi-level organization according to claim 2, characterized in that, Step 3 specifically includes the following steps: Step 3.1: Convert the basic sequence number based on mixed radix encoding: Use the base62 encoding conversion layer to convert the numerical sequence number into mixed radix encoding, hide the numerical pattern, add random perturbation to the data before encoding, and restrict external systems from reverse deducing the original sequence number; Step 3.2, Encryption of sorting results based on national cryptographic algorithms: A temporary key is dynamically generated using the SM3 hash algorithm. The input parameters include department ID, timestamp, and random number: Temporary key = SM3(sharing party department ID + receiving party department ID + timestamp + random number); The temporary key is used to encrypt the Base62 encoded sorting number using SM4 to generate ciphertext data. Step 3.3: Construct a dynamic key management mechanism, specifically including: (i) Department-level keys: Each department is assigned a unique SM2 key pair for data transmission and signature verification; (ii) Versioned keys: A key rotation mechanism is implemented by combining version control fields, and the rotation cycle is determined according to the management policy settings; (iii) Temporary session key: When sharing across organizations, a temporary key derived from SM3 is generated. The temporary key = SM3(sharing party department ID + receiving party department ID + timestamp + random number), which is bound to a single session. The system automatically clears the temporary key when the session ends, and it cannot be recovered. (iv) The key is managed by a domestically produced cryptographic product on the server. The encoding rules and encryption keys are stored separately. The key is stored using a secure device on the server, and the encoding rules are stored in the database.

5. The efficient and secure sorting method for a large number of members in a multi-level organization according to claim 4, characterized in that, In step 4, the data sharing process specifically includes: Temporary key transmission: Encrypted encapsulation, the temporary key is encrypted with the recipient's SM2 public key, and an SM3 hash checksum and timestamp are appended; secure channel, transmitted via TLS 1.3 protocol, and bound to a session ID to prevent man-in-the-middle attacks; Data packet composition: The transmitted content includes the SM4 encrypted sorting result, the SM2 encrypted temporary key, and the SM2 signature.

6. The efficient and secure sorting method for a large number of members in a multi-level organization according to claim 4, characterized in that, In step 4, controlling access specifically includes: Internal sharing mode: Provides plaintext data and original sequence number, supports full operation permissions, and controls the identity and time of data access through access control policies; Cross-departmental sharing mode: uses encrypted data, adds random perturbation values, ensures non-linear coding of adjacent personnel, and only allows limited sorting operations; External sharing mode: Provides a pure encoding format, adds random perturbation values ​​to ensure non-linear encoding between adjacent users, and restricts access to read-only mode.

Citation Information

Patent Citations

  • Data sorting method and device

    CN114780623A

  • Method and apparatus for additional reference signal monitoring

    CN115804175A