Intelligent layout and wiring system and method for DSP module
The intelligent layout and wiring system for DSP modules enables automatic collision avoidance and wiring of DSP modules, solving the problems of spatial conflicts and messy wiring during the module dragging process in the existing technology, and improving the configuration efficiency and reliability of the DSP system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN TONGCHUANG AUDIO TECH CO LTD
- Filing Date
- 2025-12-08
- Publication Date
- 2026-05-08
AI Technical Summary
Existing DSP module connection solutions struggle to provide systematic and coordinated assistance when dealing with complexity and dynamic adjustments. This leads to difficulties in handling spatial conflicts during module dragging, arranging batch modules as a whole, and automatically organizing connection paths, increasing the workload of configuration and modification and the probability of errors.
The system employs a DSP module intelligent layout and wiring system, including a DSP drag wiring unit, a collision avoidance unit, and an automatic layout unit. It automatically lays out and connects modules by sensing the drag trajectory in real time, automatically finding pins, detecting and avoiding collisions, and combining a depth-first search algorithm.
It significantly reduces the amount of user operations, improves the configuration efficiency and reliability of DSP systems, maintains a clean and readable interface, reduces the probability of module stacking and misconnection, and enhances the configuration efficiency and maintainability of DSP systems in multiple scenarios.
Smart Images

