Circular Doubly Linked List Binary Heap Data Sorting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing data sorting method based on a binary heap with a pointer chain has high time complexity for locating the tail node, leading to high time complexity in adding or deleting operations.

Innovation Solution

A data sorting method using a circular doubly linked list to rapidly locate the cursor node, determining the node to be updated based on the update type, and performing updating and sorting operations efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Stability of the object's composition

If a pointer chain based binary heap is used for data sorting, then the data structure can maintain a complete binary tree structure, but the time complexity of locating the tail node becomes high

Engineering Contradiction:
Improvebinary tree structureVSAvoidtime complexity of locating tail node
Core Design Contradiction:
Stability of the object's compositionVSLoss of time

Solution Approach 1:

The patent segments the binary heap structure by introducing a circular doubly linked list that connects all leaf nodes. This segmentation allows independent access to leaf nodes without traversing from the root, resolving the contradiction between maintaining binary tree structure and enabling efficient tail node location.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a circular doubly linked list as an intermediary structure between the binary heap nodes. This intermediary provides direct access paths to leaf nodes, eliminating the need for step-by-step traversal from the root node while preserving the original binary heap structure.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Stability of the object's composition

If step-by-step traversal from root node is used to locate tail node, then the binary heap structure is maintained, but the time complexity of adding or deleting operations becomes high

Engineering Contradiction:
Improvebinary heap structureVSAvoidefficiency of adding or deleting operations
Core Design Contradiction:
Stability of the object's compositionVSProductivity

Solution Approach 1:

The patent segments the binary heap by creating a separate circular doubly linked list structure that connects all leaf nodes. This allows O(1) access to the tail node for deletion operations and efficient access to leftmost leaf nodes for insertion operations, dramatically improving productivity while maintaining the binary heap structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary action by pre-establishing the circular doubly linked list structure during heap construction. This preliminary setup enables direct access to tail nodes and leaf nodes during adding or deleting operations, eliminating the need for time-consuming traversals and significantly improving operational efficiency.

Inventive Principle:
Principle #10Preliminary action

3Loss of time

If a circular doubly linked list is introduced to rapidly locate cursor node, then the time complexity of updating and sorting operations is reduced, but the device complexity increases

Engineering Contradiction:
Improvetime complexity of updating and sorting operationsVSAvoidstructure complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent merges the binary heap structure with a circular doubly linked list structure, where the linked list nodes reuse the same data structures as the binary heap nodes. This merging approach reduces the overhead of maintaining separate structures and minimizes the increase in device complexity while achieving O(1) access to cursor nodes.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11740867B2Data sorting method, apparatus and device, storage medium and program product
Publication Date: 2023.08.29 MICROFUN INC
  • US11740867B2 patent drawing
  • US11740867B2 patent drawing
  • US11740867B2 patent drawing

AI summary

A data sorting method, apparatus and device, a storage medium, and a program product. The method includes: obtaining a data sorting and updating request, where the data sorting and updating request includes data to be updated and an update type; determining a current cursor node, according to the data sorting and updating request, from a circular doubly linked list corresponding to a binary heap storing original data and according to pointing of the current cursor node pointer; determining a node to be updated corresponding to the data to be updated in the binary heap according to the update type and the current cursor node; and performing updating and sorting operations on the original data according to the node to be updated and the data to be updated.