Figure CN121279235B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, specifically to a system and method for intelligent layout and interconnection of DSP modules. Background Technology
[0002] DSP (Digital Signal Processing) refers to the technology of digitally processing acquired continuous signals (such as sound, images, sensor data, etc.). It converts analog signals into digital signals and then uses various mathematical algorithms (such as filtering, Fourier transform, compression, feature extraction, etc.) to process, optimize, or analyze the signals, thereby extracting useful information, removing noise, compressing data, or realizing other functions.
[0003] DSP module layout and wiring refers to selecting and configuring appropriate processing modules, algorithm parameters, and hardware parameters for a digital signal processing system based on specific application requirements. This includes determining the signal processing flow, setting algorithm parameters such as filter order, sampling rate, and quantization precision, and configuring hardware resources such as sampling frequency, bit width, buffer size, and hardware registers. Through configuration, it is ensured that the DSP system can execute tasks efficiently and accurately while meeting resource and performance requirements.
[0004] The existing connection scheme connects several DSP algorithm modules according to signal flow and processing order, ensuring a clear and efficient signal transmission path from input to output. During this process, the parameters of each module (such as sampling rate, cutoff frequency, and gain value) need to be set according to system requirements, while ensuring data transmission timing synchronization between modules. Finally, through optimization and checking, it is ensured that the system meets design requirements in terms of resources, timing, and performance.
[0005] For example, Chinese invention patent CN114185599B discloses a computing system based on a DSP chip array, including a DSP chip array and an array support unit connected via a hardware link; the DSP chip array includes multiple DSP chips; the hardware link includes a number of computing data flow channels and a number of loading and maintenance data flow channels equal to the number of DSP chips; each DSP chip in the DSP chip array is connected to the array support unit through a corresponding computing data flow channel and a loading and maintenance data flow channel; the array support unit includes a loading and maintenance data flow channel for completing program burning and program booting, and a computing data flow channel for completing data sharing and algorithm acceleration among multiple DSP chips.
[0006] For example, Chinese invention patent CN118095193B discloses a signal processing SIP design circuit based on multiple DSPs, relating to the field of microelectronics technology. This circuit includes: N multi-core DSP chips, N FLASH chips, a storage module, N DDR memory interfaces, N voltage adjustment chips, N clock chips, and an ABF substrate. The multi-core DSPs are used to connect to the storage module and perform calculations and cache. The storage module is used to load programs and store data. An SPI interface connects the FLASH chips and the multi-core DSP chips. The voltage adjustment chips provide operating power. The clock chips provide the clock signal. The chips and modules are distributed on the ABF substrate in a perimeter arrangement. The matrix data stored internally by the N DSPs is scheduled and integrated into the final required matrix through EDMA transfer, achieving algorithm acceleration.
[0007] Most existing technical solutions are based on DSP chip arrays with fixed topology and static connections, multi-DSP packages or two-dimensional array deployment schemes, or only provide basic drag-and-drop and manual connection of processing modules in the graphical interface. However, the actual DSP module connection process often requires frequent insertion, deletion and replacement of algorithm modules, dynamic adjustment of signal paths and coordination of the overall layout of multiple groups of modules, so that the connection is clear and orderly and meets resource and timing constraints.
[0008] Because this complexity is typically supported by only basic interface operations in existing configuration software, and with the increasing number of modules, the need for real-time responses to drag-and-drop and copy-and-paste operations, and the high coupling between various operations in terms of spatial location and topological relationships, existing solutions often only provide local interface feedback for single drag-and-drop or single connection, without establishing a unified spatial constraint and topology maintenance mechanism at the overall layout level. As a result, it is difficult to form a systematic and interconnected auxiliary capability for requirements such as handling spatial conflicts during module drag-and-drop, overall placement of batch modules, automatic alignment of connection paths, and continuation and reuse of existing topological relationships during copy-and-paste operations. Consequently, when users complete the above-mentioned complex connection requirements, they still need to repeatedly drag and precisely align each processing module, draw and adjust connections one by one. When the system scale is large or the topology is complex, connections are prone to intersection, detours, and visual confusion, which not only increases the workload and understanding cost in the configuration and modification process, but also increases the probability of connection errors and improper topology configuration, thus adversely affecting the efficiency of DSP system construction and operational reliability. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides an intelligent layout and interconnection system and method for DSP modules, which can effectively solve the problems mentioned in the background technology.
[0010] To achieve the above objectives, the present invention provides the following technical solution: The first aspect of the present invention provides an intelligent layout and wiring system for DSP modules, comprising: a DSP drag-and-connection unit, used to generate an original layout with fixed wiring on a visual configuration interface based on the fixed configuration of the DSP device; the background senses the drag trajectory of the DSP algorithm module and automatically finds pins to connect with the original layout, then enters a DSP collision avoidance unit; a DSP collision avoidance unit, used to record the dragged DSP algorithm module as the current dragged module, perform collision detection on the current dragged module, determine the collision state of the current dragged module, and if a collision exists, automatically avoid the module, then enter a DSP automatic layout unit; a DSP automatic layout unit, used to update pins during the dragging process, the current dragged module connects based on the updated pins, and after the connection is completed, uses a depth-first search algorithm to automatically lay out the DSP algorithm module.
[0011] The second aspect of this invention provides a method for intelligent layout and wiring of DSP modules, comprising: S1. Based on the fixed configuration of the DSP device, generating an original layout with fixed wiring on a visual configuration interface, and automatically finding pins to connect to the original layout by sensing the dragging trajectory of the DSP algorithm module in the background, proceeding to S2; S2. Recording the dragged DSP algorithm module as the current dragged module, performing collision detection on the current dragged module, determining the collision state of the current dragged module, and automatically avoiding collisions if they exist, proceeding to S3; S3. Updating pins during dragging, connecting the current dragged module based on the updated pins, and automatically laying out the DSP algorithm module using a depth-first search algorithm after the wiring is completed.
[0012] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:
[0013] (1) This invention provides a DSP module intelligent layout and connection system and method. The DSP drag connection unit is used to run on the original layout generated based on the fixed configuration of the device. When the user drags the DSP algorithm module in the visual interface, the background senses the drag trajectory in real time and automatically matches the appropriate connection object among the candidate pins of the original layout, thereby quickly completing the module connection without destroying the fixed backbone link, reducing the amount of operation of the user to select pins one by one and manually draw lines. The DSP collision avoidance unit marks the algorithm module being dragged as the current dragged module, performs collision detection on it with the original layout and other modules and determines the collision status. Once an overlap or too close is found, the module position is automatically shifted according to the collision direction to realize intelligent yielding during the dragging process and avoid module stacking and interface occlusion. After the connection is completed, the DSP automatic layout unit updates the pin status based on the latest topology, uses the depth-first search algorithm to calculate the hierarchical order and maximum number of levels of each module, and automatically arranges the input, processing and output modules according to the rule from left to right to generate a clear structure and a well-aligned overall layout, which significantly reduces the burden of manual alignment and connection arrangement.
[0014] (2) The present invention is based on a real-time collision detection intelligent avoidance mechanism. During the dragging process, the system continuously monitors the spatial relationship between the current module and the surrounding modules. Once the style matrix is detected to intersect or approach the preset threshold, the system can immediately provide a position adjustment scheme and perform smooth avoidance, so that the modules are not easily stacked together or block key pins. This maintains the neatness and readability of the canvas layout and avoids incorrect selection, misconnection or subsequent operation difficulties caused by module overlap, which helps to maintain a good interactive experience when there are many modules.
[0015] (3) Based on the shortest distance intelligent connection algorithm, the present invention uses the current starting pin as a reference to calculate the geometric distance with X-axis weight for the candidate target pins. It prioritizes the selection of the external optimal pin that is closer in the horizontal direction and has a more natural signal flow for automatic connection or highlighting prompts, thereby guiding the connection to use short, straight and regular paths as much as possible. This strategy can significantly reduce diagonal lines, backtracking lines and unnecessary intersections in scenarios with many channels and dense modules, making the signal flow clear at a glance, while reducing the probability of users misselecting target pins and improving connection accuracy and configuration efficiency.
[0016] (4) Compared with the prior art, this solution improves the module dragging, collision detection, connection selection and overall layout from a series of fragmented manual operations into an automatic collaborative layout configuration process by linking the drag connection unit, collision avoidance unit and automatic layout unit. It retains the stability of the original fixed topology of the device, allows users to flexibly insert, copy and adjust algorithm modules, and automatically completes avoidance and rearrangement after each drag and connection. This can effectively alleviate the problems of module alignment, messy connection and easy configuration errors in traditional software in complex DSP systems, improve the overall configuration efficiency and interface maintainability, and help engineers to quickly reuse and deploy DSP configuration solutions in multi-scenario and multi-device projects. Attached Figure Description
[0017] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the system module connections of the present invention.
[0019] Figure 2 This is a schematic diagram of the method steps of the present invention.
[0020] Figure 3 This is a diagram showing the overall architecture of the layout and connection system.
[0021] Figure 4 This is a diagram showing the effect of the DSP visualization interface.
[0022] Figure 5 This is a flowchart of the collision detection algorithm.
[0023] Figure 6 This is a flowchart of the automatic layout algorithm. Detailed Implementation
[0024] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0025] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0026] The layout and wiring system of this invention adopts a bottom-up three-layer architecture, as detailed below. Figure 3 As shown, Figure 3The diagram illustrates the overall architecture of the layout and connection system. The bottom layer is the user interaction layer, supporting various input methods such as mouse drag-and-drop, keyboard shortcuts, touch gestures, and right-click menus. In this invention, it serves as a unified interaction entry point for different business modes, including local sound reinforcement, local-remote communication, and background music (BGM) systems. The middle layer is the visual feedback layer, which generates real-time interface feedback such as connection previews, collision highlighting effects, layout animations, and status indicators based on the latest layout and connection results from the upper-layer algorithms and scheduling logic. This provides visual rendering and display of interface elements, pin states, and connection patterns. The top layer is the application presentation layer, whose event handling layer receives mouse clicks, drag-and-drop start / end events, menu contexts, and keyboard events from the user interaction layer. Driven by these events, it invokes internal algorithm scheduling logic such as path search, collision detection, automatic layout, and intelligent connection to update the DSP module view and signal topology under the current business mode. Through the collaboration of the user interaction layer, visual feedback layer, and application presentation layer, this invention maintains application views and interaction capabilities for various business scenarios while achieving unified rendering and visualization of the underlying algorithm calculation results.
[0027] Reference Figure 1 As shown, the first aspect of the present invention provides an intelligent layout and connection system for DSP modules, including: a DSP drag connection unit, a DSP collision avoidance unit, and a DSP automatic layout unit.
[0028] The DSP drag connection unit is connected to the DSP collision avoidance unit, and the DSP collision avoidance unit is connected to the DSP automatic layout unit.
[0029] In practical engineering, a DSP device often needs to adapt to multiple working modes, such as local sound reinforcement, local + remote conferencing, and BGM systems. It has many input ports, multiple processing algorithms, and multiple output zones. If relying solely on the traditional software method of manually dragging and dropping modules, aligning them manually, and drawing lines one by one, problems such as cable crossing, module stacking, and chaotic routing are easily encountered when the topology contains a large number of channels and processing blocks. This not only increases the difficulty of configuration and maintenance but also amplifies the risk of misconnection, missing connection, and scene switching errors. After introducing the intelligent layout and connection mechanism of the technical solution of this invention, the layout system can automatically maintain a unified structure of input-processing-output from left to right. When the user drags, inserts, or copies modules, it automatically handles collisions, automatically finds suitable connection points, and rearranges the layout, so that the interface always remains neat, readable, and consistent with the real signal flow. This significantly reduces the debugging threshold and error rate, and improves the efficiency and reliability of multi-scenario DSP system configuration.
[0030] The DSP drag connection unit is used for fixed configuration based on DSP devices. It generates an original layout of fixed connections on the visual configuration interface. The background senses the drag trajectory of the DSP algorithm module and automatically finds the pins to connect with the original layout, and then enters the DSP collision avoidance unit.
[0031] A DSP algorithm module, in a digital signal processing system, refers to an independent functional unit that encapsulates a specific type of processing function (such as equalization, filtering, automatic mixing, compression, delay, acoustic echo cancellation, background music management, etc.). Externally, it appears as a "building block" with several input / output pins, configurable parameters (gain, frequency, threshold, time constant, etc.), and fixed algorithm logic. In the visual configuration interface, DSP algorithm modules can be dragged and dropped, inserted between input and output matrices, and connected via pins to form a complete signal processing chain. This maintains the transparency of the internal algorithm implementation to the user while facilitating on-demand combination, replication, and adjustment in different scenarios, thereby enabling modular construction and flexible reuse of complex DSP processing flows.
[0032] Specifically, the visual configuration interface includes: left-side input module group layout, middle-side processing module group layout, and right-side output module group layout.
[0033] The left-hand input module group layout is a component bar, displaying selectable DSP algorithm modules in the form of a list or icons.
[0034] The intermediate processing module group is laid out as a topology editing area, displaying the original layout with fixed connections.
[0035] The layout of the output module group on the right is a combination of the DSP algorithm module and the original DSP algorithm layout, which sends the processed signal to the corresponding physical or network output channel.
[0036] DSP module intelligent layout and wiring essentially uses a visual configuration interface canvas, treating a fixed original layout as a skeleton, and then combining a module library and an intelligent algorithm layer to automatically calculate and adjust the positions and wiring relationships of modules. Figure 4 As shown, Figure 4 This diagram illustrates the DSP's visual interface. The DSP system uses the input module group layout on the left (e.g., Input 1 and Input 2) to pass the input signal to the intermediate processing module group layout. This area contains the automatic mixing module, AEC (Acoustic Echo Cancellation) module, intermediate matrix mixing module, and the core DSP algorithm module, responsible for processing and optimizing the input signal. The processed signal then flows to the output module group layout via arrows, ultimately reaching Output 1 and Output 2 for final signal output. This process demonstrates the connections and signal processing between modules in the DSP system. Each module processes the signal sequentially from input to output according to a fixed procedure, ensuring a smooth and accurate signal flow.
[0037] Furthermore, a fixed-connection original layout is generated on the visual configuration interface. The specific analysis process is as follows:
[0038] Generating a fixed-connection original layout can be understood as follows: The layout system first reads the hardware and inherent functional configuration of the current DSP device, such as the device model, the number of available input / output channels, whether automatic mixing, matrix mixing, AEC echo cancellation, BGM management and other functional modules are enabled, and whether the current selected mode is local amplification, local-remote or BGM system mode; then, based on this fixed configuration, a set of preset layout templates is matched in the background, and the left input module group, the middle processing backbone module (such as automatic mixing / matrix / AEC / BGM management, etc.) and the right output module group are automatically instantiated in a predetermined order, and the connections between them are drawn according to the predefined signal paths. Finally, it is rendered on the visual configuration interface at once, forming an original backbone topology that cannot be deleted or arbitrarily split, which can be used to insert and add editable DSP algorithm modules later.
[0039] In this system, the original layout generated based on the specific device configuration serves as the basic skeleton of the overall signal topology. All input modules, processing matrix modules, output modules, and their fixed connections are considered protected objects. Users are not allowed to delete, copy, or paste this part during subsequent configuration, nor are they allowed to arbitrarily modify its existing connections. Users can only expand and refine the functions by adding editable DSP algorithm modules based on this original layout, thereby ensuring that the core signal path of the device remains stable and reliable in different scenarios and avoiding system malfunctions caused by accidental damage to the underlying fixed topology.
[0040] The original layouts include the local amplification mode original layout, the local-remote mode original layout, and the background music system mode original layout.
[0041] The original layout of the local sound reinforcement mode is: left input module, automatic mixing module, middle matrix mixing module, and right output module.
[0042] Local sound reinforcement refers to an audio system that collects and amplifies sound only within a specific living space. Typically, local sound sources such as microphones and instruments are input through an automatic mixing or basic processing module, then matrix mixed and processed before being sent to amplifiers and speakers. This provides sufficient sound pressure level and clarity for the audience in environments such as conference rooms, auditoriums, and classrooms. The core objective of local sound reinforcement is to ensure that the content of a speech or performance is heard evenly and clearly throughout the space without feedback or distortion, without involving remote transmission or network interaction.
[0043] The original layout for local-remote mode is: left input module, matrix mixing module, acoustic echo cancellation module, middle matrix mixing module, and right output module.
[0044] The local + remote mode adds a matrix and an acoustic echo cancellation module (AEC) to the local sound reinforcement mode. The extra matrix is first connected to the input module, then to the echo cancellation module, and the echo cancellation module is then connected to another matrix.
[0045] Local-remote refers to a combined mode that, while providing local sound reinforcement, also requires two-way audio interaction with remote venues or participants. Typically, it involves sending local microphones and other audio sources to local speakers for on-site sound reinforcement, while simultaneously encoding the processed local mix signal using matrices and echo cancellation (AEC) modules before sending it to the remote location. At the same time, it receives audio feedback from the remote location and plays it back locally. In this mode, the system must not only ensure good on-site sound quality but also suppress echoes and feedback from the local amplified signal at the remote location, coordinating the gain, delay, and routing relationships between the local and remote links. This is a typical working method used in conferencing systems, remote teaching, and multi-location collaborative scenarios.
[0046] The original layout of the background music system is as follows: left input module, background music management module, middle matrix mixing module, and right output module.
[0047] The background music system (BGM) mode differs from local sound reinforcement in that it replaces the automatic mixing module with a BGM management module.
[0048] A BGM (Background Music) system refers to an audio operating mode primarily designed for the continuous playback of background music, notification tones, and the insertion of broadcasts. It typically receives input from sources such as players, streaming media, or broadcast front-ends. The BGM management module selects the source, controls volume, prioritizes audio, and manages scheduled tasks. A matrix then routes the different audio sources to amplifiers and speakers in various zones or sections. This system is used in environments such as shopping malls, hotels, office buildings, and restaurants to create a comfortable sound field and to insert announcements or emergency broadcasts when needed. The focus of this mode is on zone management and source scheduling, rather than local voice reinforcement or remote interaction.
[0049] It's important to explain that, regardless of whether it's a local sound reinforcement, local-to-remote, or background music system, the audio signal must first enter the system through the left input module. Then, channel routing, distribution, and aggregation are completed in the middle matrix mixing module before finally being sent to various power amplifiers or terminal devices by the right output module. Different modes simply replace the functional processing module between the input and the middle matrix with automatic mixing, matrix combined with acoustic echo cancellation, or background music management to adapt to different business scenarios. These three common modules together constitute the stable backbone structure of the entire system from signal input to matrix processing to signal output.
[0050] The DSP collision avoidance unit is used to record the dragged DSP algorithm module as the current dragged module, perform collision detection on the current dragged module, determine the collision status of the current dragged module, and if a collision exists, the module will automatically avoid the collision and enter the DSP automatic layout unit.
[0051] Specifically, collision detection is performed on the currently dragged module to determine its collision status. The specific analysis process is as follows:
[0052] After completing the original layout, based on the background of the left input module group of the visual configuration interface, the drag trajectory of the DSP algorithm module is detected, and the module is generated through the factory pattern. This module is a draggable module on the intermediate processing module group of the visual configuration interface, and the module is set as the currently draggable module.
[0053] After the initial layout is completed, when a user presses and drags a DSP algorithm module icon from the left component bar in the visual configuration interface, the front end will continuously collect mouse / touch events (such as mousedown / mousemove / mouseup or corresponding touch events), convert the current pointer's screen coordinates into canvas coordinates, and report them to the back end in the form of an event stream via a WebSocket / HTTP interface. Based on this path event stream, the back end identifies the starting point of the drag, the current area, and whether the landing point enters the layout area corresponding to the left input module group, thereby perceiving the drag trajectory and target position of the DSP algorithm module.
[0054] Once it is determined that the drag is released in a legal position, the backend calls the pre-registered factory pattern creation interface according to the reported module type identifier. The module factory generates the corresponding DSP algorithm module instance according to the type, automatically fills in its default algorithm parameters, input and output pin definitions and initial layout coordinates, and returns the newly created module and its attributes as structured data to the frontend. The frontend renders the corresponding module node in the canvas to form an editable DSP algorithm module that is connected to the original layout.
[0055] Set the pins of the currently dragged module to the "ready to connect" state, change the pin color, and record the module position of the currently dragged module before dragging in the hash set.
[0056] It should be explained that after the layout system selects the target pin that is closest to the current starting pin and matches its type from the candidate pins through the intelligent connection algorithm, it changes the color of the target pin to explicitly mark it as a pending connection state. This allows users to intuitively identify the connection object currently predicted by the system when dragging lines or modules. At the same time, different colors can also be used to distinguish between various states such as not connected, pending connection, connected, and conflict. This provides users with continuous and clear visual prompts throughout the entire interactive process of intelligent module layout and connection, creating a clear mapping between the internal algorithm calculation results and the interface presentation.
[0057] Changing pin colors serves two main purposes. First, by highlighting current candidate connection points, the probability of users misidentifying target pins, making incorrect connections, or missing connections in complex topologies can be significantly reduced, decreasing subsequent troubleshooting and modification costs. Second, color differentiation makes the interface status immediately clear when there are many connections and modules stacked, allowing users to quickly understand signal flow and connection relationships without having to check each connection individually, thereby improving the overall readability and operational efficiency of the interface. With intelligent wiring and automatic placement working together, pin color feedback can also help users build trust and understanding of the system's automatic connection strategy, further improving the reliability and interactive experience of the DSP module configuration process.
[0058] Collision detection is performed as the currently dragged module moves. A breadth-first search algorithm is used to search for all modules that may collide. The algorithm checks whether the currently dragged module overlaps with modules in the original layout. Based on the detection results, the collision state of the currently dragged module is determined.
[0059] Based on the Breadth-First Search (BFS) algorithm, the module layout on the current interface is abstracted into a graph structure composed of each module node and its adjacency relationship. Taking the currently dragged module as the starting node, it expands outward step by step according to the hierarchy, prioritizing the traversal of module nodes that are spatially adjacent to it, logically connected, or arranged in the same layout area. This allows for the rapid selection of a set of modules that may collide from a large set of modules. Then, style matrix intersection detection is performed on the modules in this set, without having to perform collision calculations on every module on the entire canvas.
[0060] In this embodiment, a breadth-first search algorithm is used to screen candidate collision modules. When there are a large number of modules and a complex topology, the computational load of collision detection is significantly reduced each time the position is updated by dragging. This avoids interface lag or dragging delay caused by full traversal, enabling collision detection to respond to user operations at near real-time speed. At the same time, since the BFS traversal order is consistent with the hierarchy and adjacency relationship of the modules in the layout, it can prioritize locking modules that are more logically and spatially related to the currently dragged module, improving the accuracy and stability of collision determination. This provides a reliable foundation for subsequent intelligent avoidance and automatic layout, and optimizes the overall interactive experience.
[0061] Furthermore, if a collision occurs, the module will automatically avoid it. The specific analysis process is as follows:
[0062] Based on the collision code, the style matrix of the current dragged module is intersected with the style matrices of each module in the original layout. The detection result means that if the style matrix of the current dragged module intersects with the style matrix of a certain module in the original layout, the collision state of the current dragged module is determined to be overlapping; otherwise, it is determined to be non-overlapping.
[0063] It should be explained that in the embodiments of the present invention, the appearance of the modules is essentially inherited from a matrix. The specific detection method is to determine whether the matrices intersect through code. If they intersect, it means that there is a collision or overlap.
[0064] The specific matrix intersection detection works as follows: the area occupied by each module on the canvas is abstracted into a style matrix (e.g., represented by the coordinates of the top left and bottom right corners of the module's bounding rectangle, or the corresponding width and height parameters). When detecting whether the currently dragged module overlaps with a module in the original layout, the projection intervals of the two modules in the X and Y axes are compared respectively. If the intervals of the two matrices overlap in the X-axis direction and also overlap in the Y-axis direction, then the style matrices of the two modules are determined to intersect, which corresponds to the two modules having spatial overlap on the interface, thus marking the collision state of the currently dragged module as overlapping. Conversely, when the intervals in either axis do not intersect, the two modules are considered to be separated on the plane and do not constitute a collision.
[0065] If the collision state of the currently dragged module is overlapping, the module currently being collided with in the original layout is recorded as the colliding module, the original position of the colliding module is recorded in the hash set, the movement direction is determined based on the center point of the currently dragged module and the colliding module, and the movement distance is calculated based on the movement distance formula to complete the automatic module avoidance.
[0066] The movement direction (left or right) is determined based on the center points of the dragging module and the collision module. If the center point of the dragging module exceeds the center point of the collision module, the collision module moves to the left; otherwise, it moves to the right. The movement distance is calculated using the following formula:
[0067] Move to the right:
[0068] positionRightX=dragModule.Rect.Right-waitMoveModule.Rect.Left+10;
[0069] Move to the left:
[0070] positionLeftX=-(waitMoveModule.Rect.Right-dragModule.Rect.Left+10).
[0071] Specifically, if a collision occurs, the module will automatically avoid it, which also includes:
[0072] Extract the collision module recorded in the hash table and perform collision detection again with the currently dragged module. If a collision module marked in the hash table still overlaps with the currently dragged module, the currently dragged module will automatically perform module avoidance, and the collision feedback effect of the collision module will remain unchanged, that is, the collision state of the collision module will be maintained. Otherwise, restore the collision module to its original position and remove the collision module from the hash set.
[0073] The specific collision detection process is as follows: Figure 5 As shown, Figure 5 The flowchart illustrates the collision detection algorithm. When a user selects and drags a module with a pointer, the layout system first records its original position and performs collision detection. If no collision is found, the module moves directly along the dragging trajectory and the operation ends. If a collision is detected, the system first calculates a reasonable movement direction and then, depending on whether it is a module group drag, selects to move the entire module group or a single module, calculates the corresponding offset, and performs position adjustment accordingly. Subsequently, the adjusted position is checked to see if it needs to be restored. If it is determined that there are still unreasonable overlaps or boundary violations, the module (or module group) is restored to its original position; otherwise, the adjusted position is retained and the dragging ends. This achieves automatic collision avoidance and controllable rollback of erroneous movements during the dragging interaction.
[0074] The DSP automatic placement unit is used to update pins during the dragging process. The current dragging module is connected based on the updated pins. After the connection is completed, the depth-first search algorithm is used to automatically place the DSP algorithm module.
[0075] Furthermore, during the dragging process, the pins are updated, and the current dragging module makes connections based on the updated pins. The specific analysis process is as follows:
[0076] Intelligently find the modules to be connected in the original layout and record them as target connection modules.
[0077] After collision detection and automatic avoidance are completed, the shortest distance pin between each pin of the target connection module and the pin of the current dragging module is calculated based on the shortest distance pin calculation formula. The shortest distance pin is set to the connection state and the pin color is changed. At the same time, the shortest distance pin is recorded in the pin hash set.
[0078] The formula for calculating the shortest distance pin is as follows:
[0079] distance=Math.Sqrt(Math.Pow((ptr.X-ptl.X)*0.1,2)+Math.Pow((ptr.Y-ptl.Y),2)).
[0080] It should be explained that the embodiment of this invention introduces X-axis weighting in the shortest distance pin calculation, assigning greater weight to horizontal displacement (X-axis), making the algorithm more inclined to select pins that are closer in the left-right direction and in the same signal flow direction as the nearest pins. This serves two purposes: firstly, it maintains consistency with the overall left-to-right automatic layout rule of the layout system, guiding connections to move as far as possible in the horizontal direction, avoiding numerous diagonal, downward, or even reverse connections; secondly, when multiple candidate pins are vertically close but have significant differences in horizontal position, increasing the X-axis weight can prioritize selecting target pins that are horizontally adjacent to the current module and have a more natural logical order, thereby reducing vertical detours and cross connections. The resulting connection paths are more regular, mainly consisting of short horizontal straight lines, significantly improving the readability and aesthetics of the entire topology diagram. Users can more easily see the signal flow from left to right at a glance, while also reducing the risk of misconnections and incorrect connections caused by intersecting and chaotic connections, thus improving the efficiency and reliability of DSP module layout and connection configuration.
[0081] During real-time dragging, the module to be connected is updated. At the same time, the shortest distance pin of the module to be connected is updated based on the shortest distance pin calculation formula. The pin hash set records the pin update result each time. Meanwhile, the previous shortest distance pin is removed and the pin color is restored.
[0082] When the drag ends, extract the shortest distance pin from the pin hash set, connect the currently dragged module to the original layout module corresponding to the shortest distance pin, and restore the pin color after the connection is completed.
[0083] Specifically, a depth-first search algorithm is used for automatic layout of DSP algorithm modules. The detailed analysis process is as follows:
[0084] After the connection is completed, the system first activates the three-level layout system, dividing the canvas into the left input module layout area, the middle matrix mixing module layout area, and the right output module layout area, and generates input module arrangement list, matrix module positioning, and output module arrangement list for the three modules respectively.
[0085] Automatic layout proceeds from left to right. Starting from each pin of each left input module, a depth-first search algorithm is used to traverse all reachable connection paths between the left input module and the middle matrix mixing module. The number of modules traversed on each path is counted, and the path containing the most modules is found. The maximum number of module levels corresponding to this path is used as the layout benchmark, where the number of module levels is specifically the depth (recursion depth) value recorded during the DFS process.
[0086] It should be explained that this embodiment is based on the Depth-First Search (DFS) algorithm. After abstracting the current DSP module connection relationship into a directed graph, it uses the pin of each input module as the starting point and uses DFS to exhaustively traverse all reachable module paths branch by branch along the signal flow direction. During the traversal, it records the topological level of each module and counts the number of modules traversed on the path from the starting point to each end point. This automatically finds the deepest path containing the most modules, thereby obtaining the maximum number of levels between the input end and the intermediate matrix, and between the matrix and the output end, as well as the level position of each module. This provides a unified level benchmark and sorting basis for the subsequent automatic layout from left to right.
[0087] This system can automatically derive the required hierarchical information for layout based on the actual module topology, so that the horizontal layout spacing and the number of module columns no longer depend on manual estimation or simple counting. Thus, even in complex scenarios with multiple branches and multi-level processing links, it can still ensure that all modules are evenly arranged on the preset X-axis grid in the order of topological hierarchy, forming a clear signal flow from left to right. This avoids local congestion and intersection caused by some branches being too deep, reduces the workload of users frequently adjusting the position alignment, improves the regularity and readability of the overall layout, reduces the probability of configuration errors, and significantly improves the efficiency and stability of intelligent layout and connection of DSP modules.
[0088] Based on the maximum number of module levels, divide the X-axis direction into several equally spaced layout grids to obtain a uniform horizontal distance between module levels. Place each left input module and the middle matrix mixing module in the corresponding X-axis grid position according to the level index of their pins to complete the left-to-right alignment layout between the left input module and the middle matrix mixing module.
[0089] A depth-first search algorithm is used to align the middle matrix mixing module and the right output module from left to right. Specifically, starting from each output pin of the middle matrix mixing module, DFS is used to find the maximum level path to the right output module. The horizontal distance between layers is set based on the level of this path, and subsequent modules are arranged sequentially to ensure that the overall layout direction is consistent and the column alignment is clear.
[0090] After the horizontal layout is completed, the system further performs Y-axis alignment optimization and automatic spacing adjustment, performs vertical alignment and vertical spacing correction on the input-matrix-output channels, and regularizes the connection paths, finally generating an automatic layout result with a clear overall structure, horizontal alignment and simple connections.
[0091] The specific layout process is based on Figure 6 As shown, Figure 6 The flowchart illustrates the automatic layout algorithm. After the user triggers the automatic layout, it enters a three-level layout system divided into a left input area, a central matrix group, and a right output area. In the left layout, the input modules are first sorted, and their horizontal coordinates are calculated accordingly. Then, Y-axis alignment optimization ensures the vertical alignment of each channel. The matrix group layout determines the center position of core modules such as the mixing matrix on the canvas and automatically adjusts the spacing between them and the modules on both sides based on the overall arrangement. The right layout sorts the output modules and calculates their right coordinates, while also organizing and standardizing the connection paths. After these three steps are completed, a clear left-right partitioning, vertical alignment, and concise connection layout result is output.
[0092] Furthermore, collision detection is performed on the current dragged module to determine its collision status, which also includes:
[0093] If multiple DSP algorithm modules are copied and pasted, these modules are treated as a drag-and-drop module group, which is then dragged and arranged.
[0094] After the copy operation is triggered, the modules in the dragged module group are sorted from left to right and from top to bottom. Based on the sorting results, the modules located at the top left and top right are extracted, and their pins are searched for external optimal pins and matched with the pins of the target connection module.
[0095] The corresponding pins of the top left and top right modules are used as representative pins to perform an external optimal pin search and match them with the pins of the target connection module.
[0096] The so-called external optimal pin refers to the most suitable target pin selected during the current wiring or module group docking process, based on the starting pin of the currently operating module. This target pin is chosen from all candidate module pins in the existing layout topology, excluding the module to which the starting pin belongs, through type matching and geometric distance calculation. Specifically, the system first limits the search to external module pins that are compatible with the direction and signal type of the starting pin. Then, based on canvas coordinates and rules such as nearest distance with X-axis weight, these candidate pins are comprehensively evaluated. The system selects the position that satisfies both the connection logic and is closest to the starting pin in the horizontal layout as the external optimal pin, marking it as a pending connection for automatic wiring or docking of the beginning and end of a module group with the global topology.
[0097] When the dragging ends, the connection relationship between modules is first established within the dragging module group according to the sorting result. Then, the dragging module group is automatically connected to the external optimal pin to complete the connection between the dragging module group and the original layout. After the internal and external connections are completed, the automatic layout process is triggered.
[0098] When the user finishes dragging and releases the mouse, the layout system first automatically establishes connections between modules from left to right within the module group based on the sorting results. This creates a continuous signal processing link within the copied module group. Then, the leftmost module in the module group is automatically connected to the previously searched optimal external pin via its representative pin, completing the connection between the module group and the original layout of the existing topology. After completing the internal and external connections, the automatic layout process is further triggered to adjust and align the module group and its surrounding related modules, thereby maintaining the overall neatness of the layout and the clear and orderly connection structure even when copying and pasting in batches.
[0099] After completing module drag-and-drop, intelligent connection, and automatic layout, the system uniformly collects the scene mode, module type, module parameters, pin connection relationship, and layout coordinate information in the current DSP topology, and generates a structured configuration data according to the preset parameter serialization rules for project saving, local backup, and downloading and restoring to the target DSP device.
[0100] After completing the initial layout generation, module drag-and-drop and intelligent connection, and automatic layout, the system performs unified abstract modeling of the DSP configuration on the current canvas. This maps device model and operating mode, local / local + remote / BGM scene information, module type and service parameters, region (left / center / right), layout coordinates and hierarchical index, and the connection relationships between pins into a standardized configuration object model. Then, following a predetermined order, the system traverses the entire topology, collecting information on each module, its pins, connections, and layout, and organizing and classifying this data. Based on this, according to preset parameter serialization rules, the configuration objects are encoded into structured configuration data (e.g., JSON or binary sequences). This configuration data not only fully depicts the DSP algorithm parameters and signal topology but also includes the coordinates and hierarchical information required for the interface layout. It can be used for saving project files, version comparison and rollback, as well as for distribution to target devices and for quickly restoring the current module layout and connection status via deserialization.
[0101] Reference Figure 2 As shown, the second aspect of the present invention provides a method for intelligent layout and connection of DSP modules, including: S1. Based on the fixed configuration of the DSP device, an original layout with fixed connections is generated on the visual configuration interface, and the background senses the drag trajectory of the DSP algorithm module to automatically find the pins and connect them to the original layout, and then proceeds to S2.
[0102] S2. Record the dragged DSP algorithm module as the current dragged module, perform collision detection on the current dragged module, determine the collision status of the current dragged module, and if a collision exists, the module will automatically avoid it, and proceed to S3.
[0103] S3. Update the pins during the dragging process. The currently dragged module is connected based on the updated pins. After the connection is completed, the DSP algorithm module is automatically laid out using the depth-first search algorithm.
[0104] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined by the present invention, they should all fall within the protection scope of the present invention.
Claims
1. A DSP module intelligent layout and interconnection system, characterized in that, include: The DSP drag connection unit is used to generate an original layout of fixed connections on the visual configuration interface based on the fixed configuration of the DSP device. The background senses the drag trajectory of the DSP algorithm module and automatically finds the pins to connect with the original layout, and enters the DSP collision avoidance unit. The DSP collision avoidance unit is used to record the dragged DSP algorithm module as the current dragged module, perform collision detection on the current dragged module, determine the collision status of the current dragged module, and if a collision exists, the module will automatically avoid the collision and enter the DSP automatic layout unit. The DSP automatic placement unit is used to update pins during the dragging process. The current dragging module is connected based on the updated pins. After the connection is completed, the depth-first search algorithm is used to automatically place the DSP algorithm module. The process of updating pins during dragging, with the current dragging module making connections based on the updated pins, is analyzed as follows: Intelligently find the modules to be connected in the original layout and record them as target connection modules; After completing collision detection and automatic avoidance, the shortest distance pin between each pin of the target connection module and the pin of the current dragging module is calculated based on the shortest distance pin calculation formula. The shortest distance pin is set to the connection state and the pin color is changed. At the same time, the shortest distance pin is recorded in the pin hash set. During real-time dragging, the module to be connected is updated, and the shortest distance pin of the module to be connected is updated based on the shortest distance pin calculation formula. The pin hash set records the pin update result each time, and the previous shortest distance pin is removed and the pin color is restored. When the drag ends, extract the shortest distance pin from the pin hash set, connect the currently dragged module to a certain original layout module corresponding to the shortest distance pin, and restore the pin color after the connection is completed. The DSP algorithm module refers to an independent functional unit in a digital signal processing system that encapsulates equalization, filtering, automatic mixing, compression, delay, acoustic echo cancellation, and background music management. Externally, it appears as a block with several input / output pins, configurable gain, frequency, threshold, time constant, and fixed algorithm logic.
2. The intelligent layout and interconnection system for DSP modules according to claim 1, characterized in that: The visual configuration interface includes: a left-side input module group layout, a middle-side processing module group layout, and a right-side output module group layout. The left-side input module group layout is a component bar, which displays selectable DSP algorithm modules in the form of a list or icons; The intermediate processing module group is laid out as a topology editing area, displaying the original layout with fixed connections; The layout of the right-side output module group is a combination of the DSP algorithm module and the original DSP algorithm layout, which sends the processed signal to the corresponding physical or network output channel.
3. The intelligent layout and interconnection system for DSP modules according to claim 2, characterized in that: The specific analysis process for generating a fixed-connection original layout on the visual configuration interface is as follows: The original layout includes the original layout of the local sound reinforcement mode, the original layout of the local-remote mode, and the original layout of the background music system mode; The original layout of the local sound reinforcement mode is: left input module, automatic mixing module, middle matrix mixing module, and right output module; The original layout of the local-remote mode is as follows: left input module, matrix mixing module, acoustic echo cancellation module, middle matrix mixing module, and right output module; The original layout of the background music system mode is as follows: left input module, background music management module, middle matrix mixing module, and right output module.
4. The intelligent layout and interconnection system for DSP modules according to claim 1, characterized in that: The collision detection of the current dragging module and the determination of its collision status are analyzed in the following steps: After completing the original layout, based on the background of the left input module group of the visual configuration interface, the drag trajectory of the DSP algorithm module is detected, and the DSP algorithm module is generated through the factory mode. The DSP algorithm module is the module dragged on the intermediate processing module group of the visual configuration interface. The DSP algorithm module is set as the currently dragged module. Set the pins of the currently dragged module to the connectable state, change the pin color, and record the module position of the currently dragged module before dragging in the hash set; Collision detection is performed as the currently dragged module moves. A breadth-first search algorithm is used to search for all modules that may collide. The algorithm checks whether the currently dragged module overlaps with modules in the original layout. Based on the detection results, the collision state of the currently dragged module is determined.
5. The intelligent layout and interconnection system for DSP modules according to claim 4, characterized in that: The module will automatically avoid collisions if one occurs. The specific analysis process is as follows: Based on the collision code, the style matrix of the current dragged module is intersected with the style matrices of each module in the original layout. The detection result means that if the style matrix of the current dragged module intersects with the style matrix of a certain module in the original layout, the collision state of the current dragged module is determined to be overlapping; otherwise, it is determined to be non-overlapping. If the collision state of the currently dragged module is overlapping, the module currently being collided with in the original layout is recorded as the colliding module, the original position of the colliding module is recorded in the hash set, the movement direction is determined based on the center point of the currently dragged module and the colliding module, and the movement distance is calculated based on the movement distance formula to complete the automatic module avoidance.
6. The intelligent layout and interconnection system for DSP modules according to claim 5, characterized in that: The automatic collision avoidance mechanism also includes: Extract the collision module recorded in the hash table and perform collision detection again with the currently dragged module. If a collision module marked in the hash table still overlaps with the currently dragged module, the currently dragged module will automatically perform module avoidance, and the collision feedback effect of the collision module will remain unchanged. Otherwise, restore the collision module to its original position and remove the collision module from the hash set.
7. The intelligent layout and interconnection system for DSP modules according to claim 1, characterized in that: The process of automatically laying out DSP algorithm modules using a depth-first search algorithm is as follows: After the connection is completed, the automatic layout proceeds from left to right. Starting from each pin of each left input module, a depth-first search algorithm is used to traverse all reachable connection paths between the left input module and the middle matrix mixing module. The number of modules passed through each path is counted, and the path containing the most modules is found. The maximum number of module levels corresponding to this path is used as the layout benchmark. Based on the maximum number of module levels, divide the X-axis direction into several equally spaced layout grids to obtain a uniform horizontal distance between module levels. Place each left input module and the middle matrix mixing module in the corresponding X-axis grid position according to the level index of their pins to complete the left-to-right alignment layout between the left input module and the middle matrix mixing module. A depth-first search algorithm was used to align the middle matrix mixing module and the right output module from left to right.
8. The intelligent layout and interconnection system for DSP modules according to claim 4, characterized in that: The step of performing collision detection on the current dragging module and determining the collision state of the current dragging module further includes: If multiple DSP algorithm modules are copied and pasted, these modules are treated as a drag-and-drop module group, which is then dragged and arranged. After the copy operation is triggered, the modules in the dragged module group are sorted from left to right and from top to bottom. Based on the sorting result, the modules located at the top left and top right are extracted, and their pins are searched for external optimal pins and matched with the pins of the target connected module. When the dragging ends, the connection relationship between modules is first established within the dragging module group according to the sorting result. Then, the dragging module group is automatically connected to the external optimal pin to complete the connection between the dragging module group and the original layout. After the internal and external connections are completed, the automatic layout process is triggered.
9. A method for intelligent layout and interconnection of DSP modules, applied to the intelligent layout and interconnection system of DSP modules as described in any one of claims 1-8, characterized in that: include: S1. Based on the fixed configuration of the DSP device, a fixed-connection original layout is generated on the visual configuration interface. The background senses the drag trajectory of the DSP algorithm module and automatically finds the pins to connect with the original layout, then proceeds to S2. S2. Record the dragged DSP algorithm module as the current dragged module, perform collision detection on the current dragged module, determine the collision status of the current dragged module, and if there is a collision, the module will automatically avoid it and proceed to S3. S3. Update the pins during the dragging process. The currently dragged module is connected based on the updated pins. After the connection is completed, the DSP algorithm module is automatically laid out using the depth-first search algorithm.
Citation Information
Patent Citations
A computing system based on DSP chip array
CN114185599B
A Signal Processing SIP Design Circuit Based on Multi-DSP
CN118095193B
Method, system, and computer program product for implementing routing aware placement or floor planning for an electronic design
US10515177B1